Add cover image to entry
This commit is contained in:
parent
55a8723567
commit
27a280647d
2 changed files with 21 additions and 20 deletions
|
|
@ -231,24 +231,20 @@ main {
|
|||
.concert-entry {
|
||||
margin: 0.8em 0;
|
||||
padding: 20px;
|
||||
|
||||
display: grid;
|
||||
grid-template-columns: 2fr 3fr 7fr 1fr;
|
||||
|
||||
display: flex;
|
||||
gap: 1em;
|
||||
border: 2px #000 solid;
|
||||
border-radius: 20px;
|
||||
align-items: center;
|
||||
background-color: #fff;
|
||||
height: 200px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.concert-date {
|
||||
padding: 0 0.5em;
|
||||
min-width: 110px;
|
||||
margin: 0 0.5em;
|
||||
font-weight: bold;
|
||||
font-size: 1.2em;
|
||||
color: #600303;
|
||||
color: #da1e2c;
|
||||
}
|
||||
|
||||
.concert-date h4 {
|
||||
|
|
@ -256,15 +252,6 @@ main {
|
|||
padding: 0.2em;
|
||||
}
|
||||
|
||||
.concert-cover {
|
||||
flex-grow: 1;
|
||||
/*height: 100%;*/
|
||||
}
|
||||
|
||||
.concert-cover > img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.concert-overview {
|
||||
flex-grow: 8;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,18 @@
|
|||
{{ define "main" }}
|
||||
<h2>Actualités</h2>
|
||||
<div class="concerts">
|
||||
{{ range site.RegularPages }}
|
||||
{{ range where site.RegularPages "Section" "event" }}
|
||||
<div class="concert-entry">
|
||||
<p class="concert-date">{{ .Params.ConcertDate }}</p>
|
||||
<div class="concert-cover">
|
||||
<img src="/unk.jpg" alt="Unknown cover" />
|
||||
{{ with .Resources.GetMatch "cover.*" }}
|
||||
<img
|
||||
src="{{ .RelPermalink }}"
|
||||
width="{{ .Width }}"
|
||||
height="{{ .Height }}"
|
||||
alt="Concert cover"
|
||||
/>
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="concert-overview">
|
||||
<h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
|
||||
|
|
@ -27,7 +34,14 @@
|
|||
<img src="bar.png" class="separator" />
|
||||
<div class="concert-entry-container">
|
||||
<div class="concert-cover">
|
||||
<img src="/unk.jpg" alt="Unknown cover" />
|
||||
{{ with .Resources.GetMatch "cover.*" }}
|
||||
<img
|
||||
src="{{ .RelPermalink }}"
|
||||
width="{{ .Width }}"
|
||||
height="{{ .Height }}"
|
||||
alt="Concert cover"
|
||||
/>
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="concert-overview">
|
||||
<a href="{{ .RelPermalink }}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue