diff options
author | mms <michal@sapka.me> | 2023-12-24 23:35:44 +0100 |
---|---|---|
committer | mms <michal@sapka.me> | 2023-12-24 23:35:51 +0100 |
commit | e4e8c804f54f3e909e698f67598bb00e436b1e53 (patch) | |
tree | fdd261b7e4efcac9ebb9121a8433fdac40fdd61d /layouts | |
parent | 10bf749a75bb711d960dcce7e8e40078c9ce5eb3 (diff) |
feat: hier menu
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/baseof.html | 37 | ||||
-rw-r--r-- | layouts/_default/index.html | 1 | ||||
-rw-r--r-- | layouts/partials/back_nav.html | 2 | ||||
-rw-r--r-- | layouts/shortcodes/menu.html | 12 |
4 files changed, 38 insertions, 14 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index e0fdb94..be7e066 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -52,22 +52,27 @@ {{ $section_class = "blog" }} {{ else if in .Page.Params.categories "article" }} {{ $section_class = "article" }} + {{ else if in .Page.Params.categories "emacs" }} + {{ $section_class = "emacs" }} {{ end }} <body class="{{ $section_class }}"> <header> <div class="logo"> - {{ if in .Page.Params.category "bsd" }} - {{ $logo := resources.Get "logos/logo-beastie-white.svg" }} + {{ if in .Page.Params.category "bsd" }} + {{ $logo := resources.Get "logos/logo-beastie-white.svg"}} <img src="{{$logo.RelPermalink}}" class="beastie"> - {{ else if in .Page.Params.categories "star-trek" }} + {{ else if in .Page.Params.categories "star-trek" }} {{ $logo := resources.Get "logos/logo-startrek-white.svg" }} <img src="{{$logo.RelPermalink}}" class="stbadge"> - {{ else if in .Page.Params.category "blog" }} + {{ else if in .Page.Params.category "blog" }} {{ $logo := resources.Get "logos/logo-blog-white.svg" }} <img src="{{$logo.RelPermalink}}" class="blogicon"> - {{ else if in .Page.Params.categories "article" }} + {{ else if in .Page.Params.categories "article" }} {{ $logo := resources.Get "logos/logo-article-white.svg" }} <img src="{{$logo.RelPermalink}}" class="files"> + {{ else if in .Page.Params.Categories "emacs" }} + {{ $logo := resources.Get "logos/logo-emacs-white.svg" }} + <img src="{{$logo.RelPermalink}}" class="emacslogo"> {{ end }} </div> @@ -99,17 +104,21 @@ <footer> <nav id="top-nav"> <nav id="main-nav"> - <a href="/">Home</a> - <a href="/about">About</a> - <a href="/links">Links</a> + <a href="/">Home</a> | + <a href="/about">About</a> | + <a href="/links">Links</a> | <a href="/index.xml">RSS</a> </nav> - <nav id="categories-nav"> - <a href="/category/engineering">Engineering</a> - <a href="/category/emacs">Emacs</a> - <a href="/category/bsd">BSD</a> - <a href="/category/computer-history">Computer History</a> - <a href="/star-trek">Star Trek</a> + <nav id="categories-nav"> + <a href="/articles/">Articles</a> | + <a href="/blog/">Blog</a> | + <a href="/bsd/">BSD</a> | + <a href="/emacs/">Emacs</a> | + <a href="/funnies/">Funnies</a> | + <a href="/site/">Site info</a> | + <a href="/star-trek/">Star Trek </a> | + <a href="/vcs/git">VCS</a> + </nav> </nav> </nav> </footer> diff --git a/layouts/_default/index.html b/layouts/_default/index.html index 60957e2..4df8057 100644 --- a/layouts/_default/index.html +++ b/layouts/_default/index.html @@ -17,6 +17,7 @@ Hey! I'm Michał Sapka, a computer programmer living in Kraków, Poland. This we <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> <p><a class="sec-link" href="/vcs/git/"><b>Version control system</b> : My little code repository. I don't expect to cooporate on any of those, so it's just stagit.</a></p> diff --git a/layouts/partials/back_nav.html b/layouts/partials/back_nav.html index a1dded7..c3a3371 100644 --- a/layouts/partials/back_nav.html +++ b/layouts/partials/back_nav.html @@ -12,6 +12,8 @@ <a href="/blog/">← Back to Michal's blog</a> {{- else if in .Page.Params.Categories "article" }} <a href="/articles/">← Back to Article Library</a> +{{- else if in .Page.Params.Categories "emacs" }} + <a href="/emacs/">← Back to C-X emacs</a> {{- end }} {{- if not .Page.Params.hardback }} <br> diff --git a/layouts/shortcodes/menu.html b/layouts/shortcodes/menu.html index 1b3dc54..356c675 100644 --- a/layouts/shortcodes/menu.html +++ b/layouts/shortcodes/menu.html @@ -8,6 +8,18 @@ <a href="{{ .URL }}"> {{ .Name }} </a> + + {{ if .HasChildren }} + <ul> + {{ range .Children }} + <li> + <a href="{{ .URL }}"> + {{ .Name }} + </a> + {{ end }} + </ul> + + {{ end }} {{- end }} </ol> </nav> |