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 .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 &--grid .events
&:not(.unique) @include grid(2, md)
@include grid(2, md) .event
&.unique .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 flex-direction: row
grid-gap: $grid-gutter grid-gap: $grid-gutter
.media
width: col(4, 8)
&-content &-content
flex: 1 flex: 1
.more .more
...@@ -15,6 +46,8 @@ ...@@ -15,6 +46,8 @@
&::after &::after
margin-left: half($spacing0) margin-left: half($spacing0)
@include media-breakpoint-up(desktop) @include media-breakpoint-up(desktop)
.media
width: col(4, 8)
&-dates &-dates
font-size: $h3-size-desktop font-size: $h3-size-desktop
line-height: $h3-line-height line-height: $h3-line-height
...@@ -25,45 +58,21 @@ ...@@ -25,45 +58,21 @@
line-height: $h2-line-height line-height: $h2-line-height
font-weight: $h2-weight font-weight: $h2-weight
@include media-breakpoint-down(desktop) @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 .media:empty
display: none 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 @include in-page-with-sidebar
.events.unique .event .media:empty .events .event .media:empty
display: none display: none
.block-agenda--grid
@include in-page-without-sidebar @include in-page-without-sidebar
.events:not(.unique) .events
@include grid(3, desktop) @include grid(3, desktop)
.unique \ No newline at end of file
.events.unique .event-content
position: relative
\ No newline at end of file
...@@ -27,18 +27,14 @@ ...@@ -27,18 +27,14 @@
{{ end -}} {{ end -}}
</div> </div>
{{ end -}} {{ end -}}
{{ $rangeLength := len .events }}
{{ if eq $rangeLength 1 }} <div class="events">
{{ $isUnique = true }}
{{ end }}
<div class="events{{ if eq $rangeLength 1 }} unique{{ end}} ">
{{ range .events }} {{ range .events }}
{{ $event := site.GetPage .file }} {{ $event := site.GetPage .file }}
{{ with $event }} {{ with $event }}
{{ partial "events/event" (dict {{ partial "events/event" (dict
"event" . "event" .
"layout" $layout "layout" $layout
"isUnique" $isUnique
) }} ) }}
{{ end }} {{ end }}
{{ end }} {{ end }}
......
{{ $event := .event }} {{ $event := .event }}
{{ $layout := "list" }} {{ $layout := "list" }}
{{ $layout = .layout }} {{ $layout = .layout }}
{{ $isUnique := .isUnique }}
{{- $direction := "" -}} {{- $direction := "" -}}
{{ $heading := .heading | default "h2" }} {{ $heading := .heading | default "h2" }}
{{ $heading_tag := (dict {{ $heading_tag := (dict
...@@ -25,8 +24,8 @@ ...@@ -25,8 +24,8 @@
<a href="{{ .Permalink }}" title="{{ safeHTML (i18n "commons.more_aria" (dict "Title" $title)) }}" itemprop="name">{{ $title }}</a> <a href="{{ .Permalink }}" title="{{ safeHTML (i18n "commons.more_aria" (dict "Title" $title)) }}" itemprop="name">{{ $title }}</a>
{{ $heading_tag.close }} {{ $heading_tag.close }}
{{ if eq $isUnique true }} {{ if eq $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 -}}"> <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 }} {{ .Params.dates.computed.short }}
<div class="event-time"> <div class="event-time">
{{ if .Params.dates.from.hour }} {{ if .Params.dates.from.hour }}
...@@ -57,7 +56,7 @@ ...@@ -57,7 +56,7 @@
{{ end }} {{ end }}
</div> </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 -}}"> <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 }} {{ .Params.dates.computed.short }}
<div class="event-time"> <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