refactoring style and animation

This commit is contained in:
Geriano
2022-07-29 23:20:43 +07:00
parent 792d6fcbc9
commit c771514e57
6 changed files with 196 additions and 136 deletions

View File

@@ -33,10 +33,10 @@ Echo.private(`App.Models.User.${user.id}`)
</style>
<template>
<div class="flex bg-gray-300 dark:bg-gray-900 font-sans">
<div class="flex bg-gray-300 dark:bg-gray-900 font-sans w-full h-full">
<Head :title="title" />
<div ref="sidebar" class="fixed sm:static top-0 left-0 flex-none flex flex-col h-screen transition-all ease-in-out duration-300 z-20" :class="`${themes().get('sidebar', 'bg-gray-700 text-gray-200 hover:bg-gray-800 hover:text-gray-100 transition-all ease-in-out duration-100').replace(/hover:(bg|text)-(.*?)-(\d+)/)} ${open ? 'w-full sm:w-60' : 'w-0'}`">
<div ref="sidebar" class="fixed sm:static top-0 left-0 flex-none flex flex-col h-full min-h-screen transition-all ease-in-out duration-300 z-20" :class="`${themes().get('sidebar', 'bg-gray-700 text-gray-200 hover:bg-gray-800 hover:text-gray-100 transition-all ease-in-out duration-100').replace(/hover:(bg|text)-(.*?)-(\d+)/)} ${open ? 'w-full sm:w-60' : 'w-0'}`">
<div v-if="open" class="sticky top-0 left-0 flex-none flex items-center justify-between w-full h-14 px-2" :class="themes().get('topbar', 'bg-cyan-500 text-gray-700 hover:bg-cyan-600 hover:text-gray-800 transition-all ease-in-out duration-150').replace(/hover:(bg|text)-(.*?)-(\d+)/, '')">
<Toggler @toggle="open = ! open" class="sm:hidden" />
@@ -50,14 +50,14 @@ Echo.private(`App.Models.User.${user.id}`)
<Sidebar v-if="open" />
</div>
<div class="relative w-full h-screen overflow-auto">
<div class="relative w-full h-full min-h-screen max-h-screen overflow-auto">
<div class="sticky top-0 left-0 z-20 flex-none flex justify-between w-full h-14 px-2" :class="themes().get('topbar', 'bg-cyan-500 text-gray-700 hover:bg-cyan-600 hover:text-gray-800 transition-all ease-in-out duration-150').replace(/hover:(bg|text)-(.*?)-(\d+)/, '')">
<Toggler @toggle="open = ! open" />
<TopbarDropdown />
</div>
<main class="min-h-full p-6 h-full">
<main class="p-6">
<slot />
</main>
</div>