From 77d4a98a666ef6c2c18c10f2f2d62210f9eeb752 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Sun, 27 Aug 2023 01:36:12 +0530 Subject: first commit --- layouts/404.html | 0 layouts/_default/baseof.html | 16 ++++++++++++++++ layouts/_default/list.html | 13 +++++++++++++ layouts/_default/single.html | 3 +++ layouts/blog/list.html | 19 +++++++++++++++++++ layouts/blog/single.html | 27 +++++++++++++++++++++++++++ layouts/index.html | 24 ++++++++++++++++++++++++ layouts/partials/blog-list.html | 16 ++++++++++++++++ layouts/partials/blog-section-list.html | 8 ++++++++ layouts/partials/footer.html | 5 +++++ layouts/partials/head.html | 30 ++++++++++++++++++++++++++++++ layouts/partials/header.html | 10 ++++++++++ 12 files changed, 171 insertions(+) create mode 100644 layouts/404.html create mode 100644 layouts/_default/baseof.html create mode 100644 layouts/_default/list.html create mode 100644 layouts/_default/single.html create mode 100644 layouts/blog/list.html create mode 100644 layouts/blog/single.html create mode 100644 layouts/index.html create mode 100644 layouts/partials/blog-list.html create mode 100644 layouts/partials/blog-section-list.html create mode 100644 layouts/partials/footer.html create mode 100644 layouts/partials/head.html create mode 100644 layouts/partials/header.html (limited to 'layouts') diff --git a/layouts/404.html b/layouts/404.html new file mode 100644 index 0000000..e69de29 diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100644 index 0000000..9bc0b22 --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,16 @@ + + + {{- partial "head.html" . -}} + + {{ if ne .Kind "home" }} + + {{- partial "header.html" . -}} + {{ end }} + +
+ {{- block "main" . }}{{- end }} +
+ + {{- partial "footer.html" . -}} + + diff --git a/layouts/_default/list.html b/layouts/_default/list.html new file mode 100644 index 0000000..5ecbbe0 --- /dev/null +++ b/layouts/_default/list.html @@ -0,0 +1,13 @@ +{{ define "main" }} +
+

{{ if .Params.heading }}{{ .Params.heading }}{{ else }}{{ .Title }}{{ end }}

+ + {{ .Content }} + + {{ range (union .Sections .Pages).ByDate.Reverse }} +

+ {{ .Title }} +

+ {{ end }} +
+{{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..e0e8308 --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,3 @@ +{{ define "main" }} + {{ .Content }} +{{ end }} diff --git a/layouts/blog/list.html b/layouts/blog/list.html new file mode 100644 index 0000000..9040dea --- /dev/null +++ b/layouts/blog/list.html @@ -0,0 +1,19 @@ +{{ define "main" }} +
+

+ {{ if .Params.heading }} + {{ .Params.heading }} + {{ else }} + {{ .Title }} + {{ end }} +

+ + {{ .Content }} + + {{ if .Sections }} + {{- partial "blog-section-list.html" . -}} + {{ else }} + {{- partial "blog-list.html" . -}} + {{ end }} +
+{{ end }} diff --git a/layouts/blog/single.html b/layouts/blog/single.html new file mode 100644 index 0000000..035db0a --- /dev/null +++ b/layouts/blog/single.html @@ -0,0 +1,27 @@ +{{ define "main" }} +
+
+

{{ .Title }}

+ +
+ + Published on + {{ .Date.Format "2" }}{{ if in (slice 1 21 31) .Date.Day}}st{{ else if in (slice 2 22) .Date.Day}}nd{{ else if in (slice 3 23) .Date.Day}}rd{{ else }}th{{ end }} + {{ .Date.Format "January" }} + {{ .Date.Format "2006" }} + + + + Approx + {{ .ReadingTime }} + minute{{ if (ne .ReadingTime 1) }}s{{ end }} + read + +
+ +
+
+ + {{ .Content }} +
+{{ end }} diff --git a/layouts/index.html b/layouts/index.html new file mode 100644 index 0000000..46e5188 --- /dev/null +++ b/layouts/index.html @@ -0,0 +1,24 @@ +{{ define "main" }} +
+
+ + +
+ {{ .Content }} +
+
+
+{{ end }} diff --git a/layouts/partials/blog-list.html b/layouts/partials/blog-list.html new file mode 100644 index 0000000..c05eb84 --- /dev/null +++ b/layouts/partials/blog-list.html @@ -0,0 +1,16 @@ +{{ range (union .Sections .Pages).ByDate.Reverse }} +
+ +
+ + {{/* .Date.Format "2" }}{{ if in (slice 1 21 31) .Date.Day}}st{{ else if in (slice 2 22) .Date.Day}}nd{{ else if in (slice 3 23) .Date.Day}}rd{{ else }}th{{ end }} {{ .Date.Format "January" */}} + {{ .Date.Format "02" }} {{ .Date.Format "Jan" }} + + + + {{ .Title }} + +
+
+
+{{ end }} diff --git a/layouts/partials/blog-section-list.html b/layouts/partials/blog-section-list.html new file mode 100644 index 0000000..b475f27 --- /dev/null +++ b/layouts/partials/blog-section-list.html @@ -0,0 +1,8 @@ +{{ range .Sections.ByDate.Reverse }} +
+ +

{{ .Title }}

+
+ {{- partial "blog-list.html" . -}} +
+{{ end }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html new file mode 100644 index 0000000..63ba377 --- /dev/null +++ b/layouts/partials/footer.html @@ -0,0 +1,5 @@ + diff --git a/layouts/partials/head.html b/layouts/partials/head.html new file mode 100644 index 0000000..9cf7575 --- /dev/null +++ b/layouts/partials/head.html @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + {{ if eq .Section "blog" }} + + {{ else }} + + {{ end }} + + + {{ if .Title }} + {{ .Title }} + {{ else }} + {{ .Site.Title }} + {{ end }} + + diff --git a/layouts/partials/header.html b/layouts/partials/header.html new file mode 100644 index 0000000..ba1869b --- /dev/null +++ b/layouts/partials/header.html @@ -0,0 +1,10 @@ + -- cgit v1.2.3