blob: 1528e725aa53f8ec9e74fb6e4fc6b489da314db7 (
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
|
<header class="container mt-sm-5 mt-4 mb-4 mt-xs-1">
<div class="row">
<div class="col-sm-4 col-12 text-sm-right text-center pt-sm-4">
<a href="/" class="text-decoration-none">
<img id="home-image" class="rounded-circle"
{{ if (and (isset .Site.Params "home_image") (fileExists (printf "static/%s" (strings.TrimPrefix "/" .Site.Params.home_image)))) }}
{{ if hasPrefix .Site.Params.home_image "/" }}
src="{{ .Site.Params.home_image }}"
{{ else }}
src="{{ printf "/%s" .Site.Params.home_image }}"
{{ end }}
{{ else }}
src="/images/avatar.png"
{{ end }}
/>
</a>
</div>
<div class="col-sm-8 col-12 text-sm-left text-center">
<h2 class="m-0 mb-2 mt-4">
<a href="/" class="text-decoration-none">
{{ if isset .Site.Params "header_title" }}
{{ .Site.Params.header_title }}
{{ else }}
Your Name
{{ end }}
</a>
</h2>
<p class="text-muted mb-1">
{{ if isset .Site.Params "header_subtitle" }}
{{ .Site.Params.header_subtitle }}
{{ else }}
Your Subtitle Text
{{ end }}
</p>
<ul id="nav-links" class="list-inline mb-2">
{{ $currentPage := . }}
{{ range .Site.Menus.main }}
<li class="list-inline-item">
<a class="badge badge-white {{if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }}active{{end}}" href="{{ .URL }}" title="{{ .Title }}">{{ .Name }}</a>
</li>
{{ end }}
</ul>
<ul id="nav-social" class="list-inline">
{{ range .Site.Params.social }}
<li class="list-inline-item mr-3">
<a href="{{ .href }}" target="_blank">
<i class="{{ .fa_icon }} text-muted"></i>
</a>
</li>
{{ end }}
</ul>
</div>
</div>
<hr />
</header>
|