single.html 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. ---
  2. layout: default
  3. ---
  4. {% if page.header.overlay_color or page.header.overlay_image or page.header.image %}
  5. {% include page__hero.html %}
  6. {% elsif page.header.video.id and page.header.video.provider %}
  7. {% include page__hero_video.html %}
  8. {% endif %}
  9. {% if page.url != "/" and site.breadcrumbs %}
  10. {% unless paginator %}
  11. {% include breadcrumbs.html %}
  12. {% endunless %}
  13. {% endif %}
  14. <div id="main" role="main">
  15. {% include sidebar.html %}
  16. <article class="page" itemscope itemtype="https://schema.org/CreativeWork">
  17. {% if page.title %}<meta itemprop="headline" content="{{ page.title | markdownify | strip_html | strip_newlines | escape_once }}">{% endif %}
  18. {% if page.excerpt %}<meta itemprop="description" content="{{ page.excerpt | markdownify | strip_html | strip_newlines | escape_once }}">{% endif %}
  19. {% if page.date %}<meta itemprop="datePublished" content="{{ page.date | date_to_xmlschema }}">{% endif %}
  20. {% if page.last_modified_at %}<meta itemprop="dateModified" content="{{ page.last_modified_at | date_to_xmlschema }}">{% endif %}
  21. <div class="page__inner-wrap">
  22. {% unless page.header.overlay_color or page.header.overlay_image %}
  23. <header>
  24. {% if page.title %}<h1 id="page-title" class="page__title" itemprop="headline">{{ page.title | markdownify | remove: "<p>" | remove: "</p>" }}</h1>{% endif %}
  25. {% include page__meta.html %}
  26. </header>
  27. {% endunless %}
  28. <section class="page__content" itemprop="text">
  29. {% if page.toc %}
  30. <aside class="sidebar__right {% if page.toc_sticky %}sticky{% endif %}">
  31. <nav class="toc">
  32. <header><h4 class="nav__title"><i class="fas fa-{{ page.toc_icon | default: 'file-alt' }}"></i> {{ page.toc_label | default: site.data.ui-text[site.locale].toc_label | default: "On this page" }}</h4></header>
  33. {% include toc.html sanitize=true html=content h_min=1 h_max=6 class="toc__menu" skip_no_ids=true %}
  34. </nav>
  35. </aside>
  36. {% endif %}
  37. <hr>
  38. {% assign split_path = page.path | split: "/" %}
  39. {% assign locale = split_path[1] %}
  40. {% for link in site.data.navigation[locale].bottom %}
  41. {% if link.url contains 'http' %}
  42. {% assign domain = '' %}
  43. {% else %}
  44. {% assign domain = site.url | append: site.baseurl %}
  45. {% endif %}
  46. <div class ="notice"><b>{{ link.title }}</b></div>
  47. {% endfor %}
  48. <hr>
  49. {{ content }}
  50. {% if page.link %}<div><a href="{{ page.link }}" class="btn btn--primary">{{ site.data.ui-text[site.locale].ext_link_label | default: "Direct Link" }}</a></div>{% endif %}
  51. </section>
  52. <footer class="page__meta">
  53. {% if site.data.ui-text[site.locale].meta_label %}
  54. <h4 class="page__meta-title">{{ site.data.ui-text[site.locale].meta_label }}</h4>
  55. {% endif %}
  56. {% include page__taxonomy.html %}
  57. {% include page__date.html %}
  58. </footer>
  59. {% if page.share %}{% include social-share.html %}{% endif %}
  60. {% include post_pagination.html %}
  61. </div>
  62. {% if jekyll.environment == 'production' and site.comments.provider and page.comments %}
  63. {% include comments.html %}
  64. {% endif %}
  65. </article>
  66. {% comment %}<!-- only show related on a post page when `related: true` -->{% endcomment %}
  67. {% if page.id and page.related and site.related_posts.size > 0 %}
  68. <div class="page__related">
  69. <h4 class="page__related-title">{{ site.data.ui-text[site.locale].related_label | default: "You May Also Enjoy" }}</h4>
  70. <div class="grid__wrapper">
  71. {% for post in site.related_posts limit:4 %}
  72. {% include archive-single.html type="grid" %}
  73. {% endfor %}
  74. </div>
  75. </div>
  76. {% comment %}<!-- otherwise show recent posts if no related when `related: true` -->{% endcomment %}
  77. {% elsif page.id and page.related %}
  78. <div class="page__related">
  79. <h4 class="page__related-title">{{ site.data.ui-text[site.locale].related_label | default: "You May Also Enjoy" }}</h4>
  80. <div class="grid__wrapper">
  81. {% for post in site.posts limit:4 %}
  82. {% if post.id == page.id %}
  83. {% continue %}
  84. {% endif %}
  85. {% include archive-single.html type="grid" %}
  86. {% endfor %}
  87. </div>
  88. </div>
  89. {% endif %}
  90. </div>