Skip to content
Snippets Groups Projects
header.html 2.58 KiB
Newer Older
Erxleben, Fredo's avatar
Erxleben, Fredo committed
{% comment %}
    Header Design for HIFIS Webites

    This file specifies the structure for the headers of HIFIS-related websites.
    It observes the Helmholtz corporate design guidelines.

    The header is a floating section with light gray background and contains
        * the HIFIS logo
        * navigation
        * a transitional element that visually separates the header from the
            remaining content of the site

In the case of a mobile end device the navigation will be turned into a menu
which can be toggled to expand or collapse.
The contents of the navigation is generated by Jekyll from
    /_data/navigation.yaml

See also:
    /assets/css/header.scss
    /_includes/header_transition.svg
{% endcomment %}

{% if site.baseurl != '/' %}
{% assign base_url = site.baseurl | append: '/' %}
{% else %}
{% assign base_url = site.baseurl %}
{% endif %}

<header id="header" class="header">

    <div id="header-content-container">

        <a href="{{ base_url }}" class="logo-link">
            <img
                id="header-logo"
                class="logo"
                src="{{ '/assets/img/HIFIS_Logo_short_RGB_cropped.svg' | relative_url }}"
Erxleben, Fredo's avatar
Erxleben, Fredo committed
                alt="HIFIS Logo"
            >
Uwe Jandt (DESY, HIFIS)'s avatar
Uwe Jandt (DESY, HIFIS) committed
            <img
                id="header-logo"
                class="logo"
                src="{{ '/assets/img/HIFIS_SWS_Logo_cropped.svg' | relative_url }}"
                alt="HIFIS Logo"
            >            
Erxleben, Fredo's avatar
Erxleben, Fredo committed
        </a>

        {% comment %}
            The following button is not displayed in desktop mode, but will
            replace the navigation list on smaller displays.
            When clicked the button will toggle the 'active' class.
            The associated CSS will then display the navigation elements as a
            menu.
        {% endcomment %}
        <input type="checkbox" id="mobile_toggle" class="d-none">
        <label for="mobile_toggle" class="nav_toggle"></label>
Erxleben, Fredo's avatar
Erxleben, Fredo committed

        <nav>
            {% for entry in site.data.navigation.header %}
                <a href="{{ entry.url | relative_url }}" class="btn btn-header">
                    <span class="navigation-entry">
                        {% if entry.fontawesome_class %}
Erxleben, Fredo's avatar
Erxleben, Fredo committed
                        <i class="navigation-icon {{ entry.fontawesome_class }}"
                           title="{{ entry.title }}">
                        </i>
Erxleben, Fredo's avatar
Erxleben, Fredo committed
                        <span class="navigation-text">{{ entry.title }}</span>
                    </span>
                </a>
            {% endfor %}
        </nav>

    </div>

    {% include transition.html direction="bottom"%}
Erxleben, Fredo's avatar
Erxleben, Fredo committed

</header>