tAddress deprecation warnings for relative page URLs and RSS link - andersdamsgaard.com - my photography webpage
 (HTM) git clone git://src.adamsgaard.dk/andersdamsgaard.com
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) Submodules
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit ff1905f0244b2a1204840ed6ee9d30b92eb2461e
 (DIR) parent 2f44993e437f610761fe8719fd6e0523a24eaf07
 (HTM) Author: Anders Damsgaard <anders@adamsgaard.dk>
       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(-)
       ---
 (DIR) diff --git a/themes/tale-mod/layouts/_default/single.da.html b/themes/tale-mod/layouts/_default/single.da.html
       t@@ -49,12 +49,12 @@
        
            <div class="pagination">
                {{- if .PrevPage }}
       -        <!-- <a href="{{ .PrevPage.URL }}" class="left arrow">&#8592; Previous</a> -->
       -        <a href="{{ .PrevPage.URL }}" class="right arrow">Næste serie &#8594;</a>
       +        <!-- <a href="{{ .PrevPage.RelPermalink }}" class="left arrow">&#8592; Previous</a> -->
       +        <a href="{{ .PrevPage.RelPermalink }}" class="right arrow">Næste serie &#8594;</a>
                {{- end }}
                {{- if .NextPage }}
       -        <!-- <a href="{{ .NextPage.URL }}" class="right arrow">Next &#8594;</a> -->
       -        <a href="{{ .NextPage.URL }}" class="left arrow">&#8592; Forrige serie</a>
       +        <!-- <a href="{{ .NextPage.RelPermalink }}" class="right arrow">Next &#8594;</a> -->
       +        <a href="{{ .NextPage.RelPermalink }}" class="left arrow">&#8592; Forrige serie</a>
                {{- end }}
        
                <a href="{{ .Site.BaseURL }}{{ .Lang }}" class="top">Hjem</a>
 (DIR) diff --git a/themes/tale-mod/layouts/_default/single.html b/themes/tale-mod/layouts/_default/single.html
       t@@ -49,12 +49,12 @@
        
            <div class="pagination">
                {{- if .PrevPage }}
       -        <!-- <a href="{{ .PrevPage.URL }}" class="left arrow">&#8592; Previous</a> -->
       -        <a href="{{ .PrevPage.URL }}" class="right arrow">Next series &#8594;</a>
       +        <!-- <a href="{{ .PrevPage.RelPermalink }}" class="left arrow">&#8592; Previous</a> -->
       +        <a href="{{ .PrevPage.RelPermalink }}" class="right arrow">Next series &#8594;</a>
                {{- end }}
                {{- if .NextPage }}
       -        <!-- <a href="{{ .NextPage.URL }}" class="right arrow">Next &#8594;</a> -->
       -        <a href="{{ .NextPage.URL }}" class="left arrow">&#8592; Previous series</a>
       +        <!-- <a href="{{ .NextPage.RelPermalink }}" class="right arrow">Next &#8594;</a> -->
       +        <a href="{{ .NextPage.RelPermalink }}" class="left arrow">&#8592; Previous series</a>
                {{- end }}
        
                <a href="{{ .Site.BaseURL }}" class="top">Home</a>
 (DIR) diff --git a/themes/tale-mod/layouts/about/list.html b/themes/tale-mod/layouts/about/list.html
       t@@ -12,10 +12,10 @@
        
                <div class="pagination">
                        {{ if .PrevPage }}
       -                <a href="{{ .PrevPage.URL }}" class="left arrow">&#8592;</a>
       +                <a href="{{ .PrevPage.RelPermalink }}" class="left arrow">&#8592;</a>
                        {{ end }}
                        {{ if .NextPage }}
       -                <a href="{{ .NextPage.URL }}" class="right arrow">&#8594;</a>
       +                <a href="{{ .NextPage.RelPermalink }}" class="right arrow">&#8594;</a>
                        {{ end }}
        
                        <a href="#" class="top">Top</a>
 (DIR) diff --git a/themes/tale-mod/layouts/index.da.html b/themes/tale-mod/layouts/index.da.html
       t@@ -12,15 +12,14 @@
                                </a>
                        {{ end }}
                </div>
       -        
       +
                <div class="pagination">
                        {{ if .Paginator.HasPrev }}
       -                        <a href="{{ .Paginator.PrevPage.URL }}" class="left arrow">&#8592;</a>
       +                        <a href="{{ .Paginator.PrevPage.RelPermalink }}" class="left arrow">&#8592;</a>
                        {{ end }}
                <a href="{{ .Site.BaseURL }}{{ .Lang }}" class="top">Hjem</a>
                        {{ if .Paginator.HasNext }}
       -                        <a href="{{ .Paginator.NextPage.URL }}" class="right arrow">&#8594;</a>
       -        
       +                        <a href="{{ .Paginator.NextPage.RelPermalink }}" class="right arrow">&#8594;</a>
                        <span>{{ .Paginator.PageNumber }}</span>
                        {{ end }}
                </div>
 (DIR) diff --git a/themes/tale-mod/layouts/index.html b/themes/tale-mod/layouts/index.html
       t@@ -15,11 +15,11 @@
                
                <div class="pagination">
                        {{ if .Paginator.HasPrev }}
       -                        <a href="{{ .Paginator.PrevPage.URL }}" class="left arrow">&#8592;</a>
       +                        <a href="{{ .Paginator.PrevPage.RelPermalink }}" class="left arrow">&#8592;</a>
                        {{ end }}
                <a href="{{ .Site.BaseURL }}" class="top">Top</a>
                        {{ if .Paginator.HasNext }}
       -                        <a href="{{ .Paginator.NextPage.URL }}" class="right arrow">&#8594;</a>
       +                        <a href="{{ .Paginator.NextPage.RelPermalink }}" class="right arrow">&#8594;</a>
                
                        <span>{{ .Paginator.PageNumber }}</span>
                        {{ end }}
 (DIR) diff --git a/themes/tale-mod/layouts/partials/head.html b/themes/tale-mod/layouts/partials/head.html
       t@@ -1,46 +1,45 @@
        <head>
       -    <meta charset="UTF-8">
       +        <meta charset="UTF-8">
                        <meta name="viewport" content="width=device-width, initial-scale=1.0">
       -                {{- if eq .URL "/" }}
       +                {{- if eq .RelPermalink "/" }}
                                <meta name="description" content="{{ .Site.Params.Description }}">
                        {{- else if .Description }}
                                <meta name="description" content="{{ .Description }}">
                        {{- end }}
       -        
       +
                        <title>
       -                        {{- if eq .URL "/" }}
       +                        {{- if eq .RelPermalink "/" }}
                                        {{ .Site.Title }}
                                {{- else }}
                                        {{ .Title }} &middot; {{ .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") > -1) {
       +                                url=window.location.href;
       +                                url=url.replace("andersdamsgaard.dk","andersdamsgaard.com/da");
       +                                window.location.replace(url);
       +                        }
       +                </script>
        
                        <!-- CSS -->
                        {{- $inServerMode        := .Site.IsServer }}
                        {{- $cssTarget                := "css/style.css" }}
                        {{- $cssOptions                := cond ($inServerMode) (dict "targetPath" $cssTarget "enableSourceMap" true) (dict "targetPath" $cssTarget "outputStyle" "compressed") }}                
                        {{- $style                        := resources.Get "scss/tale.scss" | toCSS $cssOptions }}
       -                  <link rel="stylesheet" href="{{ $style.RelPermalink }}">
       +                <link rel="stylesheet" href="{{ $style.RelPermalink }}">
                        <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Libre+Baskerville:400,400i,700">
                        {{- $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.BaseURL }}images/favicon-32x32.png">
                        <link rel="icon" type="image/png" sizes="16x16" href="{{ .Site.BaseURL }}images/favicon-16x16.png">
                        <link rel="apple-touch-icon" sizes="180x180" href="{{ .Site.BaseURL}}images/apple-touch-icon.png">
       -        
       +
                        <!-- RSS -->
       -                <link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
       +                <link href="{{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
                </head>
       -        
       +
 (DIR) diff --git a/themes/tale-mod/layouts/prints/list.html b/themes/tale-mod/layouts/prints/list.html
       t@@ -12,10 +12,10 @@
        
                <div class="pagination">
                        {{ if .PrevPage }}
       -                <a href="{{ .PrevPage.URL }}" class="left arrow">&#8592;</a>
       +                <a href="{{ .PrevPage.RelPermalink }}" class="left arrow">&#8592;</a>
                        {{ end }}
                        {{ if .NextPage }}
       -                <a href="{{ .NextPage.URL }}" class="right arrow">&#8594;</a>
       +                <a href="{{ .NextPage.RelPermalink }}" class="right arrow">&#8594;</a>
                        {{ end }}
        
                        <a href="#" class="top">Top</a>