From d7da16ecfa5cadb643df78694db44963ba665cbe Mon Sep 17 00:00:00 2001 From: Shubham Saini Date: Wed, 8 Feb 2023 16:19:28 -0800 Subject: init --- layouts/404.html | 14 ++++++++++++++ layouts/_default/baseof.html | 11 +++++++++++ layouts/_default/list.html | 17 +++++++++++++++++ layouts/_default/single.html | 33 +++++++++++++++++++++++++++++++++ layouts/_default/term.html | 15 +++++++++++++++ layouts/_default/terms.html | 20 ++++++++++++++++++++ layouts/index.html | 37 +++++++++++++++++++++++++++++++++++++ layouts/partials/footer.html | 11 +++++++++++ layouts/partials/head.html | 11 +++++++++++ layouts/partials/header.html | 22 ++++++++++++++++++++++ layouts/partials/paginator.html | 15 +++++++++++++++ 11 files changed, 206 insertions(+) create mode 100755 layouts/404.html create mode 100755 layouts/_default/baseof.html create mode 100755 layouts/_default/list.html create mode 100755 layouts/_default/single.html create mode 100755 layouts/_default/term.html create mode 100755 layouts/_default/terms.html create mode 100755 layouts/index.html create mode 100755 layouts/partials/footer.html create mode 100755 layouts/partials/head.html create mode 100755 layouts/partials/header.html create mode 100755 layouts/partials/paginator.html (limited to 'layouts') diff --git a/layouts/404.html b/layouts/404.html new file mode 100755 index 0000000..70e40c1 --- /dev/null +++ b/layouts/404.html @@ -0,0 +1,14 @@ + + + {{ partial "header.html" . }} + +
+ {{ partial "head.html" . }} +

+ 404 │ Nothing here +

+ {{ partial "footer.html" . }} +
+ + + diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100755 index 0000000..b941097 --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,11 @@ + + + {{- partial "header.html" . -}} + +
+ {{- partial "head.html" . -}} + {{- block "main" . }}{{- end }} + {{- partial "footer.html" . -}} +
+ + diff --git a/layouts/_default/list.html b/layouts/_default/list.html new file mode 100755 index 0000000..41a4c6f --- /dev/null +++ b/layouts/_default/list.html @@ -0,0 +1,17 @@ +{{ define "main" }} +{{ if isset .Data "Term" }} +

Entries tagged - "{{ .Data.Term }}"

+{{ else }} +

All articles

+{{ end }} + + +{{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100755 index 0000000..44222d4 --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,33 @@ +{{ define "main" }} +
+
+
+

{{ .Title }}

+ {{ if .Date }}
Posted on {{ dateFormat "Jan 2, 2006" .Date }}{{ if .Draft }} DRAFT {{ end }}
{{ end }} +
+ {{ if isset .Params "tldr" }} +
+ tl;dr: + {{ .Params.tldr }} +
{{ end }} + +
+ {{ .Content }} +
+ + +
+
+{{ end }} diff --git a/layouts/_default/term.html b/layouts/_default/term.html new file mode 100755 index 0000000..9648bf3 --- /dev/null +++ b/layouts/_default/term.html @@ -0,0 +1,15 @@ + + +{{ partial "header.html" . }} + + +
+ {{ partial "head.html" . }} + +

All tags

+
+ + {{ partial "footer.html" . }} + + + \ No newline at end of file diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html new file mode 100755 index 0000000..fea9c2f --- /dev/null +++ b/layouts/_default/terms.html @@ -0,0 +1,20 @@ +{{ define "main" }} +

All tags

+ +{{ $biggest := 1 }} +{{ $smallest := 1 }} +{{ $max := 3 }} +{{ $min := 1 }} +{{ $size := $min }} + +{{ $data := .Data }} +
+ +
+{{ end }} diff --git a/layouts/index.html b/layouts/index.html new file mode 100755 index 0000000..43a3508 --- /dev/null +++ b/layouts/index.html @@ -0,0 +1,37 @@ + + {{ partial "header.html" . }} + +
+ {{ partial "head.html" . }} +
+
+ {{- if isset .Site.Params "subtitle" -}} +

{{ .Site.Params.Subtitle | markdownify }}

+ {{- end -}} +
+ {{- if isset .Site.Params "note" -}} + {{ .Site.Params.Note | markdownify }} + {{- end -}} + + {{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }} + {{ $paginator := .Paginate (where $pages "Params.hidden" "ne" true) }} + {{ range $paginator.Pages }} +
+

{{.Title}}

+ +
+ {{ if isset .Params "description" }} + {{ .Description }} + {{ else }} + {{ .Summary }}… + {{ end }} +
+ Read more ⟶ +
+ {{ end }} + {{ template "partials/paginator.html" . }} +
+ {{ partial "footer.html" . }} +
+ + diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html new file mode 100755 index 0000000..9f04da6 --- /dev/null +++ b/layouts/partials/footer.html @@ -0,0 +1,11 @@ +
+ diff --git a/layouts/partials/head.html b/layouts/partials/head.html new file mode 100755 index 0000000..3c9693b --- /dev/null +++ b/layouts/partials/head.html @@ -0,0 +1,11 @@ +
+ + +
diff --git a/layouts/partials/header.html b/layouts/partials/header.html new file mode 100755 index 0000000..548acb1 --- /dev/null +++ b/layouts/partials/header.html @@ -0,0 +1,22 @@ + + + + {{- $title := ( .Title ) -}} + {{- $siteTitle := ( .Site.Title ) -}} + {{- if .IsHome -}} + {{ $siteTitle }} + {{- else -}} + {{ $title }} + {{- end -}} + {{- if isset .Site.Params "favicon" -}} + + {{- end -}} + + {{ with .OutputFormats.Get "rss" -}} + {{ printf `` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} + {{ end -}} + + {{- if or (eq .Site.Params.mode "auto") (eq .Site.Params.mode "dark") -}} + + {{- end -}} + diff --git a/layouts/partials/paginator.html b/layouts/partials/paginator.html new file mode 100755 index 0000000..5acc06d --- /dev/null +++ b/layouts/partials/paginator.html @@ -0,0 +1,15 @@ +{{ $pag := $.Paginator }} +{{ if gt $pag.TotalPages 1 }} + +{{ end }} -- cgit v1.2.3