<article id="post-<?php the_ID(); ?>" <?php post_class( 'clearfix' ); ?>>
  <?php if ( is_singular() ): ?>
    <?php the_content(); ?>
    <p><?php the_tags(); ?></p>
    <?php wp_link_pages( array( 'before' => '<nav class="page-links">Seiten:', 'after' => '</nav>' ) ); ?>
  <?php else: ?>
    <a class="h h-box h-box-blaugelb<?php if ( ! has_post_thumbnail() ): ?> h-box-blaugelb-bildlos<?php endif; ?>" href="<?php echo esc_url( get_permalink() ); ?>">
      <?php the_post_thumbnail( 'gallery-thumb', [ 'alt' => '' ] ); ?>
      <?php if ( get_the_title() ): ?>
      <header class="wrap">
        <h3><?php the_title(); ?></h3>
      </header>
      <?php endif; ?>
    </a>
    <?php has_excerpt() ? the_excerpt() : the_content(); ?>
  <?php endif; ?>
</article>
