aboutsummaryrefslogtreecommitdiffstats
path: root/layouts/partials/header.html
blob: 9b2aaab7472f6362ad6fbe448b62f3b618e874b5 (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
{{ if .Site.Author.gravataremail }}
    {{ .Scratch.Set "authorPicture" (printf "//www.gravatar.com/avatar/%s" (urlize (md5 (.Site.Author.gravataremail )))) }}
{{ else if .Site.Author.picture }}
    {{ .Scratch.Set "authorPicture" (absURL .Site.Author.picture) }}
{{ end }}

<nav id="sidebar" class="fl w-25-ns bg-gray vh-100-ns">
    <div class="tc pv4">
        <a href="/#about" class="white link">
            {{ with ($.Scratch.Get "authorPicture") }}
            <img class="br-100" src="{{ . }}{{ if in . "//www.gravatar.com/avatar/" }}?s=110{{ end }}"/>
            {{ end }}
            <h3 class="f3">
                {{ .Site.Author.name }}
            </h3>
        </a>
    </div>
    <ul class="list bd ba">
        {{ range .Site.Menus.main }}
        <li class="ma2 dib">
            <a class="link white db grow" href="{{ .URL | relLangURL }}" title="{{ .Title }}">
                {{ .Pre }} {{ .Name }}</a>
        </li>
        {{ end }}
    </ul>
    <ul class="list">
        {{ range .Site.Menus.links }}
        <li class="pv2">
            <a class="link white db grow" href="{{ .URL | relLangURL }}" title="{{ .Title }}">
                {{ .Pre }} {{ .Name }}</a>
        </li>
        {{ end }}
    </ul>

    <ul class="list">
        {{ range .Site.Menus.misc }}
        <li class="pv2">
            <a class="link white db grow" href="{{ .URL | relLangURL }}" title="{{ .Title }}">
                {{ .Pre }} {{ .Name }}</a>
        </li>
        {{ end }}
    </ul>

</nav>