animate.css/docs/main.mjs
Mehmet Sağır 3d9aef2ba6
Dark Mode (#1217)
* corrections were made

* added dark-mode

* back-to-top-button added

* back-to-top button edited

* back-to-top button edited

* last edit

* last edit

* arrangements were made

* dark-mode-button-updated

* dark-mode-option-added
2021-07-06 11:12:49 +01:00

28 lines
975 B
JavaScript

import buildDocsIndex from './modules/buildDocsIndex.mjs';
import playground from './modules/playground.mjs';
import startAnimations from './modules/startAnimations.mjs';
import toggleOnClick from './modules/toggle.mjs';
import darkModeControl from './modules/darkMode.mjs';
buildDocsIndex();
playground();
darkModeControl();
toggleOnClick('.callout-showList', 'html', 'animationList-active');
toggleOnClick('.callout-hideList', 'html', 'animationList-active');
toggleOnClick('.hamburger', 'html', 'hamburger-active');
toggleOnClick('.docs-index', 'html', 'hamburger-active');
requestAnimationFrame(startAnimations);
document.querySelectorAll('.copy-icon').forEach(icon => {
icon.addEventListener('click', () => {
icon.classList.add('copied');
document.querySelector('.copied .tooltip').textContent = 'Copied!';
setTimeout(() => {
icon.children[0].textContent = 'Copy class name to clipboard'
icon.classList.remove('copied')
}, 750)
})
})