contao-components / swipe

JavaScript touch slider with additional dot menu
5 stars 2 forks source link

Use actual page numbers for the menu #2

Open MatthiasBusch opened 7 years ago

MatthiasBusch commented 7 years ago

In my opinion it would be better to use the actual page numbers for the slider menu instead of '•'. They make much more sense from a syntax perspective and you can more easily adjust them to your needs.

You could still style it the way it is now using css, but would be more flexible

0xhtml commented 1 year ago

You could still style it the way it is now using css

Or the other way around. CSS to turn the way it is now into page numbers:

.slider-menu {
    counter-reset: slider-counter;
}
.slider-menu b {
    color: transparent !important;
}
.slider-menu b::before {
    content: counter(slider-counter);
    counter-increment: slider-counter;
    color: #bbb;
}
.slider-menu b.active::before {
    color: #666;
}