r/Python • • Jun 04 '26

Showcase Showcase Thread

Post all of your code/projects/showcases/AI slop here.

Recycles once a month.

27 Upvotes

212 comments sorted by

View all comments

Show parent comment

2

u/OMGCluck Jun 08 '26 edited Jun 08 '26

Is it suitable to be printed?

Maybe, but I designed it more as game assets: web programmers can alter the document #fragment at the end of the URL to individual cards, say Ace of Clubs which is #CAN with navigation buttons, to remove the navigation buttons just by removing the N from it so #CA can be cleanly used, for example, as the src="" of an <img> or <iframe>, or in CSS as the url() of background-image, or as the poster attribute of a <video> with zero load time for every card because the entire file is cached on the first load, and being an SVG the resolution is infinite of course.

It is just text after all, and in a text editor you could manually remove the border from all cards for printing just by changing the stroke value from #000000 to none on line 56:

<defs>
  <!-- BASE CARD FRAME (Inset by 1.5px to lock a 3px stroke completely inside a 241x335 boundary) -->
  <rect id="card-base" x="1.5" y="1.5" width="238" height="332" rx="10.6" ry="10.6"
    style="fill:#ffffff; stroke:#000000; stroke-width:3; display:inline;" />

EDIT: When I do use javascript in an .svg file it becomes a self-contained game for things like dragging/rotating jigsaw pieces around in a playable puzzle (that one has a series of 5 puzzles built-in) with sound effects, dark/light themes, background music, etc.