111
This commit is contained in:
parent
dbf62feea9
commit
660379d2b8
14 changed files with 1498 additions and 3206 deletions
|
|
@ -1,82 +1,48 @@
|
|||
// Nuxt 3 + Quasar + Tailwind + TypeScript
|
||||
// Configuration for E-Learning Platform
|
||||
export default defineNuxtConfig({
|
||||
compatibilityDate: '2026-01-19',
|
||||
|
||||
modules: [
|
||||
'nuxt-quasar-ui',
|
||||
'@nuxtjs/tailwindcss',
|
||||
'@nuxtjs/i18n'
|
||||
],
|
||||
|
||||
i18n: {
|
||||
strategy: 'no_prefix',
|
||||
defaultLocale: 'th',
|
||||
|
||||
// ✅ สำคัญ: ไม่ใส่ i18n/ ซ้ำ (ฐานคือโฟลเดอร์ i18n อยู่แล้ว)
|
||||
langDir: 'locales',
|
||||
lazy: true,
|
||||
|
||||
locales: [
|
||||
{ code: 'th', iso: 'th-TH', name: 'ไทย', file: 'th.json' },
|
||||
{ code: 'en', iso: 'en-US', name: 'English', file: 'en.json' }
|
||||
],
|
||||
|
||||
// ✅ ให้ใช้ config จากไฟล์นี้ด้วย (ถ้าคุณมี i18n.config.ts)
|
||||
vueI18n: './i18n.config.ts',
|
||||
|
||||
detectBrowserLanguage: {
|
||||
useCookie: true,
|
||||
cookieKey: 'i18n_redirected',
|
||||
redirectOn: 'root'
|
||||
}
|
||||
},
|
||||
|
||||
css: ['~/assets/css/main.css'],
|
||||
|
||||
modules: ["nuxt-quasar-ui", "@nuxtjs/tailwindcss"],
|
||||
css: ["~/assets/css/main.css"],
|
||||
typescript: {
|
||||
strict: true
|
||||
strict: true,
|
||||
},
|
||||
|
||||
quasar: {
|
||||
plugins: ['Notify'],
|
||||
plugins: ["Notify"],
|
||||
config: {
|
||||
brand: {
|
||||
primary: '#4b82f7',
|
||||
secondary: '#2f5ed7',
|
||||
accent: '#44d4a8',
|
||||
dark: '#0f1827'
|
||||
}
|
||||
}
|
||||
primary: "#4b82f7",
|
||||
secondary: "#2f5ed7",
|
||||
accent: "#44d4a8",
|
||||
dark: "#0f1827",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
components: [
|
||||
{
|
||||
path: '~/components',
|
||||
pathPrefix: false
|
||||
}
|
||||
path: "~/components",
|
||||
pathPrefix: false,
|
||||
},
|
||||
],
|
||||
|
||||
app: {
|
||||
head: {
|
||||
htmlAttrs: {
|
||||
lang: 'th'
|
||||
lang: 'th',
|
||||
},
|
||||
title: 'E-Learning System',
|
||||
meta: [{ name: 'viewport', content: 'width=device-width, initial-scale=1' }],
|
||||
title: "E-Learning System",
|
||||
meta: [
|
||||
{ name: "viewport", content: "width=device-width, initial-scale=1" },
|
||||
],
|
||||
link: [
|
||||
{
|
||||
rel: 'stylesheet',
|
||||
href:
|
||||
'https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Prompt:wght@300;400;500;600;700;800;900&family=Sarabun:wght@300;400;500;600;700;800&display=swap'
|
||||
}
|
||||
]
|
||||
}
|
||||
rel: "stylesheet",
|
||||
href: "https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Prompt:wght@300;400;500;600;700;800;900&family=Sarabun:wght@300;400;500;600;700;800&display=swap",
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
|
||||
runtimeConfig: {
|
||||
public: {
|
||||
apiBase: process.env.NUXT_PUBLIC_API_BASE || 'http://localhost:4000/api'
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue