mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2024-11-17 05:15:58 -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 = [
|
||||
"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;
|
||||
}
|
||||
|
||||
.post-title a {
|
||||
color: inherit;
|
||||
text-decoration: inherit;
|
||||
}
|
||||
|
||||
.post-description {
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
.post-title a {
|
||||
color: inherit;
|
||||
text-decoration: inherit;
|
||||
.post-image {
|
||||
padding-top: 15px;
|
||||
}
|
||||
|
||||
.readmore {
|
||||
@ -82,6 +86,11 @@ body {
|
||||
max-width: 720px;
|
||||
}
|
||||
|
||||
img:not(.noborder) {
|
||||
padding: 5px;
|
||||
border: 5px solid #1b5b9b;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #4da6ff;
|
||||
text-decoration: inherit;
|
||||
|
@ -66,6 +66,12 @@
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Resources.GetMatch "feature" }}
|
||||
<div class="post-image">
|
||||
<img src="{{ .Permalink }}" alt="{{ .Title }}" />
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<div class="post-description">
|
||||
{{ if .Description }}
|
||||
{{ .Description | markdownify }}
|
||||
|
Loading…
Reference in New Issue
Block a user