|
| 1 | +--- |
| 2 | +layout: default |
| 3 | +refactor: true |
| 4 | +panel_includes: |
| 5 | + - toc |
| 6 | +tail_includes: |
| 7 | + - related-posts |
| 8 | + - post-nav |
| 9 | + - comments |
| 10 | +--- |
| 11 | + |
| 12 | +{% include lang.html %} |
| 13 | + |
| 14 | +<article class="px-1"> |
| 15 | + <header> |
| 16 | + <h1 data-toc-skip>{{ page.title }}</h1> |
| 17 | + {% if page.description %} |
| 18 | + <p class="post-desc fw-light mb-4">{{ page.description }}</p> |
| 19 | + {% endif %} |
| 20 | + |
| 21 | + <div class="post-meta text-muted"> |
| 22 | + <!-- published date --> |
| 23 | + <span> |
| 24 | + {{ site.data.locales[lang].post.posted }} |
| 25 | + {% include datetime.html date=page.date tooltip=true lang=lang %} |
| 26 | + </span> |
| 27 | + |
| 28 | + <!-- lastmod date --> |
| 29 | + {% if page.last_modified_at and page.last_modified_at != page.date %} |
| 30 | + <span> |
| 31 | + {{ site.data.locales[lang].post.updated }} |
| 32 | + {% include datetime.html date=page.last_modified_at tooltip=true lang=lang %} |
| 33 | + </span> |
| 34 | + {% endif %} |
| 35 | + |
| 36 | + {% if page.image and page.image.show_in_post != false %} |
| 37 | + {% capture src %}src="{{ page.image.path | default: page.image }}"{% endcapture %} |
| 38 | + {% capture class %}class="preview-img{% if page.image.no_bg %}{{ ' no-bg' }}{% endif %}"{% endcapture %} |
| 39 | + {% capture alt %}alt="{{ page.image.alt | xml_escape | default: "Preview Image" }}"{% endcapture %} |
| 40 | + |
| 41 | + {% if page.image.lqip %} |
| 42 | + {%- capture lqip -%}lqip="{{ page.image.lqip }}"{%- endcapture -%} |
| 43 | + {% endif %} |
| 44 | + |
| 45 | + <div class="mt-3 mb-3"> |
| 46 | + <img {{ src }} {{ class }} {{ alt }} w="1200" h="630" {{ lqip }}> |
| 47 | + {%- if page.image.alt -%} |
| 48 | + <figcaption class="text-center pt-2 pb-2">{{ page.image.alt }}</figcaption> |
| 49 | + {%- endif -%} |
| 50 | + </div> |
| 51 | + {% endif %} |
| 52 | + |
| 53 | + <div class="d-flex justify-content-between"> |
| 54 | + <!-- author(s) --> |
| 55 | + <span> |
| 56 | + {% if page.author %} |
| 57 | + {% assign authors = page.author %} |
| 58 | + {% elsif page.authors %} |
| 59 | + {% assign authors = page.authors %} |
| 60 | + {% endif %} |
| 61 | + |
| 62 | + {{ site.data.locales[lang].post.written_by }} |
| 63 | + |
| 64 | + <em> |
| 65 | + {% if authors %} |
| 66 | + {% for author in authors %} |
| 67 | + {% if site.data.authors[author].url -%} |
| 68 | + <a href="{{ site.data.authors[author].url }}">{{ site.data.authors[author].name }}</a> |
| 69 | + {%- else -%} |
| 70 | + {{ site.data.authors[author].name }} |
| 71 | + {%- endif %} |
| 72 | + {% unless forloop.last %}{{ '</em>, <em>' }}{% endunless %} |
| 73 | + {% endfor %} |
| 74 | + {% else %} |
| 75 | + <a href="{{ site.social.links[0] }}">{{ site.social.name }}</a> |
| 76 | + {% endif %} |
| 77 | + </em> |
| 78 | + </span> |
| 79 | + |
| 80 | + <div> |
| 81 | + <!-- pageviews --> |
| 82 | + {% if site.pageviews.provider and site.analytics[site.pageviews.provider].id %} |
| 83 | + <span> |
| 84 | + <em id="pageviews"> |
| 85 | + <i class="fas fa-spinner fa-spin small"></i> |
| 86 | + </em> |
| 87 | + {{ site.data.locales[lang].post.pageview_measure }} |
| 88 | + </span> |
| 89 | + {% endif %} |
| 90 | + |
| 91 | + <!-- read time --> |
| 92 | + {% include read-time.html content=content prompt=true lang=lang %} |
| 93 | + </div> |
| 94 | + </div> |
| 95 | + </div> |
| 96 | + </header> |
| 97 | + |
| 98 | + <div class="content"> |
| 99 | + {{ content }} |
| 100 | + </div> |
| 101 | + |
| 102 | + <div class="post-tail-wrapper text-muted"> |
| 103 | + <!-- categories --> |
| 104 | + {% if page.categories.size > 0 %} |
| 105 | + <div class="post-meta mb-3"> |
| 106 | + <i class="far fa-folder-open fa-fw me-1"></i> |
| 107 | + {% for category in page.categories %} |
| 108 | + <a href="{{ site.baseurl }}/categories/{{ category | slugify | url_encode }}/">{{ category }}</a> |
| 109 | + {%- unless forloop.last -%},{%- endunless -%} |
| 110 | + {% endfor %} |
| 111 | + </div> |
| 112 | + {% endif %} |
| 113 | + |
| 114 | + <!-- tags --> |
| 115 | + {% if page.tags.size > 0 %} |
| 116 | + <div class="post-tags"> |
| 117 | + <i class="fa fa-tags fa-fw me-1"></i> |
| 118 | + {% for tag in page.tags %} |
| 119 | + <a |
| 120 | + href="{{ site.baseurl }}/tags/{{ tag | slugify | url_encode }}/" |
| 121 | + class="post-tag no-text-decoration" |
| 122 | + > |
| 123 | + {{- tag -}} |
| 124 | + </a> |
| 125 | + {% endfor %} |
| 126 | + </div> |
| 127 | + {% endif %} |
| 128 | + |
| 129 | + <div |
| 130 | + class=" |
| 131 | + post-tail-bottom |
| 132 | + d-flex justify-content-between align-items-center mt-5 pb-2 |
| 133 | + " |
| 134 | + > |
| 135 | + <div class="license-wrapper"> |
| 136 | + {% if site.data.locales[lang].copyright.license.template %} |
| 137 | + {% capture _replacement %} |
| 138 | + <a href="{{ site.data.locales[lang].copyright.license.link }}"> |
| 139 | + {{ site.data.locales[lang].copyright.license.name }} |
| 140 | + </a> |
| 141 | + {% endcapture %} |
| 142 | + |
| 143 | + {{ site.data.locales[lang].copyright.license.template | replace: ':LICENSE_NAME', _replacement }} |
| 144 | + {% endif %} |
| 145 | + </div> |
| 146 | + |
| 147 | + {% include post-sharing.html lang=lang %} |
| 148 | + </div> |
| 149 | + <!-- .post-tail-bottom --> |
| 150 | + </div> |
| 151 | + <!-- div.post-tail-wrapper --> |
| 152 | +</article> |
0 commit comments