From 7b4b78ee8458b16a6167170bf7405d7bf911cfbc Mon Sep 17 00:00:00 2001 From: Francesco Date: Mon, 22 Apr 2024 13:19:56 +0200 Subject: Initial --- layouts/_default/baseof.html | 31 +++++++++++++++++++++++ layouts/_default/home.html | 58 ++++++++++++++++++++++++++++++++++++++++++++ layouts/_default/list.html | 18 ++++++++++++++ layouts/_default/single.html | 45 ++++++++++++++++++++++++++++++++++ 4 files changed, 152 insertions(+) create mode 100644 layouts/_default/baseof.html create mode 100644 layouts/_default/home.html create mode 100644 layouts/_default/list.html 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..eef7b25 --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,31 @@ + + + + + {{ partial "head.html" . }} + {{ if .Param "math" }} + {{ partialCached "math.html" . }} + {{ end }} + + + + +
+
+ {{ partial "header.html" . }} +
+ +
+ {{ block "main" . }}{{ end }} +
+
+ + + + + + + \ No newline at end of file diff --git a/layouts/_default/home.html b/layouts/_default/home.html new file mode 100644 index 0000000..bc3aad8 --- /dev/null +++ b/layouts/_default/home.html @@ -0,0 +1,58 @@ +{{ define "main" }} + +{{ .Content }} + +{{/* Intro summary section */}} +{{ if .Site.Params.homeIntro }} + +
+ {{ if .Site.Params.homeIntroTitle }} +

{{ .Site.Params.homeIntroTitle }}

+ {{ end }} + + {{ if .Site.Params.homeIntroContent }} +

{{ .Site.Params.homeIntroContent | markdownify }}

+ {{ end }} +
+ +{{ end }} + +{{/* Social Icons */}} + +{{ with site.Params.social }} +
+ {{- range . }} + + {{ partial "svg.html" . }} + + {{- end }} +
+{{ end }} + +{{/* Collection Section */}} + +{{ if .Site.Params.homeCollection }} + +{{ with .Site.Params.homeCollectionTitle}} +

{{ . }}

+{{ end }} + +{{ $pages := where .Site.RegularPages "Section" .Site.Params.homeCollection }} + +{{ $paginationSize := 1}} +{{ if (gt .Site.Params.paginationSize 0) }} +{{ $paginationSize = .Site.Params.paginationSize }} +{{ end }} + +{{ $paginator := .Paginate $pages $paginationSize }} + +{{ range $index, $page := $paginator.Pages }} +{{ partial "post-entry.html" $page}} +{{ end }} + +{{ partial "pagination-controls.html" $paginator}} + +{{ end }} + +{{ end }} \ No newline at end of file diff --git a/layouts/_default/list.html b/layouts/_default/list.html new file mode 100644 index 0000000..8c52a86 --- /dev/null +++ b/layouts/_default/list.html @@ -0,0 +1,18 @@ +{{ define "main" }} +

{{ .Title }}

+{{ .Content }} + +{{ $paginationSize := 1}} +{{ if (gt .Site.Params.paginationSize 0) }} +{{ $paginationSize = .Site.Params.paginationSize }} +{{ end }} + +{{ $paginator := .Paginate (.Pages) $paginationSize }} + +{{ range $index, $page := $paginator.Pages }} +{{ partial "post-entry.html" $page}} +{{ end }} + +{{ partial "pagination-controls.html" $paginator}} + +{{ end }} \ No newline at end of file diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..b68da6c --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,45 @@ +{{ define "main" }} + +{{/* Intro */}} + +
+ + {{/* Title and Summary */}} + +

{{ .Title }}

+ {{if .Param "summary" }} +

{{ .Summary }}

+ {{ end }} + + {{/* Reading Time */}} + +

+ {{if .Date }} + {{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }} + {{ $dateHuman := .Date | time.Format ":date_long" }} + + - + {{end}} + {{if (.Param "readTime")}} + {{.ReadingTime}} min + {{end }} +

+ +
+ +{{/* Table of Content */}} + +{{if .Param "toc" }} + +{{ end }} + +{{/* Actual document content */}} + +
+ {{ .Content }} +
+ +{{ end }} \ No newline at end of file -- cgit v1.2.3