feat: initial commit
This commit is contained in:
commit
e214116e40
253 changed files with 17406 additions and 0 deletions
30
src/includes/nav/link.liquid
Normal file
30
src/includes/nav/link.liquid
Normal file
|
@ -0,0 +1,30 @@
|
|||
{%- assign categoryUrl = link.permalink | downcase -%}
|
||||
{%- assign isHttp = categoryUrl contains "http" -%}
|
||||
{%- if categoryUrl | isLinkActive:page.url -%}
|
||||
<span
|
||||
class="active {{ link.class }}"
|
||||
aria-current="page"
|
||||
>
|
||||
{%- if link.icon -%}
|
||||
{% tablericon link.icon %}
|
||||
<span>{{ link.title }}</span>
|
||||
{%- else -%}
|
||||
{{ link.title }}
|
||||
{%- endif -%}
|
||||
</span>
|
||||
{%- else -%}
|
||||
<a
|
||||
class="{% if link.icon %}{{ link.icon | downcase }} icon {% endif %}{{ link.class }}"
|
||||
href="{{ categoryUrl }}"
|
||||
{% if isHttp -%} rel="me" {%- endif %}
|
||||
title="{{ link.title }}"
|
||||
aria-label="{{ link.title }}"
|
||||
>
|
||||
{%- if link.icon -%}
|
||||
{% tablericon link.icon %}
|
||||
<span>{{ link.title }}</span>
|
||||
{%- else -%}
|
||||
{{ link.title }}
|
||||
{%- endif -%}
|
||||
</a>
|
||||
{%- endif -%}
|
47
src/includes/nav/paginator.liquid
Normal file
47
src/includes/nav/paginator.liquid
Normal file
|
@ -0,0 +1,47 @@
|
|||
{%- assign pageCount = pagination.pages.size | default:0 -%}
|
||||
{%- assign hidePagination = pageCount <= 1 -%}
|
||||
{%- unless hidePagination -%}
|
||||
<script type="module" src="/assets/scripts/components/select-pagination.js?v={% appVersion %}" defer></script>
|
||||
<nav aria-label="Pagination" class="pagination">
|
||||
{%- assign prevHref = pagination.href.previous -%}
|
||||
{%- assign nextHref = pagination.href.next -%}
|
||||
{% if prevHref %}
|
||||
<a
|
||||
href="{{ prevHref }}"
|
||||
aria-label="Previous page"
|
||||
>
|
||||
{% tablericon "arrow-left" %}
|
||||
</a>
|
||||
{% else %}
|
||||
<span>
|
||||
{% tablericon "arrow-left" %}
|
||||
</span>
|
||||
{% endif %}
|
||||
<select-pagination>
|
||||
<select class="client-side" aria-label="Page selection">
|
||||
{%- for pageEntry in pagination.pages -%}
|
||||
<option value="{{ forloop.index | minus:1 }}">
|
||||
{{ forloop.index }} of {{ pagination.links.size }}
|
||||
</option>
|
||||
{%- endfor -%}
|
||||
</select>
|
||||
<noscript>
|
||||
<p>
|
||||
<span aria-current="page">{{ pagination.pageNumber | plus:1 }}</span> of {{ pagination.links.size }}
|
||||
</p>
|
||||
</noscript>
|
||||
</select-pagination>
|
||||
{% if nextHref %}
|
||||
<a
|
||||
href="{{ nextHref }}"
|
||||
aria-label="Next page"
|
||||
>
|
||||
{% tablericon "arrow-right" %}
|
||||
</a>
|
||||
{% else %}
|
||||
<span>
|
||||
{% tablericon "arrow-right" %}
|
||||
</span>
|
||||
{% endif %}
|
||||
</nav>
|
||||
{%- endunless -%}
|
12
src/includes/nav/primary.liquid
Normal file
12
src/includes/nav/primary.liquid
Normal file
|
@ -0,0 +1,12 @@
|
|||
<nav class="primary-navigation">
|
||||
<ul class="nav-list">
|
||||
{%- for link in nav.primary -%}
|
||||
<li>
|
||||
{% render "nav/link.liquid",
|
||||
page:page,
|
||||
link:link
|
||||
%}
|
||||
</li>
|
||||
{%- endfor -%}
|
||||
</ul>
|
||||
</nav>
|
9
src/includes/nav/secondary.liquid
Normal file
9
src/includes/nav/secondary.liquid
Normal file
|
@ -0,0 +1,9 @@
|
|||
<nav aria-label="Secondary site navigation" class="sub-pages">
|
||||
{%- for link in links -%}
|
||||
{% render "nav/link.liquid",
|
||||
page:page,
|
||||
link:link
|
||||
%}
|
||||
{% unless forloop.last %}<span>•</span>{% endunless %}
|
||||
{%- endfor -%}
|
||||
</nav>
|
8
src/includes/nav/social.liquid
Normal file
8
src/includes/nav/social.liquid
Normal file
|
@ -0,0 +1,8 @@
|
|||
<nav aria-label="Social icons" class="social">
|
||||
{%- for link in links -%}
|
||||
{% render "nav/link.liquid",
|
||||
page:page,
|
||||
link:link
|
||||
%}
|
||||
{%- endfor -%}
|
||||
</nav>
|
Loading…
Add table
Add a link
Reference in a new issue