Skip to content
Snippets Groups Projects
Verified Commit a1672fbf authored by Jake's avatar Jake
Browse files

readded menu items

parent dd62d159
No related branches found
No related tags found
No related merge requests found
Pipeline #312657 failed
<!DOCTYPE html>
{%- import 'macros/getters.html' as get with context -%}
{#{%- import 'macros/cards.html' as cards with context -%}
{%- import 'macros/renderers.html' as render with context -%}#}
<html lang="{%- block html_lang -%}{{ l }}{%- endblock html_lang -%}">
<head>
{% block head %}
......@@ -35,16 +40,14 @@
<nav>
<ul>
{% for item in config.menuitems -%}
{{item}}
{#
{%- if item.tag is defined -%}
{%- call(nativetag, sccat, _) get.tag_by_name(item.tag) -%}
<li style="--category-color: {{ sccat.color }}"><a href="{{ siteurl }}/{{ nativetag.url }}">{{ sccat[lang]|e }}</a></li>
{%- call(tagtitle, tagcolor, tagurl, tagpage, tagpages) get.tag_by_name(item.tag, l) -%}
<li style="--category-color: {{ tagcolor }}"><a href="{{ siteurl }}/{{ tagurl }}">{{ tagtitle|e }}</a></li>
{%- endcall -%}
{%- elif item.slug is defined -%}
{%- call(aop, _) get.article_or_page_by_slug(item.slug, lang) -%}
{%- call(__, sccat, ___) get.category_by_name(aop.category.name, True) -%}
<li style="--category-color: {{ sccat.color }}"><a href="{{ siteurl }}/{{ aop.url }}">{{ aop.title }}</a></li>
{%- call(page) get.page_by_slug(item.slug, l) -%}
{%- call(tagtitle, tagcolor, tagurl, tagpage, tagpages) get.tag_by_name(page.category, l) -%}
<li style="--category-color: {{ tagcolor }}"><a href="{{ siteurl }}/{{ page.url }}">{{ page.title|e }}</a></li>
{%- endcall -%}
{%- endcall -%}
{%- else -%}
......@@ -52,7 +55,6 @@
<strong>ERROR: menuitems: Cannot parse item: {{ item|string|e }}</strong><br />
<br />
{%- endif -%}
#}
{#- TODO add active class if this is the current site -#}
{%- endfor %}
</ul>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment