initial
This commit is contained in:
14
themes/next/layout/_macro/menu/menu-badge.swig
Normal file
14
themes/next/layout/_macro/menu/menu-badge.swig
Normal file
@ -0,0 +1,14 @@
|
||||
{% macro render(name) %}
|
||||
|
||||
{% set badges = {
|
||||
archives: site.posts.length,
|
||||
categories: site.categories.length,
|
||||
tags: site.tags.length }
|
||||
%}
|
||||
{% for menu, count in badges %}
|
||||
{% if name == menu %}
|
||||
<span class="badge">{{ count }}</span>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% endmacro %}
|
Reference in New Issue
Block a user