mirror of
https://github.com/pmoreno-rodriguez/grav-theme-future2021.git
synced 2025-06-07 20:08:54 +00:00
Added color class for boxes
This commit is contained in:
parent
8bf699956e
commit
bff3e1e352
1 changed files with 2 additions and 1 deletions
|
@ -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 }}"/>
|
||||||
|
|
Loading…
Add table
Reference in a new issue