dash-website/_includes/base.html
0xfff 7cb8aac36e (Update) Nav: Link the Dash logo to the homepage (#6)
* (Update) Nav: Link the Dash logo to the homepage

* (Update) Header: Reduce dropshadow
2016-09-09 12:45:29 -04:00

18 lines
No EOL
695 B
HTML

<!--
Include this file in your templates so you can reference assets with relative urls
include base.html
example: href="{{ base }}/assets/css/style.css"
-->
{% assign base = '' %}
{% assign depth = page.url | split: '/' | size | minus: 1 %}
{% if depth == -1 %}{% assign base = '.' %}
{% elsif depth == 1 %}{% assign base = '..' %}
{% elsif depth == 2 %}{% assign base = '../..' %}
{% elsif depth == 3 %}{% assign base = '../../..' %}
{% elsif depth == 4 %}{% assign base = '../../../..' %}{% endif %}
{% if site.lang != "en" %}
{% assign base = base | prepend: '../' %}
{% endif %}
{% capture basenav %}{{ base }}{% if site.lang != "en" %}/{{ site.lang }}{% endif %}{% endcapture %}