-{{- /*
-Renders a menu for the given menu ID.
-
-@context {page} page The current page.
-@context {string} menuID The menu ID.
-
-@example: {{ partial "menu.html" (dict "menuID" "main" "page" .) }}
-*/}}
-
{{- $page := .page }}
{{- $menuID := .menuID }}
-<nav id="nav"
- th:include="~{::#navigation}?:_"
- th:with="section=${crumbs != null && crumbs.size() > 1 ? crumbs[1] : null}"
- >
+<nav id="nav">
<hr class="n"/>
<a class="hide" href="#top" title="Show Content">Jump back to the top of the page</a>
<h1 class="nav">Navigation</h1>
<h2 class="nav menu">Section-Menu</h2>
<ul id="menu" class="cf">
- <li th:each="entry : ${_childs.get('/index.html')}"
- th:with="title=${_titles.get(entry)}"
- class="m blog"
- th:class="'m ' + ${title}">
- <a href="../blog/"
- th:href="@{${entry}}"
- class="m"
- th:class="${section == entry} ? 'm selected' : 'm'"
- th:text="${_titles.get(entry)}">Blog</a>
+ {{- range $page.Site.MainSections }}
+ {{- $section := site.GetPage "section" . }}
+ <li class="m {{ . }}">
+ <a href="{{ $section.RelPermalink }}" class="m">{{ $section.LinkTitle }}</a>
</li>
- <!--/*-->
- <li class="m projects"><a href="../projects.html" class="m selected">Projects</a></li>
- <li class="m about"><a href="../about.html" class="m">About</a></li>
- <!--*/-->
+ {{- end }}
</ul>
<h2 class="nav submenu">
<span class="s">Submenu for section</span>