diff options
author | mms <michal@sapka.me> | 2024-04-08 22:12:32 +0200 |
---|---|---|
committer | mms <michal@sapka.me> | 2024-04-08 22:12:32 +0200 |
commit | 3b5710f60c19760ccfc211b342f180cc5508d50d (patch) | |
tree | b358226b0a030a558dc86086a64bbe05cacb1991 /layouts | |
parent | 47be93b724133b1edeac15faa46f1198557e33e3 (diff) |
feat: BSD as HP section
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/index.html | 5 | ||||
l--------- | layouts/partials/.#menu.html | 1 | ||||
-rw-r--r-- | layouts/partials/homepage/bsd.html | 16 | ||||
-rw-r--r-- | layouts/partials/menu.html | 34 |
4 files changed, 55 insertions, 1 deletions
diff --git a/layouts/_default/index.html b/layouts/_default/index.html index 3acf34a..9dc6df3 100644 --- a/layouts/_default/index.html +++ b/layouts/_default/index.html @@ -27,12 +27,15 @@ Hey! I'm Michał Sapka, a computer programmer living in Kraków, Poland. This we {{ end }} <p><a href="/all_updates">» All updates</a><BR> <a href="/blog/">» Go to blog</a></p> + + {{ partial "partials/homepage/bsd.html" . }} + <h2>Sections</h2> <nav> <P><a class="sec-link" href="/blog/"><b>Blog</b>: my shorter publications withount any theme. You can treat it as E/N site.</a> </p> <P><a class="sec-link" href="/articles/"><b>Articles</b>: longer publications that don't fit blog or any other category.</a> </p> - <P><a class="sec-link" href="/bsd/"><b>BSD site</b>: my writings on Berkley Standard Distribution flavors. Those are the OSes I use on the daily basis.</a> </p> + <P><a class="sec-link" href="/emacs/"><b>C-X Emacs</b>: this is my Emacs. There are many like it, but this one is mine. My Emacs is my best friend. It is my life.</a> </p> <P><a class="sec-link" href="/star-trek/"><b>Star Trek fan site</b>: my little shrine to the greatest american Sci-Fi that has ever graced our screens.</a> </p> <P><a class="sec-link" href="/funnies/"><b>Funnies</b>: A small, curated collection of things I found funny or ammusing.</a> </p> 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 }} + |