{# The focus rail: `up` (..) and `rail` items (current one accent bordered).
pin_flip share_live rail. A strip on small screens, a column from md up. #}
{# The rail: a horizontal strip on small screens, a column beside the page from md up. #}
<nav id="focus-rail" aria-label="{{ rail_label | default('Other categories') }}"
class="flex shrink-0 gap-2 overflow-x-auto pb-1 md:sticky md:top-4 md:self-start md:max-h-[calc(100dvh-6rem)] md:overflow-y-auto md:w-20 md:flex-col md:pb-0">
<a id="focus-up" href="{{ up.href }}" title="Up to {{ up.name }}" aria-label="Up to {{ up.name }}"
class="flex aspect-square w-16 shrink-0 flex-col items-center justify-center rounded-box border border-base-300 bg-base-200 font-mono text-lg font-bold transition-all hover:-translate-y-0.5 hover:border-primary/60 focus-visible:outline-2 focus-visible:outline-primary md:w-full">
..
<span class="max-w-full truncate px-1 font-sans text-[0.6rem] font-normal opacity-60">{{ up.name }}</span>
</a>
{% for r in rail %}
{% if r.current %}
<div id="focus-rail-{{ r.slug }}" aria-current="true" title="{{ r.name }} (in focus)"
class="flex aspect-square w-16 shrink-0 flex-col justify-between rounded-box border-2 border-accent bg-accent/10 p-1.5 shadow-sm md:w-full">
{% if r.widget_bg %}<span class="size-4 rounded-full border border-base-content/20" style="background: {{ r.widget_bg }}" aria-hidden="true"></span>{% else %}<span class="font-mono text-xs opacity-60" aria-hidden="true">#</span>{% endif %}
<span class="line-clamp-2 text-[0.65rem] font-semibold leading-tight">{{ r.name }}</span>
<span class="font-mono text-[0.6rem] opacity-60">{{ r.count }}</span>
</div>
{% else %}
<a id="focus-rail-{{ r.slug }}" href="{{ r.href }}" title="Focus on {{ r.name }}" aria-label="Focus on {{ r.name }}"
class="flex aspect-square w-16 shrink-0 flex-col justify-between rounded-box border border-base-300 bg-base-200 p-1.5 transition-all hover:-translate-y-0.5 hover:border-primary/60 focus-visible:outline-2 focus-visible:outline-primary md:w-full">
{% if r.widget_bg %}<span class="size-4 rounded-full border border-base-content/20" style="background: {{ r.widget_bg }}" aria-hidden="true"></span>{% else %}<span class="font-mono text-xs opacity-60" aria-hidden="true">#</span>{% endif %}
<span class="line-clamp-2 text-[0.65rem] font-medium leading-tight">{{ r.name }}</span>
<span class="font-mono text-[0.6rem] opacity-50">{{ r.count }}</span>
</a>
{% endif %}
{% endfor %}
</nav>
neiam
/recourse
public · Issues · Pulls · Labels · Forks · Compare · Actions running · Badges · Packages
⭐
Log in to mark this repository.
2.6 KiB · text
History
0c61284