almost working site
This commit is contained in:
parent
351773a8aa
commit
bb70bf6d3f
25 changed files with 1508 additions and 58 deletions
1
assets/js/lore.js
Normal file
1
assets/js/lore.js
Normal file
|
@ -0,0 +1 @@
|
|||
console.log('Lore Page');
|
|
@ -1,21 +1,9 @@
|
|||
/* let portfolio = document.getElementsByClassName('portfolio');
|
||||
let art = document.getElementsByClassName('art');
|
||||
let lore = document.getElementsByClassName('lore');
|
||||
let box = document.getElementById('box');
|
||||
|
||||
let links = [ portfolio[0], art[0], lore[0] ];
|
||||
|
||||
links.forEach((link) => {
|
||||
setTimeout(() => {
|
||||
link.classList.add('show');
|
||||
}, 3 * 1000);
|
||||
});
|
||||
*/
|
||||
let scheme = window.matchMedia(`(prefers-color-scheme: dark)`);
|
||||
let theme = window.localStorage.getItem('prefer-light');
|
||||
let title = document.getElementsByClassName('title')[0];
|
||||
let body = document.getElementsByTagName('body')[0];
|
||||
let toggle = document.getElementById('theme-switch');
|
||||
let toggle = document.getElementsByClassName('toggle')[0];
|
||||
|
||||
if (theme === 'yes') {
|
||||
body.classList.add('light');
|
||||
} else if (theme === 'no') {
|
||||
|
@ -31,8 +19,8 @@ if (theme === 'yes') {
|
|||
}
|
||||
}
|
||||
|
||||
/* toggle.addEventListener('click', (e) => {
|
||||
console.log(e);
|
||||
toggle.addEventListener('click', (e) => {
|
||||
//console.log(e);
|
||||
body.classList.toggle('light');
|
||||
if (body.classList.contains('light')) {
|
||||
window.localStorage.setItem('prefer-light', 'yes');
|
||||
|
@ -42,4 +30,3 @@ if (theme === 'yes') {
|
|||
console.log('user likes dark');
|
||||
}
|
||||
});
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue