Fill schedule cards with faded tour photos
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
d508e041a8
commit
860ffaaed2
3 changed files with 32 additions and 11 deletions
|
|
@ -114,7 +114,7 @@ days:
|
|||
- `time` is `HH:MM` with a leading zero (`09:30`). Tours are sorted by time, so their order in the file doesn't matter.
|
||||
- `title` (optional) replaces the page's title on the card, with one entry per language: `title: { de: "Hafen am Abend", en: "Harbour by Night" }`.
|
||||
- `status` (optional): `soldout` marks the tour as fully booked. Other values are ignored.
|
||||
- With the day picker, the first local photo in the tour page is shown on its card when it has alt text; its gallery credit is displayed below it.
|
||||
- With the day picker, the first local photo in the tour page fills its card behind a fade when it has alt text; its gallery credit remains visible.
|
||||
|
||||
For the events managed with Hackertours-Admin, the data file is generated by its website sync; don't edit it by hand.
|
||||
|
||||
|
|
|
|||
|
|
@ -135,31 +135,52 @@
|
|||
}
|
||||
|
||||
.schedule--picker .schedule__card--photo {
|
||||
grid-template-columns: minmax(0, 1fr) auto minmax(0, 6rem);
|
||||
grid-template-rows: min-content min-content 1fr;
|
||||
isolation: isolate;
|
||||
overflow: hidden;
|
||||
min-height: 7rem;
|
||||
align-items: start;
|
||||
|
||||
.schedule__title {
|
||||
grid-column: 1 / 3;
|
||||
.schedule__title,
|
||||
.schedule__photo-credit {
|
||||
max-width: 70%;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
.schedule__lang {
|
||||
background: var(--color-body-bg);
|
||||
}
|
||||
}
|
||||
|
||||
.schedule__photo {
|
||||
display: none;
|
||||
grid-column: 3;
|
||||
grid-row: 1 / 4;
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
z-index: -1;
|
||||
margin: 0;
|
||||
pointer-events: none;
|
||||
|
||||
img {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
&::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background: linear-gradient(90deg,
|
||||
var(--color-body-bg) 0%,
|
||||
color-mix(in srgb, var(--color-body-bg) 97%, transparent) 35%,
|
||||
color-mix(in srgb, var(--color-body-bg) 90%, transparent) 65%,
|
||||
color-mix(in srgb, var(--color-body-bg) 20%, transparent) 100%);
|
||||
}
|
||||
}
|
||||
|
||||
.schedule__photo-credit {
|
||||
display: none;
|
||||
grid-column: 1 / 3;
|
||||
grid-column: 1 / -1;
|
||||
grid-row: 3;
|
||||
font-size: var(--fs-xs);
|
||||
color: var(--color-text-meta);
|
||||
|
|
|
|||
|
|
@ -89,8 +89,8 @@ so an hour without tours still gets a row.
|
|||
{{- if and .resource .alt }}
|
||||
{{- if and (eq .resource.ResourceType "image") (ne .resource.MediaType.SubType "svg") }}
|
||||
{{- $oriented := .resource.Filter images.AutoOrient }}
|
||||
{{- $side := math.Min 240 $oriented.Width $oriented.Height | int }}
|
||||
{{- $photo = $oriented.Fill (printf "%dx%d Smart" $side $side) }}
|
||||
{{- $photo = $oriented }}
|
||||
{{- if gt $oriented.Width 1600 }}{{ $photo = $oriented.Resize "1600x" }}{{ end }}
|
||||
{{- $photoAlt = .alt }}
|
||||
{{- $photoCredit = .credit }}
|
||||
{{- end }}
|
||||
|
|
|
|||
Loading…
Reference in a new issue