adding more responsive styling
This commit is contained in:
@@ -27,10 +27,10 @@ onMounted(() => window.addEventListener('resize', () => open.value = window.inne
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="flex bg-gray-300 dark:bg-gray-900 w-full h-screen max-h-screen font-sans">
|
<div class="flex bg-gray-300 dark:bg-gray-900 w-full h-screen max-h-screen font-sans overflow-hidden">
|
||||||
<Head :title="title" />
|
<Head :title="title" />
|
||||||
|
|
||||||
<div ref="sidebar" class="fixed sm:static flex-none flex flex-col h-full transition-all ease-in-out duration-300 z-10 sm:z-0" :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 flex-none flex flex-col h-full transition-all ease-in-out duration-300 z-10 sm:z-0 overflow-auto sm:overflow-hidden" :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="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+)/, '')">
|
<div v-if="open" class="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" />
|
<Toggler @toggle="open = ! open" class="sm:hidden" />
|
||||||
|
|
||||||
|
|||||||
@@ -151,8 +151,8 @@ onUnmounted(() => window.removeEventListener('keydown', esc))
|
|||||||
</DashboardLayout>
|
</DashboardLayout>
|
||||||
|
|
||||||
<transition name="fade">
|
<transition name="fade">
|
||||||
<div v-if="open" class="fixed top-0 left-0 w-full h-screen flex items-center justify-center bg-black bg-opacity-40">
|
<div v-if="open" class="fixed top-0 left-0 w-full h-screen flex sm:items-center justify-center bg-black bg-opacity-40 overflow-auto">
|
||||||
<form @submit.prevent="submit" class="w-full max-w-5xl rounded-md shadow-xl">
|
<form @submit.prevent="submit" class="w-full max-w-xl sm:max-w-5xl rounded-md shadow-xl">
|
||||||
<Card class="bg-gray-50 dark:bg-gray-700 dark:text-gray-100">
|
<Card class="bg-gray-50 dark:bg-gray-700 dark:text-gray-100">
|
||||||
<template #header>
|
<template #header>
|
||||||
<div class="flex items-center space-x-2 p-2 justify-end bg-gray-200 dark:bg-gray-800">
|
<div class="flex items-center space-x-2 p-2 justify-end bg-gray-200 dark:bg-gray-800">
|
||||||
@@ -263,8 +263,8 @@ onUnmounted(() => window.removeEventListener('keydown', esc))
|
|||||||
</transition>
|
</transition>
|
||||||
|
|
||||||
<transition name="fade">
|
<transition name="fade">
|
||||||
<div v-if="icon" class="fixed top-0 left-0 w-full h-screen flex items-center justify-center bg-black bg-opacity-40">
|
<div v-if="icon" class="fixed top-0 left-0 w-full h-screen flex sm:items-center justify-center bg-black bg-opacity-40 overflow-auto">
|
||||||
<Card class="bg-gray-50 dark:bg-gray-700 dark:text-gray-100 w-full max-w-5xl">
|
<Card class="bg-gray-50 dark:bg-gray-700 dark:text-gray-100 w-full max-w-xl sm:max-w-5xl">
|
||||||
<template #header>
|
<template #header>
|
||||||
<div class="flex items-center space-x-2 p-2 justify-end bg-gray-200 dark:bg-gray-800">
|
<div class="flex items-center space-x-2 p-2 justify-end bg-gray-200 dark:bg-gray-800">
|
||||||
<input type="search" v-model="search" class="py-1 w-full bg-white dark:bg-transparent rounded-md text-sm uppercase" placeholder="search something">
|
<input type="search" v-model="search" class="py-1 w-full bg-white dark:bg-transparent rounded-md text-sm uppercase" placeholder="search something">
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ onUnmounted(() => window.removeEventListener('keydown', esc))
|
|||||||
</DashboardLayout>
|
</DashboardLayout>
|
||||||
|
|
||||||
<transition name="fade">
|
<transition name="fade">
|
||||||
<div v-if="open" class="fixed top-0 left-0 w-full h-screen flex items-center justify-center bg-black bg-opacity-40">
|
<div v-if="open" class="fixed top-0 left-0 w-full h-screen flex sm:items-center justify-center bg-black bg-opacity-40 overflow-auto">
|
||||||
<form @submit.prevent="submit" class="w-full max-w-xl shadow-xl">
|
<form @submit.prevent="submit" class="w-full max-w-xl shadow-xl">
|
||||||
<Card class="bg-gray-50 dark:bg-gray-700 dark:text-gray-100 border dark:border-gray-700">
|
<Card class="bg-gray-50 dark:bg-gray-700 dark:text-gray-100 border dark:border-gray-700">
|
||||||
<template #header>
|
<template #header>
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ onUnmounted(() => window.removeEventListener('keydown', esc))
|
|||||||
</DashboardLayout>
|
</DashboardLayout>
|
||||||
|
|
||||||
<transition name="fade">
|
<transition name="fade">
|
||||||
<div v-if="open" class="fixed top-0 left-0 w-full h-full bg-black bg-opacity-40 flex items-center justify-center">
|
<div v-if="open" class="fixed top-0 left-0 w-full h-full bg-black bg-opacity-40 flex sm:items-center justify-center overflow-auto">
|
||||||
<form @submit.prevent="submit" class="w-full max-w-xl shadow-xl">
|
<form @submit.prevent="submit" class="w-full max-w-xl shadow-xl">
|
||||||
<Card class="bg-gray-50 dark:bg-gray-700 dark:text-gray-100">
|
<Card class="bg-gray-50 dark:bg-gray-700 dark:text-gray-100">
|
||||||
<template #header>
|
<template #header>
|
||||||
|
|||||||
@@ -227,8 +227,8 @@ onUnmounted(() => window.removeEventListener('keydown', esc))
|
|||||||
</DashboardLayout>
|
</DashboardLayout>
|
||||||
|
|
||||||
<transition name="fade">
|
<transition name="fade">
|
||||||
<div v-if="open" class="fixed top-0 left-0 w-full h-full bg-black bg-opacity-40 flex items-center justify-center">
|
<div v-if="open" class="fixed top-0 left-0 w-full h-full bg-black bg-opacity-40 flex sm:items-center justify-center overflow-auto">
|
||||||
<form @submit.prevent="submit" class="w-full max-w-5xl shadow-xl">
|
<form @submit.prevent="submit" class="w-full max-w-xl sm:max-w-5xl shadow-xl">
|
||||||
<Card class="bg-gray-50 dark:bg-gray-700 dark:text-gray-100">
|
<Card class="bg-gray-50 dark:bg-gray-700 dark:text-gray-100">
|
||||||
<template #header>
|
<template #header>
|
||||||
<div class="flex items-center justify-end bg-gray-200 dark:bg-gray-800 p-2">
|
<div class="flex items-center justify-end bg-gray-200 dark:bg-gray-800 p-2">
|
||||||
|
|||||||
Reference in New Issue
Block a user