diff options
author | mismith0227 <doraepon2216@gmail.com> | 2017-12-12 13:31:32 +0300 |
---|---|---|
committer | mismith0227 <doraepon2216@gmail.com> | 2017-12-12 13:31:32 +0300 |
commit | 2dc807199f18eedc2294be1e1078d78086cfd030 (patch) | |
tree | 04cd03cc2c1365d7b057f6ba64ac87679e7778ca /layouts | |
parent | 0a1409514c4084b69953a62c2f620f83219edeb3 (diff) |
edit
PC版のコーディング
#38
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/partials/related.html | 26 |
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 }} |