From 9495cb612590c43c39a3b3c3582ce288009b6c76 Mon Sep 17 00:00:00 2001 From: Urja Acharya Date: Sun, 28 Feb 2021 21:22:15 -0800 Subject: modified header for all pages except home page --- layouts/_default/list.html | 3 ++- layouts/_default/single.html | 4 ---- layouts/_default/taxonomy.html | 9 +++++---- layouts/partials/head.html | 5 +---- layouts/partials/header.html | 34 +++++++++++++--------------------- layouts/partials/title.html | 17 +++++++++++++++++ layouts/section/archive.html | 1 - layouts/section/pinnedPosts.html | 1 - static/css/main.css | 15 ++++++++++++--- 9 files changed, 50 insertions(+), 39 deletions(-) create mode 100644 layouts/partials/title.html diff --git a/layouts/_default/list.html b/layouts/_default/list.html index eb7c0cd..dbfa4b1 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,6 +1,7 @@ {{ define "main" }} -

{{ .Title }}

+
{{ range (.Paginator 10).Pages }} {{ partial "listPage" . }} {{ end }} +
{{ end }} \ No newline at end of file diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 917c4f9..9983b08 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,7 +1,3 @@ {{ define "main" }} -
-

{{ .Title }}

-

{{ dateFormat .Site.Params.theme.dateFormat .Date }} · {{ .Site.Params.author }}

-
{{ .Content }} {{ end }} diff --git a/layouts/_default/taxonomy.html b/layouts/_default/taxonomy.html index ea0c32f..34d6b4e 100644 --- a/layouts/_default/taxonomy.html +++ b/layouts/_default/taxonomy.html @@ -1,6 +1,7 @@ {{ define "main" }} -

#{{ .Title }}

-{{ range (.Paginator 10).Pages.ByDate.Reverse }} -{{ partial "listPage" . }} -{{ end }} +
+ {{ range (.Paginator 10).Pages.ByDate.Reverse }} + {{ partial "listPage" . }} + {{ end }} +
{{ end }} 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 @@ - {{ .Site.Title }} - {{ if and (not .IsHome) (.Title) }} - - {{ .Title }} - {{ end }} + {{- if and (not .IsHome) (.Title) }} {{ .Title }} - {{ end }} {{ .Site.Title -}} 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 @@ -
+
+ {{ if .IsHome }}
- profile image of {{ .Site.Params.author }} + profile image of {{ .Site.Params.author }}
+ {{ end }}
{{ if not .IsHome }} @@ -11,27 +16,14 @@ {{ else }}

{{- .Site.Title -}}

- {{ end }} - -
-

- {{ if not .IsHome }} {{ .Site.Title }} {{ end }} -

-

- {{ .Site.Params.about.narrative | markdownify }} -

-
- + {{ end }} {{ partial "title" . }} {{ if .IsHome }} + {{ end }}
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 @@ +
+

+ {{ if not .IsHome }} + {{ if eq .Kind "taxonomy" }}#{{ end }}{{ .Title }} + {{ if eq .Kind "page" }} +

+ {{ dateFormat .Site.Params.theme.dateFormat .Date }} · {{ .Site.Params.author }} +

+ {{ end }} + {{ end }} +

+ {{ if .IsHome }} +

+ {{ .Site.Params.about.narrative | markdownify }} +

+ {{ end }} +
diff --git a/layouts/section/archive.html b/layouts/section/archive.html index 686e8bb..20050ac 100644 --- a/layouts/section/archive.html +++ b/layouts/section/archive.html @@ -1,5 +1,4 @@ {{ define "main" }} -

{{ .Title }}

{{$paginator := .Paginate (where .Site.Pages "Kind" "page").ByDate.Reverse 50 }}
{{ range $paginator.Pages }} diff --git a/layouts/section/pinnedPosts.html b/layouts/section/pinnedPosts.html index e9e39b4..0049765 100644 --- a/layouts/section/pinnedPosts.html +++ b/layouts/section/pinnedPosts.html @@ -1,5 +1,4 @@ {{ define "main" }} -

{{ .Title }}

{{$paginator := .Paginate (where .Site.Pages "Params.pinned" true).ByDate.Reverse 5 }} {{ range $paginator.Pages }}

{{ .Title }}

diff --git a/static/css/main.css b/static/css/main.css index dcd702b..c042cbf 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -45,13 +45,15 @@ a:hover { header { background-color: var(--primary); margin-top: 5px; - min-height: 275px; display: flex; flex-direction: row; justify-content: start; flex-wrap: wrap; } -header img { +header .home-page-header { + min-height: 275px; +} +header .home-page-header img { height: 100%; } .header-info { @@ -168,7 +170,7 @@ h6 { } .site-title.home-false { display: block; - font-size: 1.5em; + font-size: 2em; font-weight: 600; margin-bottom: 0.5em; text-decoration: underline; @@ -251,6 +253,9 @@ svg { .archive-table { width: 100%; } +.archive-table { + margin-top: 1em; +} .home-page-card { background-color: var(--bgLight) !important; padding: 15px; @@ -310,6 +315,10 @@ svg { padding: 0 0.5em; border-radius: 5px; } +.taxonomy-data, +.list-page { + margin-top: 1em; +} .list-page-data { display: flex; margin-bottom: 0.5em; -- cgit v1.2.3