Use details summary for related articles
This commit is contained in:
parent
c61a9ddb9f
commit
9b39f6443e
|
@ -697,15 +697,6 @@ select {
|
||||||
.mentions-list {
|
.mentions-list {
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
.item {
|
|
||||||
.link {
|
|
||||||
.post-title {
|
|
||||||
margin-bottom: 0;
|
|
||||||
overflow: hidden;
|
|
||||||
font-size: .8125rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -815,23 +806,13 @@ select {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
.caption {
|
.caption {
|
||||||
display: block;
|
|
||||||
margin-bottom: 5px;
|
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
}
|
}
|
||||||
.related-list {
|
.related-list {
|
||||||
|
margin-top: 5px;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
.item {
|
|
||||||
.link {
|
|
||||||
.post-title {
|
|
||||||
margin-bottom: 0;
|
|
||||||
overflow: hidden;
|
|
||||||
font-size: .8125rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,15 @@
|
||||||
{{ $related := .Site.RegularPages.Related . | first 5 }}
|
{{ $related := .Site.RegularPages.Related . | first 5 }}
|
||||||
{{ with $related }}
|
{{ with $related }}
|
||||||
<div class="related">
|
<div class="related">
|
||||||
<span class="caption">{{ T "related" }}</span>
|
<details>
|
||||||
<ul class="related-list">
|
<summary class="caption">{{ T "related" }}</summary>
|
||||||
{{ range . }}
|
<ul class="related-list">
|
||||||
<li class="item"><a class="link" href="{{ .RelPermalink }}"><p class="post-title">
|
{{ range . }}
|
||||||
{{ with .Title }}{{ . }}{{ else }}{{ .Summary | truncate 60 }}{{ end }}
|
<li class="item">
|
||||||
</p></a></li>
|
<a class="link" href="{{ .RelPermalink }}">{{ with .Title }}{{ . }}{{ else }}{{ .Summary | truncate 60 }}{{ end }}</a> <i>{{.Date.Format ( .Site.Params.dateformat | default "January 02, 2006")}}</i>
|
||||||
{{ end }}
|
</li>
|
||||||
</ul>
|
{{ end }}
|
||||||
|
</ul>
|
||||||
|
</details>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
Reference in New Issue