Skip to content

Commit cc51234

Browse files
authored
Merge pull request #153 from connorabbas/develop
Theme updates, Improvements
2 parents f5f7bd2 + 3eb8bbe commit cc51234

27 files changed

+318
-179
lines changed

.env.example

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ LOG_STACK=single
1919
LOG_DEPRECATIONS_CHANNEL=null
2020
LOG_LEVEL=debug
2121

22-
DB_CONNECTION=mysql
23-
DB_HOST=127.0.0.1
24-
DB_PORT=3306
25-
DB_DATABASE=laravel
26-
DB_USERNAME=root
27-
DB_PASSWORD=
22+
DB_CONNECTION=sqlite
23+
#DB_HOST=
24+
#DB_PORT=
25+
#DB_DATABASE=
26+
#DB_USERNAME=
27+
#DB_PASSWORD=
2828

2929
SESSION_DRIVER=file
3030
SESSION_LIFETIME=120
@@ -68,4 +68,4 @@ WWWUSER=1000
6868

6969
APP_PORT=8000
7070
VITE_PORT=5173
71-
FORWARD_DB_PORT=3306
71+
FORWARD_DB_PORT=

README.md

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22

33
## About
44

5-
![Static Badge](https://img.shields.io/badge/Laravel%20-%20v11%20-%20%23f9322c) ![Static Badge](https://img.shields.io/badge/Inertia.js%20-%20v2%20-%20%236b46c1) ![Static Badge](<https://img.shields.io/badge/Vue.js%20-%20v3.5%20-%20rgb(66%20184%20131)>) ![Static Badge](https://img.shields.io/badge/PrimeVue%20-%20v4%20-%20rgb(16%20185%20129)) ![Static Badge](https://img.shields.io/badge/Tailwind%20CSS%20-%20v4%20-%20%230284c7)
6-
5+
![Static Badge](https://img.shields.io/badge/Laravel%20-%20v11%20-%20%23f9322c) ![Static Badge](https://img.shields.io/badge/Inertia.js%20-%20v2%20-%20%236b46c1) ![Static Badge](<https://img.shields.io/badge/Vue.js%20-%20v3.5%20-%20rgb(66%20184%20131)>) ![Static Badge](<https://img.shields.io/badge/PrimeVue%20-%20v4%20-%20rgb(16%20185%20129)>) ![Static Badge](https://img.shields.io/badge/Tailwind%20CSS%20-%20v4%20-%20%230284c7)
76

87
A basic authentication starter kit using [Laravel](https://laravel.com/docs/master), [Intertia.js](https://inertiajs.com/), [PrimeVue](https://primevue.org/) components, and [Tailwind CSS](https://tailwindcss.com/). An equivalent to using [Laravel Breeze](https://laravel.com/docs/master/starter-kits#laravel-breeze), but with the added benefit of all the PrimeVue components at your disposal.
98

@@ -23,18 +22,42 @@ Do you need a separate Vue SPA front-end instead of using Inertia.js? Consider u
2322

2423
## Theme
2524

26-
This starter kit provides a light/dark mode toggle by default, and custom theme functionality provided by the powerful **PrimeVue V4** theming system, using styled mode and custom design token values.
25+
This starter kit features a built-in light/dark mode toggle along with a collection of custom theme presets built using the powerful **PrimeVue V4** theming system. It leverages styled mode and custom design token values to create flexible and cohesive UI designs.
26+
27+
### Prebuilt Theme Presets
28+
29+
The prebuilt theme presets are located in the `/resources/js/theme` directory. Each preset offers a distinct visual style:
30+
31+
- **noir**
32+
A minimal, monochromatic theme that serves as the default style.
33+
34+
- **bootstrap**
35+
Emulates the familiar look and feel of [Bootstrap](https://getbootstrap.com/).
2736

28-
The starting point for customizing your theme will be the `resources/js/theme-preset.js` module file. To quickly change the look and feel of your site, swap the [primary](https://primevue.org/theming/styled/#primary) values with a different set of [colors](https://primevue.org/theming/styled/#colors), change the [surface](https://primevue.org/theming/styled/#surface) `colorScheme` values (slate, gray, neutral, etc.), or completely change the [preset theme](https://primevue.org/theming/styled/#presets) (Aura used by default).
37+
- **breeze**
38+
Captures the aesthetic of [Laravel Breeze](https://laravel.com/docs/master/starter-kits#laravel-breeze).
2939

30-
Please reference the [PrimeVue Styled Mode Docs](https://primevue.org/theming/styled/) to fully understand how this system works, and how to further customize your theme to make it your own.
40+
- **enterprise**
41+
Provides a clean, no-nonsense corporate design.
42+
43+
### Customizing Your Own Theme
44+
45+
Creating your own theme preset is simple. You can:
46+
47+
- Swap the [primary](https://primevue.org/theming/styled/#primary) values with a different set of [colors](https://primevue.org/theming/styled/#colors).
48+
- Adjust the `colorScheme` [surface](https://primevue.org/theming/styled/#surface) values (e.g., slate, gray, neutral).
49+
- Change the extended [preset theme](https://primevue.org/theming/styled/#presets).
50+
51+
For detailed guidance on customization, please refer to the [PrimeVue Styled Mode Docs](https://primevue.org/theming/styled/).
3152

3253
## PrimeVue v4 w/ Tailwind CSS
3354

3455
If you have used a previous version of this project using **PrimeVue V3**, you'll know that [PrimeFlex](https://primeflex.org/) was used instead of [Tailwind CSS](https://tailwindcss.com/) for utility class styling. With V4 however, the PrimeTek team has officially suggested [Moving from PrimeFlex to Tailwind CSS](https://primevue.org/guides/primeflex/).
3556

3657
For this reason PrimeFlex has been removed, and Tailwind has been added into the project, along with the [tailwindcss-primeui](https://primevue.org/tailwind/#plugin) plugin. CSS layers have also been implemented so the Tailwind utilities can [override](https://primevue.org/tailwind/#override) the PrimeVue component styling when needed.
3758

59+
To clarify, Tailwind is **not** used for any component styling in this starter kit; instead, we use PrimeVue's styled mode with a custom theme preset implementation for component styling. Tailwind is applied solely for layout purposes **around** PrimeVue components and for minimal styling when needed.
60+
3861
---
3962

4063
## Usage with Docker
@@ -54,7 +77,7 @@ This starter kit is configured to use Docker Compose for local development with
5477
```env
5578
# Use any desired domain ending with .localhost
5679
# Match with value used in docker-compose.local.yml
57-
APP_URL=http://primevue-inertia.localhost
80+
APP_URL=http://inertia-primevue.localhost
5881
5982
DB_CONNECTION=pgsql
6083
DB_HOST=pgsql # name of service
@@ -63,7 +86,7 @@ This starter kit is configured to use Docker Compose for local development with
6386
DB_USERNAME=sail
6487
DB_PASSWORD=password
6588
66-
# Update port values as needed when running multiple projects
89+
# Update port values as needed when running multiple projects/services
6790
APP_PORT=8000
6891
VITE_PORT=5173
6992
FORWARD_DB_PORT=5432

docker-compose.local.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ services:
2121
- '.:/var/www/html'
2222
labels:
2323
- "traefik.enable=true"
24-
- "traefik.http.routers.primevue_inertia.rule=Host(`primevue-inertia.localhost`)"
25-
- "traefik.http.services.primevue_inertia.loadbalancer.server.port=80"
24+
- "traefik.http.routers.inertia_primevue.rule=Host(`inertia-primevue.localhost`)"
25+
- "traefik.http.services.inertia_primevue.loadbalancer.server.port=80"
2626
networks:
2727
- sail
2828
- proxy
@@ -39,7 +39,7 @@ services:
3939
POSTGRES_USER: '${DB_USERNAME}'
4040
POSTGRES_PASSWORD: '${DB_PASSWORD:-secret}'
4141
volumes:
42-
- 'primevue-inertia-pgsql:/var/lib/postgresql/data'
42+
- 'inertia-primevue-pgsql:/var/lib/postgresql/data'
4343
- './docker/local/database/pgsql/create-testing-database.sql:/docker-entrypoint-initdb.d/10-create-testing-database.sql'
4444
networks:
4545
- sail
@@ -49,7 +49,7 @@ services:
4949
timeout: 5s
5050

5151
volumes:
52-
primevue-inertia-pgsql:
52+
inertia-primevue-pgsql:
5353
driver: local
5454

5555
networks:

package-lock.json

Lines changed: 35 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,15 @@
99
"devDependencies": {
1010
"@eslint/js": "^9.18.0",
1111
"@inertiajs/vue3": "^2.0.0",
12+
"@primeuix/themes": "^1.0.0-rc.1",
1213
"@primevue/auto-import-resolver": "^4.2.2",
13-
"@primevue/themes": "^4.2.2",
1414
"@tailwindcss/vite": "^4.0.0",
1515
"@types/lodash-es": "^4.17.12",
1616
"@types/qs": "^6.9.18",
1717
"@typescript-eslint/eslint-plugin": "^8.19.1",
1818
"@typescript-eslint/parser": "^8.19.1",
1919
"@vitejs/plugin-vue": "^5.0.0",
2020
"@vueuse/core": "^12.4.0",
21-
"axios": "^1.6.4",
2221
"eslint": "^9.18.0",
2322
"eslint-config-prettier": "^9.1.0",
2423
"eslint-plugin-vue": "^9.32.0",
@@ -27,7 +26,7 @@
2726
"lodash": "^4.17.21",
2827
"lodash-es": "^4.17.21",
2928
"primeicons": "^7.0.0",
30-
"primevue": "^4.2.2",
29+
"primevue": "^4.2.5",
3130
"qs": "^6.14.0",
3231
"tailwindcss": "^4.0.0",
3332
"tailwindcss-primeui": "^0.3.2",

resources/js/Components/PrimeVue/LinksBreadcrumb.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const page = usePage();
2020
custom
2121
>
2222
<span
23-
v-show="item.icon"
23+
v-if="item.icon"
2424
:class="item.icon"
2525
class="p-breadcrumb-item-icon"
2626
/>
@@ -33,7 +33,7 @@ const page = usePage();
3333
v-bind="props.action"
3434
>
3535
<span
36-
v-show="item.icon"
36+
v-if="item.icon"
3737
:class="item.icon"
3838
class="p-breadcrumb-item-icon"
3939
/>

resources/js/Components/PrimeVue/LinksMenu.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ defineExpose({
2323
custom
2424
>
2525
<span
26-
v-show="item.icon"
26+
v-if="item.icon"
2727
:class="item.icon"
2828
class="p-menu-item-icon"
2929
/>
@@ -36,7 +36,7 @@ defineExpose({
3636
v-bind="props.action"
3737
>
3838
<span
39-
v-show="item.icon"
39+
v-if="item.icon"
4040
:class="item.icon"
4141
class="p-menu-item-icon"
4242
/>

resources/js/Components/PrimeVue/LinksMenuBar.vue

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,19 @@ defineExpose({
2121
<slot name="start"></slot>
2222
</template>
2323
<template #item="{ item, props, hasSubmenu, root }">
24-
<!-- add if using 'nora' preset theme -->
25-
<!-- hover:text-primary-100 dark:hover:text-primary-950 -->
2624
<InertiaLink
2725
v-if="item.route"
2826
:href="item.route"
2927
class="p-menubar-item-link"
3028
:class="{
31-
'font-bold text-primary': item.active,
32-
'text-muted-color': root && !item.active,
29+
'font-bold! text-muted-color': item.active,
3330
}"
3431
custom
3532
>
3633
<span
37-
v-show="item.icon"
34+
v-if="item.icon"
3835
:class="item.icon"
39-
class="p-menu-item-icon"
36+
class="p-menubar-item-icon"
4037
/>
4138
<span class="p-menu-item-label">{{ item.label }}</span>
4239
</InertiaLink>
@@ -46,20 +43,17 @@ defineExpose({
4643
:target="item.target"
4744
v-bind="props.action"
4845
class="p-menubar-item-link"
49-
:class="{
50-
'text-muted-color': root,
51-
}"
5246
>
5347
<span
54-
v-show="item.icon"
48+
v-if="item.icon"
5549
:class="item.icon"
56-
class="p-menu-item-icon"
50+
class="p-menubar-item-icon"
5751
/>
5852
<span class="p-menu-item-label">{{ item.label }}</span>
5953
<i
6054
v-if="hasSubmenu"
6155
:class="[
62-
'pi text-muted-color',
56+
'pi',
6357
root ? 'pi-angle-down text-xs' : 'pi-angle-right',
6458
]"
6559
></i>

0 commit comments

Comments
 (0)