Skip to content

Commit

Permalink
Rework sidebar menu setup
Browse files Browse the repository at this point in the history
  • Loading branch information
zeha committed Oct 3, 2024
1 parent e716d95 commit 4046571
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 21 deletions.
7 changes: 4 additions & 3 deletions assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ html{color:#000;background:#FFF}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre

.mainandnav { display: flex; flex-flow: row wrap; column-gap: 1em; }
.mainandnav main { width: auto; flex: 1 100%; }
.mainandnav nav { padding-top: 2em; flex: 1 auto; }
.mainandnav aside { padding-top: 2em; flex: 1 auto; }
@media all and (min-width: 800px) {
.mainandnav main { flex: 14 0; order: 1; }
.mainandnav nav { order: 2; }
.mainandnav aside { order: 2; }
}

main { padding: 0 1em 0 1em; }
Expand All @@ -64,5 +64,6 @@ html{color:#000;background:#FFF}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre
main ul.pagination { text-align: center; }
main ul.pagination li { display: inline; }

nav h2 { font-weight: bold; color: #999; line-height:2em; }
aside h2 { font-weight: bold; color: #999; line-height:2em; }
aside nav { padding-bottom: 2em; }
}
4 changes: 4 additions & 0 deletions content/categories/events/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: Events
menus: categories
---
4 changes: 4 additions & 0 deletions content/categories/general/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: General
menus: categories
---
4 changes: 4 additions & 0 deletions content/categories/kernel/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: Linux Kernel
menus: categories
---
4 changes: 4 additions & 0 deletions content/categories/links/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: Links
menus: categories
---
4 changes: 4 additions & 0 deletions content/categories/packages/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: Packages
menus: categories
---
6 changes: 2 additions & 4 deletions content/page/archive.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
---
title: "Archives"
title: "All posts"
layout: archive
slug: archive
type: page
menus: archives
params:
archive_page_type: post
menu:
main:
weight: 2
---
30 changes: 16 additions & 14 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,25 @@
<main>
{{ block "main" . }}{{ end }}
</main>
<nav>
{{ partial "menu.html" (dict "menuID" "main" "page" .) }}
<aside>
<h2>Archives</h2>
<ul>
<li><a href="{{ relref . "archive" }}">All posts</a></li>
</ul>
{{ partial "menu.html" (dict "menuID" "archives" "page" .) }}

<h2>Categories</h2>
{{ partial "menu.html" (dict "menuID" "categories" "page" .) }}

<h2>Subscribe</h2>
{{ with .OutputFormats.Get "RSS" -}}
<a href="{{ .Permalink | safeHTML }}"
onclick="(function(btn){var z=document.createElement('script');document.subtomeBtn=btn;z.src='https://www.subtome.com/load.js';document.body.appendChild(z);})(this); return false;"
value="Subscribe"
data-subtome-feeds="{{ .Permalink | safeHTML }}">
<img src="https://blog.grml.org/templates/2k11/img/subtome.png" alt="XML" style="border: 0px">
</a>
{{- end }}
</nav>
<nav>
{{ with .OutputFormats.Get "RSS" -}}
<a href="{{ .Permalink | safeHTML }}"
onclick="(function(btn){var z=document.createElement('script');document.subtomeBtn=btn;z.src='https://www.subtome.com/load.js';document.body.appendChild(z);})(this); return false;"
value="Subscribe"
data-subtome-feeds="{{ .Permalink | safeHTML }}">
<img src="https://blog.grml.org/templates/2k11/img/subtome.png" alt="XML" style="border: 0px">
</a>
{{- end }}
</nav>
</aside>
</div>
<footer>
{{ partial "footer.html" . }}
Expand Down

0 comments on commit 4046571

Please sign in to comment.