add responsive layout for dashboard
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
5a70d34164
commit
acced9c054
|
@ -0,0 +1 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M12.9 14.32a8 8 0 1 1 1.41-1.41l5.35 5.33-1.42 1.42-5.33-5.34zM8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12z"/></svg>
|
After Width: | Height: | Size: 175 B |
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
<!-- ******************************** Sidebar ******************************** -->
|
<!-- ******************************** Sidebar ******************************** -->
|
||||||
<div
|
<div
|
||||||
class="fixed bg-gray-800 p-6 w-56 left-0 top-0 h-screen border-r border-gray-600 border-solid flex flex-col justify-between transition-all"
|
class="fixed z-40 bg-gray-800 p-6 w-56 left-0 top-0 h-screen border-r border-gray-600 border-solid flex flex-col justify-between transition-all"
|
||||||
:class="{
|
:class="{
|
||||||
'-left-[14rem]': !(menuVisible || (!menuVisible && menuOverflowVisible)),
|
'-left-[14rem]': !(menuVisible || (!menuVisible && menuOverflowVisible)),
|
||||||
'left-0': menuVisible || (!menuVisible && menuOverflowVisible),
|
'left-0': menuVisible || (!menuVisible && menuOverflowVisible),
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
<div class="h-16 px-6 flex justify-between items-center border-b border-gray-600">
|
<div class="h-16 px-6 flex justify-between items-center border-b border-gray-600">
|
||||||
<div class="flex space-x-3 items-center">
|
<div class="flex space-x-3 items-center">
|
||||||
<a href="#" @click.prevent="menuOverflowVisible = !menuOverflowVisible" class="lg:hidden">
|
<a href="#" @click.prevent="menuOverflowVisible = !menuOverflowVisible" class="lg:hidden">
|
||||||
<svg-sprite src="menu" class="text-gray-100 w-4 h-4"></svg-sprite>
|
<svg-sprite src="menu" class="text-gray-100 w-5 h-5"></svg-sprite>
|
||||||
</a>
|
</a>
|
||||||
<span
|
<span
|
||||||
class="text-sm md:text-xl font-semibold text-white leading-none"
|
class="text-sm md:text-xl font-semibold text-white leading-none"
|
||||||
|
@ -58,7 +58,11 @@
|
||||||
</i-link>
|
</i-link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<label for="search" class="hidden md:block">
|
<label
|
||||||
|
for="search"
|
||||||
|
:class="{'opacity-0 sm:opacity-100': !searchVisible, 'opacity-100': searchVisible}"
|
||||||
|
class="absolute left-14 sm:static transition-all"
|
||||||
|
>
|
||||||
<input
|
<input
|
||||||
class="shadow-lg bg-gray-800 rounded-lg py-2 px-3 text-gray-300 hover:bg-gray-700 focus:bg-gray-700 placeholder-gray-400"
|
class="shadow-lg bg-gray-800 rounded-lg py-2 px-3 text-gray-300 hover:bg-gray-700 focus:bg-gray-700 placeholder-gray-400"
|
||||||
placeholder="Suchen…"
|
placeholder="Suchen…"
|
||||||
|
@ -66,6 +70,18 @@
|
||||||
v-model="isearch"
|
v-model="isearch"
|
||||||
/>
|
/>
|
||||||
</label>
|
</label>
|
||||||
|
<a href="#" @click.prevent="searchVisible = !searchVisible" class="relative sm:hidden w-5 h-5">
|
||||||
|
<svg-sprite
|
||||||
|
:class="{'opacity-0': searchVisible, 'opacity-100': !searchVisible}"
|
||||||
|
class="absolute transition-all text-gray-300 w-5 h-5"
|
||||||
|
src="search"
|
||||||
|
></svg-sprite>
|
||||||
|
<svg-sprite
|
||||||
|
:class="{'opacity-0': !searchVisible, 'opacity-100': searchVisible}"
|
||||||
|
class="absolute transition-all text-gray-300 w-5 h-5"
|
||||||
|
src="close"
|
||||||
|
></svg-sprite>
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="grow flex flex-col">
|
<div class="grow flex flex-col">
|
||||||
|
@ -83,6 +99,7 @@ import mergesQueryString from '../mixins/mergesQueryString.js';
|
||||||
export default {
|
export default {
|
||||||
data: function () {
|
data: function () {
|
||||||
return {
|
return {
|
||||||
|
searchVisible: true,
|
||||||
menuVisible: true,
|
menuVisible: true,
|
||||||
menuOverflowVisible: false,
|
menuOverflowVisible: false,
|
||||||
};
|
};
|
||||||
|
@ -116,11 +133,13 @@ export default {
|
||||||
|
|
||||||
if (x.matches && !this.menuVisible) {
|
if (x.matches && !this.menuVisible) {
|
||||||
this.menuVisible = true;
|
this.menuVisible = true;
|
||||||
|
this.searchVisible = false;
|
||||||
this.menuOverflowVisible = false;
|
this.menuOverflowVisible = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!x.matches && this.menuVisible) {
|
if (!x.matches && this.menuVisible) {
|
||||||
this.menuVisible = false;
|
this.menuVisible = false;
|
||||||
|
this.searchVisible = false;
|
||||||
this.menuOverflowVisible = false;
|
this.menuOverflowVisible = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue