From 02fcbbf7987ad95b51abfed56df48a8ea8f0b166 Mon Sep 17 00:00:00 2001 From: danix Date: Sun, 12 Feb 2023 18:31:25 +0100 Subject: [PATCH] working on the blog listing page. Almost finished. Needs a few tweaks. --- layouts/articles/list-baseof.html | 27 +++++++++++------ layouts/articles/list.html | 48 ++++++++++++++++++++++--------- layouts/page/list-baseof.html | 4 +-- layouts/page/list.html | 2 +- 4 files changed, 56 insertions(+), 25 deletions(-) diff --git a/layouts/articles/list-baseof.html b/layouts/articles/list-baseof.html index 06d57b2..f8388a9 100644 --- a/layouts/articles/list-baseof.html +++ b/layouts/articles/list-baseof.html @@ -1,19 +1,28 @@ {{- partial "head.html" . -}} - -
- + + +
{{- partial "header.html" . -}} - {{- partial "breadcrumbs.html" . -}} -
-
-
- {{- block "main" . }}{{- end }} -
+ + + +
+ {{- block "blog-list" . }}{{- end }}
{{- partial "footer.html" . -}}
+ {{- partial "footer-addition.html" . -}} + diff --git a/layouts/articles/list.html b/layouts/articles/list.html index d75b6db..a14fe3d 100644 --- a/layouts/articles/list.html +++ b/layouts/articles/list.html @@ -1,18 +1,40 @@ -{{ define "main" }} -
-
- {{ .Content }} -
-
-
    +{{ define "blog-list" }} +
    +
    +
    + {{ .Content }} +
    +
    +
    +
    {{ range .Pages }} -
  • -
    -

    {{.Title}}

    - +
    + + suca + +
    +
    +
    +

    + {{ if gt (len .Title) 40 }} + {{ $first50 := ( substr .Title 0 40 ) }} + {{ $lastChars := ( substr .Title 40 ) }} + {{ $newLine := "
    " }} + {{ $newTitle := ( printf "%s" $lastChars | printf "%s%s" $newLine | printf "%s%s" $first50 ) }} + {{ $newTitle | safeHTML }} + {{ else }} + {{ .Title }} + {{ end }} +

    +
    +

    here goes an abstract

    + +
    -
  • +
    {{ end }} -
+ {{ end }} diff --git a/layouts/page/list-baseof.html b/layouts/page/list-baseof.html index f3beae8..cc5d0eb 100644 --- a/layouts/page/list-baseof.html +++ b/layouts/page/list-baseof.html @@ -1,7 +1,7 @@ {{- partial "head.html" . -}} - +
{{- partial "header.html" . -}} @@ -19,7 +19,7 @@
- {{- block "list-main" . }}{{- end }} + {{- block "page-list-main" . }}{{- end }}
{{- partial "footer.html" . -}}
diff --git a/layouts/page/list.html b/layouts/page/list.html index 23d4372..fb8b30a 100644 --- a/layouts/page/list.html +++ b/layouts/page/list.html @@ -1,4 +1,4 @@ -{{ define "list-main" }} +{{ define "page-list-main" }}

{{ .Content }}

-- 2.20.1