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,7 +1,7 @@
|
|||
import { defineStore } from 'pinia';
|
||||
import { ref, computed } from 'vue';
|
||||
|
||||
export const useRecitStore = defineStore('recit', () => {
|
||||
export const useNarrativeStore = defineStore('narrative', () => {
|
||||
const data = ref(null);
|
||||
const loading = ref(false);
|
||||
const error = ref(null);
|
||||
|
|
@ -19,10 +19,10 @@ export const useRecitStore = defineStore('recit', () => {
|
|||
|
||||
const items = [];
|
||||
|
||||
// Add recit intro as first section
|
||||
// Add narrative intro as first section
|
||||
items.push({
|
||||
id: data.value.id,
|
||||
template: 'recit',
|
||||
template: 'narrative',
|
||||
title: data.value.title,
|
||||
author: data.value.author,
|
||||
cover: data.value.cover,
|
||||
|
|
@ -72,10 +72,10 @@ export const useRecitStore = defineStore('recit', () => {
|
|||
return items;
|
||||
});
|
||||
|
||||
// Load recit data from URL
|
||||
const loadRecit = async (url) => {
|
||||
// Load narrative data from URL
|
||||
const loadNarrative = async (url) => {
|
||||
if (!url) {
|
||||
error.value = 'No recit URL provided';
|
||||
error.value = 'No narrative URL provided';
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -91,7 +91,7 @@ export const useRecitStore = defineStore('recit', () => {
|
|||
|
||||
data.value = await response.json();
|
||||
} catch (e) {
|
||||
console.error('Error loading recit:', e);
|
||||
console.error('Error loading narrative:', e);
|
||||
error.value = e.message;
|
||||
data.value = null;
|
||||
} finally {
|
||||
|
|
@ -121,7 +121,7 @@ export const useRecitStore = defineStore('recit', () => {
|
|||
flattenedContent,
|
||||
|
||||
// Actions
|
||||
loadRecit,
|
||||
loadNarrative,
|
||||
reset
|
||||
};
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue