mirror of
https://github.com/seigler/dash-website
synced 2025-07-27 07:16:10 +00:00
Moved base.html login inline
The base could not be included as a snippet because it causes a stack error due to a conflict with the i18n plugin.
This commit is contained in:
parent
57e052947c
commit
bcabe142a6
16 changed files with 603 additions and 475 deletions
|
@ -1,3 +1,17 @@
|
|||
{% 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 %}
|
||||
|
||||
<nav class="overlay-menu">
|
||||
<ul>
|
||||
<li><a href="{{ basenav }}/">{% t nav.what-is-dash %}</a></li>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue