diff --git a/sass/components/_example.scss b/sass/components/_example.scss index 199a2215f0..8b454406a3 100644 --- a/sass/components/_example.scss +++ b/sass/components/_example.scss @@ -47,6 +47,11 @@ text-align: right; } + &__explanation { + padding-inline: 16px; + margin-block: 32px; + } + &__code-tabs { margin-top: 16px; } diff --git a/sass/components/_tabs.scss b/sass/components/_tabs.scss index 2825057401..8f7d6e7165 100644 --- a/sass/components/_tabs.scss +++ b/sass/components/_tabs.scss @@ -17,6 +17,7 @@ padding: 12px $h-padding; position: relative; border-radius: 8px; + user-select: none; &:hover { background-color: var(--tabs-bg-hover-color); @@ -38,6 +39,10 @@ right: $h-padding; transition: background-color $duration; } + + code { + font-size: 0.9em; + } } &__panel { diff --git a/templates/layouts/example.html b/templates/layouts/example.html index 7105551770..7ad1fe50fa 100644 --- a/templates/layouts/example.html +++ b/templates/layouts/example.html @@ -24,11 +24,15 @@

{{ category.title }} / {{ page.title }}

{% block callout %}{% endblock callout %} - + {% if page.content %} +
+ {{ page.content | safe }} +
+ {% endif %}
{% set filename = page.extra.code_path | split(pat="/") | last %} - +
{% set code = load_data(path=page.extra.code_path) %} @@ -39,7 +43,7 @@

{{ category.title }} / {{ page.title }}

{% for shader in page.extra.shader_code_paths %} - +
{% set code = load_data(path="static/assets/examples/" ~ shader) %}