Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions static/galene.css
Original file line number Diff line number Diff line change
Expand Up @@ -1311,3 +1311,58 @@ header .collapse {
}

}

/* Changes made by dark mode */
.app-dark {
background-color: #212529;
overflow: hidden;
margin: 0;
padding: 0;
box-shadow: 0 1px 1px 0 rgba(90, 89, 89, 0.06), 0 2px 5px 0 rgba(0, 0, 0, .2);
}

.sidenav-content-dark {
padding: 10px;
background: #212529;
height: 100%;
}

#left-sidebar.left-sidebar-dark {
min-width: 200px;
max-width: 200px;
transition: all 0.3s;
background: #212529;
border-right: 1px solid #3b3b3b;
z-index: 1039;
}

#chat.chat-dark {
padding: 0;
margin: 0;
background-color: #212529;
background-size: cover;
overflow-y: scroll;
border: none;
border-right-color: currentcolor;
border-right-style: none;
border-right-width: medium;
border-right: 4px solid #3b3b3b;
height: 100% !important;
width: 100%;
min-width: 300px;
overflow: hidden;
}

#users.users-dark {
padding: 0;
margin: 0;
height: calc(100% - 84px);
width: 100%;
z-index: 1;
position: relative;
display: block;
background-color: #212529;
overflow-y: auto;
border: 1px solid #3b3b3b;
}
/*end of changes*/
5 changes: 5 additions & 0 deletions static/galene.html
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,11 @@ <h2>Settings</h2>
<label for="activitybox">Activity detection</label>
</form>

<form>
<input id="darkmode" type="checkbox"/>
<label for="darkmode">Dark mode</label>
</form>

</fieldset>

<form id="fileform">
Expand Down
12 changes: 12 additions & 0 deletions static/galene.js
Original file line number Diff line number Diff line change
Expand Up @@ -2727,4 +2727,16 @@ function start() {
document.getElementById("login-container").classList.remove('invisible');
}

//Dark mode function
getInputElement('darkmode').onchange = function (e){
e.preventDefault();
if(!(this instanceof HTMLInputElement))
throw new Error('Unexpected type for this');
document.getElementById('main').classList.toggle('app-dark');
document.getElementById('optionsdiv').classList.toggle('sidenav-content-dark');
document.getElementById('left-sidebar').classList.toggle('left-sidebar-dark');
document.getElementById('chat').classList.toggle('chat-dark');
document.getElementById('users').classList.toggle('users-dark');
}

start();