This commit is contained in:
GZod01 2024-11-10 14:45:58 +01:00
parent db0b66f683
commit 45108445ef
8 changed files with 126 additions and 5 deletions

View file

@ -98,6 +98,14 @@
transition: opacity 0.2s;
text-decoration: none;
}
.blog-pagination{
.blog-pagination-next,.blog-pagination-previous{
max-width:50%;
}
a{
color: white;
}
}
a:hover {
text-decoration: none;

View file

@ -0,0 +1,15 @@
.press_articles_list{
display:grid;
grid-template-columns: repeat(3, 1fr);
gap: 10px;
grid-auto-rows: minmax(100px, auto);
.press_article{
.p_a_img{}
.p_a_datas{
.p_a_title{}
.p_a_infos{}
}
}
}

View file

@ -30,6 +30,7 @@ $responsive-large: 1500px;
@import "layouts/contact-card";
@import "layouts/map";
@import "layouts/partners_per_compet";
@import "layouts/press";
/* ===== Scrollbar CSS ===== */
/* Firefox */

4
content/press.md Normal file
View file

@ -0,0 +1,4 @@
---
title: "On parle de nous"
---
{{<presslist>}}

78
layouts/blog/single.html Normal file
View file

@ -0,0 +1,78 @@
{{ define "main" }}
<div class="cover">
<div class="cover-back"></div>
<div class="cover-container">
<div class="container mx-auto">
<div class="cover-title">
<h1>{{ .Title }}</h1>
</div>
</div>
</div>
</div>
<main class="container mx-auto content text">
<article class="article">
{{ with .Date }}
<div>Publié le <b><time>{{ . | time.Format ":date_full" }}</time></b></div>
{{ end }}
{{ if .Params.banner }}
{{ $featuredImage := .Resources.GetMatch (.Params.banner | safeURL) }}
{{ $featuredImageCaption := "Bannière représentant l'article" }}
{{ if $featuredImage }}
{{ $featuredImage = $featuredImage.Resize "600x" }}
<figure>
<img alt="{{ $featuredImageCaption }}" src="{{ $featuredImage.RelPermalink }}" />
<figcaption>{{ $featuredImageCaption }}</figcaption>
</figure>
{{ end }}
{{ end }}
{{ range .Params.tags }}
<a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a>
{{ end }}
{{ block "previousnextblock" . }}{{ end }}
<div>
{{ .Content | safeHTML }}
</div>
{{ block "previousnextblock" . }}{{ end }}
</article>
</main>
{{ end }}
{{ define "previousnextblock"}}
{{ $pages := .CurrentSection.Pages.ByWeight }}
{{ $pagesNext := ($pages.Next .)}}
{{ $pagesPrev := ($pages.Prev .)}}
<div class="mt-6 pt-2 blog-pagination">
<div class="blog-pagination-previous">
<a
class="button button-primary mobile-icon {{ if (not $pagesPrev) }}disabled{{end}}"
{{ if (not $pagesPrev) }}disabled{{end}}
href="{{ if $pagesPrev }}{{$pagesPrev.RelPermalink}}{{ end }}">
<div class="button-icon">
<i class="fa fas fa-arrow-left"></i>
</div>
<div class="link button-text">
{{ site.Params.previous }} {{ if $pagesPrev}} {{ $pagesPrev.Title }}{{ end }}
</div>
</a>
</div>
<div class="blog-pagination-current">
</div>
<div class="blog-pagination-next">
<a
class="button button-primary mobile-icon {{ if (not $pagesNext) }}disabled{{end}}"
{{ if (not $pagesNext) }}disabled{{end}}
href="{{ if $pagesNext }}{{$pagesNext.RelPermalink }}{{end}}">
<div class="link button-text">
{{ site.Params.next }} {{ if $pagesNext}}{{ $pagesNext.Title }}{{ end }}
</div>
<div class="button-icon">
<i class="fa fas fa-arrow-right"></i>
</div>
</a>
</div>
</div>
{{ end }}

View file

@ -0,0 +1,19 @@
<div class=press_articles_list>
{{ range site.Data.press.articles }}
<div class=press_article>
{{ if (gt (.source_url | len) 0)}}
<a href="{{.source_url | safeURL}}">
{{ end }}
<div class=p_a_img>
<img src="{{ .source_image | safeURL }}">
</div>
<div class=p_a_datas>
<div class=p_a_title>{{.source_title}}</div>
<div class=p_a_infos>{{.source_journal}}, {{.source_date}}</div>
</div>
{{ if (gt (.source_url | len) 0)}}
</a>
{{ end }}
</div>
{{ end }}
</div>

View file

@ -1,5 +0,0 @@
{{ define "main" }}
<b>hello</b>
{{ end }}

View file

@ -0,0 +1 @@
{{ partial "presslist.html" }}