diff options
Diffstat (limited to 'layouts/partials')
l--------- | layouts/partials/.#menu.html | 1 | ||||
-rw-r--r-- | layouts/partials/homepage/bsd.html | 16 | ||||
-rw-r--r-- | layouts/partials/menu.html | 34 |
3 files changed, 51 insertions, 0 deletions
diff --git a/layouts/partials/.#menu.html b/layouts/partials/.#menu.html new file mode 120000 index 0000000..d0039d2 --- /dev/null +++ b/layouts/partials/.#menu.html @@ -0,0 +1 @@ +mms@voyager.83459:1712135685
\ No newline at end of file diff --git a/layouts/partials/homepage/bsd.html b/layouts/partials/homepage/bsd.html new file mode 100644 index 0000000..892c62f --- /dev/null +++ b/layouts/partials/homepage/bsd.html @@ -0,0 +1,16 @@ +{{- $file := "freebsd-beastie.png" }} +{{- $path := printf "content_images/%s" $file}} +{{- $img := resources.Get $path }} +{{- $img1x := $img.Resize "150x webp" }} +{{- $img2x := $img.Resize "300x webp" }} + + + +<section class="bsd"> + + + <h2 id="bsd">Berkeley Software Distribution</h2> + Some articles on the BSD family of Operating Systems I use + {{ partial "menu.html" (dict "menuID" "bsd" "page" .) }} +</section> + diff --git a/layouts/partials/menu.html b/layouts/partials/menu.html new file mode 100644 index 0000000..0773944 --- /dev/null +++ b/layouts/partials/menu.html @@ -0,0 +1,34 @@ +{{- $page := .page }} +{{- $menuID := .menuID }} + +{{- with index site.Menus $menuID }} + <nav> + <ul> + {{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }} + </ul> + </nav> +{{- end }} + +{{- define "partials/inline/menu/walk.html" }} + {{- $page := .page }} + {{- range .menuEntries }} + + + {{ if .Params.nonpage }} + <li>{{.Name }} + {{else if .Params.placeholder }} + <li class="placeholder">{{.Name }} + {{else}} + <li><b><a href="{{ .URL }}">{{ .Name }}</b></a> + {{end}} + + + {{- with .Children }} + <ul> + {{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }} + </ul> + {{- end }} + </li> + {{- end }} +{{- end }} + |