1{%- if include.theme == 'dark' -%} 2 <header class="header header--dark" {%- if include.background -%} style="background: {{ include.background }};" {%- endif -%}> 3{%- elsif include.theme == 'light' -%} 4 <header class="header header--light" {%- if include.background -%} style="background: {{ include.background }};" {%- endif -%}> 5{%- else -%} 6 <header class="header" {%- if include.background -%} style="background: {{ include.background }};" {%- endif -%}> 7{%- endif -%} 8 <div class="main"> 9 <div class="header__title"> 10 <div class="header__brand"> 11 {%- include svg/logo.svg -%} 12 {%- assign _paths_root = site.paths.root | default: site.data.variables.default.paths.root -%} 13 {%- include snippets/get-nav-url.html path=_paths_root -%} 14 {%- if site.title -%} 15 <a title="{%- if site.description -%}{{ site.description }}{%- endif -%}" href="{{ __return }}">{{ site.title }}</a> 16 {%- endif -%} 17 </div> 18 {%- if site.search.provider -%} 19 <button class="button button--secondary button--circle search-button js-search-toggle"><i class="fas fa-search"></i></button> 20 {%- endif -%} 21 </div> 22 {%- if site.data.navigation.header -%} 23 <nav class="navigation"> 24 <ul> 25 {%- for _item in site.data.navigation.header -%} 26 {%- include snippets/get-nav-url.html path=_item.url -%} 27 {%- assign _nav_url = __return -%} 28 {%- include snippets/get-nav-url.html path=page.url -%} 29 {%- assign _page_url = __return -%} 30 {%- include snippets/get-string-from-locale-config.html locale=_item.titles -%} 31 {%- if _nav_url == _page_url or page.nav_key and _item.key and page.nav_key == _item.key -%} 32 <li class="navigation__item navigation__item--active"><a href="{{ _nav_url }}">{%- if _item.title -%}{{ _item.title }}{%- else -%}{{ __return }}{%- endif -%}</a></li> 33 {%- elsif page.nav_key and _item.key -%} 34 <li class="navigation__item"><a href="{{ _nav_url }}">{%- if _item.title -%}{{ _item.title }}{%- else -%}{{ __return }}{%- endif -%}</a></li> 35 {%- else -%} 36 <li class="navigation__item"><a href="{{ _nav_url }}" target="_blank" rel="noopener noreferrer">{%- if _item.title -%}{{ _item.title }}{%- else -%}{{ __return }}{%- endif -%}</a></li> 37 {%- endif -%} 38 {%- endfor -%} 39 {%- if site.search.provider -%} 40 <li><button class="button button--secondary button--circle search-button js-search-toggle"><i class="fas fa-search"></i></button></li> 41 {%- endif -%} 42 </ul> 43 </nav> 44 {%- endif -%} 45 </div> 46 </header> 47