Art: full-image thumbnails, detail page with copy-to-clipboard

- gallery thumbnails now object-fit: contain (whole image, letterboxed),
  and a card links to the new detail page instead of the raw file
- /art/{id} detail page: large uncropped image, "Open full size",
  "Delete" (moved here from the gallery), and "Copy image"
- clipboard Stimulus controller copies the image to the OS clipboard
  (converts non-PNG via canvas) for pasting into WhatsApp etc.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Frank
2026-09-06 16:53:49 +02:00
co-authored by Claude Sonnet 5
parent f04c8ccc51
commit ed22b81e97
5 changed files with 147 additions and 19 deletions
+6
View File
@@ -74,6 +74,12 @@ class ArtController extends AbstractController
return $this->render('art/upload.html.twig', ['form' => $form]);
}
#[Route('/art/{id}', name: 'app_art_show', requirements: ['id' => '\d+'], methods: ['GET'])]
public function show(Artwork $artwork): Response
{
return $this->render('art/show.html.twig', ['art' => $artwork]);
}
#[Route('/art/{id}/file', name: 'app_art_file', requirements: ['id' => '\d+'], methods: ['GET'])]
public function serve(Artwork $artwork): BinaryFileResponse
{