diff --git a/assets/icons/facebook-icon.svg b/assets/icons/facebook-icon.svg
new file mode 100644
index 0000000..48e488a
--- /dev/null
+++ b/assets/icons/facebook-icon.svg
@@ -0,0 +1,10 @@
+
diff --git a/assets/icons/link-icon.svg b/assets/icons/link-icon.svg
new file mode 100644
index 0000000..92239da
--- /dev/null
+++ b/assets/icons/link-icon.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/icons/linkedin-icon.svg b/assets/icons/linkedin-icon.svg
new file mode 100644
index 0000000..78980f8
--- /dev/null
+++ b/assets/icons/linkedin-icon.svg
@@ -0,0 +1,10 @@
+
diff --git a/assets/icons/twitter-icon.svg b/assets/icons/twitter-icon.svg
new file mode 100644
index 0000000..6c49177
--- /dev/null
+++ b/assets/icons/twitter-icon.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/icons/whatsapp-icon.svg b/assets/icons/whatsapp-icon.svg
new file mode 100644
index 0000000..d5cf8b4
--- /dev/null
+++ b/assets/icons/whatsapp-icon.svg
@@ -0,0 +1,11 @@
+
diff --git a/site/templates/article.json.php b/site/templates/article.json.php
index b247fe9..5bb46e6 100644
--- a/site/templates/article.json.php
+++ b/site/templates/article.json.php
@@ -6,7 +6,7 @@ if ($related->isEmpty()) {
}
$specificData = [
- 'date' => $page->date()->toDate('d/m/Y'),
+ 'published' => $page->published()->toDate('d/m/Y'),
'intro' => $page->intro()->value(),
'cover' => $page->cover()->toFile()?->url(),
'body' => (string) $page->body()->toBlocks(),
diff --git a/site/templates/blog.json.php b/site/templates/blog.json.php
index bf60e42..7d7ed20 100644
--- a/site/templates/blog.json.php
+++ b/site/templates/blog.json.php
@@ -6,7 +6,7 @@ $mapArticle = function($article) {
return [
'title' => $article->title()->value(),
'slug' => $article->slug(),
- 'date' => $article->published()->toDate('d/m/Y'),
+ 'published' => $article->published()->toDate('d/m/Y'),
'intro' => $article->intro()->value(),
'cover' => $article->cover()->toFile()?->url(),
];
diff --git a/src/router/index.js b/src/router/index.js
index 6e931f9..d035676 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -28,8 +28,16 @@ async function loadSlide(path) {
// Sub-page: resolve to parent slide (ex: /blog/slug → /blog)
if (idx === -1) {
const parentPath = path.replace(/\/[^/]+$/, "");
- idx = slides.getIndexByPath(parentPath);
- if (idx !== -1) slidePath = parentPath;
+ if (parentPath && parentPath !== path) {
+ const parentIdx = slides.getIndexByPath(parentPath);
+ if (parentIdx !== -1) {
+ idx = parentIdx;
+ slidePath = parentPath;
+ } else if (!siteInitialized) {
+ // Slides not yet initialized — assume sub-page, fetch parent to bootstrap
+ slidePath = parentPath;
+ }
+ }
}
if (idx !== -1) {
diff --git a/src/views/Article.svelte b/src/views/Article.svelte
index 3095a7d..6bbf8d5 100644
--- a/src/views/Article.svelte
+++ b/src/views/Article.svelte
@@ -4,14 +4,48 @@
* Reçoit les données article via props, pas via le slide system.
*/
let { data, onBack } = $props()
+
+ let copySuccess = $state(false)
+ let copyTimer = null
+
+ function copyLink() {
+ navigator.clipboard.writeText(window.location.href)
+ copySuccess = true
+ clearTimeout(copyTimer)
+ copyTimer = setTimeout(() => { copySuccess = false }, 2000)
+ }
+
+ const shareUrl = $derived(encodeURIComponent(window.location.href))
-
+
-
-
+
+
+ {#if copySuccess}
+
Lien copié !
+ {/if}
+
+
@@ -34,6 +68,30 @@
{@html data.body}
{/if}
+
+
+
+
Partager cet article
+
+
+
{#if data.related?.length}