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

github.com/mismith0227/hugo_theme_pickles.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormismith0227 <doraepon2216@gmail.com>2017-12-12 13:31:32 +0300
committermismith0227 <doraepon2216@gmail.com>2017-12-12 13:31:32 +0300
commit2dc807199f18eedc2294be1e1078d78086cfd030 (patch)
tree04cd03cc2c1365d7b057f6ba64ac87679e7778ca /layouts
parent0a1409514c4084b69953a62c2f620f83219edeb3 (diff)
edit
PC版のコーディング #38
Diffstat (limited to 'layouts')
-rw-r--r--layouts/partials/related.html26
1 files changed, 15 insertions, 11 deletions
diff --git a/layouts/partials/related.html b/layouts/partials/related.html
index 5e91cc1..95cf989 100644
--- a/layouts/partials/related.html
+++ b/layouts/partials/related.html
@@ -1,14 +1,18 @@
-{{ $related := .Site.RegularPages.Related . | first 5 }}
+{{ $related := .Site.RegularPages.Related . | first 6 }}
{{ with $related }}
-<h3>See Also</h3>
-<ul>
- {{ range . }}
- <li>
- {{ with .Params.thumbnail }}
- <img src="{{ $.Site.BaseURL }}{{ . }}" alt="">
+<section class="p-related">
+ <h3>See Also</h3>
+ <ul class="p-related__list">
+ {{ range . }}
+ <li class="p-related__item">
+ <a href="{{ .RelPermalink }}"
+ {{ with .Params.thumbnail }}
+ style="background-image: url({{ $.Site.BaseURL }}{{ . }});"
+ {{ end }}>
+ <span>{{ .Title }}</span>
+ </a>
+ </li>
{{ end }}
- <a href="{{ .RelPermalink }}">{{ .Title }}</a>
- </li>
- {{ end }}
-</ul>
+ </ul>
+</section>
{{ end }}