making all path relative

This commit is contained in:
Set Hallstrom 2019-12-16 12:12:57 +01:00
parent 1d1c40fd3b
commit f39725b142
24 changed files with 85 additions and 61 deletions

View file

@ -17,28 +17,28 @@
<br /><br /><a id="commentlink" href="mailto:info+comment@basspistol.com?subject=Regarding the post &quot;{{ page.title }}&quot;!&body=Hey! The post on on your site with the title &quot;{{ page.title }}&quot; is wrong/right/good/bad/weird/peanuts/jelly/crazy/" style="text-decoration:none;">Write a comment</a>
<br /><br /><h2>
{% if prev_post %}
<a href="{{ site.baseurl }}{{ prev_post }}" style="text-decoration: none;">&laquo; Older</a> {% if next_post %}<span style="color:#313d26;">|</span>{% endif %}
<a href="{{ relBase }}{{ prev_post }}" style="text-decoration: none;">&laquo; Older</a> {% if next_post %}<span style="color:#313d26;">|</span>{% endif %}
{% endif %}
{% if next_post %}
<a href="{{ site.baseurl }}{{ next_post }}" style="text-decoration: none;">Newer&raquo;</a>
<a href="{{ relBase }}{{ next_post }}" style="text-decoration: none;">Newer&raquo;</a>
{% endif %}
</h2>
<p>Tags:</p>
{% assign sortedtags = page.tags | sort %} {% for tags in sortedtags%}
<a href="{{ site.baseurl }}/tags/#{{ tags }}">{{ tags }}</a> /
<a href="{{ relBase }}/tags/#{{ tags }}">{{ tags }}</a> /
{% endfor %}
<br /><br />
<a style="text-decoration: none;" href="https://touch.facebook.com/sharer.php?u={{ page.link | xml_escape }}&quote={{ page.description | xml_escape }} via https://basspistol.com" target="_blank" rel="noopener noreferrer nofollow">
<img src="{{ site.baseurl }}/assets/img/facebook.svg" width="22px" height="22px" alt="share on facebook" />
<img src="{{ relBase }}/assets/img/facebook.svg" width="22px" height="22px" alt="share on facebook" />
</a>
<a style="text-decoration: none;" href="https://twitter.com/share?url={{ page.link | xml_escape }}&text={{ page.description | xml_escape }}&via=bpist&hashtags=BpistHilights" target="_blank" rel="noopener noreferrer nofollow">
<img src="{{ site.baseurl }}/assets/img/twitter.svg" width="24px" height="24px" alt="share on twitter" />
<img src="{{ relBase }}/assets/img/twitter.svg" width="24px" height="24px" alt="share on twitter" />
</a>
<a style="text-decoration: none;" href="https://telegram.me/share/url?url={{ page.link }}&text={{ page.description }} via &#64;basspistolQC" target="_blank" rel="noopener noreferrer nofollow">
<img src="{{ site.baseurl }}/assets/img/telegram.svg" width="24px" height="24px" alt="share on telegram" />
<img src="{{ relBase }}/assets/img/telegram.svg" width="24px" height="24px" alt="share on telegram" />
</a>
<a style="text-decoration: none;" href="https://reddit.com/submit/?url={{ page.link }}" target="_blank" rel="noopener noreferrer nofollow">
<img src="{{ site.baseurl }}/assets/img/reddit.svg" width="24px" height="24px" alt="share on reddit" />
<img src="{{ relBase }}/assets/img/reddit.svg" width="24px" height="24px" alt="share on reddit" />
</a>
</div>

View file

@ -1,7 +1,7 @@
{% include highlightbase.html %}
{% include asciisplash.html %}
<link rel="shortcut icon" href="{{ site.baseurl }}/assets/img/basspistolico.png" type="image/png" />
<link rel="stylesheet" href="{{ site.baseurl }}/assets/css/style.css" />
<link rel="shortcut icon" href="{{ relBase }}/assets/img/basspistolico.png" type="image/png" />
<link rel="stylesheet" href="{{ relBase }}/assets/css/style.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
<link rel="alternate" type="application/rss+xml" href="{{ site.production_url }}/rss.xml" />
@ -225,5 +225,5 @@
<!-- END rendered SEO Meta -->
<script src="{{ site.baseurl }}/assets/js/jquery-3.4.1.min.js"></script>
<script src="{{ relBase }}/assets/js/jquery-3.4.1.min.js"></script>

View file

@ -2,31 +2,31 @@
<ul>
<li class="icofont">
<a href="{{ site.baseurl }}/" title="Home" class="icofont-home"></a>
<a href="{{ relBase }}/" title="Home" class="icofont-home"></a>
</li>
<li class="icofont">
<a href="{{ site.baseurl }}/discography/" title="Discography" class="icofont-disc"></a>
<a href="{{ relBase }}/discography/" title="Discography" class="icofont-disc"></a>
</li>
<li class="icofont">
<a href="{{ site.baseurl }}/radio/" title="Radio" class="icofont-radio"></a>
<a href="{{ relBase }}/radio/" title="Radio" class="icofont-radio"></a>
</li>
<li class="icofont">
<a href="{{ site.baseurl }}/highlights/" title="Highlights" class="icofont-newspaper current"></a>
<a href="{{ relBase }}/highlights/" title="Highlights" class="icofont-newspaper current"></a>
</li>
<li class="icofont">
<a href="{{ site.baseurl }}/artists/" title="Artists" class="icofont-people"></a>
<a href="{{ relBase }}/artists/" title="Artists" class="icofont-people"></a>
</li>
<li class="icofont">
<a href="{{ site.baseurl }}/about/" title="About" class="icofont-finger-print"></a>
<a href="{{ relBase }}/about/" title="About" class="icofont-finger-print"></a>
</li>
<li class="icofont">
<a href="{{ site.baseurl }}/links/" title="Links" class="icofont-link"></a>
<a href="{{ relBase }}/links/" title="Links" class="icofont-link"></a>
</li>
<li class="icofont">

View file

@ -1,7 +1,7 @@
{% include asciisplash.html %}
<link rel="shortcut icon" href="{{ site.baseurl }}/assets/img/basspistolico.png" type="image/png" />
<link rel="stylesheet" href="{{ site.baseurl }}/assets/css/style.css" />
<link rel="shortcut icon" href="{{ relBase }}/assets/img/basspistolico.png" type="image/png" />
<link rel="stylesheet" href="{{ relBase }}/assets/css/style.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
<link rel="alternate" type="application/rss+xml" href="{{ site.production_url }}/rss.xml" />
@ -220,5 +220,5 @@
<!-- END rendered SEO Meta -->
<script src="{{ site.baseurl }}/assets/js/jquery-3.4.1.min.js"></script>
<script src="{{ relBase }}/assets/js/jquery-3.4.1.min.js"></script>

View file

@ -2,7 +2,7 @@
<ul>
{% for link in site.data.navigation %}
<li class="icofont">
<a href="{{ site.baseurl }}{{ link.url }}" title="{{ link.title }}" class="{{ link.text }}{% if page.url == link.url %} current{% endif %}"></a>
<a href="{{ relBase }}{{ link.url }}" title="{{ link.title }}" class="{{ link.text }}{% if page.url == link.url %} current{% endif %}"></a>
</li>
{% endfor %}
<li class="icofont">

12
_includes/relBase.html Normal file
View file

@ -0,0 +1,12 @@
{% assign relBase = '' %}
{% assign tempDepth = page.url | append: 'hackish-solution' | split: '/' | size | minus: 2 %}
{% for i in (1..tempDepth) %}
{% if forloop.last %}
{% assign relBase = relBase | append: ".." %}
{% else %}
{% assign relBase = relBase | append: "../" %}
{% endif %}
{% endfor %}
{% if relBase == '' %}
{% assign relBase = '.' %}
{% endif %}

View file

@ -1,7 +1,7 @@
{% include asciisplash.html %}
<link rel="shortcut icon" href="{{ site.baseurl }}/assets/img/basspistolico.png" type="image/png" />
<link rel="stylesheet" href="{{ site.baseurl }}/assets/css/style.css" />
<link rel="shortcut icon" href="{{ relBase }}/assets/img/basspistolico.png" type="image/png" />
<link rel="stylesheet" href="{{ relBase }}/assets/css/style.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
<link rel="alternate" type="application/rss+xml" href="{{ site.production_url }}/rss.xml" />
@ -168,4 +168,4 @@
]
}
</script>
<script src="{{ site.baseurl }}/assets/js/jquery-3.4.1.min.js"></script>
<script src="{{ relBase }}/assets/js/jquery-3.4.1.min.js"></script>

View file

@ -1,7 +1,7 @@
{% include asciisplash.html %}
<link rel="shortcut icon" href="{{ site.baseurl }}/assets/img/basspistolico.png" type="image/png" />
<link rel="stylesheet" href="{{ site.baseurl }}/assets/css/style.css" />
<link rel="shortcut icon" href="{{ relBase }}/assets/img/basspistolico.png" type="image/png" />
<link rel="stylesheet" href="{{ relBase }}/assets/css/style.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
<link rel="alternate" type="application/rss+xml" href="{{ site.production_url }}/rss.xml" />
@ -128,5 +128,5 @@
<!-- END rendered SEO Meta -->
<script src="{{ site.baseurl }}/assets/js/jquery-3.4.1.min.js"></script>
<script src="{{ relBase }}/assets/js/jquery-3.4.1.min.js"></script>

View file

@ -1,5 +1,5 @@
<video poster="{{ site.baseurl }}{{ page.poster_image }}" id="bgvid" autoplay playsinline muted loop>
<source src="{{ site.baseurl }}{{ page.video_path }}" type="video/mp4">
<video poster="{{ relBase }}{{ page.poster_image }}" id="bgvid" autoplay playsinline muted loop>
<source src="{{ relBase }}{{ page.video_path }}" type="video/mp4">
</video>
<img id="bgpic" src="{{ site.baseurl }}{{ page.poster_image }}" alt="Basspistol" />
<img id="bgpic" src="{{ relBase }}{{ page.poster_image }}" alt="Basspistol" />
<div id="headline"><h1>~/{{ page.subtitle }}</h1></div>