diff options
author | Zach Berwaldt <zberwaldt@tutamail.com> | 2023-05-13 22:39:58 -0400 |
---|---|---|
committer | Zach Berwaldt <zberwaldt@tutamail.com> | 2023-05-13 22:39:58 -0400 |
commit | b34e09f8fe1011963934dbf40dc92f0b258592ca (patch) | |
tree | c99974d127163b266f107d5c9c5e1f126a233087 /layouts | |
parent | 24e058c3eb3a278023c4ecee7efa9a73774ded0b (diff) |
more layout work
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/baseof.html | 10 | ||||
-rw-r--r-- | layouts/_default/list.html | 12 | ||||
-rw-r--r-- | layouts/_default/single.html | 4 | ||||
-rw-r--r-- | layouts/_default/summary.html | 13 | ||||
-rw-r--r-- | layouts/index.html | 6 | ||||
-rw-r--r-- | layouts/partials/footer.html | 4 | ||||
-rw-r--r-- | layouts/partials/head.html | 3 | ||||
-rw-r--r-- | layouts/partials/header.html | 22 |
8 files changed, 63 insertions, 11 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 5f8e2ec..6ed81b9 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html | |||
@@ -1,10 +1,14 @@ | |||
1 | <!DOCTYPE html> | 1 | <!DOCTYPE html> |
2 | <html> | 2 | <html lang="en" data-theme="dark"> |
3 | {{- partial "head.html" . -}} | 3 | {{- partial "head.html" . -}} |
4 | <body> | 4 | <body> |
5 | {{- partial "header.html" . -}} | 5 | {{- partial "header.html" . -}} |
6 | <div id="content"> | 6 | <div |
7 | {{- block "main" . }}{{- end }} | 7 | class='container' |
8 | id="content" | ||
9 | > | ||
10 | {{- block "main" . }} | ||
11 | {{- end }} | ||
8 | </div> | 12 | </div> |
9 | {{- partial "footer.html" . -}} | 13 | {{- partial "footer.html" . -}} |
10 | </body> | 14 | </body> |
diff --git a/layouts/_default/list.html b/layouts/_default/list.html index e69de29..5d1370f 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html | |||
@@ -0,0 +1,12 @@ | |||
1 | {{ define "main" }} | ||
2 | <article> | ||
3 | <section>{{- .Content -}}</section> | ||
4 | <section> | ||
5 | {{ range .Paginator.Pages }} | ||
6 | <div> | ||
7 | {{ .Render "summary" }} | ||
8 | </div> | ||
9 | {{ end }} | ||
10 | </section> | ||
11 | </article> | ||
12 | {{ end }} | ||
diff --git a/layouts/_default/single.html b/layouts/_default/single.html index e69de29..3e48693 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html | |||
@@ -0,0 +1,4 @@ | |||
1 | {{ define "main" }} | ||
2 | <h1>{{ .Title }}</h1> | ||
3 | {{- .Content -}} | ||
4 | {{ end }} \ No newline at end of file | ||
diff --git a/layouts/_default/summary.html b/layouts/_default/summary.html new file mode 100644 index 0000000..afd5f2b --- /dev/null +++ b/layouts/_default/summary.html | |||
@@ -0,0 +1,13 @@ | |||
1 | <div> | ||
2 | <div> | ||
3 | {{with .CurrentSection.Title }}<span class="f6 db">{{ . }}</span>{{end}} | ||
4 | <h1 class="f3 near-black"> | ||
5 | <a href="{{ .RelPermalink }}" class="link black dim"> | ||
6 | {{ .Title }} | ||
7 | </a> | ||
8 | </h1> | ||
9 | <div> | ||
10 | {{ .Summary }} | ||
11 | </div> | ||
12 | </div> | ||
13 | </div> | ||
diff --git a/layouts/index.html b/layouts/index.html index 273d161..51f6625 100644 --- a/layouts/index.html +++ b/layouts/index.html | |||
@@ -1,5 +1,9 @@ | |||
1 | {{ define "main" }} | 1 | {{ define "main" }} |
2 | <div> | 2 | <div> |
3 | <h1>Hello World</h1> | 3 | {{ with .Site.GetPage "post" }} |
4 | {{ range .Pages }} | ||
5 | <h1>{{ .Title }}</h1> | ||
6 | {{ end }} | ||
7 | {{ end }} | ||
4 | </div> | 8 | </div> |
5 | {{ end }} \ No newline at end of file | 9 | {{ end }} \ No newline at end of file |
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index e72253b..eb1e7e7 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html | |||
@@ -1,3 +1,5 @@ | |||
1 | <footer> | 1 | <footer> |
2 | <h1>{{ .Title }}</h1> | 2 | <div class="container"> |
3 | <h3>{{ .Site.Title }}</h3> | ||
4 | </div> | ||
3 | </footer> \ No newline at end of file | 5 | </footer> \ No newline at end of file |
diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 73308f4..dbc55b1 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html | |||
@@ -1,5 +1,8 @@ | |||
1 | <head> | 1 | <head> |
2 | <title>{{ .Title }}</title> | 2 | <title>{{ .Title }}</title> |
3 | {{ with resources.Get "css/pico.min.css" }} | ||
4 | <link rel="stylesheet" href="{{ .RelPermalink }}"> | ||
5 | {{ end }} | ||
3 | {{ with resources.Get "css/main.css" }} | 6 | {{ with resources.Get "css/main.css" }} |
4 | <link rel="stylesheet" href="{{ .RelPermalink }}"> | 7 | <link rel="stylesheet" href="{{ .RelPermalink }}"> |
5 | {{ end }} | 8 | {{ end }} |
diff --git a/layouts/partials/header.html b/layouts/partials/header.html index d0930a3..4a9ae70 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html | |||
@@ -1,8 +1,18 @@ | |||
1 | <header> | 1 | <header> |
2 | <h1>{{ .Title | default .Site.Title }}</h1> | 2 | <div class="container"> |
3 | <nav> | 3 | <nav> |
4 | {{ range .Site.Menus.main }} | 4 | <ul> |
5 | <a href="{{ .URL }}">{{ .Name }}</a> | 5 | <li> |
6 | {{ end }} | 6 | <strong> |
7 | </nav> | 7 | {{ .Site.Title }} |
8 | </strong> | ||
9 | </li> | ||
10 | </ul> | ||
11 | <ul> | ||
12 | {{ range .Site.Menus.main }} | ||
13 | <li><a href="{{ .URL }}">{{ .Name }}</a></li> | ||
14 | {{ end }} | ||
15 | </ul> | ||
16 | </nav> | ||
17 | </div> | ||
8 | </header> \ No newline at end of file | 18 | </header> \ No newline at end of file |