summaryrefslogtreecommitdiff
path: root/_includes/article-footer.html
blob: 33c3742e83750a9a2af395a25765ed0ad7ed3964 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{%- include snippets/assign.html
  target=site.data.variables.default.page.show_author_profile
  source0=layout.show_author_profile source1=page.show_author_profile -%}
{%- assign _show_author_profile = __return -%}

{%- include snippets/assign.html
  target=site.data.variables.default.page.show_subscribe
  source0=layout.show_subscribe source1=page.show_subscribe -%}
{%- assign _show_subscribe = __return -%}

{%- include snippets/assign.html
  target=site.data.variables.default.page.license
  source0=layout.license source1=page.license -%}
{%- assign _license = __return -%}

<footer class="article__footer">
  {%- if page.modify_date -%}
    {%- include snippets/get-locale-string.html key='ARTICLE_DATE_FORMAT' -%}
    {%- assign _locale_date_format = __return -%}

    {%- include snippets/get-locale-string.html key='LAST_UPDATED' -%}
    {%- assign _locale_last_update = __return -%}
    <span>{{ _locale_last_update }}
      <time itemprop="dateModified" datetime="{{ page.modify_date | date_to_xmlschema }}">{{ page.modify_date | date: _locale_date_format }}</time>
    </span>
  {%- elsif page.date -%}
    <meta itemprop="dateModified" content="{{ page.date | date_to_xmlschema }}">
  {%- endif -%}

  {%- include article/footer/custom.html -%}

  {%- if _show_author_profile -%}
    {%- if page.author -%}
      {%- assign _author = site.data.authors[page.author] -%}
    {%- else -%}
      {%- assign _author = site.author -%}
    {%- endif -%}
    {%- include article/footer/author-profile.html author=_author -%}
  {%- endif -%}

  {%- if _show_subscribe -%}
    <div class="article__subscribe">{%- include article/footer/subscribe.html -%}</div>
  {%- endif -%}

  {%- if _license != false -%}
    {%- assign _data_license = site.data.licenses-%}
    {%- if site.license -%}
      {%- assign _license_data = _data_license[site.license] -%}
    {%- endif -%}
    {%- if _license != true -%}
      {%- assign _license_data = _data_license[_license] -%}
    {%- endif -%}
    <div class="article__license">{%- include article/footer/license.html license=_license_data -%}</div>
  {%- endif -%}
</footer>