Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/shaform/hugo-theme-den.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaform <shaform@gmail.com>2018-07-24 17:06:28 +0300
committerShaform <shaform@gmail.com>2018-07-24 17:06:28 +0300
commitcf7b65e04482d16efb057d06e9daf25a4d41be25 (patch)
tree4651f9a7704856526804f6934e94f1efcedf772e /layouts
parentf835d863df715ef97674b779a2b4ecefa31f4bd8 (diff)
change to absURL
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/baseof.html2
-rw-r--r--layouts/partials/footer.html10
-rw-r--r--layouts/partials/head.html6
-rw-r--r--layouts/partials/header.html6
-rw-r--r--layouts/shortcodes/figure.html2
5 files changed, 15 insertions, 11 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 1646fbf..299caca 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -14,7 +14,7 @@
{{ if .Resources.GetMatch "header" }}
<div class="header-container" style="background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), url('{{ (.Resources.GetMatch "header").RelPermalink }}'); background-position: center; background-size: cover; ">
{{ else if .Site.Params.headerImage }}
- <div class="header-container" style="background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), url('{{ .Site.Params.headerImage | relURL }}'); background-position: center; background-size: cover;">
+ <div class="header-container" style="background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), url('{{ .Site.Params.headerImage | absURL }}'); background-position: center; background-size: cover;">
{{ else }}
<div class="header-container gradient">
{{ end }}
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index fc16411..66ffa7e 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -6,11 +6,15 @@
<ul class="list-unstyled">
{{ if .Site.Menus.sitemap }}
{{ range .Site.Menus.sitemap }}
- <li><a href="{{ .URL | relLangURL | safeURL }}">{{ .Name }}</a></li>
+ <li><a href="{{ .URL | absLangURL | safeURL }}">{{ .Name }}</a></li>
{{ end }}
{{ else }}
- <li><a href="{{ "/tags/" | relLangURL }}">{{ i18n "tags" }}</a></li>
- <li><a href="{{ "/categories/" | relLangURL }}">{{ i18n "categories" }}</a></li>
+ {{ with .Site.GetPage "/tags" }}
+ <li><a href="{{ .Permalink }}">{{ i18n "tags" }}</a></li>
+ {{ end }}
+ {{ with .Site.GetPage "/categories" }}
+ <li><a href="{{ .Permalink }}">{{ i18n "categories" }}</a></li>
+ {{ end }}
{{ end }}
{{ with .Site.GetPage "home" }}
{{ with .OutputFormats.Get "RSS" }}
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 271029e..6f16560 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -22,13 +22,13 @@
{{- end -}}
{{- with .Site.Params.customFavicon -}}
-<link rel="icon" href="{{ . | relURL }}" />
+<link rel="icon" href="{{ . | absURL }}" />
{{- end }}
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.2/css/bootstrap.min.css" integrity="sha384-Smlep5jCw/wG7hdkwQ/Z5nLIefveQRIY9nfy6xoR1uRYBtpZgI6339F5dgvm/e9B" crossorigin="anonymous">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.0/css/all.css" integrity="sha384-lKuwvrZot6UHsBSfcMvOkWwlCMgc0TaWr+30HWe3a4ltaBwTZhyTEggF5tJv8tbt" crossorigin="anonymous">
-<link rel="stylesheet" href="{{ "/css/den.css" | relURL }}">
+<link rel="stylesheet" href="{{ "/css/den.css" | absURL }}">
{{ range .Site.Params.customCSS }}
-<link rel="stylesheet" href="{{ "/css/" | relURL }}{{ . }}">
+<link rel="stylesheet" href="{{ "/css/" | absURL }}{{ . }}">
{{ end }}
{{ if .RSSLink }}
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index f85890e..0c33dd5 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -1,9 +1,9 @@
<div class="container">
<nav class="header-nav navbar navbar-expand-md navbar-dark light-dark">
<div class="header-logo navbar-brand">
- <a class="float-left" href="{{ "/" | relLangURL }}">
+ <a class="float-left" href="{{ "/" | absLangURL }}">
{{ with .Site.Params.siteLogoImage }}
- <img class="mr20 header-logo-image" src="{{ . | relURL }}" alt="logo">
+ <img class="mr20 header-logo-image" src="{{ . | absURL }}" alt="logo">
{{ end }}
{{ if .Site.Params.logoTitle }}
{{ .Site.Params.logoTitle | safeHTML }}
@@ -22,7 +22,7 @@
{{ if hasPrefix .URL "http" }}
<a class="nav-link" href="{{ .URL | safeURL }}">{{ with .Pre }}{{ . | safeHTML }}{{ end }}{{ .Name }}</a>
{{ else }}
- <a class="nav-link" href="{{ .URL | relLangURL | safeURL }}">{{ with .Pre }}{{ . | safeHTML }}{{ end }}{{ .Name }}</a>
+ <a class="nav-link" href="{{ .URL | absLangURL | safeURL }}">{{ with .Pre }}{{ . | safeHTML }}{{ end }}{{ .Name }}</a>
{{ end }}
</li>
{{ end }}
diff --git a/layouts/shortcodes/figure.html b/layouts/shortcodes/figure.html
index 5082830..0774d13 100644
--- a/layouts/shortcodes/figure.html
+++ b/layouts/shortcodes/figure.html
@@ -4,7 +4,7 @@ NB this overrides Hugo's built-in "figure" shortcode but is backwards compatible
Documentation and licence at https://github.com/liwenyip/hugo-easy-gallery/
-->
<!-- count how many times we've called this shortcode; load the css if it's the first time -->
-{{- if not ($.Page.Scratch.Get "figurecount") }}<link rel="stylesheet" href="{{ "/css/hugo-easy-gallery.css" | relURL }}" />{{ end }}
+{{- if not ($.Page.Scratch.Get "figurecount") }}<link rel="stylesheet" href="{{ "/css/hugo-easy-gallery.css" | absURL }}" />{{ end }}
{{- $.Page.Scratch.Add "figurecount" 1 -}}
<!-- use either src or link-thumb for thumbnail image -->
{{- $thumb := .Get "src" | default (printf "%s." (.Get "thumb") | replace (.Get "link") ".") }}