Added cover images
parent
cfe5cad630
commit
85927861b9
|
|
@ -72,6 +72,10 @@ h6::before {
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.cover-image img {
|
||||||
|
border: 3px solid var(--darkMaincolor);
|
||||||
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
border-bottom: 3px solid var(--darkMaincolor);
|
border-bottom: 3px solid var(--darkMaincolor);
|
||||||
color: inherit;
|
color: inherit;
|
||||||
|
|
|
||||||
|
|
@ -72,6 +72,10 @@ img {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.cover-image img {
|
||||||
|
border: 3px solid var(--maincolor);
|
||||||
|
}
|
||||||
|
|
||||||
figure {
|
figure {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
|
@ -79,12 +83,12 @@ figure {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
figure img {
|
figure:not(.cover-image) img {
|
||||||
max-height: 500px;
|
max-height: 500px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (min-width: 600px) {
|
@media screen and (min-width: 600px) {
|
||||||
figure {
|
figure:not(.cover-image) {
|
||||||
padding: 0 40px;
|
padding: 0 40px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,11 @@
|
||||||
<div class="post-container">
|
<div class="post-container">
|
||||||
<!-- Main Content -->
|
<!-- Main Content -->
|
||||||
<div class="post-content">
|
<div class="post-content">
|
||||||
|
{{ if isset .Params "cover" }}
|
||||||
|
<figure class="cover-image">
|
||||||
|
<img src="{{ .Params.cover.image }}" alt="{{ .Params.cover.alt }}">
|
||||||
|
</figure>
|
||||||
|
{{ end }}
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<h1 class="title">{{ .Title }}</h1>
|
<h1 class="title">{{ .Title }}</h1>
|
||||||
<div class="meta">{{ i18n "publishedOn" }} {{ dateFormat ":date_medium" .Date }}{{ if .Draft }} <span class="draft-label">DRAFT</span> {{ end }}</div>
|
<div class="meta">{{ i18n "publishedOn" }} {{ dateFormat ":date_medium" .Date }}{{ if .Draft }} <span class="draft-label">DRAFT</span> {{ end }}</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue