Skip to content
Snippets Groups Projects
Unverified Commit 687ba54d authored by Arnaud Levy's avatar Arnaud Levy Committed by GitHub
Browse files

Merge pull request #145 from noesya/events

Gestion des événements
parents 6f85d019 60b26b7f
No related branches found
No related tags found
No related merge requests found
Showing
with 381 additions and 0 deletions
......@@ -61,6 +61,7 @@
@import "sections/authors"
@import "sections/categories"
@import "sections/diplomas"
@import "sections/events"
@import "sections/organizations"
@import "sections/pages"
@import "sections/papers"
......
.events__page
@include media-breakpoint-down(desktop)
.document-content
display: flex
flex-direction: column
aside
order: 2
padding: 0 half($grid-gutter-sm)
.block-pagination
order: 3
@include media-breakpoint-up(desktop)
.event-sidebar
@include container-margin-left
margin-top: 0
top: 0
left: 0
height: 100%
position: absolute
width: col-outside-container(4)
> div
@include sticky($spacing1)
.toc-container
border-top: 1px solid $color-border
padding-top: $spacing1
position: static
margin-left: 0
// Safe spacing if post is empty
.document-content
min-height: 350px
.lead
@include h3
.events__section
.archive-link
@include icon(arrow, after, true)
@include hover-translate-icon(after)
display: block
text-align: right
text-decoration: none
.event-infos
margin-bottom: 0
@include meta
@include list-reset
font-size: $table-body-size
@include media-breakpoint-up(desktop)
font-size: $table-body-size-desktop
.event-date
text-transform: capitalize
> li
@include meta
padding-top: $spacing0
padding-bottom: $spacing0
padding: 1rem 0
font-family: $body-font-family
&:not(:first-child)
align-items: center
> span
@include meta
color: $color-text-alt
padding-left: 0
display: block
white-space: nowrap
vertical-align: top
> ul
text-align: right
flex: 1
time + time
@include icon(arrow)
&::before
padding-right: 0.3rem
a
@include link($color-accent)
.share
a
color: inherit
li:first-child a
padding-left: 0
.events
.event
border-bottom: 1px solid $color-border
display: flex
flex-direction: column
margin-bottom: $spacing1
padding-bottom: $spacing1
position: relative
h2, h3
@include h3
margin-bottom: $spacing0
a
@include stretched-link
text-decoration: none
&-dates
order: 1
&-content
order: 2
.media
order: 0
@include media-breakpoint-up(desktop)
@include grid
&-dates
order: 0
grid-column: 1 / 4
&-content
order: 1
grid-column: 4 / 10
.media
order: 2
grid-column: 11 / 13
@include media-breakpoint-up(md)
.media
grid-column: 10 / 13
\ No newline at end of file
......@@ -21,6 +21,15 @@ params:
home:
toc:
disabled: true
events:
default_image: false
date_format: ":date_long"
index:
show_categories: false
show_author: false
show_description: true
truncate_description: 200 # Set to 0 to disable truncate
layout: list # grid | list
organizations:
dark_logo_background: false
pages:
......@@ -117,6 +126,19 @@ params:
mobile: 400
tablet: 800
desktop: 900
events:
hero:
mobile: 400
tablet: 800
desktop: 900
hero_single:
mobile: 400
tablet: 800
desktop: 900
item:
mobile: 350
tablet: 450
desktop: 900
organizations:
hero:
mobile: 400
......
......@@ -107,6 +107,7 @@ commons:
page: Go to page {{ .Number }}
previous: Previous page
between:
events: Events navigation
pages: Pages navigation
posts: Posts navigation
title: Page
......@@ -136,6 +137,20 @@ cookie_banner:
title: Cookie banner
diplomas:
type: Type de diplôme
events:
archives: Previous events archive
none: No event
next: Next event
next_aria: Next event “{{ .Title }}”
previous: Previous event
previous_aria: Previous event “{{ .Title }}”
from:
day: From day
hour: From hour
to:
day: To day
hour: To hour
unique_day: Date
formats:
pdf: Adobe Portable Document Format
jpg: JPEG image
......
......@@ -107,6 +107,7 @@ commons:
page: Aller à la page {{ .Number }}
previous: Page précédente
between:
events: Navigation entre événements
pages: Navigation entre pages
posts: Navigation entre articles
title: Page
......@@ -136,6 +137,22 @@ cookie_banner:
title: Bandeau cookie
diplomas:
type: Type de diplôme
events:
archives: Accéder aux archives des événements passés
date: Date
hour: Heure
none: Aucun événement
next: Événement suivant
next_aria: Événement suivant “{{ .Title }}”
previous: Événement précédent
previous_aria: Événement précédent “{{ .Title }}”
from:
day: Date de début
hour: Heure de début
to:
day: Jour de fin
hour: Heure de fin
unique_day: Date
formats:
pdf: Adobe Portable Document Format
jpg: JPEG image
......
{{ define "main" }}
{{ partial "events/hero-list.html" . }}
<div class="document-content">
{{ partial "commons/list-content.html" . }}
{{ partial "events/summary.html" (dict
"with_container" true
"context" .
) }}
{{ partial "contents/list.html" . }}
<div class="container">
{{ partial "events/events.html" . }}
{{ partial "events/archive-link.html" . }}
{{ partial "commons/pagination.html" . }}
</div>
</div>
{{ end }}
{{ define "main" }}
{{ partial "events/hero-single.html" . }}
<div class="document-content" itemscope itemtype="https://schema.org/Event">
<meta itemprop="headline" content="{{ partial "PrepareHTML" .Title }}">
<meta itemprop="url" content="{{ .Permalink }}">
{{ if .Params.summary }}<meta itemprop="abstract" content="{{ partial "PrepareText" .Params.summary }}">{{ end }}
{{ if .Summary }}<meta itemprop="description" content="{{ partial "PrepareText" .Summary }}">{{ end }}
{{ partial "events/sidebar.html" . }}
{{ partial "events/summary.html" (dict
"context" .
"block_wrapped" true
) }}
{{ partial "contents/list.html" . }}
{{ partial "commons/siblings-navigation.html" (dict
"context" .
) }}
{{ partial "hooks/before-document-content-end.html" . }}
</div>
{{ end }}
{{ if .IsSection }}
{{ range where .Pages "Kind" "section" }}
<a href="{{ .Permalink }}" class="archive-link">{{ i18n "events.archives" }}</a>
{{ end }}
{{ end }}
{{ $unique_day := eq .Params.dates.from.day .Params.dates.to.day }}
<ul class="event-infos">
{{ with .Params.dates }}
{{ with .computed }}
<li class="event-date">
<span>{{ i18n "events.date" }}</span>
{{ .long }}
</li>
{{ end }}
{{ if .from.hour }}
<li>
<span>{{ i18n "events.hour" }}</span>
{{ with .from.hour }}
<time datetime="{{ . }}">{{ . }}</time>
{{ end }}
{{ with .to.hour }}
<time datetime="{{ . }}">{{ . }}</time>
{{ end }}
</li>
{{ end }}
{{ end }}
<li>
<span>{{ i18n "posts.share" }}</span>
{{ partial "commons/share.html" . }}
</li>
</ul>
{{ $event := .event }}
{{- $direction := "" -}}
{{ $heading := .heading | default "h2" }}
{{ $heading_tag := (dict
"open" ((printf "<%s itemprop='headline'>" $heading) | safeHTML)
"close" ((printf "</%s>" $heading) | safeHTML)
) }}
{{ $index := .index }}
{{ $alternate := .alternate }}
{{ with $event }}
{{ if .Params.image }}
{{- $direction = partial "GetImageDirection" .Params.image -}}
{{ end }}
<article class='event {{ if $alternate }}{{ $direction }} {{if not (modBool $index 2)}}left{{ else}}right{{end}}{{end}}' itemprop="events" itemscope itemtype="https://schema.org/Event">
<div class="event-content">
{{- $title := partial "PrepareHTML" .Title -}}
{{ $heading_tag.open }}
<a href="{{ .Permalink }}" title="{{ safeHTML (i18n "commons.more_aria" (dict "Title" $title)) }}">{{ $title }}</a>
{{ $heading_tag.close }}
{{ if site.Params.events.index.show_description }}
{{- if (partial "GetTextFromHTML" .Params.summary) -}}
<p itemprop="articleBody">
{{ if site.Params.events.index.truncate_description }}
{{ partial "GetTruncateContent" ( dict
"text" .Params.summary
"length" site.Params.events.index.truncate_description
) }}
{{ else }}
{{ partial "PrepareText" .Params.summary }}
{{ end }}
</p>
{{- end -}}
{{- end -}}
</div>
<div class="event-dates">
{{ .Params.dates.computed.short }}
</div>
<div class="media">
{{- if .Params.image -}}
{{- partial "commons/image.html"
(dict
"image" .Params.image
"sizes" site.Params.image_sizes.sections.events.item
) -}}
{{- else if site.Params.events.default_image -}}
{{- partial "commons/image-default.html" -}}
{{- end -}}
</div>
</article>
{{ end }}
\ No newline at end of file
<div class="events events--{{- site.Params.events.index.layout -}}">
{{ if not .Pages }}
<p>{{ i18n "events.none" }}</p>
{{ end }}
{{ range .Paginator.Pages }}
{{ partial "events/event.html" (dict "event" . )}}
{{ end }}
</div>
{{- $title := or .Params.header_text .Title -}}
{{- partial "header/hero.html"
(dict
"title" $title
"image" .Params.image
"sizes" site.Params.image_sizes.sections.events.hero
"context" .
) -}}
{{- $title := or .Params.header_text .Title -}}
{{- partial "header/hero.html"
(dict
"title" $title
"image" .Params.image
"sizes" site.Params.image_sizes.sections.events.hero_single
"context" .
) -}}
{{- if or .PrevInSection .NextInSection -}}
<div class="block block-pagination">
<div class="container">
<div class="block-content">
<nav class="posts-navigation" aria-label="{{ i18n "commons.pagination.between.events" }}">
<ul>
{{- if .PrevInSection -}}
{{with .Site.RegularPages.Prev . }}
<li class="previous">
{{ $title := partial "PrepareHTML" .Title -}}
<a href="{{.RelPermalink}}" title="{{ safeHTML (i18n "events.previous_aria" (dict "Title" $title)) }}">
<span>
{{- i18n "events.previous" -}}
</span>
{{- $title -}}
</a>
</li>
{{end}}
{{- end -}}
{{- if .NextInSection -}}
{{with .Site.RegularPages.Next . }}
<li class="next">
{{ $title := partial "PrepareHTML" .Title -}}
<a href="{{.RelPermalink}}" title="{{ safeHTML (i18n "events.next_aria" (dict "Title" $title)) }}">
<span>
{{- i18n "events.next" -}}
</span>
{{- $title -}}
</a>
</li>
{{end}}
{{- end -}}
</ul>
</nav>
</div>
</div>
</div>
{{- end -}}
<div class="event-sidebar">
<div>
<aside>
{{- partial "events/event-infos.html" . -}}
</aside>
{{ partial "toc/container.html"
(dict
"toc" "toc/default.html"
"context" .
)
}}
</div>
</div>
{{- partial "commons/summary-in-content.html" . -}}
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