shortcodes: Add svg

This short code allows an SVG to be embedded directly into the HTML
document.  This is preferable to using an `<img>` or `<object>` tag
because it allows the SVG document to inherit the style from HTML
document.
This commit is contained in:
2025-10-15 20:08:54 -05:00
parent 0446a7a53c
commit 786290a29c
2 changed files with 17 additions and 9 deletions

View File

@@ -13,6 +13,16 @@ $panel-color: $primary-color-dark;
$panel-color-dark: $primary-color-darker;
$toolbar-color: $primary-color;
$font-family:
"DejaVu Sans",
"Lucida Sans",
"Lucida Sans Regular",
"Lucida Grande",
"Lucida Sans Unicode",
Geneva,
Verdana,
sans-serif;
@font-face {
font-family: "DejaVu Sans";
font-weight: 100;
@@ -65,15 +75,7 @@ body {
display: flex;
flex-direction: column;
min-height: 100vh;
font-family:
"DejaVu Sans",
"Lucida Sans",
"Lucida Sans Regular",
"Lucida Grande",
"Lucida Sans Unicode",
Geneva,
Verdana,
sans-serif;
font-family: $font-family;
}
body.index {
@@ -109,6 +111,10 @@ span#n0 {
font-family: "DejaVu Sans Mono", monospace, monospace;
}
svg text {
font-family: $font-family;
}
/* Header */
@media only screen and (min-width: 800px) {

View File

@@ -0,0 +1,2 @@
{% set svg = load_data(path=path) %}
{{ svg | safe }}