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

Formations > Contenu lié (Actus, Événements, Projets) #683

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
8 changes: 5 additions & 3 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,11 @@ params:
# twitter: true
# whatsapp: false
programs:
related_events:
quantity: 4
related_posts:
quantity: 4
related_events:
related_projects:
quantity: 4
index:
options:
Expand Down Expand Up @@ -305,7 +307,7 @@ params:
programs:
mobile: 400
tablet: 800
desktop: 600
desktop: 600
sections:
categories:
hero:
Expand Down Expand Up @@ -449,7 +451,7 @@ params:
mobile: 350
tablet: 450
desktop: 900
map:
map:
mobile: 150
tablet: 150
desktop: 150
17 changes: 11 additions & 6 deletions i18n/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ blocks:
categories:
title: Catégories
items:
count:
count:
one: "1 article"
other: "{{ .Count }} articles"
chapter:
Expand Down Expand Up @@ -39,7 +39,7 @@ blocks:
by-nc-sa: Creative Commons license - Attribution to the creator - Non-commercial - Share alike
by-nc-nd: Creative Commons license - Attribution to the creator - Non-commercial - No derivative works
locations:
button_location: Discover the site
button_location: Discover the site
organizations:
title: Organizations
pages:
Expand Down Expand Up @@ -108,7 +108,7 @@ commons:
schedule: Hours
socials:
title: Social Media
label:
label:
social_media: See the {{ .name }} page on {{ .media }}
email: Contact {{ .name }} by email
rss: Read the RSS feed for {{ .name }}
Expand Down Expand Up @@ -197,7 +197,9 @@ events:
from:
day: From day
hour: From hour
see_all_in_program: See all program's events
share: Share on
title: Events
to:
day: To day
hour: To hour
Expand Down Expand Up @@ -240,7 +242,7 @@ persons:
posts:
recent: Latest news
all: View all news posted by {{ .author }}
papers:
papers:
recent: Latest papers
all: View all papers published by {{ .author }}
publications:
Expand Down Expand Up @@ -291,7 +293,7 @@ projects:
programs:
accessibility: Accessibility
administrative_information: Administrative information
certifications:
certifications:
qualiopi: Qualiopi, processus certifié, République Française
children: Options
contacts: Contacts
Expand Down Expand Up @@ -326,7 +328,10 @@ programs:
essential: Essential
pedagogy: Pedagogy
presentation: Presentation
related: News
related:
events: Events
posts: News
projects: Projects
results: After the program
type:
apprenticeship: Apprenticeship
Expand Down
19 changes: 12 additions & 7 deletions i18n/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ blocks:
categories:
title: Catégories
items:
count:
count:
one: "1 article"
other: "{{ .Count }} articles"
chapter:
Expand Down Expand Up @@ -39,7 +39,7 @@ blocks:
by-nc-sa: Licence libre - Attribution à l’entité créatrice - Pas d’utilisation commerciale - Partage dans les mêmes conditions
by-nc-nd: Licence libre - Attribution à l’entité créatrice - Pas d’utilisation commerciale - Pas de modification
locations:
button_location: Découvrir le site
button_location: Découvrir le site
organizations:
title: Organisations
pages:
Expand Down Expand Up @@ -109,7 +109,7 @@ commons:
schedule: Horaires
socials:
title: Réseaux sociaux
label:
label:
social_media: Consulter la page {{ .name }} sur {{ .media }}
email: Contacter {{ .name }} par email
rss: Consulter le flux RSS du site {{ .name }}
Expand Down Expand Up @@ -176,7 +176,7 @@ errors:
text: >-
Ce lien semble erroné.<br>
Nous vous proposons de retourner à la <a href="/">page d'accueil de notre site</a>.<br>
Merci de votre compréhension.
Merci de votre compréhension.
events:
archives: Accéder aux archives des événements passés
add_to_calendar:
Expand All @@ -199,7 +199,9 @@ events:
from:
day: Date de début
hour: Heure de début
see_all_in_program: Voir tous les événements de la formation
share: Partager sur
title: Événements
to:
day: Jour de fin
hour: Heure de fin
Expand Down Expand Up @@ -242,7 +244,7 @@ persons:
posts:
recent: Actualités publiées récemment
all: Voir toutes les actualités publiées par {{ .author }}
papers:
papers:
recent: Papiers publiés récemment
all: Voir tous les papiers publiés par {{ .author }}
publications:
Expand Down Expand Up @@ -293,7 +295,7 @@ projects:
programs:
accessibility: Accessibilité
administrative_information: Informations administratives
certifications:
certifications:
qualiopi: Qualiopi, processus certifié, République Française
children: Parcours
contacts: Contacts
Expand Down Expand Up @@ -332,7 +334,10 @@ programs:
essential: Essentiel
pedagogy: Pédagogie
presentation: Présentation
related: Actualités
related:
events: Événements
posts: Actualités
projects: Projets
results: Après la formation
type:
apprenticeship: Apprentissage
Expand Down
13 changes: 9 additions & 4 deletions i18n/pt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ blocks:
categories:
title: Categorias
items:
count:
count:
one: "1 artigo"
other: "{{ .Count }} artigos"
chapter:
Expand Down Expand Up @@ -96,7 +96,7 @@ commons:
schedule: Horários
socials:
title: Redes sociais
label:
label:
social_media: Ver a página {{ .name }} em {{ .media }}
email: Contactar {{ .name }} por correio eletrónico
rss: Consultar o feed RSS do sítio {{ .name }}
Expand Down Expand Up @@ -185,7 +185,9 @@ events:
from:
day: Data de início
hour: Hora de início
see_all_in_program: Ver todos os eventos do curso
share: Compartilhar em
title: Eventos
to:
day: Data de término
hour: Hora de término
Expand Down Expand Up @@ -274,7 +276,7 @@ projects:
programs:
accessibility: Acessibilidade
administrative_information: Informações administrativas
certifications:
certifications:
qualiopi: Qualiopi, processo certificado, República Francesa
contacts: Contatos
children: Cursos
Expand Down Expand Up @@ -313,7 +315,10 @@ programs:
essential: Essencial
pedagogy: Pedagogia
presentation: Apresentação
related: Notícias relacionadas
related:
events: Eventos relacionados
posts: Notícias relacionadas
projects: Projectos relacionados
results: Após o curso
type:
apprenticeship: Aprendizado
Expand Down
16 changes: 16 additions & 0 deletions layouts/partials/events/block-events-layout.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{ $layout := site.Params.events.index.layout | default "list" }}
<div class="block-events block-events--{{- $layout -}}">
<div class="container">
<div class="block-content">
<div class="events events--{{ $layout }}">
{{ range .events }}
{{ partial "events/event.html" (dict
"event" .
"options" .Site.Params.events.index.options
"heading" "h3"
) }}
{{ end }}
</div>
</div>
</div>
</div>
93 changes: 74 additions & 19 deletions layouts/partials/programs/related.html
Original file line number Diff line number Diff line change
@@ -1,21 +1,76 @@
{{ if .Pages }}
<section class="related-posts" id="{{ urlize (i18n "programs.toc.related") }}">
<div class="container">
<div class="content">
<h2 id="page-posts">{{ i18n "posts.title" }}</h2>
<a href="{{ .Permalink }}" class="category-link">
{{ $category_name := safeHTML .Title | truncate 30 }}
{{ i18n "posts.see_all_in_program" (dict "Title" $category_name) }}
</a>
{{ with .Params.related_categories }}
{{- $postCategory := site.GetPage (printf "/posts_categories/%s" .blog ) -}}
{{ with $postCategory }}
{{ if .Pages }}
<section class="related-posts" id="{{ urlize (i18n "programs.toc.related.posts") }}">
<div class="container">
<div class="content">
<h2 id="page-posts">{{ i18n "posts.title" }}</h2>
<a href="{{ .Permalink }}" class="category-link">
{{ $category_name := safeHTML .Title | truncate 30 }}
{{ i18n "posts.see_all_in_program" (dict "Title" $category_name) }}
</a>

{{/* Related posts */}}
{{ $posts := first site.Params.programs.related_posts.quantity .Pages }}
{{ if gt (len $posts) 0 }}
<div class="blocks">
{{ partial "posts/block-posts-layout.html" (dict "posts" $posts ) }}
{{/* Related posts */}}
{{ $posts := first site.Params.programs.related_posts.quantity .Pages }}
{{ if gt (len $posts) 0 }}
<div class="blocks">
{{ partial "posts/block-posts-layout.html" (dict "posts" $posts ) }}
</div>
{{ end }}
</div>
{{ end }}
</div>
</div>
</section>
{{ end }}
</div>
</section>
{{ end }}
{{ end }}

{{- $eventCategory := site.GetPage (printf "/events_categories/%s" .agenda ) -}}
{{ with $eventCategory }}
{{ if .Pages }}
<section class="related-events" id="{{ urlize (i18n "programs.toc.related.events") }}">
<div class="container">
<div class="content">
<h2 id="page-events">{{ i18n "events.title" }}</h2>
<a href="{{ .Permalink }}" class="category-link">
{{ $category_name := safeHTML .Title | truncate 30 }}
{{ i18n "events.see_all_in_program" (dict "Title" $category_name) }}
</a>

{{/* Related events */}}
{{ $events := first site.Params.programs.related_events.quantity .Pages }}
{{ if gt (len $events) 0 }}
<div class="blocks">
{{ partial "events/block-events-layout.html" (dict "events" $events ) }}
</div>
{{ end }}
</div>
</div>
</section>
{{ end }}
{{ end }}

{{- $projectCategory := site.GetPage (printf "/projects_categories/%s" .portfolio ) -}}
{{ with $projectCategory }}
{{ if .Pages }}
<section class="related-projects" id="{{ urlize (i18n "programs.toc.related.projects") }}">
<div class="container">
<div class="content">
<h2 id="page-projects">{{ i18n "projects.title" }}</h2>
<a href="{{ .Permalink }}" class="category-link">
{{ $category_name := safeHTML .Title | truncate 30 }}
{{ i18n "projects.see_all_in_program" (dict "Title" $category_name) }}
</a>

{{/* Related projects */}}
{{ $projects := first site.Params.programs.related_projects.quantity .Pages }}
{{ if gt (len $projects) 0 }}
<div class="blocks">
{{ partial "projects/block-projects-layout.html" (dict "projects" $projects ) }}
</div>
{{ end }}
</div>
</div>
</section>
{{ end }}
{{ end }}
{{ end }}
3 changes: 1 addition & 2 deletions layouts/partials/programs/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@
{{- partial "programs/admission.html" . -}}
{{- partial "programs/certification.html" . -}}

{{- $category := site.GetPage (printf "/posts_categories/%s" .Params.related_category ) -}}
{{- partial "programs/related.html" $category -}}
{{- partial "programs/related.html" . -}}

{{- partial "hooks/before-program-end.html" . -}}
</div>
16 changes: 16 additions & 0 deletions layouts/partials/projects/block-projects-layout.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{ $layout := site.Params.projects.index.layout | default "list" }}
<div class="block-projects block-projects--{{- $layout -}}">
<div class="container">
<div class="block-content">
<div class="{{ $layout }}">
{{ range .projects }}
{{ partial "projects/project.html" (dict
"project" .
"options" .Site.Params.projects.index.options
"heading" "h3"
) }}
{{ end }}
</div>
</div>
</div>
</div>
Loading