Fix rel URLs (#50)

This commit is contained in:
Hanzei 2018-06-10 01:30:15 +02:00 committed by Vicky Lai
parent 71a72311ac
commit 4542024359
7 changed files with 25 additions and 27 deletions

View file

@ -38,7 +38,7 @@
<div class="container has-text-centered top-pad">
<hr>
<a href="{{ .Permalink }}#top">
<a href="#top">
<i class="fa fa-arrow-up"></i>
</a>
<hr>

View file

@ -12,7 +12,6 @@
<!-- Everything below fades in two! -->
<div class="section {{ if .Site.Params.fadeIn }} fade-in two {{ end }}">
<div class="container">
<!-- Begin Nav bar -->
{{ partial "nav-single.html" . }}
@ -23,10 +22,9 @@
<!-- Begin blog post content -->
{{ if .Params.image }}
<div class="has-text-centered">
<img src="{{ .Params.image }}" class="img-responsive">
<img src="{{ .Params.image }}" class="img-responsive">
</div>
{{ end }}
{{ end }}
{{ .Content }}
</div>
<!-- End blog post content -->
@ -37,7 +35,7 @@
<div class="container has-text-centered top-pad">
<hr>
<a href="{{ .Permalink }}#top">
<a href="#top">
<i class="fa fa-arrow-up"></i>
</a>
<hr>
@ -61,4 +59,4 @@
})
</script>
</body>
</body>

View file

@ -38,7 +38,7 @@
<div class="container has-text-centered top-pad">
<hr>
<a href="{{ .Permalink }}#top">
<a href="#top">
<i class="fa fa-arrow-up"></i>
</a>
<hr>

View file

@ -33,7 +33,7 @@
<div class="container has-text-centered top-pad">
<hr>
<a href="{{ .Permalink }}#top">
<a href="#top">
<i class="fa fa-arrow-up"></i>
</a>
<hr>
@ -57,4 +57,4 @@
})
</script>
</body>
</body>

View file

@ -51,15 +51,15 @@
<div class="columns"><!-- Avatar and about.md side by side except mobile -->
{{ if .Site.Params.avatar }}
<div class="column is-one-third has-text-centered">
<img class="img-responsive avatar" src="/{{ .Site.Params.avatar }}" alt="My profile picture.">
<img class="img-responsive avatar" src="{{ .Site.Params.avatar | relURL }}" alt="My profile picture.">
</div>
{{ end }}
<div class="column markdown">
{{ range .Data.Pages }}
{{if eq .Title "About" }}
{{.Content}}
{{end}}
{{ end }}
{{end}}
{{ end }}
</div>
</div>
</div><!-- End About container-->
@ -96,16 +96,16 @@
<div class="markdown">
{{ range .Data.Pages }}
{{if eq .Title "Contact" }}
{{.Content}}
{{end}}
{{ end }}
{{.Content}}
{{end}}
{{ end }}
</div>
{{ if .Site.Params.localTime }}
<p>My current local time is <span id="time"></span>.</p>
<script type="text/javascript" src={{ "js/moment.js" | absURL }}></script>
<script type="text/javascript" src={{ "js/moment-timezone.js" | absURL }}></script>
<script type="text/javascript" src={{ "js/moment-timezone-with-data-2012-2022.js" | absURL }}></script>
<script type="text/javascript" src="{{ "/js/moment.js" | relURL }}"></script>
<script type="text/javascript" src="{{ "/js/moment-timezone.js" | relURL }}"></script>
<script type="text/javascript" src="{{ "/js/moment-timezone-with-data-2012-2022.js" | relURL }}"></script>
<script>
$(document).ready(function() {

View file

@ -34,25 +34,25 @@
{{ end }}
<!-- jQuery -->
<script type="text/javascript" src={{ "js/jquery-3.3.1.min.js"| absURL }}></script>
<script type="text/javascript" src="{{ "/js/jquery-3.3.1.min.js" | relURL }}"></script>
<!-- Fonts and icon CSS -->
<link rel="stylesheet" href={{ "css/font-awesome.min.css" | absURL }}>
<link rel="stylesheet" href={{ "css/nunito_sans.css" | absURL }}>
<link rel="stylesheet" href="{{ "/css/font-awesome.min.css" | relURL }}">
<link rel="stylesheet" href="{{ "/css/nunito_sans.css" | relURL }}">
{{ if .Site.Params.cacheBuster }}
<link rel="stylesheet" href="{{ (printf "css/%s-style.css?t=%d" (.Site.Params.themeStyle | default "dark") now.Unix) |relURL }}">
{{ else }}
<link rel="stylesheet" href="{{ (printf "css/%s-style.css" .Site.Params.themeStyle | default "dark") | absURL }}">
<link rel="stylesheet" href="{{ (printf "css/%s-style.css" .Site.Params.themeStyle | default "dark") | relURL }}">
{{ end }}
<!-- Custom css -->
{{ range .Site.Params.customCSS -}}
<link rel="stylesheet" href="{{ . | absURL }}">
<link rel="stylesheet" href="{{ . | relURL }}">
{{- end }}
<!-- Icon -->
<link rel="shortcut icon" href="{{ .Site.Params.faviconFile | default "img/favicon.ico" | absURL }}">
<link rel="shortcut icon" href="{{ .Site.Params.faviconFile | default "img/favicon.ico" | relURL }}">
<!-- Google Analytics -->
{{ template "_internal/google_analytics_async.html" . }}

View file

@ -14,7 +14,7 @@
<div class="card-image">
<figure class="image is-3by2">
<a {{ if .Params.external_link }} href="{{ .Params.external_link }}" {{ end }}>
<img src="{{ if .Params.image }}{{ .Params.image }}{{ else }}{{ .Site.Params.placeHolderimg | default "img/workday.jpg" }}{{ end }}">
<img src="{{ if .Params.image }}{{ .Params.image | relURL }}{{ else }}{{ (.Site.Params.placeHolderimg | default "/img/workday.jpg") | relURL }}{{ end }}">
</a>
</figure>
</div>
@ -42,7 +42,7 @@
</header>
{{ end }}
{{ if .Params.image }}
<img src="{{ .Params.image }}" class="img-responsive img-centered">
<img src="{{ .Params.image | relURL }}" class="img-responsive img-centered">
{{ end }}
{{ if .Content }}
<section class="modal-card-body markdown">