mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2024-11-17 13:25:57 -06:00
Replace See also with a nicer looking Related posts section
This commit is contained in:
parent
dff23045a8
commit
e8f9d1c5df
@ -70,7 +70,8 @@
|
||||
}
|
||||
|
||||
.page-list li,
|
||||
.series-taxonomy li {
|
||||
.series-taxonomy li,
|
||||
.related-posts .post {
|
||||
padding-top: 8px;
|
||||
padding-left: 24px;
|
||||
padding-right: 24px;
|
||||
@ -239,6 +240,19 @@
|
||||
padding: 8px 15px;
|
||||
}
|
||||
|
||||
.related-posts {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-evenly;
|
||||
gap: 10px;
|
||||
align-items: stretch; /* this is default anyways */
|
||||
}
|
||||
|
||||
.related-posts .post {
|
||||
min-width: 10%;
|
||||
flex: 1 1 49%;
|
||||
}
|
||||
|
||||
#back-to-top {
|
||||
position: fixed;
|
||||
float: right;
|
||||
|
@ -35,8 +35,8 @@ post_count:
|
||||
read_more:
|
||||
other: "Read more"
|
||||
|
||||
see_also:
|
||||
other: "See also"
|
||||
related_posts:
|
||||
other: "Related posts"
|
||||
|
||||
older_post:
|
||||
other: "Older"
|
||||
|
@ -35,8 +35,8 @@ no_posts:
|
||||
read_more:
|
||||
other: "Leer más"
|
||||
|
||||
see_also:
|
||||
other: "Véase también"
|
||||
related_posts:
|
||||
other: "Publicaciones similares"
|
||||
|
||||
older_post:
|
||||
other: "Más antiguo"
|
||||
|
@ -52,17 +52,11 @@
|
||||
|
||||
{{ $related := .Site.RegularPages.Related . | first 5 }}
|
||||
{{ with $related }}
|
||||
<div class="see-also">
|
||||
<h2>{{ i18n "see_also" }}</h2>
|
||||
|
||||
<ul>
|
||||
{{ range . }}
|
||||
<li>
|
||||
{{ with .Parent.Params.icon }}{{ partial "icon.html" . }}{{ end }}
|
||||
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
<h2>{{ i18n "related_posts" }}</h2>
|
||||
<div class="related-posts">
|
||||
{{ range . }}
|
||||
{{ .Render "summary/post" }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user