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

github.com/dewittn/hugo-html5up-alpha.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--exampleSite/content/blog/post.10/banner.jpg (renamed from exampleSite/content/blog/post.10/pic04.jpg)bin20737 -> 20737 bytes
-rw-r--r--exampleSite/content/blog/post.10/index.md4
-rw-r--r--exampleSite/content/blog/post.3.md2
-rw-r--r--exampleSite/content/blog/post.4.md2
-rw-r--r--layouts/_default/list.html4
-rw-r--r--layouts/_default/single.html5
-rw-r--r--layouts/partials/bannerURL.html7
-rw-r--r--layouts/partials/tags.html15
8 files changed, 31 insertions, 8 deletions
diff --git a/exampleSite/content/blog/post.10/pic04.jpg b/exampleSite/content/blog/post.10/banner.jpg
index b0206cb..b0206cb 100644
--- a/exampleSite/content/blog/post.10/pic04.jpg
+++ b/exampleSite/content/blog/post.10/banner.jpg
Binary files differ
diff --git a/exampleSite/content/blog/post.10/index.md b/exampleSite/content/blog/post.10/index.md
index 55fa2eb..3a9ab86 100644
--- a/exampleSite/content/blog/post.10/index.md
+++ b/exampleSite/content/blog/post.10/index.md
@@ -4,9 +4,7 @@ slug = 'page-bundle-example'
date = "2019-08-15T00:00:00"
description = 'Donec eget ex magna. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque venenatis dolor imperdiet dolor mattis sagittis magna etiam.'
disqus_identifier = '9'
-[[resources]]
- name = "header"
- src = "pic04.jpg"
+tags = ["tag1","tag2"]
+++
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam sit amet dui nec dui commodo auctor non eu mauris. Duis varius finibus vestibulum. Praesent aliquam, erat sed dictum feugiat, velit erat iaculis elit, eget iaculis ex libero ac sapien. Sed maximus ut lectus et varius. Nullam posuere velit vitae est consectetur porttitor. Vestibulum tempor felis ante, nec volutpat risus vestibulum ac. Mauris at finibus felis, eu placerat arcu. Sed nec semper nunc. Proin eget mollis felis. Donec fermentum lectus non metus elementum, dignissim ornare felis congue. In rhoncus vehicula nibh, ac imperdiet dolor tincidunt sit amet.
diff --git a/exampleSite/content/blog/post.3.md b/exampleSite/content/blog/post.3.md
index f0c5012..e3be375 100644
--- a/exampleSite/content/blog/post.3.md
+++ b/exampleSite/content/blog/post.3.md
@@ -1,7 +1,7 @@
+++
title = 'Augue lorem primis vestibulum'
slug = 'post3'
-image = 'images/pic07.jpg'
+image = 'images/pic02.jpg'
date = "2019-04-07T00:00:00"
description = 'Donec eget ex magna. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque venenatis dolor imperdiet dolor mattis sagittis magna etiam.'
disableComments = true
diff --git a/exampleSite/content/blog/post.4.md b/exampleSite/content/blog/post.4.md
index 9101391..d559e48 100644
--- a/exampleSite/content/blog/post.4.md
+++ b/exampleSite/content/blog/post.4.md
@@ -1,7 +1,7 @@
+++
title = 'Odio magna sed consectetur'
slug = 'post4'
-image = 'images/pic06.jpg'
+image = 'images/pic03.jpg'
date = "2019-04-11T00:00:00"
description = 'Donec eget ex magna. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque venenatis dolor imperdiet dolor mattis sagittis magna etiam.'
disableComments = true
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index ff096a0..ecee70f 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -7,7 +7,9 @@
{{ range .Pages }}
<div class="col-6 col-12-narrower">
<section class="box special">
- <span class="image featured"><img src="{{ .Params.image }}" alt="" /></span>
+ {{ with partial "bannerURL" . }}
+ <span class="image featured"><img src="{{ . }}" alt="" /></span>
+ {{ end }}
<h3>{{ .Title }}</h3>
{{ with .Date }}<p>{{ .Format "Jan 2, 2006" }}</p>{{ end }}
{{ with .Description }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 0b95cb4..d8119a1 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -4,10 +4,11 @@
<p>{{ .Date.Format "Jan 2, 2006" }}</p>
</header>
<div class="box">
- {{ with .Params.image }}
- <span class="image featured"><img src="{{ . | relURL }}" alt="" /></span>
+ {{ with partial "bannerURL" . }}
+ <span class="image featured"><img src="{{ . }}" alt="" /></span>
{{ end }}
{{ .Content }}
+ {{ partial "tags" . }}
</div>
{{ if .Site.DisqusShortname }}
<div class="box">
diff --git a/layouts/partials/bannerURL.html b/layouts/partials/bannerURL.html
new file mode 100644
index 0000000..4f2abfa
--- /dev/null
+++ b/layouts/partials/bannerURL.html
@@ -0,0 +1,7 @@
+{{ $bannerURL := "" }}
+{{ if .Params.image }}
+ {{ $bannerURL = (.Params.image | relURL) }}
+{{ else if .Resources.GetMatch "banner.jpg" }}
+ {{ $bannerURL = (.Resources.GetMatch "banner.jpg").Permalink }}
+{{ end }}
+{{ return $bannerURL }} \ No newline at end of file
diff --git a/layouts/partials/tags.html b/layouts/partials/tags.html
new file mode 100644
index 0000000..abc2c4d
--- /dev/null
+++ b/layouts/partials/tags.html
@@ -0,0 +1,15 @@
+{{/* Code thanks to Jake Wiesler, https://www.jakewiesler.com/blog/hugo-taxonomies/ */}}
+{{ $taxonomy := "tags" }}
+{{ with .Param $taxonomy }}
+ <hr />
+ <h3>{{ $taxonomy }}</h3>
+ <ul>
+ {{ range $index, $tag := . }}
+ {{ with $.Site.GetPage (printf "/%s/%s" $taxonomy $tag) -}}
+ <li>
+ <a href="{{ .Permalink }}">{{ $tag | urlize }}</a>
+ </li>
+ {{- end -}}
+ {{- end -}}
+ </ul>
+{{ end }} \ No newline at end of file