Compare commits
1 Commits
feat/v1.5-
...
feat/v1.5-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fb4842ac53 |
11
.env.example
11
.env.example
@@ -1,15 +1,14 @@
|
||||
# Kit (ex-ConvertKit) - newsletter infolettre
|
||||
KIT_API_SECRET_V4=kit_xxx
|
||||
|
||||
# Behold.so : DEPRECATED V1.5-E — remplace par RSSHub self-host (rss.trans-former.fr).
|
||||
# InstaFeed.vue consomme desormais PUBLIC_JOURNAL_URL (filtre platform=instagram).
|
||||
# Les 2 vars ci-dessous ne sont plus lues ; conservees pour compat.env.local existant.
|
||||
# Behold.so feed IDs (voir docs/BEHOLD-SETUP.md)
|
||||
# 1) Inscris-toi sur https://behold.so/dashboard
|
||||
# 2) Connecte les 2 comptes Insta (@aep.politique + @julesneny)
|
||||
# 3) Recupere les feed IDs et copie ce fichier vers .env.local puis remplis ci-dessous
|
||||
PUBLIC_BEHOLD_AEP=
|
||||
PUBLIC_BEHOLD_JULESNENY=
|
||||
|
||||
# Journal unifie (PC6 + V1.5-E) - URL JSON agrege par n8n cron 4h UTC
|
||||
# Sources : RSSHub self-host (Insta @aep.politique + @julesneny + Substack @julesneny)
|
||||
# + Atom Gitea natif (git.trans-former.fr/jules.atom)
|
||||
# Journal unifie (PC6) - URL JSON agrege par n8n cron nocturne
|
||||
# Override en local : pointer vers un mock /public/data/journal.json par exemple
|
||||
PUBLIC_JOURNAL_URL=https://data.trans-former.fr/journal.json
|
||||
|
||||
|
||||
@@ -1,139 +0,0 @@
|
||||
{
|
||||
"name": "journal-aggregate-v2-rsshub",
|
||||
"_notes": "V1.5-E (2026-05-13) — remplace Behold par RSSHub self-host (rss.trans-former.fr) + ajoute Substack natif. Cron decale a 4h UTC (anti-rate-limit Insta). Si /instagram/user/* renvoie 503 (config Insta absente), le node tombe gracefully et le JSON final aura 0 item insta — ColInsta affichera fallbackBio. A importer dans n8n via UI (Workflows -> Import from File) ou API.",
|
||||
"nodes": [
|
||||
{
|
||||
"parameters": {
|
||||
"rule": {
|
||||
"interval": [
|
||||
{
|
||||
"field": "cronExpression",
|
||||
"expression": "0 4 * * *"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"id": "schedule-trigger",
|
||||
"name": "Cron-4h-UTC",
|
||||
"type": "n8n-nodes-base.scheduleTrigger",
|
||||
"typeVersion": 1.1,
|
||||
"position": [240, 320]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"url": "https://git.trans-former.fr/jules.atom",
|
||||
"options": {
|
||||
"response": { "response": { "responseFormat": "text" } },
|
||||
"timeout": 15000
|
||||
}
|
||||
},
|
||||
"id": "fetch-gitea",
|
||||
"name": "Fetch-gitea",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"typeVersion": 4.1,
|
||||
"position": [460, 160]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"url": "https://julesneny.substack.com/feed",
|
||||
"options": {
|
||||
"response": { "response": { "responseFormat": "text" } },
|
||||
"timeout": 15000
|
||||
}
|
||||
},
|
||||
"id": "fetch-substack",
|
||||
"name": "Fetch-substack-natif",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"typeVersion": 4.1,
|
||||
"position": [460, 280]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"url": "https://rss.trans-former.fr/instagram/user/aep.politique",
|
||||
"options": {
|
||||
"response": { "response": { "neverError": true, "responseFormat": "text" } },
|
||||
"timeout": 20000
|
||||
}
|
||||
},
|
||||
"id": "fetch-rsshub-aep",
|
||||
"name": "Fetch-rsshub-insta-aep",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"typeVersion": 4.1,
|
||||
"position": [460, 400]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"url": "https://rss.trans-former.fr/instagram/user/julesneny",
|
||||
"options": {
|
||||
"response": { "response": { "neverError": true, "responseFormat": "text" } },
|
||||
"timeout": 20000
|
||||
}
|
||||
},
|
||||
"id": "fetch-rsshub-julesneny",
|
||||
"name": "Fetch-rsshub-insta-julesneny",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"typeVersion": 4.1,
|
||||
"position": [460, 520]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"jsCode": "// V1.5-E : Normalisation 4 sources -> JSON unifie\n// Sources : Gitea Atom (XML), Substack natif (RSS XML), RSSHub Insta x2 (Atom/RSS XML)\n\nconst items = [];\n\n// ---- Helper parse Atom (Gitea) ----\nfunction parseAtomGitea(xml) {\n const out = [];\n if (!xml || typeof xml !== 'string') return out;\n const entries = xml.split(/<entry>/i).slice(1);\n for (const raw of entries) {\n const block = '<entry>' + raw.split(/<\\/entry>/i)[0] + '</entry>';\n const title = (block.match(/<title>([\\s\\S]*?)<\\/title>/i) || [])[1] || '';\n const updated = (block.match(/<updated>([^<]+)<\\/updated>/i) || [])[1] || '';\n const link = (block.match(/<link[^>]*href=\"([^\"]+)\"/i) || [])[1] || '';\n const summary = (block.match(/<summary[^>]*>([\\s\\S]*?)<\\/summary>/i) || [])[1] || '';\n const id = (block.match(/<id>([^<]+)<\\/id>/i) || [])[1] || link || updated;\n if (!updated) continue;\n const decode = (s) => s\n .replace(/</g, '<').replace(/>/g, '>')\n .replace(/"/g, '\"').replace(/"/g, '\"')\n .replace(/
/g, ' ').replace(/&/g, '&')\n .replace(/<[^>]+>/g, ' ').replace(/\\s+/g, ' ').trim();\n out.push({\n id: 'gitea-' + (id.slice(0, 80) || updated),\n platform: 'gitea',\n hashtag: '#stack',\n date: new Date(updated).toISOString(),\n titre: decode(title).slice(0, 140),\n extrait: decode(summary).slice(0, 280),\n url: link,\n thumbnail: null,\n });\n }\n return out;\n}\n\n// ---- Helper parse RSS 2.0 (Substack, RSSHub) ----\nfunction parseRss(xml, platform, hashtag, fallbackUrl) {\n const out = [];\n if (!xml || typeof xml !== 'string') return out;\n const items = xml.split(/<item[\\s>]/i).slice(1);\n for (const raw of items) {\n const block = '<item ' + raw.split(/<\\/item>/i)[0] + '</item>';\n const cdata = (re) => {\n const m = block.match(re);\n if (!m) return '';\n let s = m[1] || '';\n s = s.replace(/<!\\[CDATA\\[([\\s\\S]*?)\\]\\]>/g, '$1');\n return s;\n };\n const title = cdata(/<title[^>]*>([\\s\\S]*?)<\\/title>/i);\n const link = cdata(/<link[^>]*>([\\s\\S]*?)<\\/link>/i).trim();\n const guid = cdata(/<guid[^>]*>([\\s\\S]*?)<\\/guid>/i).trim();\n const desc = cdata(/<description[^>]*>([\\s\\S]*?)<\\/description>/i);\n const pub = cdata(/<pubDate[^>]*>([\\s\\S]*?)<\\/pubDate>/i).trim();\n if (!pub && !title) continue;\n const decode = (s) => s\n .replace(/</g, '<').replace(/>/g, '>')\n .replace(/"/g, '\"').replace(/"/g, '\"')\n .replace(/&/g, '&')\n .replace(/<[^>]+>/g, ' ').replace(/\\s+/g, ' ').trim();\n const enclosure = (block.match(/<enclosure[^>]+url=\"([^\"]+)\"/i) || [])[1] || null;\n const mediaThumb = (block.match(/<media:thumbnail[^>]+url=\"([^\"]+)\"/i) || [])[1] || null;\n out.push({\n id: platform + '-' + (guid || link || pub).slice(0, 80),\n platform,\n hashtag,\n date: pub ? new Date(pub).toISOString() : new Date().toISOString(),\n titre: decode(title).slice(0, 140) || platform,\n extrait: decode(desc).slice(0, 280),\n url: link || fallbackUrl,\n thumbnail: mediaThumb || enclosure,\n });\n }\n return out;\n}\n\n// ---- Recupere payloads ----\nfunction safeText(nodeName) {\n try {\n const its = $(nodeName).all();\n if (!its.length || !its[0].json) return '';\n const j = its[0].json;\n return String(j.data || j.body || '');\n } catch (e) {\n console.log(nodeName + ' missing:', e.message);\n return '';\n }\n}\n\nconst giteaXml = safeText('Fetch-gitea');\nconst subXml = safeText('Fetch-substack-natif');\nconst rsshubAepXml = safeText('Fetch-rsshub-insta-aep');\nconst rsshubJnXml = safeText('Fetch-rsshub-insta-julesneny');\n\nfor (const it of parseAtomGitea(giteaXml)) items.push(it);\nfor (const it of parseRss(subXml, 'substack', '#substack', 'https://julesneny.substack.com')) items.push(it);\nfor (const it of parseRss(rsshubAepXml, 'instagram', '#aep-politique', 'https://instagram.com/aep.politique')) items.push(it);\nfor (const it of parseRss(rsshubJnXml, 'instagram', '#peinture', 'https://instagram.com/julesneny')) items.push(it);\n\n// ---- Dedup par id, tri desc, cap top 100 ----\nconst seen = new Set();\nconst uniq = items.filter((it) => {\n if (seen.has(it.id)) return false;\n seen.add(it.id);\n return true;\n});\nuniq.sort((a, b) => b.date.localeCompare(a.date));\nconst top = uniq.slice(0, 100);\n\nconst counts = {\n total: top.length,\n gitea: top.filter((i) => i.platform === 'gitea').length,\n substack: top.filter((i) => i.platform === 'substack').length,\n instagram: top.filter((i) => i.platform === 'instagram').length,\n};\n\nreturn [{ json: { generatedAt: new Date().toISOString(), items: top, counts } }];"
|
||||
},
|
||||
"id": "normalise",
|
||||
"name": "Normalise",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"typeVersion": 2,
|
||||
"position": [720, 340]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"operation": "toJson",
|
||||
"fieldName": "data",
|
||||
"options": { "format": true }
|
||||
},
|
||||
"id": "to-json",
|
||||
"name": "To-json-string",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"typeVersion": 3.4,
|
||||
"position": [940, 340]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"operation": "write",
|
||||
"fileName": "/home/node/.n8n/journal/journal.json",
|
||||
"dataPropertyName": "data",
|
||||
"options": {}
|
||||
},
|
||||
"id": "write-file",
|
||||
"name": "Write-journal-json",
|
||||
"type": "n8n-nodes-base.readWriteFile",
|
||||
"typeVersion": 1,
|
||||
"position": [1160, 340]
|
||||
}
|
||||
],
|
||||
"connections": {
|
||||
"Cron-4h-UTC": {
|
||||
"main": [[
|
||||
{ "node": "Fetch-gitea", "type": "main", "index": 0 },
|
||||
{ "node": "Fetch-substack-natif", "type": "main", "index": 0 },
|
||||
{ "node": "Fetch-rsshub-insta-aep", "type": "main", "index": 0 },
|
||||
{ "node": "Fetch-rsshub-insta-julesneny", "type": "main", "index": 0 }
|
||||
]]
|
||||
},
|
||||
"Fetch-gitea": { "main": [[{ "node": "Normalise", "type": "main", "index": 0 }]] },
|
||||
"Fetch-substack-natif": { "main": [[{ "node": "Normalise", "type": "main", "index": 0 }]] },
|
||||
"Fetch-rsshub-insta-aep": { "main": [[{ "node": "Normalise", "type": "main", "index": 0 }]] },
|
||||
"Fetch-rsshub-insta-julesneny": { "main": [[{ "node": "Normalise", "type": "main", "index": 0 }]] },
|
||||
"Normalise": { "main": [[{ "node": "To-json-string", "type": "main", "index": 0 }]] },
|
||||
"To-json-string": { "main": [[{ "node": "Write-journal-json", "type": "main", "index": 0 }]] }
|
||||
},
|
||||
"settings": {
|
||||
"executionOrder": "v1",
|
||||
"saveExecutionProgress": true,
|
||||
"saveManualExecutions": true
|
||||
},
|
||||
"tags": [
|
||||
{ "name": "page-cerveau" },
|
||||
{ "name": "V1.5-E" }
|
||||
]
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": "1.1",
|
||||
"generatedAt": "2026-05-12T22:53:33.094Z",
|
||||
"generatedAt": "2026-05-12T09:28:20.972Z",
|
||||
"nodes": [
|
||||
{
|
||||
"id": "contrat-social-medecine-corps-social",
|
||||
|
||||
@@ -1,21 +1,23 @@
|
||||
---
|
||||
import InstaFeed from '../vue/InstaFeed.vue';
|
||||
|
||||
// V1.5-E : Behold remplacé par RSSHub self-host. InstaFeed lit désormais
|
||||
// le journal unifié (PUBLIC_JOURNAL_URL → data.trans-former.fr/journal.json)
|
||||
// agrégé par n8n depuis rss.trans-former.fr. Plus de feedId Behold à passer.
|
||||
// Feed IDs Behold a remplir apres inscription Behold (voir docs/BEHOLD-SETUP.md)
|
||||
const FEED_AEP = import.meta.env.PUBLIC_BEHOLD_AEP || 'PLACEHOLDER_AEP';
|
||||
const FEED_JULESNENY = import.meta.env.PUBLIC_BEHOLD_JULESNENY || 'PLACEHOLDER_JULESNENY';
|
||||
---
|
||||
<div class="h-full overflow-y-auto">
|
||||
<InstaFeed
|
||||
client:visible
|
||||
account="aep.politique"
|
||||
feedId={FEED_AEP}
|
||||
account="@aep.politique"
|
||||
accountUrl="https://www.instagram.com/aep.politique/"
|
||||
fallbackBio="Carrousels manifeste AEP ; pensee politique eco-architecture"
|
||||
/>
|
||||
|
||||
<InstaFeed
|
||||
client:visible
|
||||
account="julesneny"
|
||||
feedId={FEED_JULESNENY}
|
||||
account="@julesneny"
|
||||
accountUrl="https://www.instagram.com/julesneny/"
|
||||
fallbackBio="Peinture, poesie, Corse ; archives visuelles personnelles"
|
||||
/>
|
||||
|
||||
@@ -58,13 +58,14 @@ const categories = [
|
||||
},
|
||||
];
|
||||
---
|
||||
<div class="h-full flex flex-col p-4 pt-20 md:pt-6 gap-5">
|
||||
<div class="h-full flex flex-col px-4 pb-4 pt-1 md:pt-6 gap-3 md:gap-5">
|
||||
|
||||
<!-- Hashtags accordeon -->
|
||||
<details id="hashtags-accordion" class="border-t border-neutral-200 pt-4">
|
||||
<!-- Catégories accordeon (V1.5-A.4 : "Hashtags" -> "Catégories")
|
||||
V1.5-A.5 : ouvert par defaut sur mobile + desktop (collé sous tab actif). -->
|
||||
<details id="hashtags-accordion" class="md:border-t md:border-neutral-200 md:pt-4" open>
|
||||
<summary class="font-semibold cursor-pointer select-none flex items-center justify-between">
|
||||
<span>Hashtags</span>
|
||||
<span class="text-xs text-neutral-400 font-normal">4 categories</span>
|
||||
<span>Catégories</span>
|
||||
<span class="text-xs text-neutral-400 font-normal">4 catégories</span>
|
||||
</summary>
|
||||
|
||||
<div class="mt-3 flex flex-wrap gap-2" id="category-badges">
|
||||
@@ -121,10 +122,10 @@ const categories = [
|
||||
</a>
|
||||
</details>
|
||||
|
||||
<!-- Journal chrono -->
|
||||
<!-- Publication chrono (V1.5-A.2 : "Journal" -> "Publication") -->
|
||||
<section class="border-t border-neutral-200 pt-4 flex-1 overflow-y-auto">
|
||||
<h2 class="font-semibold mb-3 flex items-center justify-between">
|
||||
<span>Journal</span>
|
||||
<span>Publication</span>
|
||||
<span class="text-xs text-neutral-400 font-normal">chrono</span>
|
||||
</h2>
|
||||
<div id="journal-list" class="space-y-3 text-sm">
|
||||
@@ -134,13 +135,11 @@ const categories = [
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// V1.5-A.5 : Catégories ouvert par défaut sur mobile ET desktop.
|
||||
// (Auparavant : forcé ouvert desktop seulement, replié sur mobile.)
|
||||
// L'attribut `open` SSR garantit l'état initial — script JS retiré pour ne pas
|
||||
// refermer l'accordéon au resize cross-breakpoint.
|
||||
const accordion = document.getElementById('hashtags-accordion') as HTMLDetailsElement | null;
|
||||
if (accordion) {
|
||||
const mql = window.matchMedia('(min-width: 768px)');
|
||||
const apply = () => { accordion.open = mql.matches; };
|
||||
apply();
|
||||
mql.addEventListener('change', apply);
|
||||
}
|
||||
|
||||
const closeBtn = document.getElementById('accordion-close');
|
||||
if (closeBtn && accordion) {
|
||||
@@ -313,14 +312,25 @@ const categories = [
|
||||
dispatchPlatform(platformFilters['politique']);
|
||||
}
|
||||
|
||||
// V1.3-E : intercept clics liens Manifeste -> preview centrale (uniquement sur racine /)
|
||||
// Tagger les liens [data-manifeste-link] et router vers event 'preview-open' si on est sur /.
|
||||
// Sinon : laisser la navigation native vers /manifeste.
|
||||
// V1.3-E + V1.5-A.6 : intercept clics liens Manifeste -> preview centrale (uniquement sur racine /).
|
||||
// Mobile : on dispatche aussi `mobile-tab-scroll` pos:1 pour swiper vers la col centre
|
||||
// (sinon la preview ouvre en background sur la col journal — invisible utilisateur).
|
||||
// SwipeContainer écoute `mobile-tab-scroll` et fait scrollTo(1).
|
||||
document.querySelectorAll<HTMLAnchorElement>('a[data-manifeste-link]').forEach((el) => {
|
||||
el.addEventListener('click', (e) => {
|
||||
if (window.location.pathname === '/') {
|
||||
e.preventDefault();
|
||||
// Mobile : naviguer d'abord vers tab Carte (pos:1) puis ouvrir preview après le swipe.
|
||||
const isMobile = window.matchMedia('(max-width: 767px)').matches;
|
||||
if (isMobile) {
|
||||
document.dispatchEvent(new CustomEvent('mobile-tab-scroll', { detail: { pos: 1 } }));
|
||||
// Laisse le temps au swipe Embla de se positionner avant d'ouvrir la preview
|
||||
setTimeout(() => {
|
||||
window.dispatchEvent(new CustomEvent('preview-open', { detail: { type: 'manifeste' } }));
|
||||
}, 350);
|
||||
} else {
|
||||
window.dispatchEvent(new CustomEvent('preview-open', { detail: { type: 'manifeste' } }));
|
||||
}
|
||||
}
|
||||
// sinon : navigation normale vers /manifeste (fallback SEO + no-JS)
|
||||
});
|
||||
|
||||
@@ -1,103 +0,0 @@
|
||||
---
|
||||
// HamburgerMenu - drawer slide-in left avec liens nav (PC2)
|
||||
// Astro vanilla + script inline, pas besoin d'island Vue
|
||||
---
|
||||
<button
|
||||
id="hamburger-trigger"
|
||||
type="button"
|
||||
class="fixed top-4 right-4 z-50 p-3 bg-white/95 border border-neutral-200 rounded-lg shadow-md hover:bg-white transition-colors md:hidden"
|
||||
aria-label="Ouvrir le menu"
|
||||
aria-expanded="false"
|
||||
aria-controls="hamburger-drawer"
|
||||
>
|
||||
<span class="block w-5 h-0.5 bg-neutral-800 mb-1"></span>
|
||||
<span class="block w-5 h-0.5 bg-neutral-800 mb-1"></span>
|
||||
<span class="block w-5 h-0.5 bg-neutral-800"></span>
|
||||
</button>
|
||||
|
||||
<div
|
||||
id="hamburger-drawer"
|
||||
class="fixed inset-0 z-40 hidden"
|
||||
role="dialog"
|
||||
aria-modal="true"
|
||||
aria-label="Menu de navigation"
|
||||
>
|
||||
<div
|
||||
class="absolute inset-0 bg-black/30 transition-opacity"
|
||||
data-drawer-close
|
||||
aria-hidden="true"
|
||||
></div>
|
||||
<nav
|
||||
id="hamburger-nav"
|
||||
class="absolute left-0 top-0 h-full w-72 max-w-[80vw] bg-white shadow-xl p-6 transform -translate-x-full transition-transform duration-200 ease-out"
|
||||
>
|
||||
<button
|
||||
type="button"
|
||||
data-drawer-close
|
||||
class="absolute top-4 right-4 w-9 h-9 flex items-center justify-center text-neutral-500 hover:text-neutral-900 text-2xl leading-none rounded-md hover:bg-neutral-100"
|
||||
aria-label="Fermer le menu"
|
||||
>
|
||||
×
|
||||
</button>
|
||||
<ul class="mt-12 space-y-1 text-base">
|
||||
<li>
|
||||
<a
|
||||
href="/a-propos"
|
||||
class="block px-3 py-2 rounded-md text-neutral-800 hover:bg-neutral-100 hover:text-neutral-900 transition-colors"
|
||||
>
|
||||
A propos
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="/manifeste"
|
||||
class="block px-3 py-2 rounded-md text-neutral-800 hover:bg-neutral-100 hover:text-neutral-900 transition-colors"
|
||||
>
|
||||
Manifeste
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="/mentions-legales"
|
||||
class="block px-3 py-2 rounded-md text-neutral-800 hover:bg-neutral-100 hover:text-neutral-900 transition-colors"
|
||||
>
|
||||
Mentions legales
|
||||
</a>
|
||||
</li>
|
||||
<!-- TODO V2 : ajouter liens ici (newsletter, soutien Liberapay, contact) -->
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const trigger = document.getElementById('hamburger-trigger');
|
||||
const drawer = document.getElementById('hamburger-drawer');
|
||||
const nav = document.getElementById('hamburger-nav');
|
||||
|
||||
const open = () => {
|
||||
if (!drawer || !nav) return;
|
||||
drawer.classList.remove('hidden');
|
||||
trigger?.setAttribute('aria-expanded', 'true');
|
||||
requestAnimationFrame(() => nav.classList.remove('-translate-x-full'));
|
||||
};
|
||||
|
||||
const close = () => {
|
||||
if (!drawer || !nav) return;
|
||||
nav.classList.add('-translate-x-full');
|
||||
trigger?.setAttribute('aria-expanded', 'false');
|
||||
setTimeout(() => drawer.classList.add('hidden'), 200);
|
||||
};
|
||||
|
||||
trigger?.addEventListener('click', open);
|
||||
|
||||
drawer?.querySelectorAll('[data-drawer-close]').forEach((el) =>
|
||||
el.addEventListener('click', close)
|
||||
);
|
||||
|
||||
// ESC pour fermer
|
||||
document.addEventListener('keydown', (e) => {
|
||||
if (e.key === 'Escape' && drawer && !drawer.classList.contains('hidden')) {
|
||||
close();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@@ -1,20 +1,22 @@
|
||||
---
|
||||
// MobileTabBar - indicateur de colonne active sur mobile (V1.1-D.1)
|
||||
// V1.5-A.3 : suppression border-b (ligne séparatrice sous header mobile supprimée).
|
||||
// V1.5-A.2 : "Journal" -> "Publication" (vocabulaire visiteur).
|
||||
// Ecoute l'event "swipe-position-change" emis par SwipeContainer.vue
|
||||
// Affiche : Journal | Carte | Insta - colonne active surlignee
|
||||
// Affiche : Publication | Carte | Insta - colonne active surlignee
|
||||
---
|
||||
<nav
|
||||
id="mobile-tab-bar"
|
||||
aria-label="Navigation colonnes"
|
||||
class="fixed top-12 left-0 right-0 z-30 h-11 bg-white border-b border-neutral-200 flex items-stretch justify-around md:hidden"
|
||||
class="fixed top-12 left-0 right-0 z-30 h-11 bg-white flex items-stretch justify-around md:hidden"
|
||||
>
|
||||
<button
|
||||
type="button"
|
||||
data-tab-index="0"
|
||||
class="mobile-tab flex-1 text-sm px-2 border-b-2 transition-colors"
|
||||
aria-label="Aller au journal"
|
||||
aria-label="Aller à la publication"
|
||||
>
|
||||
Journal
|
||||
Publication
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
import '@fontsource-variable/roboto-condensed/wght.css';
|
||||
---
|
||||
<header
|
||||
class="site-header w-full border-b border-[#E5E7EB] bg-[#FAFAF7] text-[#0F172A] px-4 md:px-6 flex items-center"
|
||||
class="site-header w-full md:border-b md:border-[#E5E7EB] bg-[#FAFAF7] text-[#0F172A] px-4 md:px-6 flex items-center"
|
||||
role="banner"
|
||||
>
|
||||
<!-- Bloc identite (gauche) -->
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
// V1.5-A.7 : fallback mobile retiré — la Carte O D3-force fonctionne sur viewport <768px
|
||||
// (testé tel ≥6"). Auparavant : message "optimisée desktop" + miniature SVG statique.
|
||||
// Pourquoi : décision τ.15 PILOTE trop agressive — la mindmap tourne, juste plus dense.
|
||||
import { ref, onMounted, computed } from 'vue'
|
||||
import CarteO from './CarteO.vue'
|
||||
import CarteOContextMenu from './CarteOContextMenu.vue'
|
||||
@@ -44,7 +47,6 @@ const error = ref<string | null>(null)
|
||||
const selectedNode = ref<CarteNode | null>(null)
|
||||
const contextX = ref(0)
|
||||
const contextY = ref(0)
|
||||
const isMobileScreen = ref(false)
|
||||
|
||||
const familyColors = computed(() =>
|
||||
data.value?.meta?.familyColors || {
|
||||
@@ -63,7 +65,6 @@ function onNodeClick(payload: { node: CarteNode; x: number; y: number }) {
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
isMobileScreen.value = window.innerWidth < 768
|
||||
try {
|
||||
const res = await fetch(props.src)
|
||||
if (!res.ok) throw new Error(`HTTP ${res.status}`)
|
||||
@@ -72,37 +73,13 @@ onMounted(async () => {
|
||||
console.error('[CarteO] failed to load', e)
|
||||
error.value = e?.message || 'Erreur de chargement'
|
||||
}
|
||||
|
||||
window.addEventListener('resize', () => {
|
||||
isMobileScreen.value = window.innerWidth < 768
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="wrapper">
|
||||
<!-- Mobile fallback (V1) -->
|
||||
<div v-if="isMobileScreen" class="mobile-fallback">
|
||||
<div class="mini-map">
|
||||
<svg viewBox="0 0 200 120" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
|
||||
<circle cx="100" cy="60" r="8" fill="#3b82f6" />
|
||||
<circle cx="50" cy="35" r="5" fill="#10b981" />
|
||||
<circle cx="150" cy="35" r="5" fill="#f59e0b" />
|
||||
<circle cx="55" cy="90" r="5" fill="#ef4444" />
|
||||
<circle cx="145" cy="90" r="5" fill="#8b5cf6" />
|
||||
<line x1="100" y1="60" x2="50" y2="35" stroke="#94a3b8" stroke-width="0.8" opacity="0.5" />
|
||||
<line x1="100" y1="60" x2="150" y2="35" stroke="#94a3b8" stroke-width="0.8" opacity="0.5" />
|
||||
<line x1="100" y1="60" x2="55" y2="90" stroke="#94a3b8" stroke-width="0.8" opacity="0.5" />
|
||||
<line x1="100" y1="60" x2="145" y2="90" stroke="#94a3b8" stroke-width="0.8" opacity="0.5" />
|
||||
</svg>
|
||||
</div>
|
||||
<p class="msg">
|
||||
Carte O optimisee desktop. Retournez sur grand ecran pour explorer la mindmap interactive.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- Loading state -->
|
||||
<div v-else-if="!data && !error" class="state">
|
||||
<div v-if="!data && !error" class="state">
|
||||
<span>Chargement de la Carte O...</span>
|
||||
</div>
|
||||
|
||||
@@ -148,34 +125,4 @@ onMounted(async () => {
|
||||
.state.error {
|
||||
color: #dc2626;
|
||||
}
|
||||
|
||||
.mobile-fallback {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 1.5rem;
|
||||
text-align: center;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.mini-map {
|
||||
width: 70%;
|
||||
max-width: 240px;
|
||||
}
|
||||
|
||||
.mini-map svg {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.msg {
|
||||
color: #6b7280;
|
||||
font-size: 0.85rem;
|
||||
line-height: 1.45;
|
||||
font-style: italic;
|
||||
max-width: 24rem;
|
||||
margin: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,9 +1,16 @@
|
||||
<script setup lang="ts">
|
||||
// V1.5-A.9 : iframe AEP responsive sur mobile.
|
||||
// AEP est confirmé responsive (viewport meta + media queries Tailwind md:).
|
||||
// Mobile (<768px) : on retire le hack scale 0.42 + viewport simulé 1440px,
|
||||
// l'iframe rend à width:100% / height:100% nativement.
|
||||
// Desktop (≥768px) : on conserve le rendu desktop forcé (scale dynamique) pour garder
|
||||
// la mise en page riche de la carte AEP dans la col centre étroite (~480px).
|
||||
import { ref, computed, onMounted, onUnmounted } from 'vue'
|
||||
|
||||
const iframeRef = ref<HTMLIFrameElement | null>(null)
|
||||
const wrapperRef = ref<HTMLDivElement | null>(null)
|
||||
const skeletonHidden = ref(false)
|
||||
const isMobile = ref(false)
|
||||
|
||||
// Force rendu desktop de l'iframe AEP : viewport simulee 1440px + scale dynamique
|
||||
const VIEWPORT_W = 1440
|
||||
@@ -16,12 +23,24 @@ const updateScale = () => {
|
||||
if (w > 0) iframeScale.value = w / VIEWPORT_W
|
||||
}
|
||||
|
||||
const iframeStyle = computed(() => ({
|
||||
const iframeStyle = computed(() => {
|
||||
if (isMobile.value) {
|
||||
// Mobile : rendu natif responsive, pas de scale
|
||||
return {
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
transform: 'none',
|
||||
transformOrigin: '0 0',
|
||||
}
|
||||
}
|
||||
// Desktop : viewport simulé 1440px + scale dynamique (workaround col étroite)
|
||||
return {
|
||||
width: VIEWPORT_W + 'px',
|
||||
height: (100 / iframeScale.value) + '%',
|
||||
transform: `scale(${iframeScale.value})`,
|
||||
transformOrigin: '0 0',
|
||||
}))
|
||||
}
|
||||
})
|
||||
|
||||
let fallbackTimer: ReturnType<typeof setTimeout> | null = null
|
||||
|
||||
@@ -33,7 +52,13 @@ const revealIframe = () => {
|
||||
skeletonHidden.value = true
|
||||
}
|
||||
|
||||
const detectMobile = () => {
|
||||
isMobile.value = window.matchMedia('(max-width: 767px)').matches
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
detectMobile()
|
||||
window.addEventListener('resize', detectMobile)
|
||||
if (wrapperRef.value && typeof ResizeObserver !== 'undefined') {
|
||||
updateScale()
|
||||
resizeObs = new ResizeObserver(updateScale)
|
||||
@@ -48,6 +73,7 @@ onMounted(() => {
|
||||
onUnmounted(() => {
|
||||
resizeObs?.disconnect()
|
||||
resizeObs = null
|
||||
window.removeEventListener('resize', detectMobile)
|
||||
if (fallbackTimer) {
|
||||
clearTimeout(fallbackTimer)
|
||||
fallbackTimer = null
|
||||
|
||||
@@ -1,80 +1,46 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted } from 'vue';
|
||||
|
||||
// V1.5-E : on consomme désormais le journal unifié agrégé par n8n
|
||||
// (sources RSSHub self-host → data.trans-former.fr/journal.json),
|
||||
// au lieu de l'API Behold directe (rate-limit, plafond 6 posts gratuit).
|
||||
interface JournalItem {
|
||||
id: string;
|
||||
platform: string;
|
||||
date: string;
|
||||
titre: string;
|
||||
extrait?: string;
|
||||
url: string;
|
||||
thumbnail: string | null;
|
||||
}
|
||||
|
||||
interface JournalPayload {
|
||||
generatedAt: string;
|
||||
items: JournalItem[];
|
||||
}
|
||||
|
||||
interface InstaPost {
|
||||
interface BeholdPost {
|
||||
id: string;
|
||||
permalink: string;
|
||||
thumbnailUrl: string | null;
|
||||
caption: string;
|
||||
mediaUrl: string;
|
||||
thumbnailUrl?: string;
|
||||
caption?: string;
|
||||
mediaType: 'IMAGE' | 'VIDEO' | 'CAROUSEL_ALBUM';
|
||||
timestamp: string;
|
||||
}
|
||||
|
||||
const props = defineProps<{
|
||||
/** handle Instagram sans @ (ex: 'aep.politique', 'julesneny') — sert à filtrer le journal */
|
||||
feedId: string;
|
||||
account: string;
|
||||
accountUrl: string;
|
||||
fallbackBio?: string;
|
||||
/** nombre max de posts affichés (défaut 6, parité avec ancien Behold) */
|
||||
max?: number;
|
||||
}>();
|
||||
|
||||
const posts = ref<InstaPost[]>([]);
|
||||
const posts = ref<BeholdPost[]>([]);
|
||||
const loading = ref(true);
|
||||
const error = ref<string | null>(null);
|
||||
|
||||
const JOURNAL_URL =
|
||||
(import.meta as unknown as { env: Record<string, string | undefined> }).env
|
||||
.PUBLIC_JOURNAL_URL || 'https://data.trans-former.fr/journal.json';
|
||||
|
||||
const accountHandle = (props.account || '').replace(/^@/, '').toLowerCase();
|
||||
const limit = props.max ?? 6;
|
||||
const isPlaceholder = (id: string) => !id || id.startsWith('PLACEHOLDER_');
|
||||
|
||||
onMounted(async () => {
|
||||
if (isPlaceholder(props.feedId)) {
|
||||
loading.value = false;
|
||||
error.value = 'no-feed-id';
|
||||
return;
|
||||
}
|
||||
try {
|
||||
const controller = new AbortController();
|
||||
const timeoutId = setTimeout(() => controller.abort(), 8000);
|
||||
const res = await fetch(JOURNAL_URL, {
|
||||
const timeoutId = setTimeout(() => controller.abort(), 5000);
|
||||
const res = await fetch(`https://feeds.behold.so/${props.feedId}`, {
|
||||
signal: controller.signal,
|
||||
cache: 'no-store',
|
||||
});
|
||||
clearTimeout(timeoutId);
|
||||
if (!res.ok) throw new Error(`Journal returned ${res.status}`);
|
||||
const data = (await res.json()) as JournalPayload;
|
||||
const all = Array.isArray(data?.items) ? data.items : [];
|
||||
posts.value = all
|
||||
.filter(
|
||||
(it) =>
|
||||
it.platform === 'instagram' &&
|
||||
typeof it.url === 'string' &&
|
||||
it.url.toLowerCase().includes(`/${accountHandle}`),
|
||||
)
|
||||
.slice(0, limit)
|
||||
.map((it) => ({
|
||||
id: it.id,
|
||||
permalink: it.url,
|
||||
thumbnailUrl: it.thumbnail ?? null,
|
||||
caption: it.titre || it.extrait || '',
|
||||
timestamp: it.date,
|
||||
}));
|
||||
if (!posts.value.length) error.value = 'no-posts';
|
||||
if (!res.ok) throw new Error(`Behold returned ${res.status}`);
|
||||
const data = await res.json();
|
||||
const items: BeholdPost[] = Array.isArray(data) ? data : (data.posts ?? []);
|
||||
posts.value = items.slice(0, 6);
|
||||
} catch (e) {
|
||||
error.value = (e as Error).message || 'fetch-error';
|
||||
} finally {
|
||||
@@ -105,28 +71,24 @@ onMounted(async () => {
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div v-else-if="posts.length" class="grid grid-cols-2 gap-1 p-1">
|
||||
<div
|
||||
v-else-if="posts.length"
|
||||
class="grid grid-cols-2 gap-1 p-1"
|
||||
>
|
||||
<a
|
||||
v-for="post in posts"
|
||||
:key="post.id"
|
||||
:href="post.permalink"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
class="block aspect-square overflow-hidden group bg-neutral-100"
|
||||
class="block aspect-square overflow-hidden group"
|
||||
>
|
||||
<img
|
||||
v-if="post.thumbnailUrl"
|
||||
:src="post.thumbnailUrl"
|
||||
:src="post.thumbnailUrl || post.mediaUrl"
|
||||
:alt="post.caption?.slice(0, 80) || account"
|
||||
loading="lazy"
|
||||
class="w-full h-full object-cover group-hover:scale-105 transition-transform"
|
||||
/>
|
||||
<span
|
||||
v-else
|
||||
class="w-full h-full flex items-center justify-center text-[10px] text-neutral-400 p-2 text-center"
|
||||
>
|
||||
{{ post.caption?.slice(0, 60) || account }}
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -2,14 +2,11 @@
|
||||
export const prerender = true;
|
||||
|
||||
import BaseLayout from '../layouts/BaseLayout.astro';
|
||||
import HamburgerMenu from '../components/astro/HamburgerMenu.astro';
|
||||
---
|
||||
<BaseLayout
|
||||
title="A propos - Jules Neny"
|
||||
description="Architecte HMONP, ecrivain politique, facilitateur. Bagneres-de-Bigorre, Pyrenees."
|
||||
>
|
||||
<HamburgerMenu />
|
||||
|
||||
<main class="h-full overflow-y-auto bg-white">
|
||||
<article class="max-w-2xl mx-auto px-6 py-16 md:py-24">
|
||||
|
||||
|
||||
@@ -6,12 +6,10 @@ import ColJournal from '../components/astro/ColJournal.astro';
|
||||
import ColCentre from '../components/astro/ColCentre.astro';
|
||||
import ColInsta from '../components/astro/ColInsta.astro';
|
||||
import SwipeContainer from '../components/vue/SwipeContainer.vue';
|
||||
import HamburgerMenu from '../components/astro/HamburgerMenu.astro';
|
||||
import MobileTabBar from '../components/astro/MobileTabBar.astro';
|
||||
import PopupOnboarding from '../components/astro/PopupOnboarding.astro';
|
||||
---
|
||||
<BaseLayout title="trans-former.fr">
|
||||
<HamburgerMenu />
|
||||
<MobileTabBar />
|
||||
<PopupOnboarding />
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
export const prerender = true;
|
||||
|
||||
import BaseLayout from '../layouts/BaseLayout.astro';
|
||||
import HamburgerMenu from '../components/astro/HamburgerMenu.astro';
|
||||
---
|
||||
<BaseLayout
|
||||
title="Manifeste - Architecture d'Ecologie Politique"
|
||||
@@ -11,8 +10,6 @@ import HamburgerMenu from '../components/astro/HamburgerMenu.astro';
|
||||
articleDate="2026-05-01"
|
||||
articleDescription="Manifeste fondateur des Agences d'Ecologie Politique - un commun vivant pour bifurquer ensemble."
|
||||
>
|
||||
<HamburgerMenu />
|
||||
|
||||
<main class="h-full overflow-y-auto bg-white">
|
||||
<article class="max-w-2xl mx-auto px-6 py-16 md:py-24">
|
||||
|
||||
|
||||
@@ -2,14 +2,11 @@
|
||||
export const prerender = true;
|
||||
|
||||
import BaseLayout from '../../layouts/BaseLayout.astro';
|
||||
import HamburgerMenu from '../../components/astro/HamburgerMenu.astro';
|
||||
---
|
||||
<BaseLayout
|
||||
title="Commander la version imprimee - Manifeste AEP"
|
||||
description="Pre-inscription pour la version imprimee du manifeste Architecture d'Ecologie Politique."
|
||||
>
|
||||
<HamburgerMenu />
|
||||
|
||||
<main class="h-full overflow-y-auto bg-white">
|
||||
<article class="max-w-xl mx-auto px-6 py-16 md:py-24">
|
||||
|
||||
|
||||
@@ -2,14 +2,11 @@
|
||||
export const prerender = true;
|
||||
|
||||
import BaseLayout from '../layouts/BaseLayout.astro';
|
||||
import HamburgerMenu from '../components/astro/HamburgerMenu.astro';
|
||||
---
|
||||
<BaseLayout
|
||||
title="Mentions legales - trans-former.fr"
|
||||
description="Mentions legales du site trans-former.fr."
|
||||
>
|
||||
<HamburgerMenu />
|
||||
|
||||
<main class="h-full overflow-y-auto bg-white">
|
||||
<article class="max-w-2xl mx-auto px-6 py-16 md:py-24">
|
||||
|
||||
|
||||
Reference in New Issue
Block a user