From 344af4c0fe7e6fb52ce43afd8f39b30a7affe2a4 Mon Sep 17 00:00:00 2001
From: antonin gallon
Date: Mon, 9 Feb 2026 19:53:17 +0100
Subject: [PATCH 1/6] =?UTF-8?q?modification=20du=20blueprint=20year=20pour?=
=?UTF-8?q?=20pouvoir=20s=C3=A9l=C3=A9ctionner=20une=20page=20dans=20une?=
=?UTF-8?q?=20autre=20ann=C3=A9e?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
site/blueprints/pages/texts.yml | 2 +-
site/blueprints/pages/year.yml | 8 ++++++++
site/plugins/code-editor/index.php | 12 ++++++------
3 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/site/blueprints/pages/texts.yml b/site/blueprints/pages/texts.yml
index 8a3347b..247d9b3 100644
--- a/site/blueprints/pages/texts.yml
+++ b/site/blueprints/pages/texts.yml
@@ -15,7 +15,7 @@ tabs:
type: pages
template: year
sortBy: title desc
- - width: 1/1
+ - width: 1/2
sections:
allTextsSection:
label: Tous les textes
diff --git a/site/blueprints/pages/year.yml b/site/blueprints/pages/year.yml
index d0ad42e..75ecd8b 100644
--- a/site/blueprints/pages/year.yml
+++ b/site/blueprints/pages/year.yml
@@ -24,6 +24,14 @@ tabs:
templates:
- linear
- grid
+ linkedTextsSection:
+ type: fields
+ fields:
+ linkedTexts:
+ label: Textes liés
+ type: pages
+ query : site.find('textes').grandChildren
+ help: textes enregistrés à une autre année à inclure aussi dans celle-ci.
- width: 2/3
fields:
edito:
diff --git a/site/plugins/code-editor/index.php b/site/plugins/code-editor/index.php
index ba1302a..f4a3250 100644
--- a/site/plugins/code-editor/index.php
+++ b/site/plugins/code-editor/index.php
@@ -1,15 +1,15 @@
[
+ 'options' => array(
'language' => 'css',
- 'size' => 'small',
- 'lineNumbers' => true,
+ 'size' => 'small',
+ 'lineNumbers' => true,
'tabSize' => 4,
'insertSpaces' => true,
'ignoreTabKey' => false,
- ],
- 'fields' => [
+ ),
+ 'fields' => array(
'code-editor' => require_once __DIR__ . '/lib/fields/code-editor.php',
- ],
+ ),
]);
From dee8f94182aa3775856a92b67d9832786f366646 Mon Sep 17 00:00:00 2001
From: antonin gallon
Date: Mon, 9 Feb 2026 20:57:56 +0100
Subject: [PATCH 2/6] ajout de la methode allTexts() dans site\models\year.php
---
site/models/year.php | 8 ++++++++
site/snippets/nav__texts--collection.php | 3 ++-
2 files changed, 10 insertions(+), 1 deletion(-)
create mode 100644 site/models/year.php
diff --git a/site/models/year.php b/site/models/year.php
new file mode 100644
index 0000000..e9eb907
--- /dev/null
+++ b/site/models/year.php
@@ -0,0 +1,8 @@
+children()->listed();
+ $linked = $this->linkedTexts()->toPages();
+ return $texts->merge($linked);
+ }
+}
\ No newline at end of file
diff --git a/site/snippets/nav__texts--collection.php b/site/snippets/nav__texts--collection.php
index cf29a0e..f62e281 100644
--- a/site/snippets/nav__texts--collection.php
+++ b/site/snippets/nav__texts--collection.php
@@ -18,7 +18,8 @@
class="see-more toggle-btn toggle-btn--left" @click="edito = !edito">Lire
- children() as $article): ?>
+ allTexts() : $section->children(); ?>
+
author()->toPage() == null ? 'inconnu' : $article->author()->toPage()->title();
?>
From d91455a0b4bd9a8e93f94ca1bca8bf6c7d23e08b Mon Sep 17 00:00:00 2001
From: antonin gallon
Date: Mon, 9 Feb 2026 21:10:27 +0100
Subject: [PATCH 3/6] =?UTF-8?q?corection=20des=20style=20css=20du=20panel?=
=?UTF-8?q?=20pour=20ne=20pas=20avoir=20le=20before=20et=20le=20margin=20b?=
=?UTF-8?q?ottom=20sur=20la=20liste=20des=20pages=20li=C3=A9s?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
assets/css/panel.css | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/assets/css/panel.css b/assets/css/panel.css
index 3b53cbb..e5eb4a7 100644
--- a/assets/css/panel.css
+++ b/assets/css/panel.css
@@ -9,10 +9,10 @@
color: #000;
}
-.k-panel[data-template="year"] .k-list-items .k-item:first-child {
+.k-panel[data-template="year"] .k-section-name-texts .k-list-items .k-item:first-child {
margin-bottom: 2rem;
}
-.k-panel[data-template="year"] .k-list-items::before {
+.k-panel[data-template="year"] .k-section-name-texts .k-list-items::before {
content: "Texte princeps";
display: block;
padding: 0.5rem;
From 7501e2cbb7c933887462600631e609ff4316b784 Mon Sep 17 00:00:00 2001
From: antonin gallon
Date: Mon, 9 Feb 2026 21:22:52 +0100
Subject: [PATCH 4/6] =?UTF-8?q?ajout=20des=20page=20li=C3=A9=20pour=20le?=
=?UTF-8?q?=20template=20year?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
site/templates/year.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/site/templates/year.php b/site/templates/year.php
index b4f08eb..933f5bb 100644
--- a/site/templates/year.php
+++ b/site/templates/year.php
@@ -28,7 +28,7 @@
>Lire
- children() as $article): ?>
+ allTexts() as $article): ?>
-
From 9789b645ff766037b2f17de09e3b7918fdc06ec6 Mon Sep 17 00:00:00 2001
From: antonin gallon
Date: Mon, 9 Feb 2026 22:24:17 +0100
Subject: [PATCH 5/6] =?UTF-8?q?ajout=20d'une=20fonction=20pour=20faire=20d?=
=?UTF-8?q?ans=20l'autre=20sens=20:=20avoir=20toute=20les=20date=20(parent?=
=?UTF-8?q?=20et=20linked)=20+=20impl=C3=A9mentation=20de=20la=20fonction?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
site/plugins/helpers/index.php | 12 ++++++++++++
site/snippets/nav__texts--all.php | 9 ++++++---
site/snippets/nav__texts--collection.php | 8 +++++---
site/snippets/text-item.php | 6 +++++-
site/templates/author.php | 6 +++++-
site/templates/category.php | 8 +++++---
site/templates/year.php | 6 +++++-
7 files changed, 43 insertions(+), 12 deletions(-)
diff --git a/site/plugins/helpers/index.php b/site/plugins/helpers/index.php
index 69357d7..3a4d755 100644
--- a/site/plugins/helpers/index.php
+++ b/site/plugins/helpers/index.php
@@ -1,5 +1,17 @@
parent()]);
+
+ foreach (site()->find('textes')->children() as $year) {
+ if ($year->linkedTexts()->toPages()->has($article)) {
+ $years = $years->add($year);
+ }
+ }
+ return $years;
+}
+
function setTitleFontSizeClass($title, $level = 'h1')
{
$length = strlen($title);
diff --git a/site/snippets/nav__texts--all.php b/site/snippets/nav__texts--all.php
index 8ee0245..083c522 100644
--- a/site/snippets/nav__texts--all.php
+++ b/site/snippets/nav__texts--all.php
@@ -29,9 +29,12 @@
publié le published()->toDate('d/m/Y') ?>
- dans = $article->parent()->title() ?>
- / dans
+
+ = $year->title()?>/
+
+
+ = $article->category() ?>
diff --git a/site/snippets/nav__texts--collection.php b/site/snippets/nav__texts--collection.php
index f62e281..c3a3b3c 100644
--- a/site/snippets/nav__texts--collection.php
+++ b/site/snippets/nav__texts--collection.php
@@ -49,9 +49,11 @@
publié le published()->toDate('d/m/Y') ?>
- dans = $article->parent()->title() ?>
- / dans
+
+ = $year->title() ?> /
+
+ = $article->category() ?>
diff --git a/site/snippets/text-item.php b/site/snippets/text-item.php
index 969e2ca..3df1579 100644
--- a/site/snippets/text-item.php
+++ b/site/snippets/text-item.php
@@ -9,7 +9,11 @@
par
= $article->author()->toPage()->title() ?>
publié le = $article->published()->toDate('d/m/Y') ?>
- dans = $article->parent()->title() ?> / = $article->category() ?>
+ dans
+
+ = $year->title() ?> /
+
+ = $article->category() ?>
\ No newline at end of file
diff --git a/site/templates/author.php b/site/templates/author.php
index d002cf9..9372d83 100644
--- a/site/templates/author.php
+++ b/site/templates/author.php
@@ -23,7 +23,11 @@
diff --git a/site/templates/category.php b/site/templates/category.php
index bf96628..ffd6f30 100644
--- a/site/templates/category.php
+++ b/site/templates/category.php
@@ -27,9 +27,11 @@
href="/auteurs/= Str::slug($article->author()->toPage()->title()) ?>">= $article->author()->toPage()->title() ?>
publié le
= $article->published()->toDate('d/m/Y') ?>
- dans = $article->parent()->title() ?>
- / dans
+
+ = $year->title() ?> /
+
+ = $article->category() ?>
diff --git a/site/templates/year.php b/site/templates/year.php
index 933f5bb..9b6c4f4 100644
--- a/site/templates/year.php
+++ b/site/templates/year.php
@@ -40,7 +40,11 @@
par
= $article->author()->toPage()->title() ?>
publié le = $article->published()->toDate('d/m/Y') ?>
- dans = $article->parent()->title() ?> / = $article->category() ?>
+ dans
+
+ = $year->title() ?> /
+
+ = $article->category() ?>
From d4b7a3f3fb2bb4c203b59e69256b6aae614050ab Mon Sep 17 00:00:00 2001
From: antonin gallon
Date: Mon, 9 Feb 2026 22:32:19 +0100
Subject: [PATCH 6/6] correction du champs linkedTexts pour ne pas in clure les
page de la section texts
---
site/blueprints/pages/year.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/site/blueprints/pages/year.yml b/site/blueprints/pages/year.yml
index 75ecd8b..451d1c6 100644
--- a/site/blueprints/pages/year.yml
+++ b/site/blueprints/pages/year.yml
@@ -30,7 +30,7 @@ tabs:
linkedTexts:
label: Textes liés
type: pages
- query : site.find('textes').grandChildren
+ query : site.find('textes').grandChildren.not(page.children)
help: textes enregistrés à une autre année à inclure aussi dans celle-ci.
- width: 2/3
fields: