1. <?php
  2. /*
  3. * @template Mystique
  4. * @revised December 20, 2011
  5. * @author digitalnature, http://digitalnature.eu
  6. * @license GPL, http://www.opensource.org/licenses/gpl-license
  7. */
  8. // General Archive template.
  9. // There are quite a few templates that can override this one: http://codex.wordpress.org/Template_Hierarchy
  10. ?>
  11. <?php atom()->template('header'); ?>
  12. <!-- main content: primary + sidebar(s) -->
  13. <div id="mask-3" class="clear-block">
  14. <div id="mask-2">
  15. <div id="mask-1">
  16. <!-- primary content -->
  17. <div id="primary-content">
  18. <div class="blocks clear-block">
  19. <?php if(is_category()): ?>
  20. <h1 class="title archive-category"><?php atom()->term->Title(); ?></h1>
  21. <?php if(atom()->term->getDescription()): ?>
  22. <div class="large">
  23. <?php
  24. $category_description = category_description();
  25. if ( ! empty( $category_description ) ) {
  26. echo apply_filters( 'category_archive_meta', '<div class="category-archive-meta">' . $category_description . '</div>' );
  27. }
  28. ?>
  29. <p><em><?php atom()->term->Description(); ?></em></p>
  30. </div>
  31. <div class="divider"></div>
  32. <?php endif; ?>
  33. <?php elseif(is_tag()): ?>
  34. <h1 class="title"><?php atom()->te('Posts tagged %s', sprintf('<span class="alt">%s</span>', atom()->term->getTitle())); ?></h1>
  35. <?php elseif(is_day()): ?>
  36. <h1 class="title"><?php atom()->te('Archive for %s', sprintf('<span class="alt">%s</span>', get_the_date())); ?></h1>
  37. <?php elseif(is_month()): ?>
  38. <h1 class="title"><?php atom()->te('Archive for %s', sprintf('<span class="alt">%s</span>', get_the_time('F, Y'))); ?></h1>
  39. <?php elseif(is_year()): ?>
  40. <h1 class="title"><?php atom()->te('Archive for year %s', sprintf('<span class="alt">%s</span>', get_the_time('Y'))); ?></h1>
  41. <?php else: ?>
  42. <h1 class="title"><?php atom()->te('Blog Archives'); ?></h1>
  43. <?php endif; ?>
  44. <?php atom()->action('before_primary'); ?>
  45. <?php if(have_posts()): ?>
  46. <div class="posts clear-block">
  47. <?php while(have_posts()) atom()->template('teaser'); ?>
  48. </div>
  49. <?php atom()->pagination(); ?>
  50. <?php else: ?>
  51. <?php if(is_category()): ?>
  52. <h1 class="title"> <?php atom()->te("There aren't any posts in the %s category yet :(", atom()->term->getTitle()); ?></h1>
  53. <?php elseif(is_date()): ?>
  54. <h1 class="title"> <?php atom()->te("There aren't any posts within this date :("); ?> </h1>
  55. <?php else: ?>
  56. <h1 class="title"><?php atom()->te('Nothing here :('); ?></h1>
  57. <?php endif; ?>
  58. <?php endif; ?>
  59. <?php atom()->action('after_primary'); ?>
  60. </div>
  61. </div>
  62. <!-- /primary content -->
  63. <?php atom()->template('sidebar'); ?>
  64. </div>
  65. </div>
  66. </div>
  67. <!-- /main content -->
  68. <?php atom()->template('footer'); ?>