| tAttempt to redirect from .dk to .com/da/ - andersdamsgaard.com - my photograph… | |
| git clone git://src.adamsgaard.dk/andersdamsgaard.com | |
| Log | |
| Files | |
| Refs | |
| Submodules | |
| README | |
| LICENSE | |
| --- | |
| commit 5ad848a6fab9f702066e7c915ad08815f5acf8ac | |
| parent a69300033e13ffaaa77e5f1124a3c2d2da77851c | |
| Author: Anders Damsgaard <[email protected]> | |
| Date: Mon, 5 Nov 2018 14:27:52 +0100 | |
| Attempt to redirect from .dk to .com/da/ | |
| Diffstat: | |
| M themes/tale-mod/layouts/partials/h… | 16 ++++++++++++++-- | |
| 1 file changed, 14 insertions(+), 2 deletions(-) | |
| --- | |
| diff --git a/themes/tale-mod/layouts/partials/head.html b/themes/tale-mod/layou… | |
| t@@ -1,5 +1,5 @@ | |
| <head> | |
| - <meta charset="UTF-8"> | |
| + <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-sca… | |
| {{- if eq .URL "/" }} | |
| <meta name="description" content="{{ .Site.Params.Desc… | |
| t@@ -14,7 +14,19 @@ | |
| {{ .Title }} · {{ .Site.Title }} | |
| {{- end }} | |
| </title> | |
| - | |
| + | |
| + <script type="text/javascript"> | |
| + $(document).ready(function () { | |
| + if(window.location.href.indexOf("andersdamsgaard.dk") > -1) { | |
| + url=window.location.href; | |
| + if(url.substr(url.indexOf('=')+1)=="andersdamsgaard.dk") { | |
| + url=url.replace("andersdamsgaard.dk","andersdamsgaard.com/… | |
| + window.location.replace(url); | |
| + } | |
| + } | |
| + }); | |
| + </script> | |
| + | |
| <!-- CSS --> | |
| {{- $inServerMode := .Site.IsServer }} | |
| {{- $cssTarget := "css/style.css" }} |