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>
This commit is contained in:
parent
446b6cd9e7
commit
790eb7414e
17 changed files with 807 additions and 56 deletions
33
public/site/templates/recit.php
Normal file
33
public/site/templates/recit.php
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
/**
|
||||
* Template pour afficher un récit
|
||||
* Ce template est requis pour que recit.json.php fonctionne
|
||||
*/
|
||||
?>
|
||||
<?php snippet('header') ?>
|
||||
|
||||
<article class="recit">
|
||||
<h1><?= $page->title() ?></h1>
|
||||
|
||||
<?php if ($page->author()->isNotEmpty()): ?>
|
||||
<p class="author"><?= $page->author() ?></p>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($page->cover()->isNotEmpty()): ?>
|
||||
<figure class="cover">
|
||||
<?php if ($cover = $page->cover()->toFile()): ?>
|
||||
<img src="<?= $cover->url() ?>" alt="">
|
||||
<?php endif ?>
|
||||
</figure>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($page->introduction()->isNotEmpty()): ?>
|
||||
<div class="introduction">
|
||||
<?= $page->introduction() ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<p><a href="<?= $page->url() ?>/print">Ouvrir l'éditeur d'impression</a></p>
|
||||
</article>
|
||||
|
||||
<?php snippet('footer') ?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue