From 0381d2e62d10fd30402c29d85041071adcc483bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sapka?= Date: Sun, 8 Jan 2023 12:12:11 +0100 Subject: feat: basic list --- layouts/_default/baseof.html | 45 ++++++++++++++++++-------------------------- layouts/_default/list.html | 13 ++++++++++++- layouts/_default/single.html | 5 ----- 3 files changed, 30 insertions(+), 33 deletions(-) (limited to 'layouts/_default') diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 280135e..e3cd969 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,8 +1,8 @@ - - - - {{ block "title" . }} +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>{{ block "title" . }} {{ .Site.Title }} {{ end }} @@ -29,10 +29,10 @@ {{ if isset .Params "tags" }}{{end}} - - + + {{ block "header" . }} -
+
{{ $image := resources.Get "logo.png" }} {{ $image := $image.Resize "x45" }} @@ -42,35 +42,26 @@ (because giphy sucks) -
+
{{ end }} -
+
{{ block "page-title" . }}

{{ .Page.Title }}

{{ end }} {{ block "main" . }} {{ end }} -
{{ block "FOOTER" . }} -
- +
+ + {{ end }} - - + + diff --git a/layouts/_default/list.html b/layouts/_default/list.html index b9ddde4..d4ad721 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,6 +1,17 @@ {{ define "main" }} - {{ range where .Pages "Params.category" "meme"}} + {{ range .Pages }}
+ + {{ .Page.Title }} + + ({{ .PublishDate.Format "January 2nd, 2006" }}) +
+ {{ .Page.Summary }} +
+ {{- if .Page.Truncated }} + More + + {{ end }}
{{ end }} {{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 47ec310..a6a1697 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -2,11 +2,6 @@ {{ end }} {{ define "main" }} -{{ $imageUrl := .Params.image }} -{{ $image := resources.Get $imageUrl }} -{{ $image := $image.Resize "790x" }} -{{ .Params.title }}
-
added on {{ .PublishDate.Format "January 2, 2006" }} {{- if isset .Params "tags" -}} {{- $tagsLen := len .Params.tags -}} -- cgit v1.2.3