Skip to content
Snippets Groups Projects
Commit ffd4cd16 authored by Olivia206's avatar Olivia206
Browse files

fix

parent e7aa79b4
No related branches found
No related tags found
No related merge requests found
.block-agenda
&--grid,
&--large
.event
display: flex
flex-direction: column
position: relative
&-content
a
@include stretched-link
&-dates
@extend .meta
margin-top: $spacing0
@include media-breakpoint-down(md)
font-size: $h4-size
line-height: $h4-line-height
font-weight: $h4-weight
.media
order: -1
img
aspect-ratio: 1
object-fit: cover
margin-bottom: half($spacing0)
&--grid .events
&:not(.unique)
@include grid(2, md)
&.unique .event
@include grid(2, md)
.event
@include media-breakpoint-down(desktop)
+ .event
margin-top: $spacing1
&-dates
text-align: right
&-content
h2
@extend .h3
&-description
margin-top: $spacing0
&--large
.event
flex-direction: row
grid-gap: $grid-gutter
.media
width: col(4, 8)
&-content
flex: 1
.more
......@@ -15,6 +46,8 @@
&::after
margin-left: half($spacing0)
@include media-breakpoint-up(desktop)
.media
width: col(4, 8)
&-dates
font-size: $h3-size-desktop
line-height: $h3-line-height
......@@ -25,45 +58,21 @@
line-height: $h2-line-height
font-weight: $h2-weight
@include media-breakpoint-down(desktop)
grid-gap: $grid-gutter-sm
flex-direction: column
grid-gap: 0
.media
margin-left: calc(-#{$grid-gutter-sm} /2)
margin-right: calc(-#{$grid-gutter-sm} /2)
aspect-ratio: 1
.media:empty
display: none
.event
display: flex
flex-direction: column
position: relative
@include media-breakpoint-down(desktop)
+ .event
margin-top: $spacing1
.media
order: -1
img
aspect-ratio: 1
object-fit: cover
margin-bottom: half($spacing0)
&-dates
@extend .meta
margin-top: $spacing0
@include media-breakpoint-down(md)
font-size: $h4-size
line-height: $h4-line-height
font-weight: $h4-weight
text-align: right
&-content
a
@include stretched-link
h2
@extend .h3
&-description
margin-top: $spacing0
.block-agenda--grid
.block-agenda--large
@include in-page-with-sidebar
.events.unique .event .media:empty
.events .event .media:empty
display: none
.block-agenda--grid
@include in-page-without-sidebar
.events:not(.unique)
@include grid(3, desktop)
.unique
.events.unique .event-content
position: relative
\ No newline at end of file
.events
@include grid(3, desktop)
\ No newline at end of file
......@@ -27,18 +27,14 @@
{{ end -}}
</div>
{{ end -}}
{{ $rangeLength := len .events }}
{{ if eq $rangeLength 1 }}
{{ $isUnique = true }}
{{ end }}
<div class="events{{ if eq $rangeLength 1 }} unique{{ end}} ">
<div class="events">
{{ range .events }}
{{ $event := site.GetPage .file }}
{{ with $event }}
{{ partial "events/event" (dict
"event" .
"layout" $layout
"isUnique" $isUnique
) }}
{{ end }}
{{ end }}
......
{{ $event := .event }}
{{ $layout := "list" }}
{{ $layout = .layout }}
{{ $isUnique := .isUnique }}
{{- $direction := "" -}}
{{ $heading := .heading | default "h2" }}
{{ $heading_tag := (dict
......@@ -25,8 +24,8 @@
<a href="{{ .Permalink }}" title="{{ safeHTML (i18n "commons.more_aria" (dict "Title" $title)) }}" itemprop="name">{{ $title }}</a>
{{ $heading_tag.close }}
{{ if eq $isUnique true }}
<div class="event-dates" itemprop="startDate" content="{{- if .Params.dates.from.day -}}{{ .Params.dates.from.day }}{{- end -}} {{- if .Params.dates.from.hour -}}{{ .Params.dates.from.hour }}{{- end -}}">
{{ if eq $layout "large" }}
<div class="event-dates meta" itemprop="startDate" content="{{- if .Params.dates.from.day -}}{{ .Params.dates.from.day }}{{- end -}} {{- if .Params.dates.from.hour -}}{{ .Params.dates.from.hour }}{{- end -}}">
{{ .Params.dates.computed.short }}
<div class="event-time">
{{ if .Params.dates.from.hour }}
......@@ -57,7 +56,7 @@
{{ end }}
</div>
{{ if eq $isUnique false }}
{{ if ne $layout "large" }}
<div class="event-dates" itemprop="startDate" content="{{- if .Params.dates.from.day -}}{{ .Params.dates.from.day }}{{- end -}} {{- if .Params.dates.from.hour -}}{{ .Params.dates.from.hour }}{{- end -}}">
{{ .Params.dates.computed.short }}
<div class="event-time">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment