Skip to content

Commit 2d30113

Browse files
author
robotism
committed
update
1 parent 3990362 commit 2d30113

36 files changed

+1427
-2306
lines changed

content.config.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ export default defineContentConfig({
1515
category: z.array(z.string()),
1616
tags: z.array(z.string()),
1717
cover: z.string(),
18-
locale: z.string(),
1918
createdAt: z.date(),
2019
updatedAt: z.date(),
2120
route: z.string(),
@@ -37,7 +36,6 @@ export default defineContentConfig({
3736
category: z.array(z.string()),
3837
tags: z.array(z.string()),
3938
cover: z.string(),
40-
locale: z.string(),
4139
createdAt: z.date(),
4240
updatedAt: z.date(),
4341
excerpt: z.object({
@@ -59,7 +57,6 @@ export default defineContentConfig({
5957
category: z.array(z.string()),
6058
tags: z.array(z.string()),
6159
cover: z.string(),
62-
locale: z.string(),
6360
createdAt: z.date(),
6461
updatedAt: z.date(),
6562
excerpt: z.object({

i18n/locales/en-US.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import moment from "moment";
2-
32
import "moment/dist/locale/en-gb";
43

4+
import quasarLangEn from "quasar/lang/en-US.js";
5+
56
if (!moment.locales().includes("en")) {
67
moment.defineLocale("en", {
78
parentLocale: "en-gb",
@@ -11,6 +12,7 @@ if (!moment.locales().includes("en")) {
1112
export default defineI18nLocale(async (locale) => {
1213
return {
1314
welcome: "Welcome!",
15+
1416
nav: {
1517
"": "home",
1618
home: "Home",
@@ -23,12 +25,18 @@ export default defineI18nLocale(async (locale) => {
2325
readMore: "Read More",
2426
notFound: "Page not found",
2527
noContent: "Oops! The content you're looking for doesn't exist.",
28+
previous: "Previous",
29+
next: "Next",
2630
},
2731
tools: {
32+
search: "Search",
2833
online: "Online Tools",
2934
regex: "Regex",
3035
certinfo: "Certinfo",
3136
},
37+
quasar: {
38+
...quasarLangEn,
39+
},
3240
...useRuntimeConfig().public.locales[locale],
3341
};
3442
});

i18n/locales/zh-CN.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import moment from "moment";
22
import "moment/dist/locale/zh-cn";
33

4+
import quasarLangZh from "quasar/lang/zh-CN.js";
5+
46
if (!moment.locales().includes("zh")) {
57
moment.defineLocale("zh", {
68
parentLocale: "zh-cn",
@@ -23,12 +25,18 @@ export default defineI18nLocale(async (locale) => {
2325
readMore: "阅读更多",
2426
notFound: "页面不存在",
2527
noContent: "哎呀! 您访问的页面不存在。",
28+
previous: "上一篇",
29+
next: "下一篇",
2630
},
2731
tools: {
32+
search: "搜索",
2833
online: "在线工具",
2934
regex: "正则表达式",
3035
certinfo: "证书信息",
3136
},
37+
quasar: {
38+
...quasarLangZh,
39+
},
3240
...useRuntimeConfig().public.locales[locale],
3341
};
3442
});

nuxt.config.ts

Lines changed: 43 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
// https://nuxt.com/docs/api/configuration/nuxt-config
2-
import Aura from "@primeuix/themes/aura";
2+
import tailwindcss from "@tailwindcss/vite";
33

44
import appconfig from "./site.config";
55

66
export default defineNuxtConfig({
77
compatibilityDate: "2025-02-19",
88
devtools: {
99
enabled: true,
10-
1110
timeline: {
1211
enabled: true,
1312
},
1413
},
14+
vite: {
15+
plugins: [tailwindcss()],
16+
},
1517
nitro: {
1618
prerender: {
1719
crawlLinks: true,
@@ -33,8 +35,10 @@ export default defineNuxtConfig({
3335
"@nuxt/content",
3436
"@nuxt/image",
3537
"@vueuse/nuxt",
36-
"@primevue/nuxt-module",
3738
"@nuxt/ui",
39+
"nuxt-quasar-ui",
40+
"@nuxtjs/color-mode",
41+
"@nuxt/icon",
3842
],
3943
srcDir: "src/",
4044
routeRules: {
@@ -43,16 +47,6 @@ export default defineNuxtConfig({
4347
site: {
4448
url: appconfig.site.url,
4549
},
46-
app: {
47-
pageTransition: {
48-
name: "fade",
49-
mode: "out-in", // default
50-
},
51-
layoutTransition: {
52-
name: "fade",
53-
mode: "out-in", // default
54-
},
55-
},
5650
colorMode: {
5751
preference: "system", // default value of $colorMode.preference
5852
fallback: "dark", // fallback value if not system preference found
@@ -66,7 +60,6 @@ export default defineNuxtConfig({
6660
stylistic: {
6761
indent: "tab",
6862
semi: true,
69-
// ...
7063
},
7164
},
7265
},
@@ -87,17 +80,18 @@ export default defineNuxtConfig({
8780
},
8881
},
8982
i18n: {
83+
baseUrl: appconfig.site.url,
9084
strategy: "prefix_and_default",
9185
locales: [
9286
{
9387
code: "en",
9488
name: "English",
95-
file: "en-US.ts",
89+
files: ["en-US.ts"],
9690
},
9791
{
9892
code: "zh",
9993
name: "中文",
100-
file: "zh-CN.ts",
94+
files: ["zh-CN.ts"],
10195
},
10296
],
10397
detectBrowserLanguage: {
@@ -108,29 +102,38 @@ export default defineNuxtConfig({
108102
defaultLocale: `en`,
109103
lazy: true,
110104
},
111-
css: ["~/app.css"],
112-
tailwindcss: {
113-
cssPath: ["~/app.css", { injectPosition: "first" }],
114-
config: {},
115-
viewer: true,
116-
exposeConfig: false,
117-
},
118-
primevue: {
119-
options: {
120-
theme: {
121-
preset: Aura,
122-
options: {
123-
darkModeSelector: ".dark",
124-
},
125-
},
126-
},
127-
composables: {
128-
include: ["*"],
129-
exclude: ["useToast"],
130-
},
131-
directives: {
132-
include: "*",
105+
css: ["~/assets/css/app.css"],
106+
quasar: {
107+
lang: "en-US",
108+
plugins: [
109+
"Dark",
110+
"Notify",
111+
"Dialog",
112+
"Loading",
113+
"LoadingBar",
114+
"BottomSheet",
115+
"AppVisibility",
116+
"AppFullscreen",
117+
"LocalStorage",
118+
"SessionStorage",
119+
],
120+
extras: {
121+
animations: "all",
122+
font: "roboto-font",
123+
fontIcons: [
124+
"bootstrap-icons",
125+
"ionicons-v4",
126+
"line-awesome",
127+
"material-icons",
128+
"material-icons-outlined",
129+
"material-icons-round",
130+
"material-icons-sharp",
131+
"material-symbols-outlined",
132+
"material-symbols-rounded",
133+
"material-symbols-sharp",
134+
"mdi-v7",
135+
"themify",
136+
],
133137
},
134138
},
135-
content: {},
136-
});
139+
});

0 commit comments

Comments
 (0)