Générateur de portfolios PDF Figures Libres (app Nuxt autonome)
App Nuxt 3 + Nuxt UI qui lit les projets du CMS Grav et compose des portfolios A3 paysage exportés en PDF (gabarit book_v3) : composeur WYSIWYG, templates cover/toc/projet/grille/page libre, pipeline Playwright + Ghostscript, gel du contenu à la génération, partage public opt-in. Dépôt autonome : Dockerfile (base Playwright + Ghostscript + ffmpeg + rsync) inclus. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
10
server/api/projects/[...id].get.ts
Normal file
10
server/api/projects/[...id].get.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { useContentSource } from '../../lib/content-source'
|
||||
|
||||
export default defineEventHandler(async (event) => {
|
||||
const id = decodeURIComponent(getRouterParam(event, 'id') ?? '')
|
||||
const project = await useContentSource().getProject(id)
|
||||
if (!project) {
|
||||
throw createError({ statusCode: 404, statusMessage: 'Projet introuvable' })
|
||||
}
|
||||
return project
|
||||
})
|
||||
7
server/api/projects/index.get.ts
Normal file
7
server/api/projects/index.get.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { useContentSource } from '../../lib/content-source'
|
||||
|
||||
export default defineEventHandler(async () => {
|
||||
const source = useContentSource()
|
||||
const projects = await source.listProjects()
|
||||
return { projects }
|
||||
})
|
||||
Reference in New Issue
Block a user