Merge pull request #19 from olinpin/branch
dark/light mode implementation pt.1
This commit is contained in:
		| @@ -47,3 +47,13 @@ $(".sort-dropdown-list li").on("click", function() { | |||||||
| $(window).on("test", function(e, filter) { | $(window).on("test", function(e, filter) { | ||||||
|     console.log(filter); |     console.log(filter); | ||||||
| }) | }) | ||||||
|  |  | ||||||
|  | let root = document.querySelector(":root") | ||||||
|  |  | ||||||
|  | $(".logo").on("click", function() { | ||||||
|  |     if (root.style.getPropertyValue("--main-bg") === 'ghostwhite') { | ||||||
|  |         root.style.setProperty('--main-bg', '#292929'); | ||||||
|  |     } else { | ||||||
|  |         root.style.setProperty('--main-bg', 'ghostwhite'); | ||||||
|  |     } | ||||||
|  | }) | ||||||
		Reference in New Issue
	
	Block a user
	 GitHub
						GitHub