Compare commits
36 Commits
ac4bf4e210
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3ea91d9058 | ||
|
|
60a6342814 | ||
|
|
a1c71a967a | ||
|
|
662be26cc8 | ||
|
|
9d64bd5756 | ||
|
|
5133f7ac66 | ||
|
|
5ea16c7383 | ||
|
|
c4c189d2a9 | ||
|
|
731273b1b0 | ||
|
|
a644256ccb | ||
|
|
d2c95b4c6d | ||
|
|
5ea5170121 | ||
|
|
788e18cc30 | ||
|
|
a1a8d0e638 | ||
| 77d96a8188 | |||
| ad761c0fe8 | |||
| 2e6bd6730d | |||
| df8c10037f | |||
| f76bb8c8b8 | |||
| 801a8ebb66 | |||
| 9cc79e2cfe | |||
| 10c5cb67ea | |||
| 348b9b0d84 | |||
| 593904097c | |||
| b45745b818 | |||
| 3b94500175 | |||
| 9d1c87f3f9 | |||
| acf0becadf | |||
| 7a9af58a4b | |||
| 015f6df9b8 | |||
| 29483a05af | |||
| 5fca9cc4bb | |||
|
|
0e18d1aad6 | ||
|
|
e37db736e0 | ||
|
|
7cc928f150 | ||
|
|
07cc6a6c80 |
30
Dockerfile
Normal file
30
Dockerfile
Normal 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"]
|
||||
54
README.md
54
README.md
@@ -7,69 +7,37 @@ Look at the [Nuxt documentation](https://nuxt.com/docs/getting-started/introduct
|
||||
Make sure to install dependencies:
|
||||
|
||||
```bash
|
||||
# npm
|
||||
npm install
|
||||
|
||||
# pnpm
|
||||
npm i -g pnpm # (updates your pnpm :D)
|
||||
pnpm install
|
||||
|
||||
# yarn
|
||||
yarn install
|
||||
|
||||
# bun
|
||||
bun install
|
||||
```
|
||||
(this project uses PNPM)
|
||||
|
||||
## Development Server
|
||||
|
||||
Start the development server on `http://localhost:3000`:
|
||||
|
||||
```bash
|
||||
# npm
|
||||
npm run dev
|
||||
|
||||
# pnpm
|
||||
pnpm dev
|
||||
|
||||
# yarn
|
||||
yarn dev
|
||||
|
||||
# bun
|
||||
bun run dev
|
||||
```
|
||||
|
||||
## Production
|
||||
|
||||
Build the application for production:
|
||||
## Deployment
|
||||
|
||||
```bash
|
||||
# npm
|
||||
npm run build
|
||||
|
||||
# pnpm
|
||||
pnpm build
|
||||
|
||||
# yarn
|
||||
yarn build
|
||||
|
||||
# bun
|
||||
bun run build
|
||||
```
|
||||
|
||||
Locally preview production build:
|
||||
|
||||
```bash
|
||||
# npm
|
||||
npm run preview
|
||||
|
||||
# pnpm
|
||||
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.
|
||||
|
||||
@@ -1,2 +1,20 @@
|
||||
@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);
|
||||
}
|
||||
@@ -1,7 +1,10 @@
|
||||
<script setup lang="ts">
|
||||
import type { NavigationMenuItem } from '@nuxt/ui'
|
||||
//import Logo from '@nuxt/ui'
|
||||
|
||||
const items: NavigationMenuItem[][] = [[{
|
||||
|
||||
const items_def: NavigationMenuItem[][] = [
|
||||
[{
|
||||
label: 'Home',
|
||||
icon: 'i-lucide-house',
|
||||
active: true
|
||||
@@ -34,12 +37,20 @@ const items: NavigationMenuItem[][] = [[{
|
||||
to: 'https://github.com/nuxt/ui',
|
||||
target: '_blank'
|
||||
}]]
|
||||
|
||||
const props = defineProps<{
|
||||
items? : NavigationMenuItem[][]
|
||||
}>()
|
||||
|
||||
const items: NavigationMenuItem[][] = props.items ?? items_def;
|
||||
</script>
|
||||
|
||||
|
||||
<template>
|
||||
|
||||
<UDashboardSidebar collapsible resizable :ui="{ footer: 'border-t border-default' }">
|
||||
<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" />
|
||||
</template>
|
||||
|
||||
@@ -1,7 +1,33 @@
|
||||
<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>
|
||||
<UDashboardGroup>
|
||||
<Sidebar />
|
||||
|
||||
<DashboardSidebar collapsible resizable :items="nav"/>
|
||||
<UDashboardSidebarCollapse />
|
||||
|
||||
<slot />
|
||||
</UDashboardGroup>
|
||||
</template>
|
||||
|
||||
154
app/pages/dashboard.vue
Normal file
154
app/pages/dashboard.vue
Normal file
@@ -0,0 +1,154 @@
|
||||
<script lang="ts" setup>
|
||||
import type { TableColumn } from "@nuxt/ui"
|
||||
import { h } from 'vue'
|
||||
|
||||
definePageMeta({
|
||||
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>
|
||||
|
||||
<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>
|
||||
|
||||
<style scoped>
|
||||
@import "bootstrap/dist/css/bootstrap-grid.css";
|
||||
|
||||
</style>
|
||||
@@ -1,12 +0,0 @@
|
||||
<script lang="ts" setup>
|
||||
definePageMeta({
|
||||
layout: "dashboard"
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
</template>
|
||||
<style>
|
||||
|
||||
</style>
|
||||
19
app/pages/index.vue
Normal file
19
app/pages/index.vue
Normal 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>
|
||||
@@ -4,11 +4,11 @@ import tailwindcss from "@tailwindcss/vite";
|
||||
export default defineNuxtConfig({
|
||||
compatibilityDate: '2025-07-15',
|
||||
devtools: {enabled: true},
|
||||
css: ['./app/assets/css/global.css'],
|
||||
modules: ['@nuxt/image', '@nuxt/ui', '@nuxt/test-utils'],
|
||||
css: ['./app/assets/css/global.css' ],
|
||||
modules: ['@nuxt/image', '@nuxt/ui', '@nuxt/test-utils', '@nuxtjs/mdc'],
|
||||
vite: {
|
||||
plugins: [
|
||||
tailwindcss(),
|
||||
tailwindcss()
|
||||
],
|
||||
},
|
||||
})
|
||||
13752
package-lock.json
generated
13752
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -13,9 +13,11 @@
|
||||
"@nuxt/image": "^2.0.0",
|
||||
"@nuxt/test-utils": "^3.20.1",
|
||||
"@nuxt/ui": "^4.2.0",
|
||||
"@nuxtjs/mdc": "0.19.1",
|
||||
"@tailwindcss/vite": "^4.1.17",
|
||||
"@vueuse/core": "^14.0.0",
|
||||
"@vueuse/head": "github:vueuse/head",
|
||||
"bootstrap": "^5.3.8",
|
||||
"nuxt": "^4.2.1",
|
||||
"nuxt-storm": "^1.1.3",
|
||||
"tailwindcss": "^4.1.17",
|
||||
@@ -24,6 +26,7 @@
|
||||
"vue-router": "^4.6.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@iconify-json/lucide": "^1.2.77",
|
||||
"@nuxtjs/tailwindcss": "^6.14.0"
|
||||
}
|
||||
}
|
||||
|
||||
1508
pnpm-lock.yaml
generated
1508
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user