From 98c04aa1e19e9391a19daf903a024e7ebeaeb36b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sapka?= Date: Mon, 2 Jan 2023 22:15:10 +0100 Subject: feat: blank based on memes --- layouts/_default/baseof.html | 80 ++++++++++++++++++++++++++++++++++++++++++++ layouts/_default/list.html | 12 +++++++ layouts/_default/list.txt | 5 +++ layouts/_default/single.html | 33 ++++++++++++++++++ 4 files changed, 130 insertions(+) create mode 100644 layouts/_default/baseof.html create mode 100644 layouts/_default/list.html create mode 100644 layouts/_default/list.txt create mode 100644 layouts/_default/single.html (limited to 'layouts/_default') diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100644 index 0000000..b0bfc6f --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,80 @@ + + + + + {{ block "title" . }} + {{ .Site.Title }} + {{ end }} + + + {{- $image := resources.Get "/icons/apple-touch-icon.png"}} + + {{- $image := resources.Get "/icons/favicon-32x32.png" }} + + {{- $image := resources.Get "/icons/favicon-16x16.png" }} + + + + + + {{- $imageUrl := default "logo.png" .Params.image }} + {{- $image := resources.Get $imageUrl }} + + + + + + + + + + {{ if isset .Params "tags" }}{{end}} + + + {{ block "header" . }} +
+ {{ $image := resources.Get "logo.png" }} + {{ $image := $image.Resize "x45" }} + + logo +
+

{{ .Site.Title }}

+ (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 new file mode 100644 index 0000000..cc3addd --- /dev/null +++ b/layouts/_default/list.html @@ -0,0 +1,12 @@ +{{ define "main" }} + {{ range where .Pages "Params.category" "meme"}} +
+ + {{ $imageUrl := .Param "image" }} + {{ $image := resources.Get $imageUrl }} + {{ $image := $image.Resize "350x" }} + {{ .Param + +
+ {{ end }} +{{ end }} diff --git a/layouts/_default/list.txt b/layouts/_default/list.txt new file mode 100644 index 0000000..047ea33 --- /dev/null +++ b/layouts/_default/list.txt @@ -0,0 +1,5 @@ +{{- range where .Pages "Params.category" "meme"}} + {{- $imageUrl := .Param "image" }} + {{- $image := resources.Get $imageUrl }} + {{- $image.Permalink }} +{{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..47ec310 --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,33 @@ +{{ define "title" }} +{{ 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 -}} + {{- if gt $tagsLen 0 -}} +  with tags: + {{- range $k, $v := .Params.tags -}} + {{- $url := printf "tags/%s" (. | urlize | lower) -}} + {{ . | title }} + {{- if lt $k (sub $tagsLen 1) }} · {{ end -}} + {{- end -}} + + {{- end -}} +{{- end }} +
+ +{{ if or .Next .Prev -}} +
+ {{- with .Prev }} ← Previous {{ end -}} + {{- with .Next -}}Next → {{ end -}} +
+{{ end -}} + +{{ end }} + -- cgit v1.2.3