<ul class="list-nav">
    {#each items as { href, label }}
        <li>
            <a {href} class="{classesActive(href)}">
                <span class="">{label}</span>
            </a>
        </li>
    {/each}
</ul>

<script type="text/javascript">
    import { page } from '$app/stores';

    let items = [
        { href: '/standings', label: 'Standings' },
        { href: '/results', label: 'Results' },
    ]
    $: classesActive = (href) => (href === $page.url.pathname ? '!bg-primary-500' : '');
</script>