Skip to content
Snippets Groups Projects
Commit ec60411c authored by Andreas Gärtner's avatar Andreas Gärtner
Browse files

Add configuration option for max carousel inner item width

parent 2acc9d22
1 merge request!39Flashcards revisited
......@@ -108,6 +108,12 @@ Ext.define('ARSnova.view.CustomCarousel', {
screenWidth = (window.innerWidth > 0) ? window.innerWidth : screen.width,
showNavigationElements = screenWidth >= 840 && innerItemCount > 0 && activeIndex !== -1;
if (showNavigationElements) {
this.addCls('setMaxCaruselWidth');
} else {
this.removeCls('setMaxCaruselWidth');
}
if (showNavigationElements && activeIndex !== 0) {
this.leftArrow.removeCls('hidden');
} else {
......
......@@ -207,7 +207,8 @@ $statistics-incorrect-color: $brand-danger;
$statistics-abstention-color: $default-grey-color;
/** carousel indicator and navigation color configuration **/
/** carousel width, indicator and navigation configuration **/
$carousel-inner-max-width: 85%;
$carousel-indicator-color: $brand-primary;
$carousel-indicator-active-color: $brand-secondary;
$carousel-indicator-unanswered-question-color: $brand-warning;
......
......@@ -726,3 +726,9 @@ code {
margin: 8px;
}
}
.setMaxCaruselWidth {
.x-container.x-form {
max-width: $carousel-inner-max-width;
}
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment