summaryrefslogtreecommitdiff
path: root/layouts/shortcodes/menu-inline.md
diff options
context:
space:
mode:
authormms <michal@sapka.me>2024-03-10 19:48:28 +0100
committermms <michal@sapka.me>2024-03-10 19:48:28 +0100
commite34b07a6167580697f9aa185e6fa7ff247964b71 (patch)
tree13ad37c9af97593674c4f523e06bfc0212d4bc06 /layouts/shortcodes/menu-inline.md
parent1bcf8c19d7966829fe3fcb25c0a37fa500e2de87 (diff)
chore:add reviews to ST home
Diffstat (limited to 'layouts/shortcodes/menu-inline.md')
-rw-r--r--layouts/shortcodes/menu-inline.md25
1 files changed, 25 insertions, 0 deletions
diff --git a/layouts/shortcodes/menu-inline.md b/layouts/shortcodes/menu-inline.md
new file mode 100644
index 0000000..356c675
--- /dev/null
+++ b/layouts/shortcodes/menu-inline.md
@@ -0,0 +1,25 @@
+{{- $menuID := .Get 0 }}
+{{- $caption := .Inner }}
+
+<nav>
+ <ol>
+ {{- range index site.Menus $menuID }}
+ <li>
+ <a href="{{ .URL }}">
+ {{ .Name }}
+ </a>
+
+ {{ if .HasChildren }}
+ <ul>
+ {{ range .Children }}
+ <li>
+ <a href="{{ .URL }}">
+ {{ .Name }}
+ </a>
+ {{ end }}
+ </ul>
+
+ {{ end }}
+ {{- end }}
+</ol>
+</nav>