Add related articles
This commit is contained in:
parent
f129cabdb2
commit
d2aacf1894
|
@ -581,13 +581,18 @@ select {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@mixin subarticle-element {
|
||||||
|
padding-top: 10px;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
@include color-border(border-top, 1px, dotted, border);
|
||||||
|
@include color-border(border-bottom, 1px, dotted, border);
|
||||||
|
}
|
||||||
|
|
||||||
/* Authorbox */
|
/* Authorbox */
|
||||||
.authorbox {
|
.authorbox {
|
||||||
padding: 25px 0;
|
@include subarticle-element;
|
||||||
margin-bottom: 25px;
|
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
@include color-border(border-top, 1px, solid, border);
|
|
||||||
@include color-border(border-bottom, 1px, solid, border);
|
|
||||||
display: block;
|
display: block;
|
||||||
@media screen and (max-width: $break1) {
|
@media screen and (max-width: $break1) {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
@ -596,6 +601,7 @@ select {
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
.author-name {
|
.author-name {
|
||||||
|
text-transform: uppercase;
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
}
|
}
|
||||||
|
@ -603,9 +609,12 @@ select {
|
||||||
|
|
||||||
/* Webmentionform */
|
/* Webmentionform */
|
||||||
.wm-form {
|
.wm-form {
|
||||||
margin-bottom: 25px;
|
@include subarticle-element;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
display: block;
|
display: block;
|
||||||
|
@media screen and (max-width: $break1) {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
#wm-source {
|
#wm-source {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
|
@ -667,12 +676,8 @@ select {
|
||||||
|
|
||||||
/* Post Navigation */
|
/* Post Navigation */
|
||||||
.post-nav {
|
.post-nav {
|
||||||
|
@include subarticle-element;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding-top: 25px;
|
|
||||||
padding-bottom: 25px;
|
|
||||||
margin-bottom: 25px;
|
|
||||||
@include color-border(border-top, 1px, solid, border);
|
|
||||||
@include color-border(border-bottom, 1px, solid, border);
|
|
||||||
display: flex;
|
display: flex;
|
||||||
@media screen and (max-width: $break1) {
|
@media screen and (max-width: $break1) {
|
||||||
display: block;
|
display: block;
|
||||||
|
@ -687,7 +692,7 @@ select {
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
@media screen and (max-width: $break1) {
|
@media screen and (max-width: $break1) {
|
||||||
padding-bottom: 25px;
|
padding-bottom: 10px;
|
||||||
min-width: 100%;
|
min-width: 100%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
@ -718,6 +723,35 @@ select {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Related articles
|
||||||
|
|
||||||
|
.related {
|
||||||
|
@include subarticle-element;
|
||||||
|
@media screen and (max-width: $break1) {
|
||||||
|
min-width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.caption {
|
||||||
|
display: block;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
font-weight: 700;
|
||||||
|
line-height: 1;
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
.related-list {
|
||||||
|
list-style: none;
|
||||||
|
.item {
|
||||||
|
.link {
|
||||||
|
.post-title {
|
||||||
|
margin-bottom: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
font-size: .8125rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Images / Video */
|
/* Images / Video */
|
||||||
img {
|
img {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
|
|
|
@ -43,3 +43,6 @@
|
||||||
|
|
||||||
- id: wmform_btn
|
- id: wmform_btn
|
||||||
translation: "Senden"
|
translation: "Senden"
|
||||||
|
|
||||||
|
- id: related
|
||||||
|
translation: "Ähnlich"
|
|
@ -43,3 +43,6 @@
|
||||||
|
|
||||||
- id: wmform_btn
|
- id: wmform_btn
|
||||||
translation: "Send"
|
translation: "Send"
|
||||||
|
|
||||||
|
- id: related
|
||||||
|
translation: "Related"
|
|
@ -13,4 +13,5 @@
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</nav>
|
</nav>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{ partial "related.html" . }}
|
||||||
{{- end }}
|
{{- end }}
|
11
layouts/partials/related.html
Normal file
11
layouts/partials/related.html
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{{ $related := .Site.RegularPages.Related . | first 5 }}
|
||||||
|
{{ with $related }}
|
||||||
|
<div class="related">
|
||||||
|
<span class="caption">{{ T "related" }}</span>
|
||||||
|
<ul class="related-list">
|
||||||
|
{{ range . }}
|
||||||
|
<li class="item"><a class="link" href="{{ .RelPermalink }}"><p class="post-title">{{ .Title }}</p></a></li>
|
||||||
|
{{ end }}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
Reference in New Issue
Block a user