@talentsoft-opensource/uxp-themes
Version:
Talentsoft UX themes
56 lines (47 loc) • 1.54 kB
JavaScript
import NavbarVertical from './Navbar-vertical-navigation'
import NavbarHorizontal from './Navbar-horizontal-navigation'
import Sticky from './Sticky'
import Menu from './Menu'
import ListDropdown from './List-dropdown'
import Chart from './Chart'
import Helpers from './Helpers'
import ScrollAction from './ScrollAction'
import PerfectScrollbar from 'perfect-scrollbar'
import Comments from './Comments'
let Polyfill = new Helpers()
//Init Polyfill for IE11 => forEach
Polyfill.polyfillForeach()
//Init Chart
new Chart()
new ScrollAction()
const wrapperTimelineComments = document.querySelector('.timeline__overflow')
new Comments(wrapperTimelineComments)
//Active Scrollbar
let $elementScroll = document.querySelectorAll('.scrollbar--active')
$elementScroll.forEach(($item) => {
let scrollbar = new PerfectScrollbar($item, {
wheelPropagation: false,
minScrollbarLength: 20
})
scrollbar.update()
})
//Init Menu Panel
new Menu('.panel-header__menu')
new Menu('.menu-actions__menu')
new Menu('.feedback__button-more')
new NavbarHorizontal()
new NavbarVertical(65)
new ListDropdown()
//Init Sticky menu
const $menuScrollTo = document.querySelector('.sticky--nav')
new Sticky($menuScrollTo, {
className: 'navbar--sticky',
elementAddClass: null
})
//Init Sticky menu
const $menuFixed = document.querySelector('.navbar-profil')
const $whereAddClass = document.querySelector('.sticky__navbar-profil')
new Sticky($menuFixed, {
className: 'navbar-profil--sticky',
elementAddClass: $whereAddClass
})