forked from a11yproject/a11yproject.com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
patterns.html
50 lines (48 loc) · 1.49 KB
/
patterns.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
---
layout: page
title: Patterns
description: An accessible widget & pattern library
permalink: patterns/
---
<nav class="toc-wrap toc-long" aria-labelledby="toc_title">
<h2 id="toc_title" class="toc-title">Categories</h2>
<ul class="toc">
{% for category in site.data.patterns %}
<li>
<a class="{{ category.section-id }}" href="#{{category.section-id}}">
{{ category.pattern-category }}
</a>
</li>
{% endfor %}
</ul>
</nav>
{% for category in site.data.patterns %}
<section id="{{category.section-id}}" class="article-section patterns-section" tabindex="-1">
<h3 class="article-section__title">{{ category.pattern-category }}</h3>
<ul class="article-section__content">
{% if category.sub-category %}
<li>
{{category.sub-category}}
<ul>
{% assign sorted_subcategory = category.sub-category-patterns | sort: 'title' %}
{% for pattern in sorted_subcategory %}
<li>
<a href="{{ pattern.url }}" rel="external">
{{pattern.title}}
</a>
</li>
{% endfor %}
</ul>
</li>
{% endif %}
{% assign sorted_category = category.patterns | sort: 'title' %}
{% for pattern in sorted_category %}
<li>
<a href="{{ pattern.url }}" rel="external">
{{pattern.title}}
</a>
</li>
{% endfor %}
</ul>
</section>
{% endfor %}