From 113d4e53416ddf42212da6f217670bdc6f0c9dd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20N=C3=A1jera?= Date: Sat, 1 Jan 2022 21:03:20 +0100 Subject: Import new minimalist design --- layouts/404.html | 37 +++++++++------ layouts/_default/archive.terms.html | 21 --------- layouts/_default/baseof.html | 9 +--- layouts/_default/list.html | 14 +++--- layouts/_default/search.html | 30 ------------ layouts/_default/single.html | 93 +++++++++++++------------------------ layouts/_default/summary.html | 25 ---------- layouts/_default/terms.html | 19 -------- layouts/index.html | 22 +++++++-- layouts/index.json | 7 --- layouts/partials/author_card.html | 12 +++++ layouts/partials/footer.html | 10 ++-- layouts/partials/head.html | 57 +++++------------------ layouts/partials/header.html | 63 +++++++++---------------- layouts/partials/hero.html | 7 +++ layouts/partials/meta.html | 15 ------ layouts/partials/metadata.html | 24 ++++++++++ layouts/partials/open_section.html | 9 ++++ layouts/partials/pagination.html | 18 +++---- layouts/partials/post.html | 20 ++++++++ layouts/partials/post_pager.html | 10 ++++ layouts/section_page/single.html | 8 ++++ layouts/taxonomy/terms.html | 35 ++++++++++++++ 23 files changed, 259 insertions(+), 306 deletions(-) delete mode 100644 layouts/_default/archive.terms.html delete mode 100644 layouts/_default/search.html delete mode 100644 layouts/_default/summary.html delete mode 100644 layouts/_default/terms.html delete mode 100644 layouts/index.json create mode 100644 layouts/partials/author_card.html create mode 100644 layouts/partials/hero.html delete mode 100644 layouts/partials/meta.html create mode 100644 layouts/partials/metadata.html create mode 100644 layouts/partials/open_section.html create mode 100644 layouts/partials/post.html create mode 100644 layouts/partials/post_pager.html create mode 100644 layouts/section_page/single.html create mode 100644 layouts/taxonomy/terms.html (limited to 'layouts') diff --git a/layouts/404.html b/layouts/404.html index c2f0c31..eada35e 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -1,17 +1,28 @@ -{{ define "main" }} -
-
-

404

-

Sorry, we can't find the page you are looking for.

-
+{{ define "main"}} +
-

Are you looking for one of these?

+

Page not found

+ + {{/* Suggest recently published pages to the user. */}} + +

Perhaps you were looking for one of these?

+ + {{ $query := where (where (where (where site.RegularPages.ByDate.Reverse "Title" "!=" "") "Kind" "in" (slice "page" "section")) "Params.private" "!=" true) "Permalink" "!=" "" }} + {{ $count := len $query }} + {{ if gt $count 0 }} +

{{ i18n "user_profile_latest" }}

+ + {{ end }} -
- {{ range .Site.Menus.main }} - - {{ .Pre }} {{ .Name }} - {{ end }} -
+ {{ end }} diff --git a/layouts/_default/archive.terms.html b/layouts/_default/archive.terms.html deleted file mode 100644 index 7b5a540..0000000 --- a/layouts/_default/archive.terms.html +++ /dev/null @@ -1,21 +0,0 @@ -{{ define "main" }} -
- {{ range (where .Site.RegularPages "Section" "post").GroupByDate "2006" }} -
-

{{ .Key }}

- - {{ range .Pages.GroupByDate "January" }} -
    -
  • {{ .Key }}
  • - -
      - {{ range .Pages }} -
    • {{.Title}} - {{ .Date.Format "Jan 2" }}
    • - {{ end}} -
    -
- {{ end}} -
- {{ end }} -
-{{ end }} diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index f5fb3d8..20e0c0c 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,16 +1,11 @@ {{- partial "head.html" . -}} - + {{- partial "header.html" . -}} - -
+
{{- block "main" . }}{{- end }}
- {{- partial "footer.html" . -}} - - {{- block "footerfiles" . }}{{- end }} diff --git a/layouts/_default/list.html b/layouts/_default/list.html index c9839f8..a1f0f08 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,8 +1,10 @@ {{ define "main" }} -
- {{ range .Paginator.Pages }} - {{ .Render "summary" }} - {{ end }} - {{ partial "pagination.html" . }} -
+{{ partial "open_section.html" . }} + +{{ range .Paginator.Pages.ByPublishDate.Reverse }} +
+ {{ partial "post.html" . }} +
+{{ end }} +{{ partial "pagination.html" . }} {{ end }} diff --git a/layouts/_default/search.html b/layouts/_default/search.html deleted file mode 100644 index 4bf77f2..0000000 --- a/layouts/_default/search.html +++ /dev/null @@ -1,30 +0,0 @@ -{{ define "footerfiles" }} - - - - -{{ end }} - -{{ define "main" }} -
-
-
- -
-
-

Matching pages

-
-
-
- - -{{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 6007308..3d75915 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,71 +1,42 @@ {{ define "main" }} -
-
-
-

- {{ .Title }}

- - {{ if not (eq .Params.showMeta false) }} -
{{ .Date.Format "Mon, Jan 2, 2006" }}
- {{ partial "meta.html" . }} +
+
+

+ {{ .Title }} +

+ + {{ with .Params.subtitle }} +

{{ . }}

+ {{end}} + + {{ if isset .Params "image" }} + {{ $image := resources.Get .Params.image }} + {{ $image := $image.Fill (default "400x400" .Params.image_size) }} +
+ {{ .Title }} + {{ with .Params.caption }} + + {{ .text }} + {{ end }} -
-
- -
-
- {{ .Content }}
+ {{end}} -
- {{ with .Params.tags }} -
- -
Tagged in
- {{ range . }} - {{ . }} - {{ end }} -
- {{ end }} - -
-
Share in Social Networks
- {{ range .Site.Params.sharingOptions }} - - - - {{ end }} -
-
+ {{ if isset .Params "metadata" }} + {{ partial "metadata.html" . }} + {{ end }} - - {{ if not (eq .Params.showActions false) }} -
- {{ with .NextInSection }} - - Newer
- {{ .Title }} -
- {{ end}} - {{ with .PrevInSection }} - - Older
- {{ .Title }} -
- {{ end}} -
- {{ end}} + - {{ if not (eq .Params.comments false) }} -
- {{ template "_internal/disqus.html" . }} -
- {{ end }} +
+{{ .Content }}
+
+{{ if isset .Params "metadata" }} +{{ partial "author_card" . }} +{{ end }} +{{ partial "post_pager" . }} +
{{ end }} diff --git a/layouts/_default/summary.html b/layouts/_default/summary.html deleted file mode 100644 index 20c8d9c..0000000 --- a/layouts/_default/summary.html +++ /dev/null @@ -1,25 +0,0 @@ - diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html deleted file mode 100644 index 42d5541..0000000 --- a/layouts/_default/terms.html +++ /dev/null @@ -1,19 +0,0 @@ -{{ define "main" }} -
-
- {{ range .Data.Terms.ByCount }} -

- - {{ .Name }} ({{ .Pages | len }}) - -

- -
    - {{ range .Pages.ByDate.Reverse }} -
  • {{.Title}} - {{ .Date.Format "Jan 2, 2006" }}
  • - {{ end}} -
- {{ end }} -
-
-{{ end }} diff --git a/layouts/index.html b/layouts/index.html index 9b143c0..b256f80 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,8 +1,20 @@ {{ define "main" }} - - {{ $paginator := .Paginate (where .Data.Pages "Section" "post") }} - {{ range $paginator.Pages }} - {{ .Render "summary" }} +{{ partial "hero.html" . }} + + +{{ range $index, $element := where .Pages "Type" "in" .Site.Params.mainSections }} +{{ partial "open_section.html" . }} + + {{ range first .Params.index_show .Pages.ByPublishDate.Reverse }} +
+ {{ partial "post.html" . }} +
{{ end }} - {{ partial "pagination.html" . }} + +
+ + See all +
+
+{{ end }} {{ end }} diff --git a/layouts/index.json b/layouts/index.json deleted file mode 100644 index b8559e7..0000000 --- a/layouts/index.json +++ /dev/null @@ -1,7 +0,0 @@ -{{- $.Scratch.Add "index" slice -}} -{{- range .Site.RegularPages -}} -{{- if ne .Params.noindex true -}} - {{- $.Scratch.Add "index" (dict "title" .Title "tags" .Params.tags "categories" .Params.categories "contents" .Plain "permalink" .Permalink) -}} -{{- end -}} -{{- end -}} -{{- $.Scratch.Get "index" | jsonify -}} diff --git a/layouts/partials/author_card.html b/layouts/partials/author_card.html new file mode 100644 index 0000000..33c86b8 --- /dev/null +++ b/layouts/partials/author_card.html @@ -0,0 +1,12 @@ +
+
+ +
+
+
{{ .Site.Params.Owner }}
+
{{ .Site.Params.Role }}
+

+ {{ .Site.Params.bio }} +

+
+
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index d437bde..a9e1474 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,5 +1,7 @@ -