1
0
mirror of https://github.com/amir20/dozzle.git synced 2025-12-24 06:28:42 +01:00

Menu resizable (#206)

* Makes side menu resizable

* Fixes hiding of side menu

* Adds mobile menu

* Adds missing file
This commit is contained in:
Amir Raminfar
2019-12-11 13:23:24 -08:00
committed by GitHub
parent 05b26bea9c
commit 1b4a4e626a
5 changed files with 165 additions and 91 deletions

View File

@@ -1,16 +1,8 @@
<template lang="html">
<aside class="column menu is-3-tablet is-2-widescreen">
<a
role="button"
class="navbar-burger burger is-white is-hidden-tablet is-pulled-right"
@click="showNav = !showNav"
:class="{ 'is-active': showNav }"
>
<span></span> <span></span> <span></span>
</a>
<aside>
<h1 class="title has-text-warning is-marginless">Dozzle</h1>
<p class="menu-label is-hidden-mobile" :class="{ 'is-active': showNav }">Containers</p>
<ul class="menu-list is-hidden-mobile" :class="{ 'is-active': showNav }">
<p class="menu-label is-hidden-mobile">Containers</p>
<ul class="menu-list is-hidden-mobile">
<li v-for="item in containers">
<router-link
:to="{ name: 'container', params: { id: item.id, name: item.name } }"
@@ -40,16 +32,7 @@ export default {
props: [],
name: "SideMenu",
data() {
return {
showNav: false
};
},
methods: {
colorize: value =>
ansiConvertor
.toHtml(value)
.replace("&lt;mark&gt;", "<mark>")
.replace("&lt;/mark&gt;", "</mark>")
return {};
},
computed: {
...mapState(["containers", "activeContainers"]),
@@ -69,30 +52,10 @@ export default {
</script>
<style scoped lang="scss">
aside {
position: fixed;
z-index: 2;
padding: 1em;
height: 100vh;
overflow: auto;
@media screen and (min-width: 769px) {
& {
height: 100vh;
overflow: auto;
}
}
@media screen and (max-width: 768px) {
& {
position: sticky;
top: 0;
left: 0;
right: 0;
background: #222;
}
.menu-label {
margin-top: 1em;
}
}
.hide-overflow {
text-overflow: ellipsis;
white-space: nowrap;
@@ -106,10 +69,6 @@ aside {
.is-hidden-mobile.is-active {
display: block !important;
}
.navbar-burger {
height: 2.35rem;
}
}
.will-append-container.icon {