diff --git a/public/assets/css/stylesheet.print.css b/public/assets/css/stylesheet.print.css index c760569..e5f5095 100644 --- a/public/assets/css/stylesheet.print.css +++ b/public/assets/css/stylesheet.print.css @@ -107,10 +107,10 @@ h2{ h5{ display: flex; align-items: center; -} +}*/ .marker-title img{ width: 40px; -} */ +} diff --git a/public/content/cohesion-des-mondes/5_test-avec-geoformat/1_plongez-dans-les-sources/3_la-nouvelle-ere/chapter.txt b/public/content/cohesion-des-mondes/5_test-avec-geoformat/1_plongez-dans-les-sources/3_la-nouvelle-ere/chapter.txt index c32c6fa..71f38af 100644 --- a/public/content/cohesion-des-mondes/5_test-avec-geoformat/1_plongez-dans-les-sources/3_la-nouvelle-ere/chapter.txt +++ b/public/content/cohesion-des-mondes/5_test-avec-geoformat/1_plongez-dans-les-sources/3_la-nouvelle-ere/chapter.txt @@ -4,7 +4,7 @@ Title: La nouvelle ère Body: -[{"content":{"text":"

Là c'est le moment moins marrant où je vous mets une looooongue liste d'articles, de pages internet et de vidéos en tout genre. Mais c'est intéressant, promis !

♣ Les légendes Japonaises et Yôkais :

 

Roadtrip à vos risques et périls !

• Abura-Akago :

• Kappa :

Vidéo :

• Akaatama :

 

• Kitsune:

Prêts à frissonner ?

• Le tunnel de Kitotaki:

Vidéos :

• Kuchisake-Onna :

Vidéo :

• Aokigahara :

Vidéos :

Que la chance soit avec vous !

• Maneki-Neko :

• Teru Teru Bōzu :

Vidéo :

• Daruma :

Plongez dans les sources...

• Le maître des Yôkais :

Vidéo :

"},"id":"38715100-a428-49da-8aa9-cc2d04e9a7d7","isHidden":false,"type":"text"}] +[{"content":{"text":"

Là c'est le moment moins marrant où je vous mets une looooongue liste d'articles, de pages internet et de vidéos en tout genre. Mais c'est intéressant, promis !

♣ Les légendes Japonaises et Yôkais :

Roadtrip à vos risques et périls !

• Abura-Akago :

• Kappa :

Vidéo :

• Akaatama :

 

• Kitsune:

Prêts à frissonner ?

• Le tunnel de Kitotaki:

Vidéos :

• Kuchisake-Onna :

Vidéo :

• Aokigahara :

Vidéos :

Que la chance soit avec vous !

• Maneki-Neko :

• Teru Teru Bōzu :

Vidéo :

• Daruma :

Plongez dans les sources...

• Le maître des Yôkais :

Vidéo :

"},"id":"38715100-a428-49da-8aa9-cc2d04e9a7d7","isHidden":false,"type":"text"}] ---- diff --git a/public/content/cohesion-des-mondes/5_test-avec-geoformat/2_roadtrip-a-vos-risques-et-perils/.regenerate-map-image b/public/content/cohesion-des-mondes/5_test-avec-geoformat/2_roadtrip-a-vos-risques-et-perils/.regenerate-map-image deleted file mode 100644 index c8d700e..0000000 --- a/public/content/cohesion-des-mondes/5_test-avec-geoformat/2_roadtrip-a-vos-risques-et-perils/.regenerate-map-image +++ /dev/null @@ -1 +0,0 @@ -1772466016 \ No newline at end of file diff --git a/public/content/cohesion-des-mondes/5_test-avec-geoformat/2_roadtrip-a-vos-risques-et-perils/map-static.png b/public/content/cohesion-des-mondes/5_test-avec-geoformat/2_roadtrip-a-vos-risques-et-perils/map-static.png index e6a1148..27629ef 100644 Binary files a/public/content/cohesion-des-mondes/5_test-avec-geoformat/2_roadtrip-a-vos-risques-et-perils/map-static.png and b/public/content/cohesion-des-mondes/5_test-avec-geoformat/2_roadtrip-a-vos-risques-et-perils/map-static.png differ diff --git a/public/content/cohesion-des-mondes/5_test-avec-geoformat/2_roadtrip-a-vos-risques-et-perils/map-static.png.txt b/public/content/cohesion-des-mondes/5_test-avec-geoformat/2_roadtrip-a-vos-risques-et-perils/map-static.png.txt index 577d333..6b24936 100644 --- a/public/content/cohesion-des-mondes/5_test-avec-geoformat/2_roadtrip-a-vos-risques-et-perils/map-static.png.txt +++ b/public/content/cohesion-des-mondes/5_test-avec-geoformat/2_roadtrip-a-vos-risques-et-perils/map-static.png.txt @@ -1 +1 @@ -Uuid: eozkssgjffkkux34 \ No newline at end of file +Uuid: rbrttd19ethtb0ue \ No newline at end of file diff --git a/public/site/cache/index.html b/public/site/cache/index.html deleted file mode 100644 index e69de29..0000000 diff --git a/public/site/templates/narrative.json.php b/public/site/templates/narrative.json.php index 6fbd992..1eedce0 100644 --- a/public/site/templates/narrative.json.php +++ b/public/site/templates/narrative.json.php @@ -22,6 +22,13 @@ function resolveFileUrl($field, $page) { return null; } +/** + * Supprime les

imbriqués dans les

  • (générés par Kirby pour les listes "loose") + */ +function stripParagraphsInListItems($html) { + return preg_replace('/
  • \s*

    (.*?)<\/p>\s*<\/li>/s', '

  • $1
  • ', $html); +} + /** * Résout les images dans le contenu HTML */ @@ -63,7 +70,7 @@ function parseBlocks($blocksField, $page) { switch ($block->type()) { case 'text': $blockData['content'] = [ - 'text' => resolveImagesInHtml($block->text()->value(), $page) + 'text' => stripParagraphsInListItems(resolveImagesInHtml($block->text()->value(), $page)) ]; break; @@ -87,7 +94,7 @@ function parseBlocks($blocksField, $page) { case 'list': $blockData['content'] = [ - 'text' => $block->text()->value() + 'text' => stripParagraphsInListItems($block->text()->value()) ]; break; diff --git a/src/composables/useElementSettings.js b/src/composables/useElementSettings.js index b6bbaea..6b24e9f 100644 --- a/src/composables/useElementSettings.js +++ b/src/composables/useElementSettings.js @@ -306,9 +306,11 @@ export function useElementSettings({ margin, padding, basePopup }) { getValue: () => bold.value ? 'bold' : (INLINE_DEFAULTS[currentTag.value]?.fontWeight || null), skip: () => !bold.value && !INLINE_DEFAULTS[currentTag.value]?.fontWeight && !hasInCss('font-weight') }, { css: 'font-size', group: 'fontSize', special: true, - getValue: () => `${fontSize.value}${fontSize.unit}` }, + getValue: () => `${fontSize.value}${fontSize.unit}`, + skip: () => isIndependentElement.value && !settingEnabled.fontSize && !hasInCss('font-size') }, { css: 'line-height', group: 'lineHeight', special: true, - getValue: () => `${lineHeight.value}${lineHeight.unit}` }, + getValue: () => `${lineHeight.value}${lineHeight.unit}`, + skip: () => isIndependentElement.value && !settingEnabled.lineHeight && !hasInCss('line-height') }, { css: 'text-align', group: 'textAlign', getValue: () => textAlign.value, skip: () => !settingEnabled.textAlign && !hasInCss('text-align') }, @@ -345,6 +347,10 @@ export function useElementSettings({ margin, padding, basePopup }) { const isInlineElement = computed(() => !!INLINE_DEFAULTS[currentTag.value]); + // Elements that don't inherit font-size/line-height from

    — fully independent of TextSettings p-level + const INDEPENDENT_TAGS = new Set(['li', 'ul', 'ol', 'dt', 'dd', 'dl', 'table', 'tr', 'td', 'th', 'caption', 'figure', 'figcaption', 'pre', 'blockquote']); + const isIndependentElement = computed(() => INDEPENDENT_TAGS.has(currentTag.value)); + // Check if the current selector has a CSS property in the store const hasInCss = (cssProp) => { if (!selector.value) return false; @@ -642,28 +648,33 @@ export function useElementSettings({ margin, padding, basePopup }) { } } - // Fallback to TextSettings defaults only if the selector doesn't already have the value + // Fallback to TextSettings defaults only if the selector doesn't already have the value. + // Independent elements (li, ul, ol, table...) don't inherit from

    — only body-level fallbacks apply. + const independent = isIndependentElement.value; + if (!settingEnabled.font && !settingCache.font) { if (!stylesheetStore.extractValue(selector.value, 'font-family')) { const ff = stylesheetStore.extractValue('body', 'font-family'); if (ff) fontFamily.value = (typeof ff === 'string' ? ff : ff.value).replace(/['"]/g, ''); } - if (!stylesheetStore.extractValue(selector.value, 'font-style')) { - const fs = stylesheetStore.extractValue('p', 'font-style'); - if (fs) italic.value = (typeof fs === 'string' ? fs : fs.value) === 'italic'; - } - if (!stylesheetStore.extractValue(selector.value, 'font-weight')) { - const fw = stylesheetStore.extractValue('p', 'font-weight'); - if (fw) { const v = typeof fw === 'string' ? fw : fw.value; bold.value = v === 'bold' || parseInt(v) >= 700; } + if (!independent) { + if (!stylesheetStore.extractValue(selector.value, 'font-style')) { + const fs = stylesheetStore.extractValue('p', 'font-style'); + if (fs) italic.value = (typeof fs === 'string' ? fs : fs.value) === 'italic'; + } + if (!stylesheetStore.extractValue(selector.value, 'font-weight')) { + const fw = stylesheetStore.extractValue('p', 'font-weight'); + if (fw) { const v = typeof fw === 'string' ? fw : fw.value; bold.value = v === 'bold' || parseInt(v) >= 700; } + } } } - if (!settingEnabled.fontSize && !settingCache.fontSize) { + if (!independent && !settingEnabled.fontSize && !settingCache.fontSize) { if (!stylesheetStore.extractValue(selector.value, 'font-size')) { const data = stylesheetStore.extractValue('p', 'font-size'); if (data && data.value !== undefined) { fontSize.value = data.value; fontSize.unit = data.unit; } } } - if (!settingEnabled.lineHeight && !settingCache.lineHeight) { + if (!independent && !settingEnabled.lineHeight && !settingCache.lineHeight) { if (!stylesheetStore.extractValue(selector.value, 'line-height')) { const data = stylesheetStore.extractValue('p', 'line-height'); if (data && data.value !== undefined) { lineHeight.value = data.value; lineHeight.unit = data.unit; }