Added buttons to toggle sidebars

This commit is contained in:
Joel Collins 2018-12-13 12:16:44 +00:00
parent c0c3cf6963
commit b7b3663122
5 changed files with 63 additions and 15 deletions

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><circle cx="12" cy="12" r="3.2"/><path d="M9 2L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2H9zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>

After

Width:  |  Height:  |  Size: 324 B

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path fill="none" d="M0 0h20v20H0V0z"/><path d="M15.95 10.78c.03-.25.05-.51.05-.78s-.02-.53-.06-.78l1.69-1.32c.15-.12.19-.34.1-.51l-1.6-2.77c-.1-.18-.31-.24-.49-.18l-1.99.8c-.42-.32-.86-.58-1.35-.78L12 2.34c-.03-.2-.2-.34-.4-.34H8.4c-.2 0-.36.14-.39.34l-.3 2.12c-.49.2-.94.47-1.35.78l-1.99-.8c-.18-.07-.39 0-.49.18l-1.6 2.77c-.1.18-.06.39.1.51l1.69 1.32c-.04.25-.07.52-.07.78s.02.53.06.78L2.37 12.1c-.15.12-.19.34-.1.51l1.6 2.77c.1.18.31.24.49.18l1.99-.8c.42.32.86.58 1.35.78l.3 2.12c.04.2.2.34.4.34h3.2c.2 0 .37-.14.39-.34l.3-2.12c.49-.2.94-.47 1.35-.78l1.99.8c.18.07.39 0 .49-.18l1.6-2.77c.1-.18.06-.39-.1-.51l-1.67-1.32zM10 13c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3z"/></svg>

After

Width:  |  Height:  |  Size: 774 B

View file

@ -44,6 +44,14 @@ window.onload = function() {
getCaptures()
}
// Cosmetic methods
function toggleClassToDiv(div_id, class_name) {
document.getElementById(div_id).classList.toggle(class_name)
}
// Microscope methods
function deleteCapture(capture_id) {
function deleteCaptureCallback(response, status) {
console.log(status);

View file

@ -25,29 +25,55 @@ body {
.left, .right {
background-color: #f4f4f4;
overflow-y: scroll;
flex: 0;
flex-shrink: 0;
flex-basis: 250px;
-webkit-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
}
.left{
width: 220px;
float: left;
}
.Right{
width: 280px;
.right{
float: right;
}
.hidden{
flex-basis: 0;
padding:0
}
.middle {
margin-left: 220px;
margin-right: 280px;
position: relative;
flex-grow: 1;
background-color: #d3d3d3;
}
#left-sb-btn {
left: 20px;
}
#right-sb-btn {
right: 20px;
}
.sb-btn {
top: 20px;
position: absolute;
}
.sb-btn button{
width: 40px;
height: 40px;
margin: 0;
padding:5px;
}
/* Clear floats after the columns */
.row:after {
content: "";
display: table;
clear: both;
.row{
display: flex;
}
/* Flexboxes */