bmen-jekyll/_includes/elements/list.html

20 lines
641 B
HTML
Raw Normal View History

2020-10-10 08:35:47 +00:00
{%- assign items = list_items | strip | newline_to_br | split: '<br />' -%}
<div class="list-group my-3">
{%- if include.title -%}
<a class="list-group-item list-group-item-action active disabled text-white">{{ include.title }}</a>
{%- endif -%}
{% for item in items %}
{%- if include.type == "toc" -%}
<a class="list-group-item list-group-item-action" href="#{{ item | slugify }}">{{ item }}</a>
{%- else -%}
{%- assign item_object = item | split: ',' -%}
<a class="list-group-item list-group-item-action" href="{{ item_object[1] }}">{{ item_object[0] }}</a>
{%- endif -%}
{% endfor %}
</div>