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 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"
|
example: href="{{ base }}/assets/css/style.css"
|
||||||
-->
|
-->
|
||||||
{% assign base = '' %}
|
{% assign base = '' %}
|
||||||
|
|
|
@ -1,16 +1,4 @@
|
||||||
{% assign base = '' %}
|
{% include base.html %}
|
||||||
{% 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 %}
|
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
To change the logo color, pass the parameter in the include.
|
To change the logo color, pass the parameter in the include.
|
||||||
|
|
|
@ -1,16 +1,4 @@
|
||||||
{% assign base = '' %}
|
{% include base.html %}
|
||||||
{% 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 %}
|
|
||||||
|
|
||||||
<nav class="overlay-menu">
|
<nav class="overlay-menu">
|
||||||
<ul>
|
<ul>
|
||||||
|
|
|
@ -1,19 +1,7 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
{% assign base = '' %}
|
{% include base.html %}
|
||||||
{% 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 %}
|
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>{% if page.title %}{% t page.title %} — {% endif %}Dash</title>
|
<title>{% if page.title %}{% t page.title %} — {% endif %}Dash</title>
|
||||||
<meta name="description" content="{% t page.description %}">
|
<meta name="description" content="{% t page.description %}">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue