This commit is contained in:
Oliver Davies 2017-10-08 09:26:41 +01:00
parent 7d1591d400
commit 2b6f80bf16
15 changed files with 101 additions and 124 deletions

View file

@ -17,12 +17,9 @@
<nav class="db dtc-ns v-mid w-100 tl tr-ns mt2 mt0-ns">
{% for link in links %}
{% set classes = [
'nav-item',
not loop.first ? 'ml3',
page.url matches '#^' ~ (link.pattern ?: link.href) ~ '/?#' ? 'nav-item--active',
] %}
<a href="{{ link.href }}" class="{{ classes|join(' ') }}">
<a
href="{{ link.href }}"
class="nav-item {{ page.url matches '#^' ~ (link.pattern ?: link.href) ~ '/?#' ? 'nav-item--active' }}">
{{- link.title -}}
</a>
{% endfor %}