Commit 5494b489 authored by Daniel Edgecumbe's avatar Daniel Edgecumbe

Crappy hamburger implementation

parent 8dc00d01
Pipeline #293 passed with stages
in 28 seconds
<?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'><svg height="32px" id="Layer_1" style="enable-background:new 0 0 32 32;" version="1.1" viewBox="0 0 32 32" width="32px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M4,10h24c1.104,0,2-0.896,2-2s-0.896-2-2-2H4C2.896,6,2,6.896,2,8S2.896,10,4,10z M28,14H4c-1.104,0-2,0.896-2,2 s0.896,2,2,2h24c1.104,0,2-0.896,2-2S29.104,14,28,14z M28,22H4c-1.104,0-2,0.896-2,2s0.896,2,2,2h24c1.104,0,2-0.896,2-2 S29.104,22,28,22z"/></svg>
\ No newline at end of file
......@@ -89,13 +89,37 @@ div#app {
overflow: hidden;
display: grid;
grid-gap: 0;
grid-template-columns: 1fr 3fr;
grid-template-columns: 25rem 1fr;
}
div#app.nav_hidden {
grid-template-columns: 3rem 1fr;
}
div#leftcol {
overflow-x: hidden; overflow-y: scroll;
overflow-x: hidden;
overflow-y: scroll;
background-color: var(--primary-2);
color: var(--neutral-6);
}
div#leftcol.nav_hidden {
/* TODO: why is this required to kill the scrollbar? */
overflow-y: hidden;
}
div#leftcol.nav_hidden * {
display: none;
}
img#hamburger {
display: block;
margin: 0.5rem auto !important;
width: 2rem;
filter: invert(1);
}
div#leftcol.nav_hidden img#hamburger {
display: block;
}
div#leftcol span {
display: block;
text-align: left;
......
......@@ -32,8 +32,21 @@ along with bitcoin-top. If not, see <http://www.gnu.org/licenses/>.
</head>
<body>
<div id="app" v-cloak>
<div id="leftcol">
<div id="app" v-cloak
:class="nav_hidden ? 'nav_hidden' : ''"
>
<div
id="leftcol"
:class="nav_hidden ? 'nav_hidden' : ''"
>
<img
id="hamburger"
src="Hamburger_icon.svg"
:class="nav_hidden ? 'nav_hidden' : ''"
v-on:click="toggleNav()"
>
</img>
<div id="header"
:class="connected ? 'connected' : 'disconnected'"
......
......@@ -107,6 +107,7 @@ onload = function() {
now: getCurrentTime(),
lastpong: new Date(0),
last_updated: new Date(0),
nav_hidden: true,
uptime: null,
chaininfo: null,
mininginfo: null,
......@@ -175,6 +176,9 @@ onload = function() {
},
},
methods: {
toggleNav: function() {
app.nav_hidden = !app.nav_hidden;
},
getBlockIfRequired: function(hash) {
if (hash in app.blocks) {
return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment