Skip to content
Snippets Groups Projects
Commit 375e50e3 authored by alexisben's avatar alexisben
Browse files

add buttons and handle raw ics data

parent 461de542
No related branches found
No related tags found
No related merge requests found
......@@ -147,6 +147,13 @@ $btn-border-radius: px2rem(4) !default
$btn-border: 1px solid $color-text !default
$btn-hover-background: $color-background-alt !default
// Chip
$chip-background: $color-background !default
$chip-background-hover: $color-background-alt !default
$chip-border: 1px solid $color-border !default
$chip-border-radius: $btn-border-radius !default
$chip-color: $color-text !default
// Form
$form-btn-color: $color-background !default
$form-btn-background-color: $color-accent !default
......
......@@ -269,7 +269,19 @@ a,
@include icon-block(link-blank-block, after)
&:hover
background: $btn-hover-background
.chip
@include meta
background: $chip-background
border: $chip-border
border-radius: $chip-border-radius
color: $chip-color
text-decoration: none
padding: space(1) space(4)
transition: background 0.3s
&:hover
background: $chip-background-hover
.link-more
@include link
@include icon(arrow, before)
......
......@@ -6,12 +6,13 @@
.lead
@include h3
// Safe spacing if post is empty
.document-content
min-height: 350px
&::after
content: ''
display: block
height: 1px
@include media-breakpoint-up(desktop)
.document-content
min-height: 600px
&::after
content: ''
display: block
height: 1px
.events__section
.archive-link
......@@ -27,10 +28,8 @@
text-align: left
.event-infos
margin-bottom: 0
@include meta
@include list-reset
font-size: $table-body-size
padding-bottom: $spacing3
@include media-breakpoint-up(desktop)
font-size: $table-body-size-desktop
.event-date
......@@ -39,9 +38,8 @@
@include list-reset
> li
padding-top: $spacing0
padding-bottom: $spacing0
padding: 1rem 0
font-family: $body-font-family
&:not(:last-child)
padding-bottom: $spacing0
> span
@include meta
color: $color-text-alt
......@@ -52,11 +50,20 @@
@include icon(arrow)
&::before
padding-right: 0.3rem
a
@include link($color-accent)
.events-categories
display: flex
gap: space(2)
a
@include link($color-accent)
.events-actions
align-items: start
display: flex
flex-direction: column
gap: space(1)
padding-bottom: 0
a
&::after
display: none
.share
a
color: inherit
......
......@@ -21,7 +21,7 @@
{{ end }}
{{ if .Params.events_categories }}
<li>
<span>{{ i18n "events.category" (dict "Count" ( len .Params.events_categories )) }}</span>
<span>{{ i18n "events.category" ( len .Params.events_categories ) }}</span>
{{ partial "events/categories.html" . }}
</li>
{{ end }}
......@@ -32,13 +32,21 @@
{{ with .Params.dates.add_to_calendar }}
{{ $links := . }}
<li class="events-calendar">
<li class="events-actions">
<span>{{ i18n "events.add_to_calendar.title" }}</span>
{{- $types := slice "ical" "google" "office" "outlook" "yahoo" -}}
{{- range $types -}}
{{ $label := i18n (printf "events.add_to_calendar.%s" .) }}
{{ with index $links . }}
<a href="{{ . }}" class="chip">{{ $label }}</a>
{{- range $type := $types -}}
{{ $label := i18n (printf "events.add_to_calendar.%s" $type) }}
{{ with index $links $type }}
<a class="chip"
{{ if eq $type "ical" -}}
{{ printf `href="%s"` . | safeHTMLAttr }} download
{{ else }}
href="{{ . }}"
target="_blank"
{{ end }} >
{{- $label -}}
</a>
{{- end }}
{{- end }}
</li>
......
<ul class="post-infos">
{{ if .Params.posts_categories }}
<li>
<span>{{ i18n "posts.categories" ( len .Params.posts_categories ) }}</span>
<span>{{ i18n "posts.category" ( len .Params.posts_categories ) }}</span>
{{ partial "posts/categories.html" . }}
</li>
{{ end }}
......
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