_includes/header.html in cosy-jekyll-theme-1.0.5 vs _includes/header.html in cosy-jekyll-theme-1.0.6

- old
+ new

@@ -1,51 +1,42 @@ -{% capture site_cats %}{% for cat in site.categories %}{{ cat | first }}{% unless forloop.last %},{% endunless %}{% endfor %}{% endcapture %} -{% assign cats_list = site_cats | split:',' | sort %} +<!--[if lt IE 10]> +<div class="upgrade"><strong><a href="http://whatbrowser.org/" target="_blank">Your browser is quite old!</strong> Why + not upgrade to a different browser to better enjoy this site?</a></div> +<![endif]--> -<div class="header-menu header-menu-top" id="J_header"> +{% assign homeActive = 'active' %} +{% if page.hideHomeActive %} +{% assign homeActive = nil %} +{% endif %} +<div class="header-menu" id="J_header"> <ul class="header-item-container"> - <li class="header-item-title"> - <a href="{{site.url}}/"> - {% if site.logo %} - <img class="logo" src="{{site.url}}/{{ site.logo }}" alt="{{ site.title }}"> - {% endif %} - <a href="{{site.url}}/" class="title"> {{ site.title }}</a> - </a> + <li class="header-item-title {{homeActive}}"> + <a href="{{site.url}}/" class="title"> {{ site.title }}</a> </li> {% for menu in site.menu reversed %} + {% assign class = nil %} - {% if ((page.url contains menu.url and menu.url != '/') or (page.url == '/index.html' and menu.url == '/')) %} + {% if (page.url contains menu.url and menu.url != '/') %} {% assign class = 'active' %} {% endif %} - {% if menu.type == 'categories' %} - <li class="header-item {{class}}"><a href="{{site.url}}{{menu.url}}"><h3>{{ menu.title }}</h3></a> - <ul class="header-submenu"> - {% for item in (0..site.categories.size) %}{% unless forloop.last %} - {% capture this_word %}{{ cats_list[item] | strip_newlines }}{% endcapture %} - <li class="sub-item"><a href="{{site.url}}/categories/#{{this_word}}">{{this_word}}</a></li> - {% endunless %}{% endfor %} - </ul> - </li> - {% elsif menu.submenu %} - <li class="header-item {{class}}"><a href="{{site.url}}{{menu.url}}"><h3>{{ menu.title }}</h3></a> - <ul class="header-submenu"> - {% for sub in menu.submenu %} - <li class="sub-item"><a href="{{site.url}}{{sub.url}}">{{sub.title}}</a></li> - {% endfor %} - </ul> - </li> - {% else %} {% if menu.url contains 'http://' or menu.url contains 'https://' %} - <li class="header-item {{class}}"><a href="{{menu.url}}" target="_blank"><h3>{{ menu.title }}</h3></a></li> + <li class="header-item {{class}}"><a href="{{menu.url}}" target="_blank">{{ menu.title }}</a></li> {% else %} - <li class="header-item {{class}}"><a href="{{site.url}}{{menu.url}}"><h3>{{ menu.title }}</h3></a></li> + <li class="header-item {{class}}"><a href="{{site.url}}{{menu.url}}">{{ menu.title }}</a></li> {% endif %} - {% endif %} {% endfor %} </ul> </div> + <div class="entry-header"> - <div class="header-title"> - <h1>{{ page.title }}</h1> - </div> + <svg width="100%" height="200" xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1"> + <path id="svg-title-path"> + <animate attributeName="d" from="m0,110 h0" to="m0,110 h1100" dur="1s" repeatCount="1" fill="freeze" begin="0s" /> + </path> + <text font-size="36" fill='#ffffff' x="50%" y="50%" text-anchor="middle"> + <textPath xlink:href="#svg-title-path">{{ page.title }}</textPath> + </text> + </svg> + <canvas id="J_firework_canvas"></canvas> </div>