Main menu

<nav class="nav-main" role="navigation" vocab="http://schema.org/" typeof="SiteNavigationElement">
    <ul class="nav-main-list">
        <li class="nav-main-list__item ">
            <a href="#" title="Link title 1" target="" class="link   " property="url">Link text 1</a>

        </li>
        <li class="nav-main-list__item nav-main-list__item--active">
            <a href="#" title="Link title 2" target="" class="link true  " property="url">Link text 2</a>

        </li>
    </ul>
</nav>
<nav class="nav-main" role="navigation" vocab="http://schema.org/" typeof="SiteNavigationElement">
    <ul class="nav-main-list">
        {{#each list}}
            <li class="nav-main-list__item {{#if active }}nav-main-list__item--active{{/if}}">
                {{ render '@link' this }}
            </li>
        {{/each}}
    </ul>
</nav>
{
  "list": [
    {
      "url": "#",
      "text": "Link text 1",
      "title": "Link title 1"
    },
    {
      "url": "#",
      "text": "Link text 2",
      "title": "Link title 2",
      "active": true
    }
  ]
}
  • Content:
    /*
     * Module: Nav Main List
     */
    :root {
        --nav-main-link-color: var(--color-black);
        --nav-main-link-color-active: var(--color-primary);
    }
    
    .nav-main {
        @media (--viewport-sm-min) {
            display: block;
            font-size: 18px;
            width: calc(100% - 400px);
        }
    }
    
    .nav-main-list {
        list-style: none;
        padding: 0;
        margin: 0;
    }
    
    .nav-main-list__item {
        display: block;
        color: var(--nav-main-link-color);
        @media (--viewport-sm-min) {
            margin-right: 50px;
            display: inline-block;
            margin-bottom: 0;
        }
        a {
            color: currentColor;
            text-decoration: none;
        }
    
        &:hover {
            color: var(--nav-main-link-color);
    
            a {
                color: currentColor;
                text-decoration: underline;
            }
        }
    
        &:last-child {
            margin-right: 0;
        }
    }
    
    .nav-main-list__item--active {
        color: var(--nav-main-link-color-active);
        text-decoration: underline;
    }
    
  • URL: /components/raw/nav-main-list/nav-main-list.css
  • Filesystem Path: src/02-molecules/navigation/nav-main-list/nav-main-list.css
  • Size: 962 Bytes

There are no notes for this item.