Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sidebar dans les single de projet #906

Merged
merged 9 commits into from
Feb 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion assets/sass/_theme/design-system/taxonomies.sass
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@
margin-top: $spacing-3
&.organizations-taxonomies
@include grid(2, desktop)
&.pages-taxonomies
&.pages-taxonomies,
&.projects-taxonomies
margin-bottom: var(--heading-margin-top)
@include in-page-with-sidebar
@include grid(2, desktop)
Expand Down
63 changes: 1 addition & 62 deletions assets/sass/_theme/sections/posts.sass
Original file line number Diff line number Diff line change
Expand Up @@ -143,68 +143,7 @@
margin-bottom: $spacing-5

.post-infos
@include meta
@include list-reset
font-size: $table-body-size
margin-bottom: 0
@include media-breakpoint-up(desktop)
font-size: $table-body-size-desktop
> li,
.taxonomies-single > li
@include meta
display: flex
gap: $spacing-3
justify-content: space-between
padding-top: $spacing-2
padding-bottom: $spacing-2
border-color: var(--color-border)
&:not(:first-child)
border-top: 1px solid var(--color-border)
> span
@include meta
color: var(--color-text-alt)
padding-left: 0
white-space: nowrap
vertical-align: top
.share
text-align: right
flex: 1
&.authors,
&.terms
margin: 0
ul
text-align: right
li
display: inline-block
vertical-align: middle
margin-left: $spacing-1
&:last-child
&::after
content: none
@include media-breakpoint-up(desktop)
align-items: baseline
li
display: block
+ li
margin-top: space()

.taxonomies-single
flex: 1
li:last-child
padding-bottom: 0
a
@include link(var(--color-accent))
text-align: right
.share
display: flex
flex-wrap: wrap
justify-content: end
margin-right: -$spacing-2
li
display: inline-block
a
color: inherit
text-decoration: none
@include sidebar-infos

.related
margin-top: $spacing-3
Expand Down
6 changes: 6 additions & 0 deletions assets/sass/_theme/sections/projects.sass
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@
button
margin-top: 0
width: columns(6)

&:not(.full-width)
.project-sidebar
@include sidebar
.project-infos
@include sidebar-infos
@include media-breakpoint-up(sm)
.hero
.project-infos
Expand Down
70 changes: 70 additions & 0 deletions assets/sass/_theme/utils/sidebar.sass
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,73 @@
padding-top: $spacing-3
position: static
margin-left: 0

@mixin sidebar-infos
@include meta
@include list-reset
font-size: $table-body-size
margin-bottom: 0
@include media-breakpoint-up(desktop)
font-size: $table-body-size-desktop
@include media-breakpoint-down(desktop)
margin-top: $spacing-3
> li:first-child
> ul:first-child, &
> li:first-child, &, &
padding-top: 0
> li,
.taxonomies-single > li
@include meta
display: flex
gap: $spacing-3
justify-content: space-between
padding-top: $spacing-2
padding-bottom: $spacing-2
border-color: var(--color-border)
&:not(:first-child)
border-top: 1px solid var(--color-border)
> span
@include meta
color: var(--color-text-alt)
padding-left: 0
white-space: nowrap
vertical-align: top
.share
text-align: right
flex: 1
&.authors,
&.terms
margin: 0
ul
text-align: right
li
display: inline-block
vertical-align: middle
margin-left: $spacing-1
&:last-child
&::after
content: none
@include media-breakpoint-up(desktop)
align-items: baseline
li
display: block
+ li
margin-top: space()

.taxonomies-single
flex: 1
li:last-child
padding-bottom: 0
a
@include link(var(--color-accent))
text-align: right
.share
display: flex
flex-wrap: wrap
justify-content: end
margin-right: -$spacing-2
li
display: inline-block
a
color: inherit
text-decoration: none
10 changes: 5 additions & 5 deletions i18n/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ commons:
shortcut_navigation: Navigation Links
transcription: Transcription
credits: "Rights reserved: "
authors:
one: Author
other: Authors
search:
title: Search
close: Close search
Expand Down Expand Up @@ -199,6 +202,8 @@ commons:
read: Read
read_online: Read online
share: Share
share_on: Share on
share_on_aria: Share on “{{ .Title }}” - extern link
slider:
default_title: Carousel
goto: Go to element
Expand Down Expand Up @@ -249,7 +254,6 @@ events:
from:
day: From day
hour: From hour
share: Share on
to:
day: To day
hour: To hour
Expand Down Expand Up @@ -325,8 +329,6 @@ posts:
see_all: See all posts
see_all_in_program: See all program's news
see_all_in_category: See all news in “{{ .Title }}”
share: Please, share
share_aria: Share on “{{ .Title }}” - extern link
title: News
projects:
author: Author
Expand All @@ -343,8 +345,6 @@ projects:
see_all: See all posts
see_all_in_program: See all program's projects
see_all_in_category: See all projects in “{{ .Title }}”
share: Please, share
share_aria: Share on “{{ .Title }}” - extern link
title: Projects
year: Year
programs:
Expand Down
10 changes: 5 additions & 5 deletions i18n/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ commons:
transcription: Transcription
map_transcription : Données textuelles
credits: "Droits réservés : "
authors:
one: Auteur•ice
other: Auteur·rices
search:
label: Recherche
title: Rechercher
Expand Down Expand Up @@ -215,6 +218,8 @@ commons:
read: Lire
read_online: Lire en ligne
share: Partager
share_on: Partager sur
share_on_aria: Partager sur “{{ .Title }}” - lien externe
slider:
default_title: Carrousel
goto: Aller à l'élément
Expand Down Expand Up @@ -265,7 +270,6 @@ events:
from:
day: Date de début
hour: Heure de début
share: Partager sur
to:
day: Jour de fin
hour: Heure de fin
Expand Down Expand Up @@ -343,8 +347,6 @@ posts:
see_all: Voir toutes les actualités
see_all_in_program: Voir toutes les actualités de la formation
see_all_in_category: Voir toutes les actualités “{{ .Title }}”
share: Partager sur
share_aria: Partager sur “{{ .Title }}” - lien externe
title: Actualités
projects:
author: Auteur·rice
Expand All @@ -362,8 +364,6 @@ projects:
see_all: Voir toutes les projets
see_all_in_program: Voir toutes les projets de la formation
see_all_in_category: Voir toutes les projets “{{ .Title }}”
share: Partager sur
share_aria: Partager sur “{{ .Title }}” - lien externe
title: Projets
year: Année
programs:
Expand Down
7 changes: 2 additions & 5 deletions i18n/pt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,8 @@ commons:
read: Ler
read_online: Ler online
share: Compartilhar
share_on: Compartilhar em
share_aria: Compartilhar em “{{ .Title }}” - link externo
slider:
default_title: Carrossel
goto: Ir para o slide
Expand Down Expand Up @@ -238,7 +240,6 @@ events:
from:
day: Data de início
hour: Hora de início
share: Compartilhar em
to:
day: Data de término
hour: Hora de término
Expand Down Expand Up @@ -310,8 +311,6 @@ posts:
see_all: Ver todas as notícias
see_all_in_program: Ver todas as notícias do curso
see_all_in_category: Ver todas as notícias “{{ .Title }}”
share: Compartilhar em
share_aria: Compartilhar em “{{ .Title }}” - link externo
title: Notícias
projects:
author: Autor/a
Expand All @@ -328,8 +327,6 @@ projects:
see_all: Ver todos os projetos
see_all_in_program: Ver todos os projetos do curso
see_all_in_category: Ver todos os projetos “{{ .Title }}”
share: Compartilhar em
share_aria: Compartilhar em “{{ .Title }}” - link externo
title: Projetos
year: Ano
programs:
Expand Down
14 changes: 14 additions & 0 deletions layouts/partials/authors/partials/authors.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{{ if .Params.authors }}
<li class="authors">
<span>{{ i18n "commons.authors" (len .Params.authors) }}</span>
<ul>
{{- range .GetTerms "authors" -}}
<li>
<a href="{{ .Permalink }}" itemprop="url">
<span itemprop="name">{{- safeHTML .Params.person -}}</span>
</a>
</li>
{{- end -}}
</ul>
</li>
{{ end }}
6 changes: 6 additions & 0 deletions layouts/partials/commons/reading-time.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{{ with .Params.contents_reading_time }}
<li class="reading-time">
<span>{{ i18n "posts.reading_time" }}</span>
{{ .text }}
</li>
{{ end }}
28 changes: 14 additions & 14 deletions layouts/partials/commons/share/links.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,50 +9,50 @@
<ul class="share">
{{ if $share_options.facebook }}
<li>
<a href="https://www.facebook.com/sharer/sharer.php?u={{ .Permalink | absURL }}" target="_blank" rel="noopener" class="icon icon-facebook-fill" title="{{ i18n "posts.share_aria" (dict "Title" "Facebook") }}">
<span class="sr-only">{{ i18n "posts.share_aria" (dict "Title" "Facebook") }}</span>
<a href="https://www.facebook.com/sharer/sharer.php?u={{ .Permalink | absURL }}" target="_blank" rel="noopener" class="icon icon-facebook-fill" title="{{ i18n "commons.share_on_aria" (dict "Title" "Facebook") }}">
<span class="sr-only">{{ i18n "commons.share_on_aria" (dict "Title" "Facebook") }}</span>
</a>
</li>
{{ end }}
{{ if $share_options.linkedin }}
<li>
<a href="https://www.linkedin.com/sharing/share-offsite/?url={{ .Permalink | absURL }}" target="_blank" rel="noopener" class="icon icon-linkedin-fill" title="{{ i18n "posts.share_aria" (dict "Title" "Linkedin") }}">
<span class="sr-only">{{ i18n "posts.share_aria" (dict "Title" "Linkedin") }}</span>
<a href="https://www.linkedin.com/sharing/share-offsite/?url={{ .Permalink | absURL }}" target="_blank" rel="noopener" class="icon icon-linkedin-fill" title="{{ i18n "commons.share_on_aria" (dict "Title" "Linkedin") }}">
<span class="sr-only">{{ i18n "commons.share_on_aria" (dict "Title" "Linkedin") }}</span>
</a>
</li>
{{ end }}
{{ if $share_options.mastodon }}
<li>
<a href="https://mastodonshare.com/?text={{ .Title }}&url={{ .Permalink | absURL }}" target="_blank" rel="noopener" class="icon icon-mastodon-fill" title="{{ i18n "posts.share_aria" (dict "Title" "Mastodon") }}">
<span class="sr-only">{{ i18n "posts.share_aria" (dict "Title" "Mastodon") }}</span>
<a href="https://mastodonshare.com/?text={{ .Title }}&url={{ .Permalink | absURL }}" target="_blank" rel="noopener" class="icon icon-mastodon-fill" title="{{ i18n "commons.share_on_aria" (dict "Title" "Mastodon") }}">
<span class="sr-only">{{ i18n "commons.share_on_aria" (dict "Title" "Mastodon") }}</span>
</a>
</li>
{{ end }}
{{ if $share_options.twitter }}
<li>
<a href="https://twitter.com/intent/tweet?text={{ .Title }} {{ .Permalink | absURL }}" target="_blank" rel="noopener" class="icon icon-twitter-x-line" title="{{ i18n "posts.share_aria" (dict "Title" "Twitter") }}">
<span class="sr-only">{{ i18n "posts.share_aria" (dict "Title" "Twitter") }}</span>
<a href="https://twitter.com/intent/tweet?text={{ .Title }} {{ .Permalink | absURL }}" target="_blank" rel="noopener" class="icon icon-twitter-x-line" title="{{ i18n "commons.share_on_aria" (dict "Title" "Twitter") }}">
<span class="sr-only">{{ i18n "commons.share_on_aria" (dict "Title" "Twitter") }}</span>
</a>
</li>
{{ end }}
{{ if $share_options.whatsapp }}
<li>
<a href="https://api.whatsapp.com/send?text={{ .Permalink | absURL }}" target="_blank" rel="noopener" class="icon icon-whatsapp-fill" title="{{ i18n "posts.share_aria" (dict "Title" "Whatsapp") }}">
<span class="sr-only">{{ i18n "posts.share_aria" (dict "Title" "Whatsapp") }}</span>
<a href="https://api.whatsapp.com/send?text={{ .Permalink | absURL }}" target="_blank" rel="noopener" class="icon icon-whatsapp-fill" title="{{ i18n "commons.share_on_aria" (dict "Title" "Whatsapp") }}">
<span class="sr-only">{{ i18n "commons.share_on_aria" (dict "Title" "Whatsapp") }}</span>
</a>
</li>
{{ end }}
{{ if $share_options.telegram }}
<li>
<a href="https://t.me/share/url?url={{ .Permalink | absURL }}&text={{ .Title }}" target="_blank" rel="noopener" class="icon icon-telegram-fill" title="{{ i18n "posts.share_aria" (dict "Title" "Telegram") }}">
<span class="sr-only">{{ i18n "posts.share_aria" (dict "Title" "Telegram") }}</span>
<a href="https://t.me/share/url?url={{ .Permalink | absURL }}&text={{ .Title }}" target="_blank" rel="noopener" class="icon icon-telegram-fill" title="{{ i18n "commons.share_on_aria" (dict "Title" "Telegram") }}">
<span class="sr-only">{{ i18n "commons.share_on_aria" (dict "Title" "Telegram") }}</span>
</a>
</li>
{{ end }}
{{ if $share_options.email }}
<li>
<a href="mailto:?subject={{ .Title }}&body={{ .Permalink | absURL }}" target="_blank" rel="noopener" class="icon icon-mail-fill" title="{{ i18n "posts.share_aria" (dict "Title" "E-mail") }}">
<span class="sr-only">{{ i18n "posts.share_aria" (dict "Title" "E-mail") }}</span>
<a href="mailto:?subject={{ .Title }}&body={{ .Permalink | absURL }}" target="_blank" rel="noopener" class="icon icon-mail-fill" title="{{ i18n "commons.share_on_aria" (dict "Title" "E-mail") }}">
<span class="sr-only">{{ i18n "commons.share_on_aria" (dict "Title" "E-mail") }}</span>
</a>
</li>
{{ end }}
Expand Down
4 changes: 4 additions & 0 deletions layouts/partials/commons/share/list-item.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<li class="social-share">
<span>{{ i18n "commons.share_on" }}</span>
{{ partial "commons/share/links.html" . }}
</li>
2 changes: 1 addition & 1 deletion layouts/partials/events/single/event-infos.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
{{ end }}
{{ if site.Params.events.share_links.enabled | default site.Params.share_links.enabled }}
<li>
<span>{{ i18n "events.share" }}</span>
<span>{{ i18n "commons.share_on" }}</span>
{{ partial "commons/share/links.html" . }}
</li>
{{ end }}
Expand Down
Loading