Skip to content
Snippets Groups Projects
Commit 4b5d4e97 authored by Tom Teichler's avatar Tom Teichler :beers:
Browse files

Merge branch 'custom-carousel-color' into 'master'

Add custom carousel text color functionality

See merge request !2
parents 4b901c75 2f4842d6
No related branches found
No related tags found
1 merge request!2Add custom carousel text color functionality
...@@ -181,6 +181,14 @@ time.icon span { ...@@ -181,6 +181,14 @@ time.icon span {
max-height: 500px; max-height: 500px;
} }
.carousel-text-dark {
color: #000;
}
.carousel-text-light {
color: #fff;
}
.button-wrapper { .button-wrapper {
text-align: center; text-align: center;
} }
......
...@@ -5,10 +5,11 @@ ...@@ -5,10 +5,11 @@
<div class="carousel-inner"> <div class="carousel-inner">
{% for item in page.images %} {% for item in page.images %}
{% set image = item.split('|') %} {% set image = item.split('|') %}
{% set text = image[0].split(';;') %}
<div class="item {% if loop.first %} active {% endif %}"> <div class="item {% if loop.first %} active {% endif %}">
<img class="center-block carousel-image" src="{{ image[1] }}" alt="{{ image[0] }}"> <img class="center-block carousel-image" src="{{ image[1] }}" alt="{{ text[0] }}">
<div class="carousel-caption d-none d-md-block"> <div class="carousel-caption d-none d-md-block">
<h3>{{ image[0] }}</h3> <h3 class="carousel-text-{{ text[1] or 'light' }}">{{ text[0] }}</h3>
</div> </div>
</div> </div>
{% endfor %} {% endfor %}
......
...@@ -5,10 +5,11 @@ ...@@ -5,10 +5,11 @@
<div class="carousel-inner"> <div class="carousel-inner">
{% for item in page.images %} {% for item in page.images %}
{% set image = item.split('|') %} {% set image = item.split('|') %}
{% set text = image[0].split(';;') %}
<div class="item {% if loop.first %} active {% endif %}"> <div class="item {% if loop.first %} active {% endif %}">
<img class="center-block carousel-image" src="{{ image[1] }}" alt="{{ image[0] }}"> <img class="center-block carousel-image" src="{{ image[1] }}" alt="{{ text[0] }}">
<div class="carousel-caption d-none d-md-block"> <div class="carousel-caption d-none d-md-block">
<h3>{{ image[0] }}</h3> <h3 class="carousel-text-{{ text[1] or 'light' }}">{{ text[0] }}</h3>
</div> </div>
</div> </div>
{% endfor %} {% endfor %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment