Added color class for boxes

This commit is contained in:
pmoreno.rodriguez 2024-08-11 23:22:22 +02:00
parent 8bf699956e
commit bff3e1e352

View file

@ -1,4 +1,5 @@
{#{% set boxStyle = shortcode.getParameter('style', '') %}#} {#{% set boxStyle = shortcode.getParameter('style', '') %}#}
{% set boxColor = shortcode.getParameter('color', 'primary') %}
{% set boxHeading = shortcode.getParameter('heading', shortcode.getBbCode()) %} {% set boxHeading = shortcode.getParameter('heading', shortcode.getBbCode()) %}
{% set boxLevel = shortcode.getParameter('level', '3') %} {% set boxLevel = shortcode.getParameter('level', '3') %}
{% set boxImage = shortcode.getParameter('image', '') %} {% set boxImage = shortcode.getParameter('image', '') %}
@ -15,7 +16,7 @@
{% set pagePath = uri.route(true) %} {% set pagePath = uri.route(true) %}
{% set imagePath = pagePath ~ '/' ~ boxImage %} {% set imagePath = pagePath ~ '/' ~ boxImage %}
<article class="box"> <article class="box {{ boxColor }}">
{% if boxImage %} {% if boxImage %}
<span class="image fit"> <span class="image fit">
<img src="{{ imagePath }}" alt="{{ boxImageAlt }}" title="{{ boxImageTitle }}"/> <img src="{{ imagePath }}" alt="{{ boxImageAlt }}" title="{{ boxImageTitle }}"/>