forked from daattali/beautiful-jekyll
-
Notifications
You must be signed in to change notification settings - Fork 0
/
header.html
96 lines (88 loc) · 3.33 KB
/
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<!-- TODO this file has become a mess, refactor it -->
{% assign date_format = site.date_format | default: "%B %-d, %Y" %}
{% if page.cover-img or page.title %}
{% if page.cover-img %}
<div id="header-big-imgs" data-num-img={% if page.cover-img.first %}{{ page.cover-img.size }}{% else %}1{% endif %}
{% for bigimg in page.cover-img %}
{% assign imgnum = forloop.index %}
{% for imginfo in bigimg %}
{% if imginfo[0] %}
data-img-src-{{ imgnum }}="{{ imginfo[0] | absolute_url }}"
data-img-desc-{{ imgnum }}="{{ imginfo[1] }}"
{% else %}
data-img-src-{{ imgnum }}="{{ imginfo | absolute_url }}"
{% endif %}
{% endfor %}
{% endfor %}
></div>
{% endif %}
<header class="header-section {% if page.cover-img %}has-img{% endif %}">
{% if page.cover-img %}
<div class="big-img intro-header">
<div class="container-md">
<div class="row">
<div class="col-xl-8 offset-xl-2 col-lg-10 offset-lg-1">
<div class="{{ include.type }}-heading">
<h1>{% if page.title %}{{ page.title | strip_html }}{% else %}<br/>{% endif %}</h1>
{% if page.subtitle %}
{% if include.type == "page" %}
<hr class="small">
<span class="{{ include.type }}-subheading">{{ page.subtitle | strip_html }}</span>
{% else %}
<h2 class="{{ include.type }}-subheading">{{ page.subtitle | strip_html }}</h2>
{% endif %}
{% endif %}
{% if include.type == "post" %}
<span class="post-meta">Posted on {{ page.date | date: date_format }}</span>
{% if page.last-updated %}
<span class="post-meta">
<span class="d-none d-md-inline middot">·</span>
Last updated {{ page.last-updated | date: date_format }}
</span>
{% endif %}
{% if page.readtime %}
{% include readtime.html %}
{% endif %}
{% endif %}
</div>
</div>
</div>
</div>
<span class='img-desc'></span>
</div>
{% endif %}
<div class="intro-header no-img">
<div class="container-md">
<div class="row">
<div class="col-xl-8 offset-xl-2 col-lg-10 offset-lg-1">
<div class="{{ include.type }}-heading">
<h1>{% if page.title %}{{ page.title | strip_html }}{% else %}<br/>{% endif %}</h1>
{% if page.subtitle %}
{% if include.type == "page" %}
<hr class="small">
<span class="{{ include.type }}-subheading">{{ page.subtitle | strip_html }}</span>
{% else %}
<h2 class="{{ include.type }}-subheading">{{ page.subtitle | strip_html }}</h2>
{% endif %}
{% endif %}
{% if include.type == "post" %}
<span class="post-meta">Posted on {{ page.date | date: date_format }}</span>
{% if page.last-updated %}
<span class="post-meta">
<span class="d-none d-md-inline middot">·</span>
Last updated {{ page.last-updated | date: date_format }}
</span>
{% endif %}
{% if page.readtime %}
{% include readtime.html %}
{% endif %}
{% endif %}
</div>
</div>
</div>
</div>
</div>
</header>
{% else %}
<div class="intro-header"></div>
{% endif %}