@plutocms/pluto 0.2.1 → 0.3.0
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/CHANGELOG.md +7 -0
- package/app/components/AdminView.vue +3 -1
- package/app/components/Pluto/Navbar/PlutoNavbarAdmin.vue +1 -1
- package/app/components/modal/Modal.vue +5 -5
- package/app/components/modal/ModalContent.vue +2 -2
- package/app/components/modal/ModalFooter.vue +4 -1
- package/app/components/modal/ModalHeader.vue +6 -2
- package/app/layouts/admin.vue +52 -6
- package/app/layouts/auth.vue +1 -1
- package/app/pages/admin/home.vue +2 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
3
|
|
|
4
|
+
## [0.3.0](https://github.com/plutocms/pluto/compare/v0.2.1...v0.3.0) (2026-09-09)
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* make admin shell responsive ([#119](https://github.com/plutocms/pluto/issues/119)) ([5a4808d](https://github.com/plutocms/pluto/commit/5a4808de34e1a3796c496a8fad093290a8f7fb90))
|
|
10
|
+
|
|
4
11
|
## [0.2.1](https://github.com/plutocms/pluto/compare/v0.2.0...v0.2.1) (2026-09-08)
|
|
5
12
|
|
|
6
13
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
<template>
|
|
4
4
|
<nav
|
|
5
|
-
class="light:bg-white light:border-black/10 font-outfit sticky top-0 z-50 h-
|
|
5
|
+
class="light:bg-white light:border-black/10 font-outfit sticky top-0 z-50 h-14 shrink-0 border-b lg:h-10 dark:border-white/5 dark:bg-black dark:text-white"
|
|
6
6
|
>
|
|
7
7
|
<slot />
|
|
8
8
|
</nav>
|
|
@@ -35,9 +35,9 @@ const resolvedClasses = computed(() => {
|
|
|
35
35
|
const defaultClasses = `
|
|
36
36
|
group
|
|
37
37
|
relative
|
|
38
|
-
w-234 h-fit
|
|
38
|
+
w-234 max-w-[calc(100vw-1rem)] h-fit
|
|
39
39
|
rounded-lg
|
|
40
|
-
my-4 mx-4
|
|
40
|
+
my-2 mx-2 sm:my-4 sm:mx-4
|
|
41
41
|
shadow-2xl
|
|
42
42
|
bg-default
|
|
43
43
|
light:text-zinc-800 dark:text-white
|
|
@@ -68,7 +68,7 @@ const resolvedOverlayClasses = computed(() => {
|
|
|
68
68
|
fixed
|
|
69
69
|
left-0 top-0
|
|
70
70
|
z-51
|
|
71
|
-
h-
|
|
71
|
+
h-dvh w-screen
|
|
72
72
|
bg-black/90
|
|
73
73
|
`
|
|
74
74
|
|
|
@@ -109,14 +109,14 @@ function closeModal() {
|
|
|
109
109
|
:class="resolvedOverlayClasses"
|
|
110
110
|
@click="props.preventClickOutside === false ? closeModal() : null"
|
|
111
111
|
>
|
|
112
|
-
<div ref="scrollRef" class="h-full overflow-y-
|
|
112
|
+
<div ref="scrollRef" class="h-full overflow-y-auto py-2 sm:py-4">
|
|
113
113
|
<div class="flex min-h-full items-center justify-center">
|
|
114
114
|
<div
|
|
115
115
|
:class="twMerge(['modal-content my-auto', resolvedClasses])"
|
|
116
116
|
:style="{
|
|
117
117
|
width:
|
|
118
118
|
!props.size && props.customSize
|
|
119
|
-
?
|
|
119
|
+
? `min(${props.customSize}px, calc(100vw - 1rem))`
|
|
120
120
|
: '',
|
|
121
121
|
}"
|
|
122
122
|
v-bind="$attrs"
|
|
@@ -3,7 +3,7 @@ import { twMerge } from 'tailwind-merge'
|
|
|
3
3
|
</script>
|
|
4
4
|
|
|
5
5
|
<template>
|
|
6
|
-
<div class="flex flex-col gap-
|
|
6
|
+
<div class="flex flex-col gap-5 py-1 sm:gap-8">
|
|
7
7
|
<div
|
|
8
8
|
v-if="$slots.header"
|
|
9
9
|
:class="twMerge(['bg-opacity-90 sticky z-50 backdrop-blur-md'])"
|
|
@@ -12,7 +12,7 @@ import { twMerge } from 'tailwind-merge'
|
|
|
12
12
|
<slot name="header" />
|
|
13
13
|
</div>
|
|
14
14
|
|
|
15
|
-
<div class="px-4 pt-6">
|
|
15
|
+
<div class="px-3 pt-4 sm:px-4 sm:pt-6">
|
|
16
16
|
<slot />
|
|
17
17
|
</div>
|
|
18
18
|
</div>
|
|
@@ -45,8 +45,12 @@ function closeModal() {
|
|
|
45
45
|
class="bg-default absolute top-0 left-0 z-[-1] h-full w-full rounded-t-lg backdrop-blur-md"
|
|
46
46
|
/>
|
|
47
47
|
|
|
48
|
-
<div class="flex items-start justify-between py-4">
|
|
49
|
-
<h2
|
|
48
|
+
<div class="flex items-start justify-between gap-3 py-3 sm:py-4">
|
|
49
|
+
<h2
|
|
50
|
+
:class="
|
|
51
|
+
twMerge(['text-2xl leading-8 font-medium sm:text-3xl sm:leading-10'])
|
|
52
|
+
"
|
|
53
|
+
>
|
|
50
54
|
<slot />
|
|
51
55
|
</h2>
|
|
52
56
|
|
package/app/layouts/admin.vue
CHANGED
|
@@ -7,6 +7,12 @@ import type { NavigationMenuItem } from '@nuxt/ui'
|
|
|
7
7
|
type SidebarMenuItem = Omit<NavigationMenuItem, 'to'>
|
|
8
8
|
|
|
9
9
|
const { actions: sidebarActions } = useSidebarAdminActions()
|
|
10
|
+
const route = useRoute()
|
|
11
|
+
const isSidebarOpen = useState<boolean>('pluto-admin-sidebar-open', () => false)
|
|
12
|
+
|
|
13
|
+
function closeSidebar() {
|
|
14
|
+
isSidebarOpen.value = false
|
|
15
|
+
}
|
|
10
16
|
|
|
11
17
|
const menu = shallowRef<SidebarMenuItem[]>([
|
|
12
18
|
{
|
|
@@ -21,18 +27,46 @@ const menu = shallowRef<SidebarMenuItem[]>([
|
|
|
21
27
|
icon: 'lucide:settings',
|
|
22
28
|
},
|
|
23
29
|
])
|
|
30
|
+
|
|
31
|
+
watch(
|
|
32
|
+
() => route.fullPath,
|
|
33
|
+
closeSidebar
|
|
34
|
+
)
|
|
24
35
|
</script>
|
|
25
36
|
|
|
26
37
|
<template>
|
|
27
38
|
<div
|
|
28
|
-
class="dark:bg-admin-content light:bg-white font-outfit flex h-
|
|
39
|
+
class="dark:bg-admin-content light:bg-white font-outfit flex h-dvh min-h-0 grow flex-col overflow-hidden"
|
|
29
40
|
>
|
|
30
41
|
<NavbarAdmin />
|
|
31
42
|
|
|
32
|
-
<div class="flex h-
|
|
33
|
-
<
|
|
34
|
-
|
|
43
|
+
<div class="relative flex min-h-0 flex-1 items-stretch">
|
|
44
|
+
<Transition name="sidebar-fade">
|
|
45
|
+
<button
|
|
46
|
+
v-if="isSidebarOpen"
|
|
47
|
+
type="button"
|
|
48
|
+
aria-label="Close navigation"
|
|
49
|
+
class="fixed inset-x-0 top-14 bottom-0 z-40 bg-black/50 backdrop-blur-xs lg:hidden"
|
|
50
|
+
@click="closeSidebar"
|
|
51
|
+
/>
|
|
52
|
+
</Transition>
|
|
53
|
+
|
|
54
|
+
<aside
|
|
55
|
+
:class="isSidebarOpen ? 'translate-x-0' : '-translate-x-full'"
|
|
56
|
+
class="dark:bg-admin-sidebar light:bg-zinc-100 border-default fixed inset-y-14 left-0 z-50 flex w-[min(18rem,85vw)] shrink-0 flex-col border-r px-3 py-4 shadow-2xl transition-transform duration-200 lg:static lg:inset-auto lg:z-auto lg:w-64 lg:translate-x-0 lg:shadow-none"
|
|
35
57
|
>
|
|
58
|
+
<div class="mb-3 flex items-center justify-between px-2 lg:hidden">
|
|
59
|
+
<span class="text-muted text-sm font-semibold">Navigation</span>
|
|
60
|
+
<UButton
|
|
61
|
+
icon="lucide:x"
|
|
62
|
+
color="neutral"
|
|
63
|
+
variant="ghost"
|
|
64
|
+
aria-label="Close navigation"
|
|
65
|
+
square
|
|
66
|
+
@click="closeSidebar"
|
|
67
|
+
/>
|
|
68
|
+
</div>
|
|
69
|
+
|
|
36
70
|
<UNavigationMenu
|
|
37
71
|
:items="menu"
|
|
38
72
|
:ui="{
|
|
@@ -42,11 +76,23 @@ const menu = shallowRef<SidebarMenuItem[]>([
|
|
|
42
76
|
class="data-[orientation=vertical]:w-full"
|
|
43
77
|
highlight
|
|
44
78
|
/>
|
|
45
|
-
</
|
|
79
|
+
</aside>
|
|
46
80
|
|
|
47
|
-
<div class="grow overflow-hidden">
|
|
81
|
+
<div class="min-w-0 grow overflow-x-hidden overflow-y-auto">
|
|
48
82
|
<slot />
|
|
49
83
|
</div>
|
|
50
84
|
</div>
|
|
51
85
|
</div>
|
|
52
86
|
</template>
|
|
87
|
+
|
|
88
|
+
<style scoped>
|
|
89
|
+
.sidebar-fade-enter-active,
|
|
90
|
+
.sidebar-fade-leave-active {
|
|
91
|
+
transition: opacity 200ms ease;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.sidebar-fade-enter-from,
|
|
95
|
+
.sidebar-fade-leave-to {
|
|
96
|
+
opacity: 0;
|
|
97
|
+
}
|
|
98
|
+
</style>
|
package/app/layouts/auth.vue
CHANGED
package/app/pages/admin/home.vue
CHANGED
|
@@ -7,9 +7,9 @@ useHead({
|
|
|
7
7
|
<template>
|
|
8
8
|
<main>
|
|
9
9
|
<AdminView>
|
|
10
|
-
<h1 class="text-
|
|
10
|
+
<h1 class="text-3xl font-bold lg:text-4xl">Admin Dashboard</h1>
|
|
11
11
|
|
|
12
|
-
<div class="grid grid-cols-3 gap-x-4 gap-y-6">
|
|
12
|
+
<div class="grid grid-cols-1 gap-4 lg:grid-cols-3 lg:gap-x-4 lg:gap-y-6">
|
|
13
13
|
<div
|
|
14
14
|
v-for="i in 6"
|
|
15
15
|
:key="i"
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plutocms/pluto",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.3.0",
|
|
5
5
|
"description": "The layerable CMS",
|
|
6
6
|
"author": "Victor Ribeiro",
|
|
7
7
|
"license": "MIT",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"vue-demi"
|
|
43
43
|
],
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@plutocms/utils": "^0.
|
|
45
|
+
"@plutocms/utils": "^0.2.0",
|
|
46
46
|
"@vueuse/nuxt": "^14.3.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|