{% if item.type == “buttons” %}
<div class="navbar-item"> <div class="buttons"> {% for button in item.content %} {% if button.link %} {% assign link = button.link %} {% include util/prepend_link.html %} <a class="button {{ button.style }}" href="{{ link }}"> {% else %} <a class="button {{ button.style }}"> {% endif %} {% if button.icon %} <span class="icon {{ button.icon.style }}"> <i class="fa {{ button.icon.name }}"></i> </span> {% endif %} <span>{{ button.content | newline_to_br }}</span> </a> {% comment %} button {% endcomment %} {% endfor %} </div> {% comment %} buttons {% endcomment %} </div> {% comment %} navbar-item {% endcomment %}
{% elsif item.type == “link” %}
{% assign link = item.link %} {% include util/prepend_link.html %} <a class="navbar-item {{ item.style }}" href="{{ link }}"> {% include util/item_content.html %} </a>
{% elsif item.type == “text” %}
<div class="navbar-item {{ item.style }}"> {% include util/item_content.html %} </div>
{% elsif item.type == “dropdown” %}
<div class="navbar-item has-dropdown is-hoverable"> <a class="navbar-link {{ item.style }}"> {% include util/item_content.html %} </a> {% if dropdown_right %} <div class="navbar-dropdown is-right"> {% else %} <div class="navbar-dropdown"> {% endif %} {% for option in item.links %} {% if option.divider %} <hr class="navbar-divider"> {% else %} {% assign link = option.link %} {% include util/prepend_link.html %} <a class="navbar-item" href="{{ link }}"> {% if option.icon %} <span class="icon {{ option.icon.style }}"> <i class="fa {{ option.icon.name }}"></i> </span> {% endif %} <span>{{ option.content | newline_to_br }}</span> </a> {% endif %} {% endfor %} </div> {% comment %} navbar-dropdown {% endcomment %} </div> {% comment %} navbar-item {% endcomment %}
{% endif %}