Skip to content
Snippets Groups Projects
Commit 62c7979c authored by alexisben's avatar alexisben
Browse files

prepare block projects

parent 2bd98ecf
No related branches found
No related tags found
No related merge requests found
......@@ -83,10 +83,11 @@ params:
whatsapp: false
projects:
default_image: false
date_format: ":date_long"
date_format: "2006"
index:
show_categories: true
show_description: true
show_year: false
truncate_description: 200 # Set to 0 to disable truncate
layout: list # grid | list
share_links:
......
......@@ -223,7 +223,7 @@ posts:
next: Next article
next_aria: Next article “{{ .Title }}”
previous: Previous article
previous_aria: revious article “{{ .Title }}”
previous_aria: Previous article “{{ .Title }}”
reading_time: Reading time
see_all: See all posts
see_all_in_program: See all program's news
......@@ -231,6 +231,24 @@ posts:
share: Please, share
share_aria: Share on “{{ .Title }}” - extern link
title: News
projects:
author: Author
category:
one: Category
other: Categories
informations: Informations
next: Next project
next_aria: Next project “{{ .Title }}”
previous: Previous project
previous_aria: Previous project “{{ .Title }}”
reading_time: Reading time
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:
accessibility: Accessibility
administrative_information: Administrative information
......
......@@ -232,13 +232,11 @@ posts:
share: Partager sur
share_aria: Partager sur “{{ .Title }}” - lien externe
title: Actualités
projects:
author: Auteur·rice
category:
one: Catégorie
other: Catégories
date: Date
informations: Informations
next: Projet suivant
next_aria: Projet suivant “{{ .Title }}”
......@@ -251,6 +249,7 @@ projects:
share: Partager sur
share_aria: Partager sur “{{ .Title }}” - lien externe
title: Projets
year: Année
programs:
accessibility: Accessibilité
administrative_information: Informations administratives
......
{{- $block := .block -}}
{{- $block_title := .block.title -}}
{{- $block_class := partial "GetBlockClass" .block -}}
{{- $layout := .block.data.layout | default "grid" -}}
{{- with .block.data -}}
<div class="{{ $block_class }}">
<div class="container">
<div class="block-content">
{{ partial "blocks/top.html" (dict
"title" $block_title
"heading_level" $block.ranks.self
) }}
{{- partial (printf "blocks/templates/projects/%s.html" $layout) (dict
"projects" .projects
"heading_level" $block.ranks.children
) }}
</div>
</div>
</div>
{{- end -}}
{{ $heading_level := .heading_level | default 3 }}
{{ $heading := printf "h%d" $heading_level }}
<div class="projects grid">
{{ range $project := .projects -}}
{{ with site.GetPage .file }}
{{ partial "projects/project.html" (dict
"project" .
"heading" $heading
) }}
{{ end }}
{{ end }}
</div>
......@@ -5,10 +5,12 @@
{{ partial "projects/categories.html" . }}
</li>
{{ end }}
<li>
<span>{{ i18n "projects.date" }}</span>
<time datetime="{{ .Date.Format "2006-01-02T15:04" }}">{{ .Date | time.Format site.Params.projects.date_format }}</time>
</li>
{{ with .Params.year }}
<li>
<span>{{ i18n "projects.year" }}</span>
<time datetime="{{ . }}">{{ . }}</time>
</li>
{{ end }}
<li class="social-share">
<span>{{ i18n "projects.share" }}</span>
{{ partial "commons/share.html" . }}
......
......@@ -26,10 +26,12 @@
{{ if site.Params.projects.index.show_categories }}
{{- partial "projects/categories" . -}}
{{ end }}
<div class="project-meta">
<time itemprop="datePublished" datetime="{{ .Date.Format "2006-01-02T15:04" }}">{{ .Date | time.Format site.Params.projects.date_format }}</time>
</div>
{{ if and site.Params.projects.index.show_year .Params.year }}
<div class="project-meta">
<time itemprop="datePublished" datetime="{{ .Params.year }}">{{ .Params.year }}</time>
</div>
{{ end }}
</div>
<div class="media">
......
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