mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2024-12-22 12:13:19 -06:00
Add the ability to feature an image in an article on list pages
This commit is contained in:
parent
02fcd97a9a
commit
2490ebe6d9
@ -11,4 +11,10 @@ Lorem ipsum
|
|||||||
tags = [
|
tags = [
|
||||||
"awesome",
|
"awesome",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
# this image will be shown for the article in list pages
|
||||||
|
[[resources]]
|
||||||
|
name = "feature"
|
||||||
|
src = "gui.webp"
|
||||||
|
title = "Checkra1n GUI running on Arch Linux"
|
||||||
+++
|
+++
|
||||||
|
@ -7,13 +7,17 @@
|
|||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.post-title a {
|
||||||
|
color: inherit;
|
||||||
|
text-decoration: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
.post-description {
|
.post-description {
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.post-title a {
|
.post-image {
|
||||||
color: inherit;
|
padding-top: 15px;
|
||||||
text-decoration: inherit;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.readmore {
|
.readmore {
|
||||||
@ -82,6 +86,11 @@ body {
|
|||||||
max-width: 720px;
|
max-width: 720px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
img:not(.noborder) {
|
||||||
|
padding: 5px;
|
||||||
|
border: 5px solid #1b5b9b;
|
||||||
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: #4da6ff;
|
color: #4da6ff;
|
||||||
text-decoration: inherit;
|
text-decoration: inherit;
|
||||||
|
@ -66,6 +66,12 @@
|
|||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
{{ with .Resources.GetMatch "feature" }}
|
||||||
|
<div class="post-image">
|
||||||
|
<img src="{{ .Permalink }}" alt="{{ .Title }}" />
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
<div class="post-description">
|
<div class="post-description">
|
||||||
{{ if .Description }}
|
{{ if .Description }}
|
||||||
{{ .Description | markdownify }}
|
{{ .Description | markdownify }}
|
||||||
|
Loading…
Reference in New Issue
Block a user