aboutsummaryrefslogtreecommitdiff
path: root/layouts/blog
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@vidhukant.xyz>2022-09-20 22:35:52 +0530
committerVidhu Kant Sharma <vidhukant@vidhukant.xyz>2022-09-20 22:35:52 +0530
commitd26ecb989f5e5b9e06b34c106a3d391fd2910524 (patch)
tree5b2f2391eb682881c90930c040f260854b3f1936 /layouts/blog
First commit
Diffstat (limited to 'layouts/blog')
-rw-r--r--layouts/blog/baseof.html11
-rw-r--r--layouts/blog/list.html19
-rw-r--r--layouts/blog/single.html6
3 files changed, 36 insertions, 0 deletions
diff --git a/layouts/blog/baseof.html b/layouts/blog/baseof.html
new file mode 100644
index 0000000..0a6ab17
--- /dev/null
+++ b/layouts/blog/baseof.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html lang="{{ .Site.LanguageCode }}">
+ {{- partial "head.html" . -}}
+ <body>
+ {{- partial "nav.html" "blog" -}}
+ <main>
+ {{- block "main" . }}{{- end }}
+ </main>
+ {{- partial "footer.html" . -}}
+ </body>
+</html>
diff --git a/layouts/blog/list.html b/layouts/blog/list.html
new file mode 100644
index 0000000..60d7a2f
--- /dev/null
+++ b/layouts/blog/list.html
@@ -0,0 +1,19 @@
+{{ define "main" }}
+ <div class="list">
+ <h1>{{ if .Params.heading }}{{ .Params.heading }}{{ else }}{{ .Title }}{{ end }}</h1>
+ {{ range .Sections.ByDate.Reverse }}
+ <h2 class="section" id="{{ .Title }}">{{ .Title }}:</h2>
+ <ul>
+ {{ range (union .Sections .Pages).ByDate.Reverse }}
+ <li>
+ <p>
+ <a href="{{ .RelPermalink }}">{{ .Title }}</a>
+ <sup>{{ .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" }}</sup>
+ </p>
+ </li>
+ {{ end }}
+ </ul>
+ {{ end }}
+ </div>
+{{ end }}
+
diff --git a/layouts/blog/single.html b/layouts/blog/single.html
new file mode 100644
index 0000000..155fc6b
--- /dev/null
+++ b/layouts/blog/single.html
@@ -0,0 +1,6 @@
+{{ define "main" }}
+<div>
+ <h1 style="text-align: center;">{{ .Title }}</h1>
+ {{ .Content }}
+</div>
+{{ end }}