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.html6
-rw-r--r--layouts/partials/header.html88
-rw-r--r--layouts/partials/title.html17
3 files changed, 79 insertions, 32 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 6670b4f..5645f6b 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -1,6 +1,6 @@
<head>
<title>
- {{- if and (not .IsHome) (.Title) }} {{ .Title }} - {{ end }} {{ .Site.Title -}}
+ {{ if and (not .IsHome) (.Title) }} {{ .Title }} - {{ end }} {{ .Site.Title }}
</title>
<meta name="theme-color" content="#a3001b" />
<meta charset="utf-8" />
@@ -20,4 +20,8 @@
href="https://fonts.googleapis.com/css2?family=Inconsolata&display=swap"
rel="stylesheet"
/>
+ <link
+ rel="stylesheet"
+ href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.4.0/font/bootstrap-icons.css"
+ />
</head>
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index bd774d7..8d0719b 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -1,5 +1,5 @@
-<header {{ if .IsHome }}class="home-page-header" {{ end }}>
- {{ if .IsHome }}
+{{ if .IsHome }}
+<header class="home-page-header">
<div class="header-image-container">
<div class="header-image">
<img
@@ -8,22 +8,82 @@
/>
</div>
</div>
- {{ end }}
<div class="header-info">
- {{ if not .IsHome }}
- <a class="home-icon" href="{{ `/` | relURL }}" aria-label="home page">
- {{ partial "homeIcon" . }}
- </a>
- {{ else }}
- <h1 class="site-title">{{- .Site.Title -}}</h1>
- {{ end }} {{ partial "title" . }} {{ if .IsHome }}
- <div class="social-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="social-link" href="{{ $val }}" aria-label="{{ $key }}">
- {{- $key -}}
+ <a class="header-icon" href="{{ $val.url }}" aria-label="{{ $key }}"
+ ><i class="{{ $val.icon }}"></i>
</a>
{{- end -}}
</div>
- {{ end }}
</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 }}
diff --git a/layouts/partials/title.html b/layouts/partials/title.html
deleted file mode 100644
index 6f12a98..0000000
--- a/layouts/partials/title.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<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>