mirror of
https://github.com/dawidolko/Website-Templates.git
synced 2026-03-22 05:02:19 +00:00
Website templates
This commit is contained in:
12
theme-changer-template/index.js
Normal file
12
theme-changer-template/index.js
Normal file
@@ -0,0 +1,12 @@
|
||||
const bg1 = document.getElementById('bgColor-1');
|
||||
const bg2 = document.getElementById('bgColor-2');
|
||||
const bg3 = document.getElementById('bgColor-3');
|
||||
const blur = document.querySelector('.blur');
|
||||
document.querySelector('#bgChange').addEventListener('click', function() {
|
||||
blur.style.background = `linear-gradient(90deg, ${bg1.value} 14%, ${bg2.value} 47%, ${bg3.value} 100%)`;
|
||||
})
|
||||
if ($(window).width() <= 650) {
|
||||
document.querySelector('#bgChange').addEventListener('click', function() {
|
||||
blur.style.background = `linear-gradient(180deg, ${bg1.value} 14%, ${bg2.value} 47%, ${bg3.value} 100%)`;
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user