Commit ee921f9f authored by Marcus M. Scheunemann's avatar Marcus M. Scheunemann

show custom icons in menu of pages, also define icons for menuitems

parent bdc38098
Publications
############
:menuicon: edit
:template: publications
The following lists hsow selected peer-revieewed publications.
\ No newline at end of file
......@@ -75,7 +75,7 @@ CATEGORY_SAVE_AS = '{slug}/index.html'
TAG_URL = 'tag/{slug}'
TAG_SAVE_AS = 'tag/{slug}/index.html'
# not created as single author page
## not created as single author page
AUTHOR_URL = ''
AUTHOR_SAVE_AS = ''
......@@ -116,6 +116,16 @@ GOOGLE_ANALYTICS = 'UA-88560035-1'
PIWIK_URL = 'piwik.mms.ai/'
PIWIK_SITE_ID = '1'
# add custom icon to all entries of menu items
# or a default one if non defined
#lst = list(MENUITEMS)
#for i,e in enumerate(lst):
# if e[0] == "Publications":
# lst[i] = (e[0], e[1], "edit")
# else:
# lst[i] = (e[0], e[1], "file-alt")
#MENUITEMS = tuple(lst)
##
## Theme settings: pelican-twitchy
##
......
......@@ -227,12 +227,13 @@
{% endfor %}
</ul></li>
{% endif %}
{% for title, link in MENUITEMS %}
{% for title, link, icon in MENUITEMS %}
{% if loop.first%}
<li class="nav-divider"></li>
{% endif %}
<li>
<a href="{{ link }}">
<i class="fas fa-{{ icon }} padding-small"></i>
{{ title }}
</a>
</li>
......@@ -250,7 +251,7 @@
{% for p in pages %}
<li{% if p == page %} class="active"{% endif %}>
<a href="{{ SITEURL }}/{{ p.url }}">
<i class="fas fa-file-alt padding-small"></i>
<i class="fas fa-{{ p.menuicon|default('file.alt') }} padding-small"></i>
{{ p.menulabel|default(p.title) }}
</a>
</li>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment