Welcome to mirror list, hosted at ThFree Co, Russian Federation.

header.html « partials « layouts - github.com/urjaacharya/redgood.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8d0719b798977e99c7ce257086d0ba81958fae2c (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
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
{{ if .IsHome }}
<header class="home-page-header">
  <div class="header-image-container">
    <div class="header-image">
      <img
        src="{{ .Site.Params.about.profileImage | relURL }}"
        alt="profile image of {{ .Site.Params.author }}"
      />
    </div>
  </div>
  <div class="header-info">
    <h1 class="main-title">{{- .Site.Title -}}</h1>
    <p class="about-narrative">
      {{ .Site.Params.about.narrative | markdownify }}
    </p>
    {{ $width := mul (len .Site.Params.social) 2 }}
    <div class="social-info" style="width: {{ $width }}em;">
      {{- range $key, $val := .Site.Params.social -}}
      <a class="header-icon" href="{{ $val.url }}" aria-label="{{ $key }}"
        ><i class="{{ $val.icon }}"></i>
      </a>
      {{- end -}}
    </div>
  </div>
</header>
{{ else }}
<header class="regular-page-header">
  <div
    style="
      display: flex;
      justify-content: space-between;
      width: 98%;
      margin-bottom: 0.5em;
    "
  >
    <a class="header-icon" href="{{ `/` | relURL }}" aria-label="home page">
      <i class="bi bi-house-door"></i>
    </a>
    <div
      class="share-links"
      style="
        display: flex;
        margin-left: 1em;
        align-items: center;
        width: 120px;
        justify-content: space-between;
      "
    >
      {{ $url := printf "%s" .URL | absLangURL }}
      <a
        class="header-icon"
        href="mailto:?subject={{ print .Title ` by ` .Site.Params.author }}&amp;body={{ $url }}"
        target="_self"
        rel="noopener"
        aria-label="share by email"
        ><i class="bi bi-envelope"></i
      ></a>
      <a
        class="header-icon"
        href="https://facebook.com/sharer/sharer.php?u={{ $url }}"
        target="_blank"
        rel="noopener"
        aria-label="share on facebook"
        ><i class="bi bi-facebook"></i
      ></a>
      <a
        class="header-icon"
        href="https://twitter.com/intent/tweet/?text={{ print .Title ` by ` .Site.Params.author }}&amp;url={{ $url }}"
        target="_blank"
        rel="noopener"
        aria-label="share on twitter"
        ><i class="bi bi-twitter"></i
      ></a>
    </div>
  </div>
  <div class="page-title-and-info" style="text-align: center">
    <h1 class="page-title">
      {{ if or (eq .Kind "taxonomy") (eq .Kind "term") }}#{{ end }}{{ .Title }}
    </h1>
    {{ if eq .Kind "page" }}
    <p class="document-date">
      {{ dateFormat .Site.Params.theme.dateFormat .Date }} &middot; {{ .Site.Params.author }}
    </p>
    {{ if .Description }}
    <p class="document-description">"{{ .Description }}"</p>
    {{ end }} {{ end }}
  </div>
</header>
{{ end }}