<nav id='nav-mobile' class='mm-menu' data-title='uHasselt' data-searchurl='#' data-placeholder='Vul je zoekterm in...'>
    <ul>
        <li>
            <span>
                <span class="icon fal fa-info-circle   fa-fw" aria-hidden="true"></span>Info voor
            </span>
            <ul>
                <li>
                    <a href='#' title='Toekomstige studenten'>Toekomstige studenten</a>
                </li>
                <li>
                    <a href='#' title='Studenten'>Studenten</a>
                </li>
                <li>
                    <a href='#' title='Doctorandi'>Doctorandi</a>
                </li>
                <li>
                    <a href='#' title='Alumni'>Alumni</a>
                </li>
            </ul>
        </li>
        <li>
            <a href='#' title='Studeren'>
                <span class="icon fal fa-user-graduate   fa-fw" aria-hidden="true"></span>Studeren
            </a>
        </li>
        <li>
            <a href='#' title='Onderzoek'>
                <span class="icon fal fa-vial   fa-fw" aria-hidden="true"></span>Onderzoek
            </a>
        </li>
        <li>
            <a href='#' title='Over ons'>
                <span class="icon fal fa-info   fa-fw" aria-hidden="true"></span>Over ons
            </a>
        </li>
        <ul class='mobile-language'>
            <li>
                <a href='' title=''>Nederlands</a>
            </li>
            <li>
                <a href='' title=''>English</a>
            </li>
        </ul>
        <ul class='mobile-utils'>
            <li>
                <a href='' title=''>Contact</a>
            </li>
            <li>
                <a href='' title=''>Wie is wie</a>
            </li>
            <li>
                <a href='' title=''>Bibliotheek</a>
            </li>
            <li>
                <a href='' title=''>Vacatures</a>
            </li>
        </ul>
        <ul class='mobile-social'>
            <li><a>Volg ons</a></li>
        </ul>
        <ul class='mobile-social'>
            <li>
                <a href='' aria-label='' target='_blank' rel='noopener noreferrer'><span class="icon far fa-external-link   " aria-hidden="true"></span></a>
            </li>
        </ul>
    </ul>
</nav>

<nav id='nav-mobile-sticky'>
    <div class='nav-mobile-sticky-inner'>

        <a href='#' title='Home'>
            <span class="icon fal fa-home   " aria-hidden="true"></span><span class='text'>Home</span>
        </a>
        <a href='#' title='Student'>
            <span class="icon fal fa-user-graduate   " aria-hidden="true"></span><span class='text'>Student</span>
        </a>
        <a href='#' title='Medewerker'>
            <span class="icon fal fa-user-lock   " aria-hidden="true"></span><span class='text'>Medewerker</span>
        </a>
        <a href='#' title='Info voor'>
            <span class="icon fal fa-info-circle   " aria-hidden="true"></span><span class='text'>Info voor</span>
        </a>

        <a id='nav-mobile-toggle' href='#nav-mobile'>
            <span class="icon far fa-bars   " aria-hidden="true"></span><span class='text'>Menu</span>
        </a>

    </div>
</nav>
<nav
    id='nav-mobile'
    class='mm-menu'
    data-title='{{navTitle}}'
    data-searchurl='{{navSearchUrl}}'
    data-placeholder='{{navPlaceholder}}'
>
    <ul>
        {{#each pageNav}}
            <li>
                {{#if subItems}}
                    <span>
                        {{render '@icon' icon}}{{text}}
                    </span>
                    <ul>
                        {{#each subItems}}
                            <li>
                                <a href='{{href}}' title='{{text}}'>{{text}}</a>
                            </li>
                        {{/each}}
                    </ul>
                {{else}}
                    <a href='{{href}}' title='{{text}}'>
                        {{render '@icon' icon}}{{text}}
                    </a>
                {{/if}}
            </li>
        {{/each}}
        <ul class='mobile-language'>
            <li>
                <a href='{{href}}' title='{{text}}'>Nederlands</a>
            </li>
            <li>
                <a href='{{href}}' title='{{text}}'>English</a>
            </li>
        </ul>
        <ul class='mobile-utils'>
            <li>
                <a href='{{href}}' title='{{text}}'>Contact</a>
            </li>
            <li>
                <a href='{{href}}' title='{{text}}'>Wie is wie</a>
            </li>
            <li>
                <a href='{{href}}' title='{{text}}'>Bibliotheek</a>
            </li>
            <li>
                <a href='{{href}}' title='{{text}}'>Vacatures</a>
            </li>
        </ul>
        <ul class='mobile-social'>
            <li><a>Volg ons</a></li>
        </ul>
        <ul class='mobile-social'>
            <li>
                <a
                    href=''
                    aria-label=''
                    target='_blank'
                    rel='noopener noreferrer'
                >{{render '@icon'}}</a>
            </li>
        </ul>
    </ul>
</nav>

<nav id='nav-mobile-sticky'>
    <div class='nav-mobile-sticky-inner'>

        {{! Sticky items }}
        {{#each stickyNav}}
            <a href='{{href}}' title='{{text}}'>
                {{render '@icon' icon}}<span class='text'>{{text}}</span>
            </a>
        {{/each}}

        {{! Toggle }}
        <a id='nav-mobile-toggle' href='#nav-mobile'>
            {{render '@icon' stickyToggle}}<span class='text'>Menu</span>
        </a>

    </div>
</nav>
{
  "navTitle": "uHasselt",
  "navSearchUrl": "#",
  "navPlaceholder": "Vul je zoekterm in...",
  "stickyToggle": {
    "icon": "fa-bars",
    "style": "far"
  },
  "link-register": {
    "title": "Dit is een test",
    "text": "Dit is een test"
  },
  "stickyNav": [
    {
      "href": "#",
      "text": "Home",
      "icon": {
        "icon": "fa-home",
        "style": "fal"
      }
    },
    {
      "href": "#",
      "text": "Student",
      "icon": {
        "icon": "fa-user-graduate",
        "style": "fal"
      }
    },
    {
      "href": "#",
      "text": "Medewerker",
      "icon": {
        "icon": "fa-user-lock",
        "style": "fal"
      }
    },
    {
      "href": "#",
      "text": "Info voor",
      "icon": {
        "icon": "fa-info-circle",
        "style": "fal"
      }
    }
  ],
  "pageNav": [
    {
      "href": "#",
      "text": "Info voor",
      "icon": {
        "icon": "fa-info-circle",
        "style": "fal",
        "modifier": "fa-fw"
      },
      "subItems": [
        {
          "href": "#",
          "text": "Toekomstige studenten"
        },
        {
          "href": "#",
          "text": "Studenten"
        },
        {
          "href": "#",
          "text": "Doctorandi"
        },
        {
          "href": "#",
          "text": "Alumni"
        }
      ]
    },
    {
      "href": "#",
      "text": "Studeren",
      "icon": {
        "icon": "fa-user-graduate",
        "style": "fal",
        "modifier": "fa-fw"
      }
    },
    {
      "href": "#",
      "text": "Onderzoek",
      "icon": {
        "icon": "fa-vial",
        "style": "fal",
        "modifier": "fa-fw"
      }
    },
    {
      "href": "#",
      "text": "Over ons",
      "icon": {
        "icon": "fa-info",
        "style": "fal",
        "modifier": "fa-fw"
      }
    }
  ]
}
  • Content:
    nav#nav-mobile:not(.mm-menu) {
        display: none;
    }
    
    nav#nav-mobile {
        @apply lg:hidden;
    }
    
    .mm-wrapper_opening {
        .mm-page {
            position: fixed;
        }
    }
    
    nav#nav-mobile.mm-menu {
        --mm-color-background: #e03131;
        --mm-color-background-emphasis: #e03131;
        --mm-color-text: #ffffff;
    
        bottom: 4rem;
    
        .mm-panels {
            @apply bg-red;
            @apply text-intro;
    
            #mm-0 {
                .mm-navbar {
                    @apply hidden !important;
                }
            }
    
            .mm-navbar__title {
                @apply hidden;
            }
    
            .mobile-language {
                @apply mt-5;
                @apply text-md;
                @apply pl-4;
                @apply flex;
                @apply flex-row;
    
                li {
                    &:first-child:after {
                        content: '-';
                        @apply ml-1;
                    }
    
                    @apply mr-2;
                }
    
                .active {
                    @apply font-bold;
                }
            }
    
            .mobile-utils {
                @apply mt-5;
                @apply text-md;
                @apply pl-4;
                @apply flex;
                @apply flex-col;
    
                li {
                    @apply border-0;
                }
            }
    
            .mobile-social {
                @apply mt-5;
                @apply text-md;
                @apply pl-4;
                @apply flex;
                @apply flex-row;
                @apply border-0;
    
                li {
                    @apply border-0;
                }
            }
        }
    
        .mm-navbar {
            @apply bg-red;
            @apply border-0;
    
            &,
            a {
                @apply text-black;
            }
    
            .mm-navbar__title {
                @apply font-bold;
            }
    
            .mm-btn_prev {
                &::before {
                    @apply border-black;
                }
            }
    
            .mm-btn_next {
                @apply border-none;
                @apply bg-black;
    
                &::after {
                    @apply border-black;
                }
            }
        }
    
        .mm-navbar.mm-navbar_sticky {
            --mm-navbar-size: 0;
        }
    
        .mm-btn.mm-navbar__btn:empty {
            @apply hidden;
        }
    
        .mm-btn.mm-btn_prev {
            &::before {
                @apply border-white;
                @apply left-4;
            }
        }
    
        .mm-btn.mm-btn_next {
            @apply border-none;
    
            &::after {
                @apply border-white;
            }
        }
    
        .mm-listitem {
            @apply border-b;
            @apply border-red-400;
    
            .mm-listitem__text {
                @apply px-3;
                @apply py-2;
            }
    
            .icon {
                @apply mr-2;
            }
    
            &::after {
                border: none;
            }
        }
    
        .mobile-language.mm-listitem,
        .mobile-utils.mm-listitem {
            @apply border-0;
        }
    
        .mm-navbars_top {
            &::before {
                content: '';
                @apply block bg-white;
            }
    
            .mm-navbar {
                @apply bg-white;
    
                .mm-navbar__searchfield {
                    @apply p-0 min-h-0;
    
                    .mm-searchfield {
                        ::-webkit-input-placeholder {
                            @apply italic text-black;
                        }
    
                        :-ms-input-placeholder {
                            @apply italic text-black;
                        }
    
                        ::placeholder {
                            @apply italic text-black;
                        }
    
                        .mm-searchfield__input {
                            input {
                                @apply bg-white text-black;
                            }
                        }
                    }
                }
            }
        }
    
        .mm-searchfield__btn {
            @apply bg-black;
    
            &::after {
                content: '\f002';
                font-family: 'Font Awesome 5 Pro';
                right: 25px;
                top: -10px;
                @apply border-0;
                @apply text-white;
                @apply transform-none;
            }
        }
    }
    
    .extra-buttons-study {
        @apply bg-white border border-gray;
        @apply fixed bottom-16 left-0 w-screen z-10;
        @apply flex flex-row lg:hidden;
    
        li {
            @apply w-full;
        }
    
        .link {
            @apply h-16 px-6 items-center w-full;
            @apply text-black;
    
            span {
                @apply w-full text-center;
            }
        }
    
        .link.green {
            @apply bg-green;
            @apply text-white;
        }
    }
    
    nav#nav-mobile-sticky {
        @apply fixed bottom-0 left-0 w-screen z-10 bg-white h-16;
        @apply lg:hidden;
        box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.25);
    
        .nav-mobile-sticky-inner {
            @apply flex;
    
            .active {
                @apply text-red;
            }
    
            a {
                @apply inline-block h-16 text-black no-underline flex-1 pt-2;
    
                .icon {
                    @apply block text-center mb-2 h-6;
                    @apply text-lg;
                }
    
                .text {
                    @apply block text-center overflow-hidden;
                    font-size: 12px;
                    line-height: 12px;
                    height: 22px;
                }
    
                &#nav-mobile-toggle {
                    @apply bg-red text-white;
    
                    &.opened {
                        .icon {
                            &::before {
                                content: '\f00d';
                            }
                        }
                    }
                }
            }
        }
    }
    
  • URL: /components/raw/nav-mobile/nav-mobile.css
  • Filesystem Path: src\components\04-organisms\nav-mobile\nav-mobile.css
  • Size: 5.6 KB
  • Content:
    (function () {
    
        'use strict';
    
        document.addEventListener('DOMContentLoaded', () => {
            const mobileMenu = document.querySelector('nav#nav-mobile');
    
            if (mobileMenu != null) {
                const mmenu = new Mmenu(
                    mobileMenu,
                    {
                        // Options
                        navbar: {
                            title: mobileMenu.dataset.title,
                        },
                        searchfield: {
                            search: false,
                        },
                    },
                    {
                        // Configuration
                        classNames: {
                            selected: 'mm-active',
                        },
                        searchfield: {
                            search: false,
                        },
                    }
                );
    
                const api = mmenu.API;
                const searchToggle = document.getElementById('nav-toggle-search');
                const navToggle = document.getElementById('nav-mobile-toggle');
    
                searchToggle.addEventListener('click', function () {
                    navToggle.classList.toggle('opened');
    
                    if (mmenu.vars.opened) {
                        api.close();
                    } else {
                        const searchField = document.querySelector(
                            '#nav-mobile .mm-navbar__searchfield input[type=text]'
                        );
    
                        if (searchField != null) {
                            searchField.focus();
                        }
                    }
                });
    
                navToggle.addEventListener('click', function () {
                    navToggle.classList.toggle('opened');
    
                    if (mmenu.vars.opened) {
                        api.close();
                    }
                });
    
                api.bind('close:start', function () {
                    navToggle.classList.remove('opened');
                });
            }
        });
    })();
    
  • URL: /components/raw/nav-mobile/nav-mobile.js
  • Filesystem Path: src\components\04-organisms\nav-mobile\nav-mobile.js
  • Size: 2 KB

No notes defined.