Merhabalar Ben Gece Gündüz modu yapacağım fakat butonun üstüne tıklandığında bir türlü simgenin değişmesini sağlayamadım
yardım ederseniz sevinirim
Kaynak kodlar ;
<link rel="stylesheet" type="text/css" href="css/global.css"><script>(function(window, document, undefined) {    'use strict';    if (!('localStorage' in window)) return;    var nightMode = localStorage.getItem('gmtNightMode');    if (nightMode) {        document.documentElement.className += ' night-mode';    }})(window, document);    
document.addEventListener('DOMContentLoaded',function() {    'use strict';    // Feature test    if (!('localStorage' in window)) return;    var nightMode = document.querySelector('#night-mode');    if (!nightMode) return;    // When clicked, toggle night mode on or offnightMode.addEventListener('click', function (event) {event.preventDefault();document.documentElement.classList.toggle('night-mode');        if ( document.documentElement.classList.contains('night-mode') ) {            localStorage.setItem('gmtNightMode', true);            return;        }        localStorage.removeItem('gmtNightMode');    }, false);});</script> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.1/css/font-awesome.min.css"><script src="https://kit.fontawesome.com/a2674fb095.js" crossorigin="anonymous"></script><button class="button" type="button" id="night-mode"><i class="fas fa-sun"></i></button>
.night-mode body{    background-color: #14191e}
.night-mode #content{    background-color: #14191e;    color: #eee}
.night-mode #logo{    background-color:#14191e}
.night-mode #logo a{    color:#eee}
.night-mode .trow1, .night-mode .trow2{    background-color: #14191e;    border-color: #14191e;    color:#eee}
.night-mode .trow1 a, .night-mode .trow2 a{    color: #eee} .button {    background:transparent;    border:transparent;    outline:none}
Tam Olarak Yapmak istediğim Güneş Simgesine Tıklayınca Gece Simgesi Olacak ve arkaplan siyahlaşacak
gece modunun simgesi ; <i class="fas fa-moon">