| 76 | }; |
| 77 | |
| 78 | const themechanger=(theme)=> |
| 79 | { |
| 80 | // console.log('clicked theme') |
| 81 | let sec=theme.colorSecondary; |
| 82 | let prim=theme.colorPrimary; |
| 83 | let back1=theme.back_1; |
| 84 | let back2=theme.back_2; |
| 85 | |
| 86 | document.documentElement.style .setProperty('--color-background-2',back2) |
| 87 | document.documentElement.style .setProperty('--color-background-1',back1) |
| 88 | document.documentElement.style .setProperty('--color-primary',prim) |
| 89 | document.documentElement.style .setProperty('--color-secondary',sec) |
| 90 | }; |
| 91 | |
| 92 | if(theme1) |
| 93 | theme1.addEventListener('click',()=>themechanger(theme1Style)) |