canonical / vanilla-framework

From community websites to web applications, this CSS framework will help you achieve a consistent look and feel.
https://vanillaframework.io
GNU Lesser General Public License v3.0
850 stars 169 forks source link

Show Jinja Macro usage in pattern code snippets #5321

Closed jmuzina closed 2 months ago

jmuzina commented 3 months ago

Done

Fixes #5254
Fixes #5332 Fixes WD-13705

QA

Check if PR is ready for release

If this PR contains Vanilla SCSS code changes, it should contain the following changes to make sure it's ready for the release:

Screenshots

Screenshot 2024-08-22 at 2 31 36 PM Screenshot 2024-08-22 at 2 31 45 PM
webteam-app commented 3 months ago

Demo

Jenkins

demos.haus

jmuzina commented 3 months ago

Added the base behavior of showing both Jinja and HTML in the docs. This needs to be accompanied by the following:

FYI @pastelcyborg @advl

jmuzina commented 3 months ago

Updated this to syntax-highlight the HTML within macro slots, as I noticed they weren't highlighted in #5331

jmuzina commented 3 months ago

I'm not sure I'd default to showing Jinja for the examples with macros - I think HTML is always the best default. We should probably assume our default user is external and would get limited value out of the macros.

Good call, switched so HTML is the default rather than Jinja

bartaz commented 2 months ago

I think if there is Jinja available, it should be shown as default.

jmuzina commented 2 months ago

I think if there is Jinja available, it should be shown as default.

Switched back to using Jinja as default if it is found per MM discussion