summaryrefslogtreecommitdiff
path: root/layouts/partials
diff options
context:
space:
mode:
authorShubham Saini <me@ubh.sh>2023-02-09 00:19:28 +0000
committerShubham Saini <me@ubh.sh>2023-02-09 00:19:28 +0000
commitd7da16ecfa5cadb643df78694db44963ba665cbe (patch)
tree00c5234f542f7064e91827064767bcf59f094a2c /layouts/partials
init
Diffstat (limited to 'layouts/partials')
-rwxr-xr-xlayouts/partials/footer.html11
-rwxr-xr-xlayouts/partials/head.html11
-rwxr-xr-xlayouts/partials/header.html22
-rwxr-xr-xlayouts/partials/paginator.html15
4 files changed, 59 insertions, 0 deletions
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 @@
1<hr>
2<footer>
3 <div class="main">
4 {{- if isset .Site.Params "copyright" -}}
5 {{ .Site.Params.Copyright | markdownify }}
6 {{- end -}}
7 </div>
8 <nav>
9 <a class="footings" rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img class="footings" alt="Creative Commons License" src="https://licensebuttons.net/l/by-nc-sa/4.0/80x15.png" /></a>
10 </nav>
11</footer>
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 @@
1<header>
2 <div class="main">
3 <a href="/">
4 <div class="logo" style="background-image: url('/images/logo.png');"></div>
5 </div>
6 <nav>
7 {{ range .Site.Menus.main }}
8 <a href="{{ .URL }}">{{ .Name }}</a>
9 {{ end }}
10 </nav>
11</header>
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 @@
1<head>
2 <meta charset="utf-8" />
3 <meta http-equiv="X-UA-Compatible" content="IE=edge">
4 {{- $title := ( .Title ) -}}
5 {{- $siteTitle := ( .Site.Title ) -}}
6 {{- if .IsHome -}}
7 <title>{{ $siteTitle }}</title>
8 {{- else -}}
9 <title>{{ $title }}</title>
10 {{- end -}}
11 {{- if isset .Site.Params "favicon" -}}
12 <link rel="icon" type="image/png" href={{ .Site.Params.favicon }} />
13 {{- end -}}
14 <meta name="viewport" content="width=device-width, initial-scale=1">
15 {{ with .OutputFormats.Get "rss" -}}
16 {{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
17 {{ end -}}
18 <link rel="stylesheet" type="text/css" media="screen" href="/css/main.css" />
19 {{- if or (eq .Site.Params.mode "auto") (eq .Site.Params.mode "dark") -}}
20 <link rel="stylesheet" type="text/css" href="/css/dark.css" {{ if eq .Site.Params.mode "auto" }}media="(prefers-color-scheme: dark)"{{ end }} />
21 {{- end -}}
22</head>
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 @@
1{{ $pag := $.Paginator }}
2{{ if gt $pag.TotalPages 1 }}
3<ul class="pagination">
4 <span class="page-item page-prev">
5 {{ if $pag.HasPrev }}
6 <a {{ if $pag.HasPrev }}href="{{ $pag.Prev.URL }}"{{ end }} class="page-link" aria-label="Previous"><span aria-hidden="true">← Prev</span></a>
7 {{ end }}
8 </span>
9 <span class="page-item page-next">
10 {{ if $pag.HasNext }}
11 <a {{ if $pag.HasNext }}href="{{ $pag.Next.URL }}"{{ end }} class="page-link" aria-label="Next"><span aria-hidden="true">Next →</span></a>
12 {{ end }}
13 </span>
14</ul>
15{{ end }}