tAddress deprecation warnings for relative page URLs and RSS link - andersdamsg… | |
git clone git://src.adamsgaard.dk/andersdamsgaard.com | |
Log | |
Files | |
Refs | |
Submodules | |
README | |
LICENSE | |
--- | |
commit ff1905f0244b2a1204840ed6ee9d30b92eb2461e | |
parent 2f44993e437f610761fe8719fd6e0523a24eaf07 | |
Author: Anders Damsgaard <[email protected]> | |
Date: Mon, 24 Jun 2019 09:35:57 +0200 | |
Address deprecation warnings for relative page URLs and RSS link | |
Diffstat: | |
M themes/tale-mod/layouts/_default/s… | 8 ++++---- | |
M themes/tale-mod/layouts/_default/s… | 8 ++++---- | |
M themes/tale-mod/layouts/about/list… | 4 ++-- | |
M themes/tale-mod/layouts/index.da.h… | 7 +++---- | |
M themes/tale-mod/layouts/index.html | 4 ++-- | |
M themes/tale-mod/layouts/partials/h… | 33 +++++++++++++++------------… | |
M themes/tale-mod/layouts/prints/lis… | 4 ++-- | |
7 files changed, 33 insertions(+), 35 deletions(-) | |
--- | |
diff --git a/themes/tale-mod/layouts/_default/single.da.html b/themes/tale-mod/… | |
t@@ -49,12 +49,12 @@ | |
<div class="pagination"> | |
{{- if .PrevPage }} | |
- <!-- <a href="{{ .PrevPage.URL }}" class="left arrow">← Previous… | |
- <a href="{{ .PrevPage.URL }}" class="right arrow">Næste serie →… | |
+ <!-- <a href="{{ .PrevPage.RelPermalink }}" class="left arrow">←… | |
+ <a href="{{ .PrevPage.RelPermalink }}" class="right arrow">Næste seri… | |
{{- end }} | |
{{- if .NextPage }} | |
- <!-- <a href="{{ .NextPage.URL }}" class="right arrow">Next →</a… | |
- <a href="{{ .NextPage.URL }}" class="left arrow">← Forrige serie… | |
+ <!-- <a href="{{ .NextPage.RelPermalink }}" class="right arrow">Next &… | |
+ <a href="{{ .NextPage.RelPermalink }}" class="left arrow">← Forr… | |
{{- end }} | |
<a href="{{ .Site.BaseURL }}{{ .Lang }}" class="top">Hjem</a> | |
diff --git a/themes/tale-mod/layouts/_default/single.html b/themes/tale-mod/lay… | |
t@@ -49,12 +49,12 @@ | |
<div class="pagination"> | |
{{- if .PrevPage }} | |
- <!-- <a href="{{ .PrevPage.URL }}" class="left arrow">← Previous… | |
- <a href="{{ .PrevPage.URL }}" class="right arrow">Next series →<… | |
+ <!-- <a href="{{ .PrevPage.RelPermalink }}" class="left arrow">←… | |
+ <a href="{{ .PrevPage.RelPermalink }}" class="right arrow">Next series… | |
{{- end }} | |
{{- if .NextPage }} | |
- <!-- <a href="{{ .NextPage.URL }}" class="right arrow">Next →</a… | |
- <a href="{{ .NextPage.URL }}" class="left arrow">← Previous seri… | |
+ <!-- <a href="{{ .NextPage.RelPermalink }}" class="right arrow">Next &… | |
+ <a href="{{ .NextPage.RelPermalink }}" class="left arrow">← Prev… | |
{{- end }} | |
<a href="{{ .Site.BaseURL }}" class="top">Home</a> | |
diff --git a/themes/tale-mod/layouts/about/list.html b/themes/tale-mod/layouts/… | |
t@@ -12,10 +12,10 @@ | |
<div class="pagination"> | |
{{ if .PrevPage }} | |
- <a href="{{ .PrevPage.URL }}" class="left arrow">←</a> | |
+ <a href="{{ .PrevPage.RelPermalink }}" class="left arrow">U… | |
{{ end }} | |
{{ if .NextPage }} | |
- <a href="{{ .NextPage.URL }}" class="right arrow">→</a> | |
+ <a href="{{ .NextPage.RelPermalink }}" class="right arrow">… | |
{{ end }} | |
<a href="#" class="top">Top</a> | |
diff --git a/themes/tale-mod/layouts/index.da.html b/themes/tale-mod/layouts/in… | |
t@@ -12,15 +12,14 @@ | |
</a> | |
{{ end }} | |
</div> | |
- | |
+ | |
<div class="pagination"> | |
{{ if .Paginator.HasPrev }} | |
- <a href="{{ .Paginator.PrevPage.URL }}" class="left ar… | |
+ <a href="{{ .Paginator.PrevPage.RelPermalink }}" class… | |
{{ end }} | |
<a href="{{ .Site.BaseURL }}{{ .Lang }}" class="top">Hjem</a> | |
{{ if .Paginator.HasNext }} | |
- <a href="{{ .Paginator.NextPage.URL }}" class="right a… | |
- | |
+ <a href="{{ .Paginator.NextPage.RelPermalink }}" class… | |
<span>{{ .Paginator.PageNumber }}</span> | |
{{ end }} | |
</div> | |
diff --git a/themes/tale-mod/layouts/index.html b/themes/tale-mod/layouts/index… | |
t@@ -15,11 +15,11 @@ | |
<div class="pagination"> | |
{{ if .Paginator.HasPrev }} | |
- <a href="{{ .Paginator.PrevPage.URL }}" class="left ar… | |
+ <a href="{{ .Paginator.PrevPage.RelPermalink }}" class… | |
{{ end }} | |
<a href="{{ .Site.BaseURL }}" class="top">Top</a> | |
{{ if .Paginator.HasNext }} | |
- <a href="{{ .Paginator.NextPage.URL }}" class="right a… | |
+ <a href="{{ .Paginator.NextPage.RelPermalink }}" class… | |
<span>{{ .Paginator.PageNumber }}</span> | |
{{ end }} | |
diff --git a/themes/tale-mod/layouts/partials/head.html b/themes/tale-mod/layou… | |
t@@ -1,46 +1,45 @@ | |
<head> | |
- <meta charset="UTF-8"> | |
+ <meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-sca… | |
- {{- if eq .URL "/" }} | |
+ {{- if eq .RelPermalink "/" }} | |
<meta name="description" content="{{ .Site.Params.Desc… | |
{{- else if .Description }} | |
<meta name="description" content="{{ .Description }}"> | |
{{- end }} | |
- | |
+ | |
<title> | |
- {{- if eq .URL "/" }} | |
+ {{- if eq .RelPermalink "/" }} | |
{{ .Site.Title }} | |
{{- else }} | |
{{ .Title }} · {{ .Site.Title }} | |
{{- end }} | |
</title> | |
- <script type="text/javascript"> | |
- if (window.location.href.indexOf("andersdamsgaard.dk") > -1) { | |
- url=window.location.href; | |
- url=url.replace("andersdamsgaard.dk","andersdamsgaard.com/da"); | |
- window.location.replace(url); | |
- } | |
- </script> | |
+ <script type="text/javascript"> | |
+ if (window.location.href.indexOf("andersdamsgaard.dk")… | |
+ url=window.location.href; | |
+ url=url.replace("andersdamsgaard.dk","andersda… | |
+ window.location.replace(url); | |
+ } | |
+ </script> | |
<!-- CSS --> | |
{{- $inServerMode := .Site.IsServer }} | |
{{- $cssTarget := "css/style.css" }} | |
{{- $cssOptions := cond ($inServerMode) (dict "… | |
{{- $style := resources.Get "scss/tale.… | |
- <link rel="stylesheet" href="{{ $style.RelPermalink }}"> | |
+ <link rel="stylesheet" href="{{ $style.RelPermalink }}"> | |
<link rel="stylesheet" href="https://fonts.googleapis.com/css?… | |
{{- $inServerMode := .Site.IsServer }} | |
{{- $style := resources.Get "css/w3.css… | |
- <link rel="stylesheet" href="{{ $style.RelPermalink }}"> | |
+ <link rel="stylesheet" href="{{ $style.RelPermalink }}"> | |
- | |
<!-- Favicon --> | |
<link rel="icon" type="image/png" sizes="32x32" href="{{ .Site… | |
<link rel="icon" type="image/png" sizes="16x16" href="{{ .Site… | |
<link rel="apple-touch-icon" sizes="180x180" href="{{ .Site.Ba… | |
- | |
+ | |
<!-- RSS --> | |
- <link href="{{ .RSSLink }}" rel="alternate" type="application/… | |
+ <link href="{{ with .OutputFormats.Get "RSS" }}{{ .RelPermalin… | |
</head> | |
- | |
+ | |
diff --git a/themes/tale-mod/layouts/prints/list.html b/themes/tale-mod/layouts… | |
t@@ -12,10 +12,10 @@ | |
<div class="pagination"> | |
{{ if .PrevPage }} | |
- <a href="{{ .PrevPage.URL }}" class="left arrow">←</a> | |
+ <a href="{{ .PrevPage.RelPermalink }}" class="left arrow">U… | |
{{ end }} | |
{{ if .NextPage }} | |
- <a href="{{ .NextPage.URL }}" class="right arrow">→</a> | |
+ <a href="{{ .NextPage.RelPermalink }}" class="right arrow">… | |
{{ end }} | |
<a href="#" class="top">Top</a> |