summaryrefslogtreecommitdiff
path: root/layouts/shortcodes
diff options
context:
space:
mode:
authormms <michal@sapka.me>2024-04-14 21:11:05 +0200
committermms <michal@sapka.me>2024-04-14 21:11:05 +0200
commit611f78ae533bbf91104afc8904831dcccf0f0d90 (patch)
tree78695a643e2e01344e8bc8cdf92def1b5ae11cf8 /layouts/shortcodes
parent741a247f7e230c293b6a3dcc48a38edf02156a8b (diff)
feat: tidy up rot
Diffstat (limited to 'layouts/shortcodes')
-rw-r--r--layouts/shortcodes/menu-info.html6
-rw-r--r--layouts/shortcodes/menu-inline.md2
-rw-r--r--layouts/shortcodes/menu.html25
3 files changed, 8 insertions, 25 deletions
diff --git a/layouts/shortcodes/menu-info.html b/layouts/shortcodes/menu-info.html
new file mode 100644
index 0000000..4573ede
--- /dev/null
+++ b/layouts/shortcodes/menu-info.html
@@ -0,0 +1,6 @@
+{{ $content := .Inner }}
+<div>
+ Grayed out items are placeholder I plan to add in the future.
+ It may take years or decades.
+</div>
+
diff --git a/layouts/shortcodes/menu-inline.md b/layouts/shortcodes/menu-inline.md
index 356c675..0ff567d 100644
--- a/layouts/shortcodes/menu-inline.md
+++ b/layouts/shortcodes/menu-inline.md
@@ -1,6 +1,6 @@
{{- $menuID := .Get 0 }}
-{{- $caption := .Inner }}
+{{- $caption := .Inner }}
<nav>
<ol>
{{- range index site.Menus $menuID }}
diff --git a/layouts/shortcodes/menu.html b/layouts/shortcodes/menu.html
index 3f6cc2f..766cfe9 100644
--- a/layouts/shortcodes/menu.html
+++ b/layouts/shortcodes/menu.html
@@ -1,27 +1,4 @@
{{- $menuID := .Get 0 }}
{{- $caption := .Inner }}
+{{ partial "menu.html" (dict "menuID" $menuID "page" $.Page ) }}
-<nav>
- <ol>
- {{- range index site.Menus $menuID }}
- {{if .Params.placeholder }}
- <li class="placeholder">{{.Name}}
- {{else}}
- <li><a href="{{ .URL }}">{{ .Name }}</a>
- {{end}}
-
- {{ if .HasChildren }}
- <ul>
- {{ range .Children }}
- <li>
-
- <a href="{{ .URL }}">
- {{ .Name }}
- </a>
- {{ end }}
- </ul>
-
- {{ end }}
- {{- end }}
-</ol>
-</nav>