mirror of
https://github.com/seigler/dash-website
synced 2025-07-27 07:16:10 +00:00
Including the base.html for relative links.
This commit is contained in:
parent
01c297d5e7
commit
13ac889ada
4 changed files with 4 additions and 40 deletions
|
@ -1,6 +1,6 @@
|
|||
<!--
|
||||
Include this file in your templates so you can reference assets with relative urls
|
||||
{% include base.html %}
|
||||
include base.html
|
||||
example: href="{{ base }}/assets/css/style.css"
|
||||
-->
|
||||
{% assign base = '' %}
|
||||
|
|
|
@ -1,16 +1,4 @@
|
|||
{% 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 %}
|
||||
{% include base.html %}
|
||||
|
||||
<!--
|
||||
To change the logo color, pass the parameter in the include.
|
||||
|
|
|
@ -1,16 +1,4 @@
|
|||
{% 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 %}
|
||||
{% include base.html %}
|
||||
|
||||
<nav class="overlay-menu">
|
||||
<ul>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue