diff options
Diffstat (limited to '_includes')
-rw-r--r-- | _includes/head.html | 15 | ||||
-rw-r--r-- | _includes/header.html | 13 | ||||
-rw-r--r-- | _includes/relBase.html | 8 |
3 files changed, 20 insertions, 16 deletions
diff --git a/_includes/head.html b/_includes/head.html index 0dc3028..9bedb01 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -1,21 +1,16 @@ +{% include relBase.html %} <head> <meta charset="utf-8"> <title>Noah Loomans</title> <meta name="theme-color" content="#ffffff"> <meta name="viewport" content="width=device-width, initial-scale=1"> - <link rel="stylesheet" href="/style/main.css"> + <link rel="stylesheet" href="{{relBase}}style/main.css"> <link href="https://fonts.googleapis.com/css?family=Roboto+Mono" rel="stylesheet"> - <script> - var host = "noahloomans.com"; - if ((host == window.location.host) && (window.location.protocol != 'https:')) { - window.location = window.location.toString().replace(/^http:/, "https:"); - } - </script> <!-- sigh... favicon --> - <link rel="apple-touch-icon" sizes="180x180" href="/assets/icons/apple-touch-icon.png"> - <link rel="icon" type="image/png" href="/assets/icons/favicon-32x32.png" sizes="32x32"> - <link rel="icon" type="image/png" href="/assets/icons/favicon-16x16.png" sizes="16x16"> + <link rel="apple-touch-icon" sizes="180x180" href="{{relBase}}assets/icons/apple-touch-icon.png"> + <link rel="icon" type="image/png" href="{{relBase}}assets/icons/favicon-32x32.png" sizes="32x32"> + <link rel="icon" type="image/png" href="{{relBase}}assets/icons/favicon-16x16.png" sizes="16x16"> {% if page.info %} <meta name="og:title" content="{{ page.info.title }}" /> diff --git a/_includes/header.html b/_includes/header.html index 3b0c26e..eb46a8e 100644 --- a/_includes/header.html +++ b/_includes/header.html @@ -1,7 +1,8 @@ +{% include relBase.html %} <header> <div class="logo-container"> - <a href="/"> - <img src="/assets/face.jpg" alt="Noah Loomans" class="logo"> + <a href="{{relBase}}"> + <img src="{{relBase}}assets/face.jpg" alt="Noah Loomans" class="logo"> </a> <div class="dotted-line"></div> </div> @@ -10,10 +11,10 @@ <div class="menu"> <ul class='no-markdown'> <li>const menu = [</li> - <li><a href="/">'Home'</a>,</li> - <li><a href="/projects/">'Projects'</a>,</li> - <li><a href="/random-projects/">'Random Projects'</a>,</li> - <li><a href="/badges/">'Badges'</a></li> + <li><a href="{{relBase}}">'Home'</a>,</li> + <li><a href="{{relBase}}projects/">'Projects'</a>,</li> + <li><a href="{{relBase}}random-projects/">'Random Projects'</a>,</li> + <li><a href="{{relBase}}badges/">'Badges'</a></li> <li>]</li> </ul></div> </div> diff --git a/_includes/relBase.html b/_includes/relBase.html new file mode 100644 index 0000000..b2d4bc4 --- /dev/null +++ b/_includes/relBase.html @@ -0,0 +1,8 @@ +{% assign relBase = '' %} +{% assign tempDepth = page.url | append: 'hackish-solution' | split: '/' | size | minus: 2 %} +{% for i in (1..tempDepth) %} + {% assign relBase = relBase | append: "../" %} +{% endfor %} +{% if relBase == '' %} + {% assign relBase = './' %} +{% endif %} |