Added buttons to toggle sidebars
This commit is contained in:
parent
c0c3cf6963
commit
b7b3663122
5 changed files with 63 additions and 15 deletions
|
|
@ -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 |
|
|
@ -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 |
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -5,11 +5,13 @@
|
|||
<link rel= "stylesheet" type= "text/css" href="{{url_for('static', filename='style_v1.css')}}">
|
||||
<script type="text/javascript" src="{{url_for('static', filename='main_v1.js')}}"></script>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimal-ui">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="row">
|
||||
<div class="column left">
|
||||
<div class="column left" id="left-sb">
|
||||
<h2>Settings</h2>
|
||||
|
||||
<h3>Position</h3>
|
||||
|
|
@ -71,7 +73,21 @@
|
|||
|
||||
</div>
|
||||
|
||||
<div class="column right">
|
||||
<div class="column middle">
|
||||
<div id="left-sb-btn" class="sb-btn">
|
||||
<button type="button" onclick="toggleClassToDiv('left-sb', 'hidden');">
|
||||
<img src="{{url_for('static', filename='icons/baseline-settings-20px.svg')}}">
|
||||
</button>
|
||||
</div>
|
||||
<div id="right-sb-btn" class="sb-btn">
|
||||
<button type="button" onclick="toggleClassToDiv('right-sb', 'hidden');">
|
||||
<img src="{{url_for('static', filename='icons/baseline-camera_alt-24px.svg')}}">
|
||||
</button>
|
||||
</div>
|
||||
<img src="/api/v1/stream" ondblclick="clickHotspotImage(event);">
|
||||
</div>
|
||||
|
||||
<div class="column right" id="right-sb">
|
||||
<h2>Capture</h2>
|
||||
Filename: <br>
|
||||
<input type="text" id="captureFilenameInput" placeholder="Leave blank for default"><br>
|
||||
|
|
@ -90,10 +106,6 @@
|
|||
|
||||
</div>
|
||||
|
||||
<div class="column middle">
|
||||
<img src="/api/v1/stream" ondblclick="clickHotspotImage(event);">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue