zh_single.html 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. ---
  2. layout: zh_base
  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: "%B %d, %Y" }}">{% endif %}
  20. {% if page.last_modified_at %}<meta itemprop="dateModified" content="{{ page.last_modified_at | date: "%B %d, %Y" }}">{% 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. </header>
  26. {% endunless %}
  27. <section class="page__content" itemprop="text">
  28. {% if page.toc %}
  29. <aside class="sidebar__right {% if page.toc_sticky %}sticky{% endif %}">
  30. <nav class="toc">
  31. <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>
  32. {% include toc.html sanitize=true html=content h_min=1 h_max=6 class="toc__menu" %}
  33. </nav>
  34. </aside>
  35. {% endif %}
  36. {{ content }}
  37. {% 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 %}
  38. </section>
  39. <footer class="page__meta">
  40. {% if site.data.ui-text[site.locale].meta_label %}
  41. <h4 class="page__meta-title">{{ site.data.ui-text[site.locale].meta_label }}</h4>
  42. {% endif %}
  43. {% include page__taxonomy.html %}
  44. {% if page.last_modified_at %}
  45. <p class="page__date"><strong><i class="fas fa-fw fa-calendar-alt" aria-hidden="true"></i> {{ site.data.ui-text[site.locale].date_label | default: "Updated:" }}</strong> <time datetime="{{ page.last_modified_at | date: "%Y-%m-%d" }}">{{ page.last_modified_at | date: "%B %d, %Y" }}</time></p>
  46. {% elsif page.date %}
  47. <p class="page__date"><strong><i class="fas fa-fw fa-calendar-alt" aria-hidden="true"></i> {{ site.data.ui-text[site.locale].date_label | default: "Updated:" }}</strong> <time datetime="{{ page.date | date_to_xmlschema }}">{{ page.date | date: "%B %d, %Y" }}</time></p>
  48. {% endif %}
  49. </footer>
  50. {% include post_pagination.html %}
  51. </div>
  52. {% if jekyll.environment == 'production' and site.comments.provider and page.comments %}
  53. {% include comments.html %}
  54. {% endif %}
  55. </article>
  56. </div>