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

github.com/urjaacharya/redgood.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials')
-rw-r--r--layouts/partials/head.html5
-rw-r--r--layouts/partials/header.html34
-rw-r--r--layouts/partials/title.html17
3 files changed, 31 insertions, 25 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 5567668..6670b4f 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -1,9 +1,6 @@
<head>
<title>
- {{ .Site.Title }}
- {{ if and (not .IsHome) (.Title) }}
- - {{ .Title }}
- {{ end }}
+ {{- if and (not .IsHome) (.Title) }} {{ .Title }} - {{ end }} {{ .Site.Title -}}
</title>
<meta name="theme-color" content="#a3001b" />
<meta charset="utf-8" />
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index d0d73f0..bd774d7 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -1,9 +1,14 @@
-<header>
+<header {{ if .IsHome }}class="home-page-header" {{ end }}>
+ {{ if .IsHome }}
<div class="header-image-container">
<div class="header-image">
- <img src="{{ .Site.Params.about.profileImage | relURL }}" alt="profile image of {{ .Site.Params.author }}"/>
+ <img
+ src="{{ .Site.Params.about.profileImage | relURL }}"
+ alt="profile image of {{ .Site.Params.author }}"
+ />
</div>
</div>
+ {{ end }}
<div class="header-info">
{{ if not .IsHome }}
<a class="home-icon" href="{{ `/` | relURL }}" aria-label="home page">
@@ -11,27 +16,14 @@
</a>
{{ else }}
<h1 class="site-title">{{- .Site.Title -}}</h1>
- {{ end }}
-
- <div>
- <p class="site-title home-{{ .IsHome }}">
- {{ if not .IsHome }} {{ .Site.Title }} {{ end }}
- </p>
- <p class="about-narrative">
- {{ .Site.Params.about.narrative | markdownify }}
- </p>
- </div>
-
+ {{ end }} {{ partial "title" . }} {{ if .IsHome }}
<div class="social-info">
- {{- range $key, $val := .Site.Params.social -}}
- <a
- class="social-link"
- href="{{ $val }}"
- aria-label="{{ $key }}"
- >
- {{- $key -}}
- </a>
+ {{- range $key, $val := .Site.Params.social -}}
+ <a class="social-link" href="{{ $val }}" aria-label="{{ $key }}">
+ {{- $key -}}
+ </a>
{{- end -}}
</div>
+ {{ end }}
</div>
</header>
diff --git a/layouts/partials/title.html b/layouts/partials/title.html
new file mode 100644
index 0000000..6f12a98
--- /dev/null
+++ b/layouts/partials/title.html
@@ -0,0 +1,17 @@
+<div>
+ <p class="site-title home-{{ .IsHome }}">
+ {{ if not .IsHome }}
+ {{ if eq .Kind "taxonomy" }}#{{ end }}{{ .Title }}
+ {{ if eq .Kind "page" }}
+ <p>
+ {{ dateFormat .Site.Params.theme.dateFormat .Date }} &middot; {{ .Site.Params.author }}
+ </p>
+ {{ end }}
+ {{ end }}
+ </p>
+ {{ if .IsHome }}
+ <p class="about-narrative">
+ {{ .Site.Params.about.narrative | markdownify }}
+ </p>
+ {{ end }}
+</div>