diff --git a/static/css/style.css b/static/css/style.css index 048861d86ead5c571774f78442b458160cd71edf..f4027cc38f5de8c9de9424928fcd320a5b3455b7 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -181,6 +181,14 @@ time.icon span { max-height: 500px; } +.carousel-text-dark { + color: #000; +} + +.carousel-text-light { + color: #fff; +} + .button-wrapper { text-align: center; } diff --git a/templates/page_with_carousel.html b/templates/page_with_carousel.html index 9cbb8e21e36119c16cb40ec8444bbc209a94dffc..c6901277ad070ca68c92c2676e8a33d60477fb1f 100644 --- a/templates/page_with_carousel.html +++ b/templates/page_with_carousel.html @@ -5,10 +5,11 @@ <div class="carousel-inner"> {% for item in page.images %} {% set image = item.split('|') %} + {% set text = image[0].split(';;') %} <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"> - <h3>{{ image[0] }}</h3> + <h3 class="carousel-text-{{ text[1] or 'light' }}">{{ text[0] }}</h3> </div> </div> {% endfor %} diff --git a/templates/page_with_carousel_button.html b/templates/page_with_carousel_button.html index 4ac97964e7c4e7e70d963af95bdd05ae1ae70e63..8c67ec6c946bc26607c444a4097221c42687a600 100644 --- a/templates/page_with_carousel_button.html +++ b/templates/page_with_carousel_button.html @@ -5,10 +5,11 @@ <div class="carousel-inner"> {% for item in page.images %} {% set image = item.split('|') %} + {% set text = image[0].split(';;') %} <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"> - <h3>{{ image[0] }}</h3> + <h3 class="carousel-text-{{ text[1] or 'light' }}">{{ text[0] }}</h3> </div> </div> {% endfor %}