JavaScript modularization

This commit is contained in:
Lucas Larroche 2021-07-09 17:42:10 +07:00
parent 366e0a55d6
commit 9575624834
21 changed files with 1629 additions and 1048 deletions

View file

@ -1,13 +1,35 @@
/*!
/*
* Add some magic to Pico docs
*
* Pico.css - https://picocss.com
* Copyright 2019-2021 - Licensed under MIT
*/
// @append src/aside.js
// @append src/theme-switcher.js
// @append src/grid.js
// @append src/color-picker.js
// @append src/most-visible.js
// @append src/scrollspy.js
// Imports
import { aside } from './components/aside.js';
import { themeSwitcher } from './components/theme-switcher.js';
import { materialDesignColors } from './components/material-design-colors.js';
import { colorPicker } from './components/color-picker.js';
import { grid } from './components/grid.js';
import { scrollspy } from './components/scrollspy.js';
// Aside initial state
aside.init();
// Theme switcher
themeSwitcher.addButton({
tag: 'BUTTON',
class: 'contrast switcher theme-switcher',
target: 'body',
});
themeSwitcher.init();
// Color Picker
colorPicker.colors = materialDesignColors;
colorPicker.init();
// Grid Interaction
grid.init();
// Scrollspy
scrollspy.init();