refactor: rename 'recit' to 'narrative' for English code naming
- Rename store: recit.js → narrative.js (useRecitStore → useNarrativeStore) - Rename templates: recit.php/json.php → narrative.php/json.php - Rename blueprint: recit.yml → narrative.yml - Update all imports and references in Vue/JS files - Update PHP template references and data attributes - Update CLAUDE.md documentation - Create comprehensive README.md with English-French dictionary The dictionary section maps English code terms to French content terms for easier navigation between codebase and CMS content. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
ea0994ed45
commit
af788ad1e0
12 changed files with 267 additions and 66 deletions
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<!-- Fallback static content when no recit data -->
|
||||
<template v-if="!hasRecitData">
|
||||
<!-- Fallback static content when no narrative data -->
|
||||
<template v-if="!hasNarrativeData">
|
||||
<section class="chapter">
|
||||
<p>
|
||||
Accumsan arcu tristique purus eros pellentesque rutrum hendrerit
|
||||
|
|
@ -10,13 +10,13 @@
|
|||
</section>
|
||||
</template>
|
||||
|
||||
<!-- Dynamic content from recit -->
|
||||
<!-- Dynamic content from narrative -->
|
||||
<template v-else>
|
||||
<template v-for="item in flattenedContent" :key="item.id">
|
||||
<!-- Récit (cover page) -->
|
||||
<!-- Narrative (cover page) -->
|
||||
<section
|
||||
v-if="item.template === 'recit'"
|
||||
class="recit-cover"
|
||||
v-if="item.template === 'narrative'"
|
||||
class="narrative-cover"
|
||||
:data-page-type="item.template"
|
||||
>
|
||||
<img v-if="item.cover" :src="item.cover" class="cover-image" alt="" />
|
||||
|
|
@ -75,7 +75,7 @@
|
|||
|
||||
<script setup>
|
||||
import { computed } from 'vue';
|
||||
import { useRecitStore } from '../stores/recit';
|
||||
import { useNarrativeStore } from '../stores/narrative';
|
||||
import {
|
||||
TextBlock,
|
||||
HeadingBlock,
|
||||
|
|
@ -87,10 +87,10 @@ import {
|
|||
blockComponents
|
||||
} from './blocks';
|
||||
|
||||
const recitStore = useRecitStore();
|
||||
const narrativeStore = useNarrativeStore();
|
||||
|
||||
const hasRecitData = computed(() => recitStore.data !== null);
|
||||
const flattenedContent = computed(() => recitStore.flattenedContent);
|
||||
const hasNarrativeData = computed(() => narrativeStore.data !== null);
|
||||
const flattenedContent = computed(() => narrativeStore.flattenedContent);
|
||||
|
||||
// Filter out hidden blocks
|
||||
const visibleBlocks = (blocks) => {
|
||||
|
|
@ -114,24 +114,24 @@ const getBlockComponent = (type) => {
|
|||
|
||||
<style>
|
||||
/* Base print styles for content sections */
|
||||
.recit-cover,
|
||||
.narrative-cover,
|
||||
.geoformat,
|
||||
.chapitre,
|
||||
.carte {
|
||||
break-before: page;
|
||||
}
|
||||
|
||||
.recit-cover .cover-image,
|
||||
.narrative-cover .cover-image,
|
||||
.geoformat .cover-image {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.recit-cover h1 {
|
||||
.narrative-cover h1 {
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
.recit-cover .author {
|
||||
.narrative-cover .author {
|
||||
font-style: italic;
|
||||
color: #666;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue