-
Notifications
You must be signed in to change notification settings - Fork 722
/
Copy patharticle-header.html
executable file
·82 lines (71 loc) · 3.38 KB
/
article-header.html
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
{%- include snippets/get-article-title.html article=include.article-%}
{%- assign _article_title = __return -%}
{%- include snippets/get-article-subtitle.html article=include.article-%}
{%- assign _article_subtitle = __return -%}
{%- if include.html != false -%}
{%- include snippets/assign.html
target=site.data.variables.default.page.show_title
source0=layout.show_title source1=include.article.show_title -%}
{%- assign _show_title = __return -%}
{%- include snippets/assign.html
target=site.data.variables.default.page.show_subtitle
source0=layout.show_subtitle source1=include.article.show_subtitle -%}
{%- assign _show_subtitle = __return -%}
{%- if _show_subtitle -%}
{%- assign _subtitle_class = _subtitle_class | append: 'have_subtitle' -%}
{%- endif -%}
{%- include snippets/assign.html
target=site.data.variables.default.page.show_nav
source0=layout.show_nav source1=include.article.show_nav -%}
{%- assign _show_nav = __return -%}
{%- include snippets/assign.html
target=site.data.variables.default.page.show_edit_on_github
source0=layout.show_edit_on_github source1=include.article.show_edit_on_github -%}
{%- assign _show_edit_on_github = __return -%}
{%- assign _show_author = include.article.author -%}
{%- assign _show_nav = include.article.show_nav -%}
{%- if _show_title or _show_edit_on_github -%}
<div class="article__header">
{%- if _show_author -%}
<div class="header-author">{%- include article-info-author.html article=page -%}</div>
{%- endif -%}
{%- if _show_nav -%}
<div class="header-nav">{%- include article-nav.html article=page -%}</div>
{%- endif -%}
{%- if _show_title -%}
<header class="main-docs {{ _subtitle_class }}">
<h1>{{ _article_title }}</h1>
{%- if _show_subtitle -%}
<div class="top-subtitle mont">{{ _article_subtitle }}</div>
{%- endif -%}
</header>
{%- endif -%}
{%- if _show_edit_on_github -%}
{%- if site.repository and site.repository_tree -%}
{%- include snippets/is_collection.html page=include.article -%}
{%- assign _is_article_collection = __return -%}
{%- include snippets/get-locale-string.html key='POST_ON_GITHUB' -%}
{%- assign _locale_post_on_github = __return -%}
{%- if _is_article_collection -%}
{%- include snippets/prepend-path.html path=include.article.path prepend_path=site.collections_dir -%}
{%- assign _article_path = __return -%}
{%- else -%}
{%- assign _article_path = include.article.path -%}
{%- endif -%}
{%- assign _github_path = site.repository | append: '/tree/' | append: site.repository_tree | append: '/' | append: _article_path | replace:'//','/' -%}
<span class="split-space"> </span>
<a class="edit-on-github"
title="{{ _locale_post_on_github }}"
href="https://github.com/{{ _github_path }}">
<i class="far fa-edit"></i></a>
{%- endif -%}
{%- endif -%}
</div>
{%- else -%}
<header style="display:none;"><h1>{{ _article_title }}</h1></header>
{%- endif -%}
{%- endif -%}
{%- if include.semantic != false -%}
<meta itemprop="headline" content="{{ _article_title }}">
{%- endif -%}