Commit graph

103 commits

Author SHA1 Message Date
isUnknown
cb5d056b51 fix: restore TextSettings functionality after store refactoring
All checks were successful
Deploy / Build and Deploy to Production (push) Successful in 16s
Fixed TextSettings fields not updating the stylesheet and preview after
the store refactoring that made content a computed property.

- Add missing font watcher in TextSettings.vue
- Update useCssUpdater.js to use store.replaceBlock() instead of
  writing to readonly store.content
- Update createRule() to append to store.customCss instead of store.content

All TextSettings fields (font, size, margins, padding, alignment) now
correctly update the stylesheet and preview.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-09 16:42:34 +01:00
isUnknown
e42eeab437 feat: add scrollable CSS editor and complete stylesheet export
Add two improvements to StylesheetViewer:

1. Scrollable CSS sections
   - Add max-height (500px) and overflow-y to custom CSS editor
   - Applies to both read-only and editable modes
   - Improves UX when content exceeds viewport

2. Complete stylesheet export button
   - Exports merged base CSS + custom CSS to single file
   - Filename format: <narrative-slug>-style.print.css
   - Includes informative comments:
     * Header with narrative title and download date
     * Section markers for base CSS and custom CSS
   - Full-width button below custom CSS section
   - Download via blob + automatic cleanup

Export file structure:
- Header comment (narrative info, date)
- Base CSS section with comment
- Custom CSS section with comment

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-09 16:30:18 +01:00
isUnknown
f8ac1ec8fc untrack content 2026-01-09 16:22:56 +01:00
isUnknown
e88c217b1e feat: add CSS file import with drag & drop support
All checks were successful
Deploy / Build and Deploy to Production (push) Successful in 16s
Add CssFileImport component to StylesheetViewer allowing users to
import CSS files to replace custom CSS content.

Features:
- Click to select file via file dialog
- Drag & drop support with visual feedback
- File validation (.css only, max 1MB)
- Error messages for invalid files
- Direct replacement of customCss content

New component:
- src/components/ui/CssFileImport.vue

Integration:
- Added at top of StylesheetViewer
- Emits 'import' event with file content
- Content replaces customCss in store

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-09 14:41:56 +01:00
isUnknown
b692047ff2 fix: improve bidirectional sync between stylesheet and ElementPopup fields
All checks were successful
Deploy / Build and Deploy to Production (push) Successful in 17s
Replace content watcher with customCss watcher and add isEditing watcher
to properly sync field values when CSS is edited in StylesheetViewer.

Changes:
- Watch customCss instead of content for real-time updates
- Watch isEditing to reload values when exiting edit mode
- Use isUpdatingFromStore + nextTick to prevent circular updates
- Ensure popup fields stay in sync with stylesheet changes

Now when editing CSS manually in the Code tab, ElementPopup fields
update automatically when exiting edit mode.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-09 14:35:23 +01:00
isUnknown
93df05c49f feat: implement inheritance lock/unlock with CSS commenting system
All checks were successful
Deploy / Build and Deploy to Production (push) Successful in 16s
Add ability to lock/unlock inheritance for element styles while preserving
custom values. Locked styles are commented in the CSS and restored when unlocked.

New utilities:
- Create css-comments.js with comment/uncomment functions
- Add parseValueWithUnit to css-parsing.js for value parsing
- Add getBlockState, commentCssBlock, uncommentCssBlock to stylesheet store

ElementPopup improvements:
- Detect inheritance state from CSS block state (active/commented/none)
- Capture computed styles from iframe when unlocking with no custom CSS
- Comment/uncomment CSS blocks instead of deleting them on lock toggle
- Use nextTick to prevent race condition with watchers during popup init
- Extract values from both active and commented CSS blocks

Workflow:
1. First unlock: Capture computed styles → create CSS block
2. Lock: Comment the CSS block (styles preserved in comments)
3. Unlock again: Uncomment the block (styles restored)

Fixes issue where CSS rules were created on popup open due to
watcher race conditions during initialization.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-09 14:31:42 +01:00
isUnknown
b123e92da8 ci: add --delete flag to FTP mirror commands
Enable automatic deletion of remote files that no longer exist locally.
This ensures the production server stays in sync with the repository,
removing obsolete files like the renamed stylesheet.css.

Protected directories (accounts, cache, sessions) remain excluded.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-09 13:59:54 +01:00
isUnknown
0f46618066 feat: add custom CSS save system with dual-editor interface
All checks were successful
Deploy / Build and Deploy to Production (push) Successful in 16s
Implement complete custom CSS management system:
- Separate base CSS (readonly) and custom CSS (editable)
- Save custom CSS to Kirby backend per narrative
- Visual save button with state indicators (dirty/saving/success/error)
- CSRF-protected API endpoint for CSS operations
- Dual-editor StylesheetViewer (base + custom with edit mode toggle)
- Auto-format custom CSS with Prettier on edit mode exit

Backend changes:
- Add web2print Kirby plugin with POST/GET routes
- Add customCss field to narrative blueprint
- Add CSRF token meta tag in header
- Include customCss and modified timestamps in JSON template
- Install code-editor plugin for Kirby panel

Frontend changes:
- Refactor stylesheet store with baseCss/customCss refs
- Make content a computed property (baseCss + customCss)
- Add helper methods: replaceBlock, replaceInCustomCss, setCustomCss
- Update all components to use new store API
- Create SaveButton component with FAB design
- Redesign StylesheetViewer with collapsable sections
- Initialize store from narrative data on app mount

File changes:
- Rename stylesheet.css → stylesheet.print.css
- Update all references to new filename

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-09 13:39:25 +01:00
isUnknown
4d1183d1af narrative : fix data fetching (build URL from location)
All checks were successful
Deploy / Build and Deploy to Production (push) Successful in 17s
2026-01-09 10:53:08 +01:00
isUnknown
ccaec7cfed refactor: rename content files from recit.txt to narrative.txt
All checks were successful
Deploy / Build and Deploy to Production (push) Successful in 16s
Update all Kirby content files to use the new narrative template name.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-09 10:38:07 +01:00
isUnknown
3b59127fa9 untrack claude settings
All checks were successful
Deploy / Build and Deploy to Production (push) Successful in 17s
2026-01-09 10:36:14 +01:00
isUnknown
af788ad1e0 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>
2026-01-09 10:34:10 +01:00
isUnknown
ea0994ed45 Edit panel > numberInput : fix decrement function
All checks were successful
Deploy / Build and Deploy to Production (push) Successful in 17s
2026-01-09 10:14:45 +01:00
isUnknown
18e4efc59d docs: update CLAUDE.md with detailed project structure and conventions
All checks were successful
Deploy / Build and Deploy to Production (push) Successful in 15s
- Add comprehensive architecture documentation with all component folders
- Document placement conventions for blocks, editor panels, UI components
- Add CI/CD deployment details and excluded files
- Remove donorbox cache file from repository

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-08 16:22:32 +01:00
isUnknown
16f01681dc fix build : copy some styles
All checks were successful
Deploy / Build and Deploy to Production (push) Successful in 15s
2026-01-08 16:07:15 +01:00
isUnknown
3cc4da63fb add image docker
All checks were successful
Deploy / Build and Deploy to Production (push) Successful in 16s
2026-01-08 15:56:11 +01:00
isUnknown
a7918a35e2 update gitignore
All checks were successful
Deploy / Build and Deploy to Production (push) Successful in 29s
2025-12-12 13:09:06 +01:00
isUnknown
10660e92bb merge
All checks were successful
Deploy / Build and Deploy to Production (push) Successful in 28s
2025-12-12 13:08:02 +01:00
isUnknown
bb215b04da merge styles
All checks were successful
Deploy / Build and Deploy to Production (push) Successful in 29s
2025-12-12 12:26:39 +01:00
isUnknown
236a606a42 chore: exclude CSS source files from production deployment
All checks were successful
Deploy / Build and Deploy to Production (push) Successful in 29s
2025-12-11 13:48:09 +01:00
isUnknown
d484915c16 Revert "fix: use HEREDOC for lftp script to handle special chars in password"
All checks were successful
Deploy / Build and Deploy to Production (push) Successful in 28s
This reverts commit 6c421ce628.
2025-12-11 13:45:46 +01:00
isUnknown
8ddac25d5c Revert "fix: pass FTP credentials as lftp arguments instead of script"
This reverts commit 0b1a759e5e.
2025-12-11 13:45:46 +01:00
isUnknown
0b1a759e5e fix: pass FTP credentials as lftp arguments instead of script 2025-12-11 13:42:41 +01:00
isUnknown
6c421ce628 fix: use HEREDOC for lftp script to handle special chars in password
All checks were successful
Deploy / Build and Deploy to Production (push) Successful in 27s
2025-12-11 13:41:24 +01:00
isUnknown
052c6958f3 feat: configure CI/CD with Forgejo Actions
Some checks failed
Deploy / Build and Deploy to Production (push) Failing after 26s
- Add Forgejo workflow for automated build and deploy
- Build creates dist/ from public/ then adds Vue app build
- Configure Vite to build to dist/assets/dist with fixed filenames
- Deploy entire dist/ directory to production via FTP
- Add workflow documentation with FTP setup instructions

The workflow mirrors the GitLab CI approach: dist/ is created during build
and synchronized to production root on every push to main.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-11 13:39:32 +01:00
isUnknown
5fb9cf68a3 merge 2025-12-11 13:39:23 +01:00
isUnknown
4ae4a6d509 merge 2025-12-11 13:38:27 +01:00
isUnknown
06aef5beb3 refactor: replace MarginEditor with linked margin fields in TextSettings
- Replace MarginEditor component with individual fields (top/bottom/left/right)
- Add link/unlink button with SVG icons to sync margin values
- When linked, all fields share the same value
- Auto-detect linked state when loading from stylesheet
- Match PageSettings UI pattern for consistency

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 13:37:59 +01:00
Julie Blanc
c6873ff7e0 color darker 2025-12-10 15:16:15 +01:00
Julie Blanc
8b5f1129f0 reverse colors 2025-12-10 15:15:43 +01:00
Julie Blanc
a42f5e48ca popup style 2025-12-10 13:48:45 +01:00
isUnknown
0eb4ed21e3 editor panel : pointer events all on close button 2025-12-10 13:38:34 +01:00
isUnknown
e4b3188aff editor panel : pointer events none when closed 2025-12-10 13:37:55 +01:00
Julie Blanc
d88758b226 filed font-size 2025-12-10 13:29:14 +01:00
isUnknown
6b578012b7 feat: restrict element selection to text elements only
- Remove containers (section, div, article, etc.) from selectable elements
- Remove media elements (img, figure, ul, ol, table) from selection
- Keep text elements: headings, paragraphs, links, formatting tags
- Add figcaption as selectable, remove span

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 13:28:35 +01:00
isUnknown
0b511389da style: update popup width and document styles
- Change popup width from 800px to 71rem for better scaling
- Add DM Sans as default body font
- Set h1 font-size to 3rem
- Reduce paragraph bottom margin from 10mm to 5mm
- Add link styles (purple color, no underline)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 13:22:12 +01:00
isUnknown
d795c08ace fix: show element-specific values in commented CSS preview
- Preview now includes all field values, not filtering defaults
- Commented CSS shows what would be applied with current field values
- Applies to both ElementPopup and PagePopup

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 13:14:48 +01:00
isUnknown
76274fff04 feat: apply field values when unlocking inheritance
- Unlocking now creates CSS block with current field values
- Locking removes CSS block to restore general styles
- Show commented CSS preview when inheritance is locked
- Preview displays what would be applied if unlocked

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 12:11:53 +01:00
isUnknown
d9f3ede661 feat: persist inheritance lock state per element via data attribute
- Store unlock state in data-inheritance-unlocked attribute on DOM element
- Each element/page now remembers its own inheritance state
- Re-locking removes element-specific CSS block to restore inheritance
- Elements revert to general styles from TextSettings/PageSettings

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 12:04:58 +01:00
isUnknown
668d950518 fix: auto-create CSS rules when selector or property is missing
updateCssValue now handles three cases:
- Selector doesn't exist: creates the full block with property
- Selector exists but property missing: adds property to block
- Property exists: updates the value

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 11:59:09 +01:00
isUnknown
681517db21 refactor: extract debounce logic into shared composable
- Create useDebounce composable to avoid code duplication
- Apply debounce to TextSettings margin/padding inputs
- Harmonize debounce delay to 500ms across all components
- Fix input lag when typing values like "30mm"

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 11:51:53 +01:00
isUnknown
35c9ab1d3b merge 2025-12-10 11:35:59 +01:00
isUnknown
ceaf318272 improve default styles 2025-12-10 11:35:37 +01:00
Julie Blanc
ea755a2dc6 colors on label 2025-12-10 11:10:14 +01:00
Julie Blanc
718aae2c23 styles w/ differents colors 2025-12-09 17:08:40 +01:00
Julie Blanc
678698b55d fonts & colors 2025-12-09 14:05:53 +01:00
isUnknown
790eb7414e feat: integrate Kirby CMS data with Vue print editor
- Add JSON content representation template (recit.json.php)
- Create virtual /print page plugin for recit pages
- Add recit.php base template for content representation
- Create Pinia store for recit data management
- Add block components (text, heading, image, list, quote, video, map)
- Update PagedJsWrapper for dynamic content rendering with data-page-type
- Modify header.php to pass recit JSON URL via data attribute
- Update App.vue to load recit data on mount

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 18:01:01 +01:00
isUnknown
446b6cd9e7 feat: add page template hover label
Add visual feedback for hovered page templates:
- Display "@page {templateName}" label on page edge hover
- Label positioned at top-left of page with 30% opacity
- Orange background matching page highlight color
- Automatically removed when hovering elements or clicking

Ensures consistent UX between page and element hover states.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 16:41:13 +01:00
isUnknown
5b5c65722b fix: improve element label positioning and state management
- Fix element label positioning using getBoundingClientRect + scroll offset
- Filter out state classes from element selectors (element-hovered, etc.)
- Add cursor pointer on hovered elements and pages
- Prevent elements from having both hovered and selected classes
- Fix issue where closing popup left previous element in hovered state

Ensures only one visual state per element at a time and cleaner
selector display in labels.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 16:35:28 +01:00
isUnknown
f9e9e65712 feat: add element hover label and refactor to use CSS classes
Add visual feedback for hovered elements:
- Display element selector label (e.g., "p", "h1.title") on hover
- Label positioned at top-left of element with 30% opacity

Refactor all hover/selection styles to use CSS classes instead of inline styles:
- .page-hovered, .page-selected for page states
- .element-hovered, .element-selected for element states
- .element-hover-label for the floating label

This improves maintainability and separation of concerns by moving
styling logic to CSS files instead of JavaScript.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 16:26:39 +01:00