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

github.com/AmazingRise/hugo-theme-diary.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoramazingrise <8315221+AmazingRise@users.noreply.github.com>2019-11-23 14:52:03 +0300
committeramazingrise <8315221+AmazingRise@users.noreply.github.com>2019-11-23 14:52:03 +0300
commit8799ffe2da642b82fa0984fb1a2060147109a207 (patch)
treef2edf632f4afae35aae48c9365834064695634c1 /layouts
parentbc48c0bc62807239296493fc1a6428a177c381ec (diff)
Fixed the issue caused by URL.
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/baseof.html2
-rw-r--r--layouts/_default/single.html6
-rw-r--r--layouts/index.html5
-rw-r--r--layouts/partials/head.html2
4 files changed, 9 insertions, 6 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 0bdeb7e..3b1948c 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -16,6 +16,6 @@
{{- partial "mobile-footer.html" . -}}
<!-- mobile footer -->
</div>
- <script src="/js/journal.js"></script>
+ <script src="{{.Site.BaseURL}}/js/journal.js"></script>
</body>
</html>
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 7262382..5c3d3bf 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -3,11 +3,13 @@
<div class="post-list-container post-list-container-shadow">
<div class="post">
{{ $post_class := "post-head-wrapper-text-only"}}
- {{ if .Params.featured_image }}
+ {{ $featured_image := .Params.featured_image }}
+ {{ if $featured_image }}
{{ $post_class = "post-head-wrapper"}}
{{ end }}
+
<div class="{{$post_class}}"
- style="background-image: url('{{.Params.featured_image}}')">
+ style="background-image: url('{{ $featured_image | relLangURL}}')">
<div class="post-title">
{{ .Title }}
<div class="post-meta">
diff --git a/layouts/index.html b/layouts/index.html
index 8e06cdb..016f063 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -19,10 +19,11 @@
{{ .PublishDate.Format "2006-01-02" }}
</div>
</div>
- {{ if .Params.featured_image }}
+ {{ $featured_image := .Params.featured_image }}
+ {{ if $featured_image }}
<div class="post-item-image-wrapper">
<div class="post-item-image"
- style="background-image: url('{{.Params.featured_image}}')"></div>
+ style="background-image: url('{{$featured_image | relLangURL }}')"></div>
</div>
{{ end }}
</div>
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index aba78b8..8db6583 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -35,7 +35,7 @@ integrity="sha256-FtWfRI+thWlNz2sB3SJbwKx5PgMyKIVgwHCTwa3biXc=" crossorigin="ano
<link rel="stylesheet" href="{{ $styles.Permalink }}" integrity="{{ $styles.Data.Integrity }}" media="screen">
-<script src="/js/loadCSS.js"></script>
+<script src="{{.Site.BaseURL}}/js/loadCSS.js"></script>
<script>
loadCSS("https://fonts.googleapis.com/css?family=Lora|Montserrat|Fira+Mono|Material+Icons");
(function (d) {