Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change settings panel behavior to slide instead of grow #110

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
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
13 changes: 7 additions & 6 deletions static/galene.css
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@
background-color: #eee;
}

.profile {
width: 230px;
}

.profile-logo {
float: left;
width: 50px;
Expand Down Expand Up @@ -930,7 +926,8 @@ h1 {
position: fixed;
-webkit-transition: all .2s ease-out;
transition: all .2s ease-out;
width: 0px;
width: 250px;
transform: translateX(100%);
/* on top of everything */
z-index: 2999;
top: 0;
Expand All @@ -940,6 +937,10 @@ h1 {
overflow-y: hidden;
}

.sidenav.opened {
transform: translateX(0);
}

.sidenav a {
padding: 10px 20px;
text-decoration: none;
Expand Down Expand Up @@ -992,7 +993,7 @@ h1 {
padding: 10px;
background: #fff;
height: calc(100% - 56px);
overflow-y: scroll;
overflow-y: auto;
overflow-x: hidden;
}

Expand Down
2 changes: 1 addition & 1 deletion static/galene.html
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ <h1 id="title" class="header-title">Galène</h1>
<div id="sidebarnav" class="sidenav">
<div class="sidenav-header">
<h2>Settings</h2>
<a class="closebtn" id="clodeside"><i class="fas fa-times" aria-hidden="true"></i></a>
<a class="closebtn" id="closeside"><i class="fas fa-times" aria-hidden="true"></i></a>
</div>
<div class="sidenav-content" id="optionsdiv">
<div id="profile" class="profile invisible">
Expand Down
18 changes: 3 additions & 15 deletions static/galene.js
Original file line number Diff line number Diff line change
Expand Up @@ -3009,12 +3009,8 @@ document.getElementById('disconnectbutton').onclick = function(e) {
closeNav();
};

function openNav() {
document.getElementById("sidebarnav").style.width = "250px";
}

function closeNav() {
document.getElementById("sidebarnav").style.width = "0";
document.getElementById("sidebarnav").classList.remove("opened");
}

document.getElementById('sidebarCollapse').onclick = function(e) {
Expand All @@ -3023,18 +3019,10 @@ document.getElementById('sidebarCollapse').onclick = function(e) {
};

document.getElementById('openside').onclick = function(e) {
e.preventDefault();
let sidewidth = document.getElementById("sidebarnav").style.width;
if (sidewidth !== "0px" && sidewidth !== "") {
closeNav();
return;
} else {
openNav();
}
document.getElementById("sidebarnav").classList.add("opened");
};


document.getElementById('clodeside').onclick = function(e) {
document.getElementById('closeside').onclick = function(e) {
e.preventDefault();
closeNav();
};
Expand Down