diff --git a/_includes/head/custom.html b/_includes/head/custom.html index 7be63ad2de77ef13d7cf1ccf250e8964fa3aee9c..3dc8937d4418cc63d89179974c98fd9c77a088b9 100644 --- a/_includes/head/custom.html +++ b/_includes/head/custom.html @@ -10,15 +10,3 @@ <meta name="theme-color" content="#ffffff"> <link href="https://fonts.googleapis.com/css?family=Lato|Inconsolata" rel="stylesheet"> - -<script type="text/javascript"> - function setActive() { - aObj = document.getElementById('dynare_masthead_ul').getElementsByTagName('a'); - for(i=0;i<aObj.length;i++) { - if(document.location.href.indexOf(aObj[i].href)>=0) { - aObj[i].className='active'; - } - } - } - window.onload = setActive; -</script> diff --git a/_includes/masthead.html b/_includes/masthead.html index e4415e3bcef63d3de1bc174a9a2d3b2030775d36..dd1f1b4aaeef94771859919a906d1ffcc803c4fa 100644 --- a/_includes/masthead.html +++ b/_includes/masthead.html @@ -1,33 +1,36 @@ -<div id="preload"> - <img src="/assets/images/logo/dlogo_hover.svg" /> -</div> +<!-- +Modified version of masthead.html from minimal-mistakes theme (git rev 8a67ce8e41ec850f2), +from which the master title has been removed. +NB: it’s important to leave the <a class="site-title"> element, even if empty, -- +otherwise the burger menu never appears. +--> + +{% capture logo_path %}{{ site.logo }}{% endcapture %} + <div class="masthead"> <div class="masthead__inner-wrap"> <div class="masthead__menu"> <nav id="site-nav" class="greedy-nav"> - <div class="dynare_masthead_image_container_load_hover"></div> - <div class="dynare_masthead_image_container" onclick="location.href='{{ '/' | relative_url }}'" onkeypress="location.href='{{ '/' | relative_url }}'"></div> - <ul class="visible-links" id="dynare_masthead_ul"> + {% unless logo_path == empty %} + <a class="site-logo" href="{{ '/' | relative_url }}"><img src="{{ logo_path | relative_url }}" alt="{{ site.masthead_title | default: site.title }}"></a> + {% endunless %} + <a class="site-title" href="{{ '/' | relative_url }}"> + </a> + <ul class="visible-links"> {%- for link in site.data.navigation.main -%} - {%- if link.url contains '://' -%} - {%- assign url = link.url -%} - {%- else -%} - {%- assign url = link.url | relative_url -%} - {%- endif -%} <li class="masthead__menu-item"> - <a href="{{ url }}" {% if link.description %}title="{{ link.description }}"{% endif %}>{{ link.title }}</a> + <a href="{{ link.url | relative_url }}"{% if link.description %} title="{{ link.description }}"{% endif %}>{{ link.title }}</a> </li> {%- endfor -%} </ul> {% if site.search == true %} <button class="search__toggle" type="button"> - <svg class="icon" width="16" height="16" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.99 16"> - <path d="M15.5,13.12L13.19,10.8a1.69,1.69,0,0,0-1.28-.55l-0.06-.06A6.5,6.5,0,0,0,5.77,0,6.5,6.5,0,0,0,2.46,11.59a6.47,6.47,0,0,0,7.74.26l0.05,0.05a1.65,1.65,0,0,0,.5,1.24l2.38,2.38A1.68,1.68,0,0,0,15.5,13.12ZM6.4,2A4.41,4.41,0,1,1,2,6.4,4.43,4.43,0,0,1,6.4,2Z" transform="translate(-.01)"></path> - </svg> + <span class="visually-hidden">{{ site.data.ui-text[site.locale].search_label | default: "Toggle search" }}</span> + <i class="fas fa-search"></i> </button> {% endif %} <button class="greedy-nav__toggle hidden" type="button"> - <span class="visually-hidden">{{ site.data.ui-text[site.locale].menu_label | default: "Toggle Menu" }}</span> + <span class="visually-hidden">{{ site.data.ui-text[site.locale].menu_label | default: "Toggle menu" }}</span> <div class="navicon"></div> </button> <ul class="hidden-links hidden"></ul> diff --git a/_sass/dynare.scss b/_sass/dynare.scss index 4f5f72ba1dacbc77e637de1fc89988f835778a68..bc5e492ef44c9780b7731a69d6046d35b6400258 100644 --- a/_sass/dynare.scss +++ b/_sass/dynare.scss @@ -478,12 +478,6 @@ ul.resources { } } -.dynare_masthead_home_img a { - margin: 0px 0px 0px 0px !important; - padding: 0px 0px 0px 0px !important; -} - - .dynare_home_page_image_container { background-image: url(/assets/images/logo/dbkgd.png); background-repeat: no-repeat; @@ -524,27 +518,6 @@ ul.resources { } } -.dynare_masthead_image_container { - background-image: url(/assets/images/logo/dlogo.svg); - background-repeat: no-repeat; - background-size: 150px; - width: 150px; - height: 65px; - margin: auto; -} - -.dynare_masthead_image_container:hover { - background-image: url(/assets/images/logo/dlogo_hover.svg); - cursor: pointer; -} - -.dynare_masthead_image_container_load_hover { - background-image: url(/assets/images/logo/dlogo_hover.svg); - background-size: 150px; - background-position: -9999px -9999px; - background-repeat: no-repeat; -} - div#preload { display: none; } diff --git a/assets/images/logo b/assets/images/logo index d8fd4bdc7b7a11bf13e1c7b699c368f79b462e37..920e0bfb8ddd6452d982da5374e4257a7ba60999 160000 --- a/assets/images/logo +++ b/assets/images/logo @@ -1 +1 @@ -Subproject commit d8fd4bdc7b7a11bf13e1c7b699c368f79b462e37 +Subproject commit 920e0bfb8ddd6452d982da5374e4257a7ba60999