diff options
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/404.html | 0 | ||||
-rw-r--r-- | layouts/_default/baseof.html | 13 | ||||
-rw-r--r-- | layouts/_default/list.html | 0 | ||||
-rw-r--r-- | layouts/_default/single.html | 16 | ||||
-rw-r--r-- | layouts/blog/baseof.html | 11 | ||||
-rw-r--r-- | layouts/blog/list.html | 19 | ||||
-rw-r--r-- | layouts/blog/single.html | 6 | ||||
-rw-r--r-- | layouts/docs/baseof.html | 11 | ||||
-rw-r--r-- | layouts/docs/list.html | 34 | ||||
-rw-r--r-- | layouts/docs/single.html | 24 | ||||
-rw-r--r-- | layouts/index.html | 32 | ||||
-rw-r--r-- | layouts/lists/baseof.html | 11 | ||||
-rw-r--r-- | layouts/lists/list.html | 14 | ||||
-rw-r--r-- | layouts/lists/single.html | 5 | ||||
-rw-r--r-- | layouts/partials/footer.html | 10 | ||||
-rw-r--r-- | layouts/partials/head.html | 30 | ||||
-rw-r--r-- | layouts/partials/index_nav.html | 27 | ||||
-rw-r--r-- | layouts/partials/intro.html | 10 | ||||
-rw-r--r-- | layouts/partials/nav.html | 11 |
19 files changed, 284 insertions, 0 deletions
diff --git a/layouts/404.html b/layouts/404.html new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/layouts/404.html 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 @@ +<!DOCTYPE html> +<html lang="{{ .Site.LanguageCode }}"> + {{- partial "head.html" . -}} + <body> + {{ if ne .Kind "home" }} + {{- partial "nav.html" .Params.navpage -}} + {{ end }} + <main> + {{- block "main" . }}{{- end }} + </main> + {{- partial "footer.html" . -}} + </body> +</html> diff --git a/layouts/_default/list.html b/layouts/_default/list.html new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/layouts/_default/list.html 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" }} +<div class="section" style="background-color: {{ .Params.bgColor }};"> + <div class="section-child"> + <div class="img-r"> + <a href="/danbooru-notice/"> + <img src="{{ .Params.img }}" alt="{{ .Params.imgAlt }}"/> + </a> + </div> + <p>{{ .Params.imgText }}</p> + + <div id="content"> + {{ .Content }} + </div> + </div> +</div> +{{ 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 @@ +<!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 }} 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 @@ +<!DOCTYPE html> +<html lang="{{ .Site.LanguageCode }}"> + {{- partial "head.html" . -}} + <body> + {{- partial "nav.html" "docs" -}} + <main> + {{- block "main" . }}{{- end }} + </main> + {{- partial "footer.html" . -}} + </body> +</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" }} + <div> + <h1 class="title" style="{{ if eq (len .Pages) 0 }}text-align: center;{{ end }}"> + {{ if .Params.heading }}{{ .Params.heading }}{{ else }}{{ .Title }}{{ end }} + </h1> + <p>{{ .Description }}</p> + + {{ .Content }} + + <ul class="range"> + {{ if ne (len .Sections) 0}} + {{ range .Sections }} + <li> + <a href="{{ .RelPermalink }}">{{ .Title }}</a> - {{ .Description }} + <ul class="range"> + <!-- Show pages under this section (but not subsections) --> + {{ range (union .Sections .Pages).ByWeight }} + <li> + <a href="{{ .RelPermalink }}">{{ .Title }}</a> - {{ .Description }} + </li> + {{ end }} + </ul> + </li> + {{ end }} + {{ else }} + {{ range .RegularPages.ByWeight }} + <li> + <a href="{{ .RelPermalink }}">{{ .Title }}</a> - {{ .Description }} + </li> + {{ end }} + {{ end }} + </ul> + </div> +{{ 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 "<div class='table-wrapper'> ${1} </div>" }} +<div> + <h1 style="text-align: center;" class="title">{{ .Title }}</h1> + <!--p style="text-align: center;">{{ .Summary }}</p--> + {{ .Content | replaceRE "(<table>(?:.|\n)+?</table>)" $wrappedTable | safeHTML }} + + <!-- For some reason prevpage shows next and vice versa --> + <div class="page-nav"> + <span> + {{ if .NextInSection }} + <a href="{{ .NextInSection.Permalink }}">Previous: {{ .NextInSection.Title }}</a> + {{ end }} + </span> + + <span> + {{ if .PrevInSection }} + <a href="{{ .PrevInSection.Permalink }}">Next: {{ .PrevInSection.Title }}</a> + {{ end }} + </span> + </div> + +</div> +{{ 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" }} +<div class="section" id="section-1"> + <div class="section-child"> + {{- partial "index_nav.html" . -}} + <!-- The first section of the page will be loaded with partial intro.html --> + <!-- and/or .Site.Params.indexContent variable in your hugo config file. --> + <!-- While the second section will be generated by content/_index.md file --> + <!-- basically, the first section is more permanent, --> + <!-- while you can regularly and easily change the second section --> + + {{ if .Site.Params.indexContent }} + {{ .Site.Params.indexContent | safeHTML }} + {{ else }} + {{- partial "intro.html" . -}} + {{ end }} + </div> +</div> + +<div class="section" id="section-2"> + <div class="section-child"> + <div id="other-content"> + {{ .Content }} + </div> + <div class="img-l"> + <!-- remove the <a> tag if the image shouldn't be a hyperlink --> + <a href="{{ .Params.imgLink }}"> + <img src="{{ .Params.img }}" alt="{{ .Params.imgAlt }}"/> + </a> + </div> + </div> +</div> +{{ 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 @@ +<!DOCTYPE html> +<html lang="{{ .Site.LanguageCode }}"> + {{- partial "head.html" . -}} + <body> + {{- partial "nav.html" "lists" -}} + <main> + {{- block "main" . }}{{- end }} + </main> + {{- partial "footer.html" . -}} + </body> +</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" }} + <div class="list"> + <h1>{{ if .Params.heading }}{{ .Params.heading }}{{ else }}{{ .Title }}{{ end }}</h1> + <p>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</p> + <ul> + {{ range .Pages.ByTitle }} + <li> + <p><a href="{{ .RelPermalink }}">{{ .Title }}</a></p> + </li> + {{ end }} + </ul> + </div> +{{ 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" }} +<div class="{{ .Params.listType }}"> + {{ .Content }} +</div> +{{ 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 @@ +<footer> + <div id="gifs"> + {{ range .Site.Params.gifs}} + {{ . | safeHTML }} + {{ end }} + </div> + <div id="copyright"> + {{ .Site.Copyright | safeHTML }} + </div> +</footer> 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 @@ +<head> + <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width,initial-scale=1"> + <meta name="author" content="{{ .Site.Author.name }}"> + + <!-- conditionally load css, set title, description, etc --> + <!-- add or remove these if you want to have more types of pages --> + {{- if eq .Type "page" -}} + <meta name="description" content="{{ .Title }}"> + <meta name="robots" content="index, follow"> + <link rel="stylesheet" type="text/css" href="/css/index.css"> + <title>{{ if .Title }}{{ .Title }}{{ else }}{{ .Site.Title }}{{ end }}</title> + {{ else if eq .Type "blog"}} + <meta name="description" content="{{ .Title }}"> + <meta name="robots" content="index, follow"> + <link rel="alternate" type="application/rss+xml" href="/blog/index.xml" title=""> + <link rel="stylesheet" type="text/css" href="/css/blog.css"> + <title>{{ .Title }} - {{ .Site.Params.blogTitle }}</title> + {{ else if eq .Type "lists"}} + <meta name="description" content="{{ .Title }}"> + <meta name="robots" content="index, follow"> + <link rel="stylesheet" type="text/css" href="/css/lists.css"> + <title>{{ .Title }} - {{ .Site.Params.listsTitle }}</title> + {{ else if eq .Type "docs"}} + <meta name="description" content="{{ .Title }}"> + <meta name="robots" content="index, follow"> + <link rel="stylesheet" type="text/css" href="/css/docs.css"> + <title>{{ .Title }} - {{ .Site.Params.docsTitle }}</title> + {{ end }} +</head> 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 @@ +<div id="image-and-links"> + <img id="my-image" src="{{ .Site.Params.mainPictureURL }}" alt="{{ .Site.Params.mainPictureAlt }}"> + <ul id="my-links"> + <li> + <a href="/blog/">Blog</a> + </li> + <li> + <a href="/lists/">Lists</a> + </li> + <li> + <a href="/docs/">Projects</a> + </li> + <li> + <a href="https://sns.mikunonaka.net/odysee">Odysee</a> + </li> + <li> + <a href="https://sns.mikunonaka.net/youtube">YouTube</a> + </li> + <li> + <a href="https://github.com/MikunoNaka">GitHub</a> + </li> + <li> + <a href="/contact/">Contact</a> + </li> + </ul> +</div> + 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 @@ +<div id="my-intro"> + <h1>Hello, World!</h1> + <p> + Thanks for using <a href="https://github.com/MikunoNaka/vidhukant-hugo">Vidhu Kant's Hugo Theme!</a> + <br/> + 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. + </p> + <h2>Also look at the example config.toml file for more variables you can set</h2> +</div> 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 @@ +<header> + <nav> + <ul> + <li><a href="/">Home</a></li> + <li><a href="/contact/" class="{{ if eq "contact" . }}selected{{ end }}">Contact</a></li> + <li><a href="/blog/" class="{{ if eq "blog" . }}selected{{ end }}">Blog</a></li> + <li><a href="/lists/" class="{{ if eq "lists" . }}selected{{ end }}">Lists</a></li> + <li><a href="/docs/" class="{{ if eq "docs" . }}selected{{ end }}">Docs</a></li> + </ul> + </nav> +</header> |