Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions library/javascript/components/slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,16 +123,25 @@ document.addEventListener('DOMContentLoaded', function (e) {

const leftArrowElement = document.createElement('img')
leftArrowElement.className = 'arrow'
leftArrowElement.setAttribute('src', leftArrow)
leftArrowElement.setAttribute('data-icon', 'carouselleft')
leftArrowElement.classList.add('ui')
leftArrowElement.classList.add('icon')
leftArrowElement.classList.add('prev')
leftArrowElement.classList.add('icon_image')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the class icon_image already there? Was it that since it was not include the arrows used yo work bad?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all the class names that I have added are present in the other dark mode arrows too. But the actual classes that are responsible for the dark mode feature are "icon" and "data-icon"

leftArrowContainer.appendChild(leftArrowElement)

const rightArrowContainer = document.createElement('div')
rightArrowContainer.className = 'right-arrow-container'

const rightArrowElement = document.createElement('img')
rightArrowElement.className = 'arrow'
rightArrowElement.setAttribute('src', rightArrow)
rightArrowElement.setAttribute('data-icon', 'carouselright')
rightArrowElement.classList.add('ui')
rightArrowElement.classList.add('icon')
rightArrowElement.classList.add('next')
rightArrowElement.classList.add('icon_image')
rightArrowContainer.appendChild(rightArrowElement)
loadIcons()

sliders[i].appendChild(leftArrowContainer)
sliders[i].appendChild(container)
Expand Down