refactor(javascript,assets): rename js directory to javascript
This commit is contained in:
3
assets/javascript/entry.js
Normal file
3
assets/javascript/entry.js
Normal file
@@ -0,0 +1,3 @@
|
||||
import * as hello from './hello.js';
|
||||
|
||||
hello.hello();
|
||||
6
assets/javascript/hello.js
Normal file
6
assets/javascript/hello.js
Normal file
@@ -0,0 +1,6 @@
|
||||
/**
|
||||
* Says hello!
|
||||
*/
|
||||
export function hello() {
|
||||
console.log('hello world');
|
||||
}
|
||||
7
assets/javascript/pages/devcolors.js
Normal file
7
assets/javascript/pages/devcolors.js
Normal file
@@ -0,0 +1,7 @@
|
||||
document.querySelector('#accent-color-hue').addEventListener('change', (e) => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
const hue = /** @type {number} */ (e.target?.value);
|
||||
|
||||
document.querySelector('body')
|
||||
.setAttribute('style', `--user-theme-accent-hue:${String(hue)};`);
|
||||
});
|
||||
Reference in New Issue
Block a user