Skip to content

Commit

Permalink
Merge pull request #5 from wisemen-digital/feature/nuxt-4
Browse files Browse the repository at this point in the history
[FEATURE]: Nuxt 4 template
  • Loading branch information
Robbe95 authored Jun 25, 2024
2 parents c2be7b5 + e3586bb commit d0eacfb
Show file tree
Hide file tree
Showing 334 changed files with 22,725 additions and 2,526 deletions.
7 changes: 6 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
NUXT_PUBLIC_BASE_URL=
NUXT_PUBLIC_API_BASE_URL=
NUXT_PUBLIC_API_AUTH_URL=
NUXT_PUBLIC_API_CLIENT_ID=
NUXT_PUBLIC_API_CLIENT_SECRET=

NUXT_PUBLIC_ENVIRONMENT=
86 changes: 12 additions & 74 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,78 +1,16 @@
{
"eslint.experimental.useFlatConfig": true,
"prettier.enable": false,
"editor.formatOnSave": false,
"html.format.enable": false,
// Formatting with ESLINT
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "always",
"source.organizeImports": "always"
},

// Change to main project language
"i18n-ally.sourceLanguage": "nl",
"i18n-ally.displayLanguage": "nl",
"eslint.rules.customizations": [
{
"rule": "style/*",
"severity": "off"
},
{
"rule": "format/*",
"severity": "off"
},
{
"rule": "*-indent",
"severity": "off"
},
{
"rule": "*-spacing",
"severity": "off"
},
{
"rule": "*-spaces",
"severity": "off"
},
{
"rule": "*-order",
"severity": "off"
},
{
"rule": "*-dangle",
"severity": "off"
},
{
"rule": "*-newline",
"severity": "off"
},
{
"rule": "*quotes",
"severity": "off"
},
{
"rule": "*semi",
"severity": "off"
}
],
// Enable eslint for all supported languages
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"vue",
"html",
"markdown",
"json",
"jsonc",
"yaml",
"toml"
],
"i18n-ally.keystyle": "nested",
"i18n-ally.localesPaths": [
"locales"
"layers/base/locales",
"layers/auth/locales",
"app/locales"
],
"i18n-ally.displayLanguage": "nl",
"i18n-ally.enabledFrameworks": [
"vue"
],
// Fix unknown at-rules for scss and css (UnoCSS)
"scss.lint.unknownAtRules": "ignore",
"css.lint.unknownAtRules": "ignore"
"i18n-ally.keystyle": "flat",
"typescript.preferences.importModuleSpecifier": "non-relative",
"javascript.preferences.importModuleSpecifier": "non-relative",
"typescript.tsdk": "node_modules/typescript/lib",
"i18n-ally.sourceLanguage": "en"
}
11 changes: 0 additions & 11 deletions app.vue

This file was deleted.

26 changes: 26 additions & 0 deletions app/App.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<script setup lang="ts">
import { ConfigProvider } from 'radix-vue'
function useIdFunction() {
return useId()
}
</script>

<template>
<SeoWrapper>
<div class="flex w-screen flex-1">
<div class="w-full">
<ConfigProvider :use-id="useIdFunction">
<NuxtLoadingIndicator color="#E94935" />
<NuxtLayout>
<NuxtPage />
</NuxtLayout>
<Teleport to="#teleports">
<AppDialogContainer />
<AppToastContainer />
</Teleport>
</ConfigProvider>
</div>
</div>
</SeoWrapper>
</template>
15 changes: 4 additions & 11 deletions error.vue → app/Error.vue
Original file line number Diff line number Diff line change
@@ -1,30 +1,23 @@
<script setup lang="ts">
interface NuxtError {
url: string
data: any
description: string
message: string
statusCode: number
statusMessage: string
message: string
description: string
data: any
url: string
}
const props = defineProps<{
error: NuxtError
}>()
function handleError() {
return clearError({ redirect: getLocalePath('index') })
}
</script>

<template>
<NuxtLayout>
<div>
<h2>{{ props.error.statusCode ?? 404 }}</h2>
<p>{{ props.error.message ?? 'Page not found' }}</p>
<button @click="handleError">
<span>Go back</span>
</button>
</div>
</NuxtLayout>
</template>
Expand Down
9 changes: 9 additions & 0 deletions app/layouts/default.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<template>
<div>
<div class="flex min-h-screen flex-col">
<div class="container relative z-0 mx-auto flex w-full flex-1 flex-col items-center justify-center overflow-x-hidden px-4">
<slot />
</div>
</div>
</div>
</template>
2 changes: 2 additions & 0 deletions app/locales/en.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
}
2 changes: 2 additions & 0 deletions app/locales/fr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
}
4 changes: 4 additions & 0 deletions app/locales/nl.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"test.login.forgot_password": "Wachtwoord vergeten?"

}
5 changes: 5 additions & 0 deletions app/pages/[...404].vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<template>
<div class="w-full">
<MockConstruction />
</div>
</template>
15 changes: 15 additions & 0 deletions app/pages/index.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<script setup lang="ts">
definePageMeta({
middleware: 'auth-middleware',
})
</script>

<template>
<div class="w-full">
<MockConstruction />
</div>
</template>

<style scoped>
</style>
21 changes: 0 additions & 21 deletions assets/styles/main.scss

This file was deleted.

15 changes: 15 additions & 0 deletions components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"$schema": "https://wisemen-digital.github.io/vue-core/_generation",
"aliases": {
"components": "@base/components/core",
"composables": "@base/composables/core",
"config": "./layers/base",
"icons": "@base/icons",
"libs": "@base/libs",
"root": "./layers/base",
"styles": "@base/assets/styles",
"types": "@base/types/core",
"utils": "@base/utils/core"
},
"style": "wisemen"
}
17 changes: 0 additions & 17 deletions components/Container.vue

This file was deleted.

11 changes: 0 additions & 11 deletions components/app/AppFooter.vue

This file was deleted.

11 changes: 0 additions & 11 deletions components/app/AppHeaderMobile.vue

This file was deleted.

43 changes: 0 additions & 43 deletions components/app/AppLoadingSpinner.vue

This file was deleted.

Loading

0 comments on commit d0eacfb

Please sign in to comment.