- Notifications
You must be signed in to change notification settings - Fork 1k
/
Copy pathinner-documentation-sections.html
29 lines (26 loc) · 851 Bytes
/
inner-documentation-sections.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{% comment %}
Layouts using this include should pass an include variable called 'links' referencing a list carrying the data
{% endcomment %}
<divclass="documentation">
{% for link in include.links %}
<!-- check if link starts with '#' -->
{% assign first_char = link.link | slice: 0 %}
{% if first_char == '#' %}
{% assign is_url = false %}
{% else %}
{% assign is_url = true %}
{% endif %}
<ahref="{% if link.link contains '://' %}{{link.link}}{% else %}{{site.baseurl}}{{link.link}}{% endif %}"
class="doc-item doc-item-link"
{%ifis_url%}target="_blank" rel="noopener noreferrer"{%endif%}
>
<divclass="doc-item-header">
<iclass="{{link.icon}}"></i>
<h4>{{link.title}}</h4>
</div>
<divclass="doc-item-main">
<p>{{link.description}}</p>
</div>
</a>
{% endfor %}
</div>