Skip to content

Commit ef1692c

Browse files
authored
Merge pull request #322 from connorabbas/develop
Breadcrumbs, fixes, nav title link
2 parents e2da810 + 0bc2a99 commit ef1692c

File tree

10 files changed

+57
-28
lines changed

10 files changed

+57
-28
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<script setup>
2+
import ApplicationLogo from '@/components/ApplicationLogo.vue';
3+
</script>
4+
5+
<template>
6+
<Button
7+
:href="route('welcome')"
8+
pt:root:class="flex items-center justify-start gap-4 no-underline p-0"
9+
variant="link"
10+
as="InertiaLink"
11+
>
12+
<ApplicationLogo class="block h-8 lg:h-10 w-auto fill-current text-surface-900 dark:text-surface-0" />
13+
<span class="font-bold">Laravel + PrimeVue Starter Kit</span>
14+
</Button>
15+
</template>

resources/js/components/primevue/menu/PanelMenu.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ defineExpose({ el: childRef });
3232
v-if="item.route"
3333
:href="item.route"
3434
:class="[
35-
'p-panelmenu-item-link flex items-center cursor-pointer no-underline px-4 py-2',
35+
'p-panelmenu-item-link flex items-center cursor-pointer no-underline p-2',
3636
{ 'font-bold! text-muted-color': item.active },
3737
]"
3838
custom
@@ -53,7 +53,7 @@ defineExpose({ el: childRef });
5353
:href="item.url"
5454
:target="item.target"
5555
:class="[
56-
'flex items-center cursor-pointer no-underline px-4 py-2',
56+
'flex items-center cursor-pointer no-underline p-2',
5757
hasSubmenu ? 'p-panelmenu-header-link' : 'p-panelmenu-item-link',
5858
]"
5959
>

resources/js/composables/useAppLayout.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,31 @@ export function useAppLayout() {
2828
active: currentRoute.value == 'dashboard',
2929
},
3030
{
31-
label: 'Info',
31+
label: 'Resources',
3232
lucideIcon: Info,
3333
items: [
34+
{
35+
label: 'Laravel Docs',
36+
url: 'https://laravel.com/docs/master',
37+
target: '_blank',
38+
lucideIcon: ExternalLink,
39+
},
3440
{
3541
label: 'PrimeVue Docs',
3642
url: 'https://primevue.org/',
43+
target: '_blank',
3744
lucideIcon: ExternalLink,
3845
},
3946
{
4047
label: 'Starter Kit Docs',
4148
url: 'https://connorabbas.github.io/laravel-primevue-starter-kit-docs/',
49+
target: '_blank',
4250
lucideIcon: FileSearch,
4351
},
4452
{
4553
label: 'Starter Kit Repo',
4654
url: 'https://github.com/connorabbas/laravel-primevue-starter-kit',
55+
target: '_blank',
4756
lucideIcon: FolderGit2,
4857
},
4958
],

resources/js/layouts/AppLayout.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script setup>
22
import AppLayout from '@/layouts/app/HeaderLayout.vue';
33
4-
defineProps({
4+
const props = defineProps({
55
breadcrumbs: {
66
type: Array,
77
default: () => [],
@@ -10,7 +10,7 @@ defineProps({
1010
</script>
1111

1212
<template>
13-
<AppLayout :breadcrumbs="breadcrumbs">
13+
<AppLayout :breadcrumbs="props.breadcrumbs">
1414
<slot />
1515
</AppLayout>
1616
</template>

resources/js/layouts/app/HeaderLayout.vue

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import { useTemplateRef } from 'vue';
33
import { usePage } from '@inertiajs/vue3';
44
import { useAppLayout } from '@/composables/useAppLayout';
55
import { ChevronsUpDown, ChevronDown, Menu as MenuIcon } from 'lucide-vue-next';
6-
import ApplicationLogo from '@/components/ApplicationLogo.vue';
76
import ClientOnly from '@/components/ClientOnly.vue';
7+
import NavLogoLink from '@/components/NavLogoLink.vue';
88
import FlashMessages from '@/components/FlashMessages.vue';
99
import Menu from '@/components/primevue/menu/Menu.vue';
1010
import Menubar from '@/components/primevue/menu/Menubar.vue';
@@ -91,11 +91,7 @@ const toggleMobileUserMenu = (event) => {
9191
>
9292
<template #start>
9393
<div class="shrink-0 flex items-center mr-5">
94-
<InertiaLink :href="route('welcome')">
95-
<ApplicationLogo
96-
class="block h-8 lg:h-10 w-auto fill-current text-surface-900 dark:text-surface-0"
97-
/>
98-
</InertiaLink>
94+
<NavLogoLink />
9995
</div>
10096
</template>
10197
<template #end>

resources/js/layouts/app/SidebarLayout.vue

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import { useTemplateRef } from 'vue';
33
import { usePage } from '@inertiajs/vue3';
44
import { ChevronsUpDown, Menu as MenuIcon } from 'lucide-vue-next';
55
import { useAppLayout } from '@/composables/useAppLayout';
6-
import ApplicationLogo from '@/components/ApplicationLogo.vue';
76
import ClientOnly from '@/components/ClientOnly.vue';
87
import FlashMessages from '@/components/FlashMessages.vue';
8+
import NavLogoLink from '@/components/NavLogoLink.vue';
99
import Menu from '@/components/primevue/menu/Menu.vue';
1010
import PanelMenu from '@/components/primevue/menu/PanelMenu.vue';
1111
import Breadcrumb from '@/components/primevue/menu/Breadcrumb.vue';
@@ -43,7 +43,7 @@ const toggleMobileUserMenu = (event) => {
4343
<!-- Mobile drawer menu -->
4444
<Drawer
4545
v-model:visible="mobileMenuOpen"
46-
position="left"
46+
position="right"
4747
>
4848
<div>
4949
<PanelMenu
@@ -82,13 +82,9 @@ const toggleMobileUserMenu = (event) => {
8282
<header class="block lg:fixed top-0 left-0 right-0 z-50">
8383
<nav class="dynamic-bg shadow-sm flex justify-between items-center lg:hidden">
8484
<Container class="grow">
85-
<div class="flex justify-between items-center py-4">
85+
<div class="flex justify-between items-center gap-4 py-4">
8686
<div>
87-
<InertiaLink :href="route('welcome')">
88-
<ApplicationLogo
89-
class="block h-8 w-auto fill-current text-surface-900 dark:text-surface-0"
90-
/>
91-
</InertiaLink>
87+
<NavLogoLink />
9288
</div>
9389
<div>
9490
<Button
@@ -114,11 +110,7 @@ const toggleMobileUserMenu = (event) => {
114110
<div class="w-full h-full flex flex-col justify-between p-4">
115111
<div class="space-y-6">
116112
<div class="p-2">
117-
<InertiaLink :href="route('welcome')">
118-
<ApplicationLogo
119-
class="block h-10 w-auto fill-current text-surface-900 dark:text-surface-0"
120-
/>
121-
</InertiaLink>
113+
<NavLogoLink />
122114
</div>
123115
<div>
124116
<PanelMenu

resources/js/pages/Dashboard.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
<script setup>
22
import AppLayout from '@/layouts/AppLayout.vue';
3+
4+
const breadcrumbs = [{ label: 'Dashboard' }];
35
</script>
46

57
<template>
6-
<AppLayout>
8+
<AppLayout :breadcrumbs>
79
<InertiaHead title="Dashboard" />
810

911
<Card>

resources/js/pages/settings/Appearance.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,15 @@
22
import AppLayout from '@/layouts/AppLayout.vue';
33
import SettingsLayout from '@/layouts/UserSettingsLayout.vue';
44
import SelectColorModeButton from '@/components/SelectColorModeButton.vue';
5+
6+
const breadcrumbs = [
7+
{ label: 'Dashboard', route: route('dashboard') },
8+
{ label: 'Appearance Settings' },
9+
];
510
</script>
611

712
<template>
8-
<AppLayout>
13+
<AppLayout :breadcrumbs>
914
<InertiaHead title="Appearance Settings" />
1015

1116
<SettingsLayout>

resources/js/pages/settings/Password.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ defineProps({
1515
},
1616
});
1717
18+
const breadcrumbs = [
19+
{ label: 'Dashboard', route: route('dashboard') },
20+
{ label: 'Password Settings' },
21+
];
22+
1823
const currentPasswordInput = useTemplateRef('current-password-input');
1924
const newPasswordInput = useTemplateRef('new-password-input');
2025
@@ -61,7 +66,7 @@ const updatePassword = () => {
6166
</script>
6267
6368
<template>
64-
<AppLayout>
69+
<AppLayout :breadcrumbs>
6570
<InertiaHead title="Password Settings" />
6671
6772
<SettingsLayout>

resources/js/pages/settings/Profile.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ defineProps({
1515
},
1616
});
1717
18+
const breadcrumbs = [
19+
{ label: 'Dashboard', route: route('dashboard') },
20+
{ label: 'Profile Settings' },
21+
];
22+
1823
const deleteUserModalOpen = ref(false);
1924
2025
const user = usePage().props.auth.user;
@@ -48,7 +53,7 @@ const updateProfileInformation = () => {
4853
</script>
4954

5055
<template>
51-
<AppLayout>
56+
<AppLayout :breadcrumbs>
5257
<InertiaHead title="Profile Settings" />
5358

5459
<SettingsLayout>

0 commit comments

Comments
 (0)