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 {
|
.concert-entry {
|
||||||
margin: 0.8em 0;
|
margin: 0.8em 0;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
|
display: flex;
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 2fr 3fr 7fr 1fr;
|
|
||||||
|
|
||||||
gap: 1em;
|
gap: 1em;
|
||||||
border: 2px #000 solid;
|
border: 2px #000 solid;
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
height: 200px;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.concert-date {
|
.concert-date {
|
||||||
padding: 0 0.5em;
|
min-width: 110px;
|
||||||
|
margin: 0 0.5em;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 1.2em;
|
font-size: 1.2em;
|
||||||
color: #600303;
|
color: #da1e2c;
|
||||||
}
|
}
|
||||||
|
|
||||||
.concert-date h4 {
|
.concert-date h4 {
|
||||||
|
|
@ -256,15 +252,6 @@ main {
|
||||||
padding: 0.2em;
|
padding: 0.2em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.concert-cover {
|
|
||||||
flex-grow: 1;
|
|
||||||
/*height: 100%;*/
|
|
||||||
}
|
|
||||||
|
|
||||||
.concert-cover > img {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.concert-overview {
|
.concert-overview {
|
||||||
flex-grow: 8;
|
flex-grow: 8;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,18 @@
|
||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
<h2>Actualités</h2>
|
<h2>Actualités</h2>
|
||||||
<div class="concerts">
|
<div class="concerts">
|
||||||
{{ range site.RegularPages }}
|
{{ range where site.RegularPages "Section" "event" }}
|
||||||
<div class="concert-entry">
|
<div class="concert-entry">
|
||||||
<p class="concert-date">{{ .Params.ConcertDate }}</p>
|
<p class="concert-date">{{ .Params.ConcertDate }}</p>
|
||||||
<div class="concert-cover">
|
<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>
|
||||||
<div class="concert-overview">
|
<div class="concert-overview">
|
||||||
<h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
|
<h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
|
||||||
|
|
@ -27,7 +34,14 @@
|
||||||
<img src="bar.png" class="separator" />
|
<img src="bar.png" class="separator" />
|
||||||
<div class="concert-entry-container">
|
<div class="concert-entry-container">
|
||||||
<div class="concert-cover">
|
<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>
|
||||||
<div class="concert-overview">
|
<div class="concert-overview">
|
||||||
<a href="{{ .RelPermalink }}"
|
<a href="{{ .RelPermalink }}"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue