Allow setting spoiler style via shortcode, move glass shadow to a CSS variable

This commit is contained in:
daudix
2024-09-16 01:36:47 +03:00
parent 1ea78723a9
commit f570d1dd74
12 changed files with 70 additions and 33 deletions

View File

@ -161,6 +161,8 @@ Available variables are:
- `pixels`: Uses nearest neighbor algorithm for scaling, useful for keeping pixel-art sharp.
- `transparent`: Removes rounded corners and shadow, useful for images with transparency.
- `no_hover`: Removes zoom on hover.
- `spoiler`: Blurs image until hovered over/pressed on, useful for plot rich game screenshots.
- `spoiler` with `solid`: Ditto, but makes the image completely hidden.
```jinja2
{{/* image(url="image.png", alt="This is an image" no_hover=true) */}}
@ -176,6 +178,11 @@ Available variables are:
<figcaption>Image with compressed version, an alt text, and without zoom on hover</figcaption>
</figure>
<figure>
{{ image(url="https://files.catbox.moe/lk7nee.jpg", alt="Portal Gun blueprint", spoiler=true) }}
<figcaption>Image with an alt text, hidden behind a spoiler</figcaption>
</figure>
Alternatively, you can append the following URL anchors. It can be more handy in some cases, e.g. such images will render normally in any Markdown editor, opposed to the Zola shortcodes.
- `#full`: Forces image to be full-width.