From d26ecb989f5e5b9e06b34c106a3d391fd2910524 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Tue, 20 Sep 2022 22:35:52 +0530 Subject: First commit --- layouts/404.html | 0 layouts/_default/baseof.html | 13 +++++++++++++ layouts/_default/list.html | 0 layouts/_default/single.html | 16 ++++++++++++++++ layouts/blog/baseof.html | 11 +++++++++++ layouts/blog/list.html | 19 +++++++++++++++++++ layouts/blog/single.html | 6 ++++++ layouts/docs/baseof.html | 11 +++++++++++ layouts/docs/list.html | 34 ++++++++++++++++++++++++++++++++++ layouts/docs/single.html | 24 ++++++++++++++++++++++++ layouts/index.html | 32 ++++++++++++++++++++++++++++++++ layouts/lists/baseof.html | 11 +++++++++++ layouts/lists/list.html | 14 ++++++++++++++ layouts/lists/single.html | 5 +++++ layouts/partials/footer.html | 10 ++++++++++ layouts/partials/head.html | 30 ++++++++++++++++++++++++++++++ layouts/partials/index_nav.html | 27 +++++++++++++++++++++++++++ layouts/partials/intro.html | 10 ++++++++++ layouts/partials/nav.html | 11 +++++++++++ 19 files changed, 284 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/baseof.html create mode 100644 layouts/blog/list.html create mode 100644 layouts/blog/single.html create mode 100644 layouts/docs/baseof.html create mode 100644 layouts/docs/list.html create mode 100644 layouts/docs/single.html create mode 100644 layouts/index.html create mode 100644 layouts/lists/baseof.html create mode 100644 layouts/lists/list.html create mode 100644 layouts/lists/single.html create mode 100644 layouts/partials/footer.html create mode 100644 layouts/partials/head.html create mode 100644 layouts/partials/index_nav.html create mode 100644 layouts/partials/intro.html create mode 100644 layouts/partials/nav.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..2c312be --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,13 @@ + + + {{- partial "head.html" . -}} + + {{ if ne .Kind "home" }} + {{- partial "nav.html" .Params.navpage -}} + {{ 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..e69de29 diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..4602cac --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,16 @@ +{{ define "main" }} +
+
+
+ + {{ .Params.imgAlt }} + +
+

{{ .Params.imgText }}

+ +
+ {{ .Content }} +
+
+
+{{ end }} 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 @@ + + + {{- partial "head.html" . -}} + + {{- partial "nav.html" "blog" -}} +
+ {{- block "main" . }}{{- end }} +
+ {{- partial "footer.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" }} +
+

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

+ {{ range .Sections.ByDate.Reverse }} +

{{ .Title }}:

+ + {{ end }} +
+{{ 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" }} +
+

{{ .Title }}

+ {{ .Content }} +
+{{ end }} diff --git a/layouts/docs/baseof.html b/layouts/docs/baseof.html new file mode 100644 index 0000000..2e4e23a --- /dev/null +++ b/layouts/docs/baseof.html @@ -0,0 +1,11 @@ + + + {{- partial "head.html" . -}} + + {{- partial "nav.html" "docs" -}} +
+ {{- block "main" . }}{{- end }} +
+ {{- partial "footer.html" . -}} + + diff --git a/layouts/docs/list.html b/layouts/docs/list.html new file mode 100644 index 0000000..f8d665a --- /dev/null +++ b/layouts/docs/list.html @@ -0,0 +1,34 @@ +{{ define "main" }} +
+

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

+

{{ .Description }}

+ + {{ .Content }} + + +
+{{ end }} diff --git a/layouts/docs/single.html b/layouts/docs/single.html new file mode 100644 index 0000000..64a74e4 --- /dev/null +++ b/layouts/docs/single.html @@ -0,0 +1,24 @@ +{{ define "main" }} +{{ $wrappedTable := printf "
${1}
" }} +
+

{{ .Title }}

+ + {{ .Content | replaceRE "((?:.|\n)+?
)" $wrappedTable | safeHTML }} + + + + +
+{{ end }} diff --git a/layouts/index.html b/layouts/index.html new file mode 100644 index 0000000..fcdb58a --- /dev/null +++ b/layouts/index.html @@ -0,0 +1,32 @@ +{{ define "main" }} +
+
+ {{- partial "index_nav.html" . -}} + + + + + + + {{ if .Site.Params.indexContent }} + {{ .Site.Params.indexContent | safeHTML }} + {{ else }} + {{- partial "intro.html" . -}} + {{ end }} +
+
+ +
+
+
+ {{ .Content }} +
+
+ + + {{ .Params.imgAlt }} + +
+
+
+{{ end }} diff --git a/layouts/lists/baseof.html b/layouts/lists/baseof.html new file mode 100644 index 0000000..943d948 --- /dev/null +++ b/layouts/lists/baseof.html @@ -0,0 +1,11 @@ + + + {{- partial "head.html" . -}} + + {{- partial "nav.html" "lists" -}} +
+ {{- block "main" . }}{{- end }} +
+ {{- partial "footer.html" . -}} + + diff --git a/layouts/lists/list.html b/layouts/lists/list.html new file mode 100644 index 0000000..e2bc2e0 --- /dev/null +++ b/layouts/lists/list.html @@ -0,0 +1,14 @@ +{{ define "main" }} +
+

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

+

These are random lists of stuff by me. These include some recommendations or things I use, maybe some plans as a "public to-do list", etc

+ +
+{{ end }} + diff --git a/layouts/lists/single.html b/layouts/lists/single.html new file mode 100644 index 0000000..f5870e5 --- /dev/null +++ b/layouts/lists/single.html @@ -0,0 +1,5 @@ +{{ define "main" }} +
+ {{ .Content }} +
+{{ end }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html new file mode 100644 index 0000000..fabde24 --- /dev/null +++ b/layouts/partials/footer.html @@ -0,0 +1,10 @@ + diff --git a/layouts/partials/head.html b/layouts/partials/head.html new file mode 100644 index 0000000..565da2b --- /dev/null +++ b/layouts/partials/head.html @@ -0,0 +1,30 @@ + + + + + + + + {{- if eq .Type "page" -}} + + + + {{ if .Title }}{{ .Title }}{{ else }}{{ .Site.Title }}{{ end }} + {{ else if eq .Type "blog"}} + + + + + {{ .Title }} - {{ .Site.Params.blogTitle }} + {{ else if eq .Type "lists"}} + + + + {{ .Title }} - {{ .Site.Params.listsTitle }} + {{ else if eq .Type "docs"}} + + + + {{ .Title }} - {{ .Site.Params.docsTitle }} + {{ end }} + diff --git a/layouts/partials/index_nav.html b/layouts/partials/index_nav.html new file mode 100644 index 0000000..6d372d1 --- /dev/null +++ b/layouts/partials/index_nav.html @@ -0,0 +1,27 @@ + + diff --git a/layouts/partials/intro.html b/layouts/partials/intro.html new file mode 100644 index 0000000..39f4a9a --- /dev/null +++ b/layouts/partials/intro.html @@ -0,0 +1,10 @@ +
+

Hello, World!

+

+ Thanks for using Vidhu Kant's Hugo Theme! +
+ Edit the vidhukant-hugo/layouts/partials/intro.html file or set params.indexContent to some html which will be shown here! + For the second section of this page, edit your content/_index.md file. +

+

Also look at the example config.toml file for more variables you can set

+
diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html new file mode 100644 index 0000000..fc951bd --- /dev/null +++ b/layouts/partials/nav.html @@ -0,0 +1,11 @@ +
+ +
-- cgit v1.2.3