Files
roro9stack/site/templates/shortcodes/diagram.html
T
twislaandClaude Sonnet 5.5 6e54658ba4
Site / build (pull_request) Successful in 9s
Site: the devlog, the blog's roro9stack posts in the site's style; Devlog replaces Blog in the navigation
Seven posts imported into site/content/devlog/ with their text unchanged,
links between them pointing to /devlog/, and shortcodes (sign, cast, steps,
asides, folded sections, diagrams, captions) restyled in the site's palette.
The 17 inline SVG diagrams carried <style> blocks and style attributes the
site's Content-Security-Policy refuses: their rules moved to
devlog-diagrams.css, and a diagram's minimum width is a class. An Atom feed
at /devlog/atom.xml.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT
2026-10-06 20:51:33 +02:00

14 lines
753 B
HTML

{#- An SVG diagram from a file next to the post, inlined so it follows the page's colours and dark mode:
{{ diagram(src="architecture.svg", caption="…", min_width=580) }}
min_width: narrower than this, the diagram scrolls sideways instead of shrinking. It is a class (mw-580,
in devlog.css), because the site's Content-Security-Policy refuses style attributes. The SVGs carry no
<style> block either: their rules are in devlog-diagrams.css. -#}
<figure class="arch">
<div class="canvas{% if min_width %} mw-{{ min_width }}{% endif %}">
{{ load_data(path=page.colocated_path ~ src, format="plain") | safe }}
</div>
{%- if caption %}
<figcaption>{{ caption | markdown(inline=true) | safe }}</figcaption>
{%- endif %}
</figure>