@innertia-solutions/nuxt-theme-spark 0.1.42 → 0.1.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/Admin/Base.vue +20 -12
- package/components/Layout/Admin.vue +6 -2
- package/package.json +1 -1
|
@@ -1,24 +1,27 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
|
|
2
|
+
const props = defineProps({
|
|
3
|
+
floating: { type: Boolean, default: false },
|
|
4
|
+
})
|
|
3
5
|
</script>
|
|
4
6
|
|
|
5
7
|
<template>
|
|
6
8
|
<aside
|
|
7
9
|
id="hs-pro-sidebar"
|
|
8
|
-
class="
|
|
9
|
-
hs-overlay-
|
|
10
|
-
-translate-x-full transition-all duration-300 transform
|
|
11
|
-
w-65
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
:class="[
|
|
11
|
+
'hs-overlay [--auto-close:lg]',
|
|
12
|
+
'hs-overlay-open:translate-x-0 -translate-x-full transition-all duration-300 transform',
|
|
13
|
+
'w-65 hidden fixed z-60',
|
|
14
|
+
'lg:block lg:translate-x-0 lg:inset-e-auto',
|
|
15
|
+
floating
|
|
16
|
+
? 'inset-y-3 start-3 rounded-2xl shadow-sm border border-sidebar-line bg-sidebar'
|
|
17
|
+
: 'inset-y-0 inset-s-0 h-full border-e border-sidebar-line bg-sidebar lg:bottom-0',
|
|
18
|
+
]"
|
|
16
19
|
tabindex="-1"
|
|
17
20
|
aria-label="Sidebar"
|
|
18
21
|
>
|
|
19
22
|
<div class="relative flex flex-col h-full max-h-full pt-3">
|
|
20
23
|
<!-- Logo + close button (mobile) -->
|
|
21
|
-
<header class="h-11.5 ps-
|
|
24
|
+
<header class="h-11.5 ps-2 pe-2 lg:ps-5 flex items-center gap-x-1 shrink-0">
|
|
22
25
|
<slot name="logo" />
|
|
23
26
|
<div class="lg:hidden ms-auto">
|
|
24
27
|
<button
|
|
@@ -36,13 +39,18 @@
|
|
|
36
39
|
</div>
|
|
37
40
|
</header>
|
|
38
41
|
|
|
42
|
+
<!-- Search slot -->
|
|
43
|
+
<div v-if="$slots.search" class="px-4 py-2 shrink-0">
|
|
44
|
+
<slot name="search" />
|
|
45
|
+
</div>
|
|
46
|
+
|
|
39
47
|
<!-- Nav content - scrollable -->
|
|
40
|
-
<div class="mt-1.5
|
|
48
|
+
<div class="flex-1 min-h-0 mt-1.5 overflow-y-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-scrollbar-track [&::-webkit-scrollbar-thumb]:bg-scrollbar-thumb">
|
|
41
49
|
<slot name="menu" />
|
|
42
50
|
</div>
|
|
43
51
|
|
|
44
52
|
<!-- User footer -->
|
|
45
|
-
<div
|
|
53
|
+
<div v-if="$slots['user-footer']" class="shrink-0">
|
|
46
54
|
<slot name="user-footer" />
|
|
47
55
|
</div>
|
|
48
56
|
</div>
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
+
const props = defineProps({
|
|
3
|
+
floating: { type: Boolean, default: false },
|
|
4
|
+
})
|
|
5
|
+
|
|
2
6
|
const showAnimation = ref(false)
|
|
3
7
|
onMounted(() => {
|
|
4
8
|
const seen = sessionStorage.getItem('auth-entered')
|
|
@@ -56,12 +60,12 @@ onMounted(() => {
|
|
|
56
60
|
</header>
|
|
57
61
|
|
|
58
62
|
<!-- Sidebar + main content -->
|
|
59
|
-
<AdminBase>
|
|
63
|
+
<AdminBase :floating="floating">
|
|
60
64
|
<template #logo><slot name="logo" /></template>
|
|
61
65
|
<template #menu><slot name="menu" /></template>
|
|
62
66
|
<template #user-footer><slot name="user-footer" /></template>
|
|
63
67
|
|
|
64
|
-
<div class="lg:ps-65 pt-14">
|
|
68
|
+
<div :class="floating ? 'lg:ps-70 pt-14' : 'lg:ps-65 pt-14'">
|
|
65
69
|
<slot />
|
|
66
70
|
</div>
|
|
67
71
|
</AdminBase>
|