<?php get_header(); ?>

<div id="chemical_content">

<div id="chemical_post">

<?php
// This also populates the iconsize for the next line
$attachment_link = get_the_attachment_link($post->ID, true, array(450, 800));
// This lets us style narrow icons specially
$_post = &get_post($post->ID); $classname = ($_post->iconsize[0] <= 128 ? 'small' : '') . 'attachment';
?>

<?php if(have_posts()) : ?>

<?php while(have_posts()) : the_post(); ?>

<div class="post_meta" id="post-<?php the_ID(); ?>">

<span class="date"><?php the_time('d. F Y') ?></span>

<h1><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h1>

<div class="div_line">
<?php the_author_posts_link(); ?> in <?php the_category(', ') ?> <?php edit_post_link('Edit', '&#124; ', ''); ?>
</div>

<div class="post_content" id="<?php echo $classname; ?>">
<?php echo $attachment_link; ?><br /><p>Dies ist ein Bild zu <?php the_title(); ?></p>
</div>

</div>

<div class="clear_content"></div>

<?php endwhile; ?>

<div class="clear_content"></div>

<?php else: ?>

<h3>Die Anlage wurde leider gelöscht.</h3>

<?php endif; ?>

</div>

<?php get_sidebar(); ?>

</div>

<?php get_dynamic_sidebar(); ?>

<?php get_footer(); ?>