page.swig 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. {% extends '_layout.swig' %}
  2. {% import '_macro/sidebar.swig' as sidebar_template with context %}
  3. {% block title %}
  4. {%- set page_title_suffix = ' | ' + title %}
  5. {%- if page.type === 'categories' and not page.title %}
  6. {{- __('title.category') + page_title_suffix }}
  7. {%- elif page.type === 'tags' and not page.title %}
  8. {{- __('title.tag') + page_title_suffix }}
  9. {%- elif page.type === 'schedule' and not page.title %}
  10. {{- __('title.schedule') + page_title_suffix }}
  11. {%- else %}
  12. {{- page.title + page_title_suffix }}
  13. {%- endif %}
  14. {% endblock %}
  15. {% block class %}page posts-expand{% endblock %}
  16. {% block content %}
  17. {##################}
  18. {### PAGE BLOCK ###}
  19. {##################}
  20. <div class="post-block" lang="{{ page.lang or config.language }}">
  21. {% include '_partials/page/page-header.swig' %}
  22. {#################}
  23. {### PAGE BODY ###}
  24. {#################}
  25. <div class="post-body{%- if page.direction and page.direction.toLowerCase() === 'rtl' %} rtl{%- endif %}">
  26. {%- if page.type === 'tags' %}
  27. <div class="tag-cloud">
  28. <div class="tag-cloud-title">
  29. {{ _p('counter.tag_cloud', site.tags.length) }}
  30. </div>
  31. <div class="tag-cloud-tags">
  32. {{ tagcloud({
  33. min_font : theme.tagcloud.min,
  34. max_font : theme.tagcloud.max,
  35. amount : theme.tagcloud.amount,
  36. color : true,
  37. start_color: theme.tagcloud.start,
  38. end_color : theme.tagcloud.end})
  39. }}
  40. </div>
  41. </div>
  42. {% elif page.type === 'categories' %}
  43. <div class="category-all-page">
  44. <div class="category-all-title">
  45. {{ _p('counter.categories', site.categories.length) }}
  46. </div>
  47. <div class="category-all">
  48. {{ list_categories() }}
  49. </div>
  50. </div>
  51. {% elif page.type === 'schedule' %}
  52. <div class="event-list">
  53. </div>
  54. {% include '_scripts/pages/schedule.swig' %}
  55. {% else %}
  56. {{ page.content }}
  57. {%- endif %}
  58. </div>
  59. {#####################}
  60. {### END PAGE BODY ###}
  61. {#####################}
  62. </div>
  63. {% include '_partials/page/breadcrumb.swig' %}
  64. {######################}
  65. {### END PAGE BLOCK ###}
  66. {######################}
  67. {% endblock %}
  68. {% block sidebar %}
  69. {{ sidebar_template.render(true) }}
  70. {% endblock %}