Compare commits

...

32 Commits

Author SHA1 Message Date
suricatingss
3ea91d9058 ez deploy 2025-12-05 20:45:01 +00:00
suricatingss
60a6342814 table complete 2025-12-05 20:39:32 +00:00
suricatingss
a1c71a967a table complete 2025-12-05 20:39:04 +00:00
suricatingss
662be26cc8 table complete 2025-12-05 20:38:41 +00:00
suricatingss
9d64bd5756 removed bootstrap, new table 2025-12-05 19:55:45 +00:00
suricatingss
5133f7ac66 commit 2025-12-05 19:55:20 +00:00
suricatingss
5ea16c7383 remove volume 2025-12-05 00:32:12 +00:00
suricatingss
c4c189d2a9 corrections 2025-12-05 00:22:13 +00:00
suricatingss
731273b1b0 link correction 2025-12-05 00:19:31 +00:00
suricatingss
a644256ccb change in dockerfile 2025-12-05 00:19:19 +00:00
suricatingss
d2c95b4c6d simple button 2025-12-04 22:42:43 +00:00
suricatingss
5ea5170121 props added 2025-12-04 22:42:36 +00:00
suricatingss
788e18cc30 ignore non_important folders 2025-12-04 22:42:23 +00:00
suricatingss
a1a8d0e638 full build 2025-12-04 22:42:11 +00:00
77d96a8188 easy to deploy 2025-12-04 17:13:39 +00:00
ad761c0fe8 mobile dash works 2025-12-04 15:40:49 +00:00
2e6bd6730d collapse btn 2025-12-04 14:23:02 +00:00
df8c10037f new widgets 2025-12-04 13:16:12 +00:00
f76bb8c8b8 commit 2025-12-04 13:16:05 +00:00
801a8ebb66 ui custom colors (both on :root and .dark) 2025-12-04 13:15:44 +00:00
9cc79e2cfe also bootstrap 2025-12-04 13:15:27 +00:00
10c5cb67ea added bootstrap 2025-12-04 13:15:20 +00:00
348b9b0d84 temp fix <Icon> 2025-12-03 01:30:46 +00:00
593904097c changed default font 2025-12-03 01:30:27 +00:00
b45745b818 added tailwindcss 2025-12-03 01:30:18 +00:00
3b94500175 began page 2025-12-03 01:30:03 +00:00
9d1c87f3f9 commit 2025-12-02 22:00:43 +00:00
acf0becadf mdc & tailwind install 2025-12-02 22:00:35 +00:00
7a9af58a4b mdc installed 2025-12-02 22:00:06 +00:00
015f6df9b8 no main app 2025-12-02 18:40:59 +00:00
29483a05af change to pnpm 2025-12-02 18:40:51 +00:00
5fca9cc4bb commit 2025-12-02 13:00:35 +00:00
10 changed files with 1719 additions and 106 deletions

30
Dockerfile Normal file
View File

@@ -0,0 +1,30 @@
# This dockerfile is to turn .output into a docker image
# You still need to install the project on your machine and build it.
# Only then you run this docker file
# This project by default uses pnpm.
# If you wish to use npm, delete "pnpm-lock.yaml" first.
# 1. pnpm (or npm) i # If you get GNU problems, use pnpm (or npm) i --force
# 2. pnpm (or npm) run build # Sit back while it compiles
# 3. sudo docker build . -t myapp:latest (replace 'myapp' to whatever tag you wanna give your image)
# You should have the image now !
# Now you just need to create the container
# Here is an example command for creating a container
# sudo docker run -d --name myappcontainer --network host -e PORT=3000 myapp:latest
FROM node:22-alpine
WORKDIR /app
# Copy the build's result
COPY .output/ .
# Change the port and host
ENV PORT=3000
ENV HOST=0.0.0.0
EXPOSE 3000
CMD ["node", "/app/server/index.mjs"]

View File

@@ -7,69 +7,37 @@ Look at the [Nuxt documentation](https://nuxt.com/docs/getting-started/introduct
Make sure to install dependencies: Make sure to install dependencies:
```bash ```bash
# npm npm i -g pnpm # (updates your pnpm :D)
npm install
# pnpm
pnpm install pnpm install
# yarn
yarn install
# bun
bun install
``` ```
(this project uses PNPM)
## Development Server ## Development Server
Start the development server on `http://localhost:3000`: Start the development server on `http://localhost:3000`:
```bash ```bash
# npm
npm run dev
# pnpm
pnpm dev pnpm dev
# yarn
yarn dev
# bun
bun run dev
``` ```
## Production ## Deployment
Build the application for production:
```bash ```bash
# npm
npm run build
# pnpm
pnpm build pnpm build
# yarn
yarn build
# bun
bun run build
``` ```
Locally preview production build: Locally preview production build:
```bash ```bash
# npm
npm run preview
# pnpm
pnpm preview pnpm preview
# yarn
yarn preview
# bun
bun run preview
``` ```
Start the production server
```bash
node .output/server/index.mjs
```
### Check out the docker file to turn your app into a container for easy deployment!
Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information. Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.

View File

@@ -1,2 +1,20 @@
@import "tailwindcss"; @import "tailwindcss";
@import "@nuxt/ui"; @import "@nuxt/ui";
:root {
--font-sans: 'Public Sans', sans-serif;
--ui-bg: rgb(220,220,220);
}
.dark {
/*--ui-bg: var(--ui-color-neutral-950);*/
--ui-bg: rgb(17,17,17);
--ui-bg-accented: rgba(189, 23, 255, 0.3);
--ui-bg-elevated: rgba(189, 23, 255, 0.2);
--ui-primary: rgb(189, 23, 255);
}
.dark-widget-bg {
--ui-bg-elevated: rgb(34, 24, 32);
--ui-bg-accented: rgb(22,22,22);
}

View File

@@ -1,8 +1,10 @@
<script setup lang="ts"> <script setup lang="ts">
import type { NavigationMenuItem } from '@nuxt/ui' import type { NavigationMenuItem } from '@nuxt/ui'
//import Logo from '@nuxt/ui'
const items: NavigationMenuItem[][] = [[{ const items_def: NavigationMenuItem[][] = [
[{
label: 'Home', label: 'Home',
icon: 'i-lucide-house', icon: 'i-lucide-house',
active: true active: true
@@ -35,13 +37,20 @@ const items: NavigationMenuItem[][] = [[{
to: 'https://github.com/nuxt/ui', to: 'https://github.com/nuxt/ui',
target: '_blank' target: '_blank'
}]] }]]
const props = defineProps<{
items? : NavigationMenuItem[][]
}>()
const items: NavigationMenuItem[][] = props.items ?? items_def;
</script> </script>
<template> <template>
<UDashboardSidebar collapsible resizable :ui="{ footer: 'border-t border-default' }"> <UDashboardSidebar collapsible resizable :ui="{ footer: 'border-t border-default' }">
<template #header="{ collapsed }"> <template #header="{ collapsed }">
<Logo v-if="!collapsed" class="h-5 w-auto shrink-0" /> <AppLogo icon="i-simple-icons-nuxtdotjs" text="Nuxt" v-if="!collapsed" name="i-simple-icons-nuxtdotjs" class="h-5 w-auto shrink-0" />
<UIcon v-else name="i-simple-icons-nuxtdotjs" class="size-5 text-primary mx-auto" /> <UIcon v-else name="i-simple-icons-nuxtdotjs" class="size-5 text-primary mx-auto" />
</template> </template>

View File

@@ -1,6 +1,32 @@
<script setup lang="ts">
import type { NavigationMenuItem } from '@nuxt/ui'
const nav : NavigationMenuItem[][] = [[
{
label: 'Home',
icon: 'i-lucide-house',
active: true,
to: "/dashboard"
}, {
label: 'Inbox',
icon: 'i-lucide-inbox',
badge: '4',
to: "/inbox"
}, {
label: 'Contacts',
icon: 'i-lucide-users',
to: "/contacts"
}]];
/*[
{
label: "Feedback"
}
]];*/
</script>
<template> <template>
<UDashboardGroup> <UDashboardGroup>
<DashboardSidebar /> <DashboardSidebar collapsible resizable :items="nav"/>
<UDashboardSidebarCollapse />
<slot /> <slot />
</UDashboardGroup> </UDashboardGroup>

View File

@@ -1,12 +1,154 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { TableColumn } from "@nuxt/ui"
import { h } from 'vue'
definePageMeta({ definePageMeta({
layout: "dashboard" layout: "dashboard"
}); });
const color = useColorMode();
color.preference = "dark";
const cards: any[] = [
{
title: "1",
icon: "meteor-icons:chevron-up",
desc: "epah ya bro"
},
{
title: "2",
icon: "majesticons:award",
desc: "bolinhas de natal ou whatever"
},
{
title: "3",
icon: "svg-spinners:clock",
desc: "espera aí um becs bro"
},
];
// create the object itself
type Payment = {
id: string,
date: string,
status: string,
email: string,
amount: number
}
const table_demo = ref<Payment[]>([
{
id: '4600',
date: '2024-03-11T15:30:00',
status: 'paid',
email: 'james.anderson@example.com',
amount: 594
},
{
id: '4599',
date: '2024-03-11T10:10:00',
status: 'failed',
email: 'mia.white@example.com',
amount: 276
},
{
id: '4598',
date: '2024-03-11T08:50:00',
status: 'refunded',
email: 'william.brown@example.com',
amount: 315
},
{
id: '4597',
date: '2024-03-10T19:45:00',
status: 'paid',
email: 'emma.davis@example.com',
amount: 529
},
{
id: '4596',
date: '2024-03-10T15:55:00',
status: 'paid',
email: 'ethan.harris@example.com',
amount: 639
}
])
const table_headers: TableColumn<Payment>[] = [
{
accessorKey: 'id',
header: "ID",
cell: ({ row }) => `#${row.getValue('id')}`
},
{
accessorKey: 'date',
header: "Date",
cell: ({ row }) => {
return new Date(row.getValue('date')).toLocaleString("pt-PT",{
day: "numeric",
month: "short",
hour: "2-digit",
minute: "2-digit",
hour12: false
})
}
},
{
accessorKey: 'status',
header: "Status",
cell: ({row}) => {
let color: string;
switch(row.getValue('status')){
case "paid":
color = "success"; break;
case "failed":
color = "error"; break;
case "refunded":
color = "warning"; break;
default:
color = "neutral";
}
return h(UBadge, { class: "capitalize", variant: "subtle", color },
() => row.getValue("status"))
}
},
{
accessorKey: 'amount',
header: "Ammount",
cell: ({ row }) => { return "€" + row.getValue('amount') }
}
]
</script> </script>
<template> <template>
<UContainer>
<UDashboardSidebarToggle variant="subtle" class="absolute z-20 top-3 left-2.5"/>
<div class="mt-1 mb-3 flex flex-col w-full relative z-0">
<ProseH2 class="text-center m-0.5 w-full">Hey there, user!</ProseH2>
<ProseP class="text-center text-muted m-0.5">Welcome to the UI!</ProseP>
<UBadge variant="subtle" class="inline mx-auto">It's cool, isn't it ?</UBadge>
</div>
<!--<div class="mx-auto max-w-220">-->
<UPageGrid class="lg:grid-cols-3 lg:gap-0 not-lg:gap-3">
<UPageCard
v-for="card in cards"
:title="card.title"
:description="card.desc"
:icon="card.icon"
variant="subtle"
class="dark-widget-bg col-lg lg:rounded-none first:lg:rounded-l-2xl last:lg:rounded-r-2xl sm:rounded-2xl"
/>
</UPageGrid>
<UTable :data="table_demo" :columns="table_headers"/>
</UContainer>
</template> </template>
<style>
<style scoped>
@import "bootstrap/dist/css/bootstrap-grid.css";
</style> </style>

19
app/pages/index.vue Normal file
View File

@@ -0,0 +1,19 @@
<template>
<div class="flex flex-col">
<UButton
to="/dashboard"
target="_self"
variant="outline"
class="mx-auto mt-5">Go to dashboard
</UButton>
</div>
</template>
<script lang="js">
</script>
<style>
</style>

View File

@@ -5,10 +5,10 @@ export default defineNuxtConfig({
compatibilityDate: '2025-07-15', compatibilityDate: '2025-07-15',
devtools: {enabled: true}, devtools: {enabled: true},
css: ['./app/assets/css/global.css' ], css: ['./app/assets/css/global.css' ],
modules: ['@nuxt/image', '@nuxt/ui', '@nuxt/test-utils'], modules: ['@nuxt/image', '@nuxt/ui', '@nuxt/test-utils', '@nuxtjs/mdc'],
vite: { vite: {
plugins: [ plugins: [
tailwindcss(), tailwindcss()
], ],
}, },
}) })

View File

@@ -13,9 +13,11 @@
"@nuxt/image": "^2.0.0", "@nuxt/image": "^2.0.0",
"@nuxt/test-utils": "^3.20.1", "@nuxt/test-utils": "^3.20.1",
"@nuxt/ui": "^4.2.0", "@nuxt/ui": "^4.2.0",
"@nuxtjs/mdc": "0.19.1",
"@tailwindcss/vite": "^4.1.17", "@tailwindcss/vite": "^4.1.17",
"@vueuse/core": "^14.0.0", "@vueuse/core": "^14.0.0",
"@vueuse/head": "github:vueuse/head", "@vueuse/head": "github:vueuse/head",
"bootstrap": "^5.3.8",
"nuxt": "^4.2.1", "nuxt": "^4.2.1",
"nuxt-storm": "^1.1.3", "nuxt-storm": "^1.1.3",
"tailwindcss": "^4.1.17", "tailwindcss": "^4.1.17",
@@ -24,6 +26,7 @@
"vue-router": "^4.6.3" "vue-router": "^4.6.3"
}, },
"devDependencies": { "devDependencies": {
"@iconify-json/lucide": "^1.2.77",
"@nuxtjs/tailwindcss": "^6.14.0" "@nuxtjs/tailwindcss": "^6.14.0"
} }
} }

1508
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff