tangled
alpha
login
or
join now
gm112.bsky.social
/
org.neocities.gm112
0
fork
atom
Code for https://gm112.neocities.org/
gm112.neocities.org/
0
fork
atom
overview
issues
4
pulls
pipelines
fix: FOUC caused by nuxt/i18n chore: styling changes
gm112.bsky.social
3 weeks ago
78bdd6fe
e9305965
1/1
deploy.yaml
success
44s
+168
-128
7 changed files
expand all
collapse all
unified
split
app
app.config.ts
components
post
detail.vue
layers
00.base
nuxt.config.ts
nuxt.config.ts
package.json
patches
@nuxtjs__i18n.patch
pnpm-lock.yaml
-123
app/app.config.ts
···
1
1
-
export default defineAppConfig({
2
2
-
ui: {
3
3
-
colors: {
4
4
-
primary: 'blue',
5
5
-
neutral: 'neutral',
6
6
-
red: 'red',
7
7
-
},
8
8
-
header: {
9
9
-
slots: {
10
10
-
root: 'border-0',
11
11
-
title: 'text-alttp-white hover:no-underline hover:text-muted font-normal',
12
12
-
},
13
13
-
},
14
14
-
main: {
15
15
-
base: 'flex',
16
16
-
},
17
17
-
link: {
18
18
-
variants: {
19
19
-
active: {
20
20
-
false: 'text-zelda-alttp-triforce-gold hover:text-alttp-white',
21
21
-
},
22
22
-
},
23
23
-
compoundVariants: [
24
24
-
{
25
25
-
active: false,
26
26
-
disabled: false,
27
27
-
class: ['hover:underline hover:underline-offset-1'],
28
28
-
},
29
29
-
],
30
30
-
},
31
31
-
contentToc: {
32
32
-
slots: {
33
33
-
trigger: 'text-[32px] font-normal',
34
34
-
link: 'text-base font-normal',
35
35
-
},
36
36
-
compoundVariants: [
37
37
-
{
38
38
-
color: 'primary',
39
39
-
active: true,
40
40
-
class: {
41
41
-
link: 'text-highlighted underline underline-offset-1',
42
42
-
linkLeadingIcon: 'text-highlighted',
43
43
-
},
44
44
-
},
45
45
-
],
46
46
-
},
47
47
-
48
48
-
navigationMenu: {
49
49
-
slots: {
50
50
-
link: 'text-base font-normal text-shadow-none',
51
51
-
childLink: 'text-base font-normal text-shadow-none',
52
52
-
linkLabel: 'text-clip',
53
53
-
},
54
54
-
},
55
55
-
56
56
-
contentSurround: {
57
57
-
slots: {
58
58
-
link: ['border-0 hover:underline'],
59
59
-
linkLeading: [
60
60
-
'bg-inherit border-0 rounded-none hover:bg-inherit ring-0 group-hover:ring-0',
61
61
-
],
62
62
-
linkLeadingIcon: ['bg-inherit group-hover:bg-inherit link-da-flute-boi-img'],
63
63
-
linkTitle: ['alttp-text text-base font-normal'],
64
64
-
linkDescription: ['alttp-text text-base font-normal'],
65
65
-
},
66
66
-
variants: {
67
67
-
direction: {
68
68
-
left: 'text-center',
69
69
-
linkLeadingIcon: ['translate-40'],
70
70
-
},
71
71
-
},
72
72
-
},
73
73
-
prose: {
74
74
-
a: {
75
75
-
base: 'text-zelda-alttp-triforce-gold hover:text-zelda-alttp-triforce-gold-50',
76
76
-
},
77
77
-
h1: {
78
78
-
slots: {
79
79
-
base: 'text-[64px] font-normal',
80
80
-
},
81
81
-
},
82
82
-
h2: {
83
83
-
slots: {
84
84
-
base: 'text-[48px] font-normal',
85
85
-
leading: 'top-5.5',
86
86
-
},
87
87
-
},
88
88
-
h3: {
89
89
-
slots: {
90
90
-
base: 'text-[32px] font-normal',
91
91
-
leading: 'top-2 ',
92
92
-
},
93
93
-
},
94
94
-
95
95
-
pre: {
96
96
-
slots: {
97
97
-
filename: 'text-base',
98
98
-
},
99
99
-
},
100
100
-
101
101
-
code: {
102
102
-
base: 'alttp-text text-base font-normal',
103
103
-
variants: {
104
104
-
color: {
105
105
-
primary: 'text-alttp-white',
106
106
-
},
107
107
-
},
108
108
-
},
109
109
-
110
110
-
codeGroup: {
111
111
-
slots: {
112
112
-
trigger: 'text-base alttp-text',
113
113
-
triggerLabel: 'text-clip',
114
114
-
},
115
115
-
},
116
116
-
codeCollapse: {
117
117
-
slots: {
118
118
-
trigger: 'text-base font-normal alttp-text [&>span]:text-clip [&>span]:overflow-visible',
119
119
-
},
120
120
-
},
121
121
-
},
122
122
-
},
123
123
-
})
+2
-2
app/components/post/detail.vue
···
3
3
<ui-widget class="border-0 border-alttp">
4
4
<template #header>
5
5
<section class="p-2 mx-2">
6
6
-
<h1 class="text-[32px]">
6
6
+
<h1 class="text-[80px]">
7
7
{{ page.title }}
8
8
</h1>
9
9
-
<h2 v-if="!!page.description" class="text-sm py-2">
9
9
+
<h2 v-if="!!page.description" class="text-[32px] font-bold py-2">
10
10
{{ page.description }}
11
11
</h2>
12
12
</section>
+125
-1
layers/00.base/nuxt.config.ts
···
1
1
import type { FileBeforeParseHook } from '@nuxt/content'
2
2
3
3
export default defineNuxtConfig({
4
4
+
appConfig: {
5
5
+
ui: {
6
6
+
colors: {
7
7
+
primary: 'blue',
8
8
+
neutral: 'neutral',
9
9
+
red: 'red',
10
10
+
},
11
11
+
header: {
12
12
+
slots: {
13
13
+
root: 'border-0',
14
14
+
title: 'text-alttp-white hover:no-underline hover:text-muted font-normal',
15
15
+
},
16
16
+
},
17
17
+
main: {
18
18
+
base: 'flex',
19
19
+
},
20
20
+
link: {
21
21
+
variants: {
22
22
+
active: {
23
23
+
false: 'text-zelda-alttp-triforce-gold hover:text-alttp-white',
24
24
+
},
25
25
+
},
26
26
+
compoundVariants: [
27
27
+
{
28
28
+
active: false,
29
29
+
disabled: false,
30
30
+
class: ['hover:underline hover:underline-offset-1'],
31
31
+
},
32
32
+
],
33
33
+
},
34
34
+
contentToc: {
35
35
+
slots: {
36
36
+
trigger: 'text-[32px] font-normal',
37
37
+
link: 'text-base font-normal',
38
38
+
},
39
39
+
compoundVariants: [
40
40
+
{
41
41
+
color: 'primary',
42
42
+
active: true,
43
43
+
class: {
44
44
+
link: 'text-highlighted underline underline-offset-1',
45
45
+
linkLeadingIcon: 'text-highlighted',
46
46
+
},
47
47
+
},
48
48
+
],
49
49
+
},
50
50
+
51
51
+
navigationMenu: {
52
52
+
slots: {
53
53
+
link: 'text-base font-normal text-shadow-none',
54
54
+
childLink: 'text-base font-normal text-shadow-none',
55
55
+
linkLabel: 'text-clip',
56
56
+
},
57
57
+
},
58
58
+
59
59
+
contentSurround: {
60
60
+
slots: {
61
61
+
link: ['border-0 hover:underline'],
62
62
+
linkLeading: [
63
63
+
'bg-inherit border-0 rounded-none hover:bg-inherit ring-0 group-hover:ring-0',
64
64
+
],
65
65
+
linkLeadingIcon: ['bg-inherit group-hover:bg-inherit link-da-flute-boi-img'],
66
66
+
linkTitle: ['alttp-text text-base font-normal'],
67
67
+
linkDescription: ['alttp-text text-base font-normal'],
68
68
+
},
69
69
+
variants: {
70
70
+
direction: {
71
71
+
left: 'text-center',
72
72
+
linkLeadingIcon: ['translate-40'],
73
73
+
},
74
74
+
},
75
75
+
},
76
76
+
prose: {
77
77
+
a: {
78
78
+
base: 'text-zelda-alttp-triforce-gold hover:text-zelda-alttp-triforce-gold-50',
79
79
+
},
80
80
+
h1: {
81
81
+
slots: {
82
82
+
base: 'text-[64px] font-normal',
83
83
+
},
84
84
+
},
85
85
+
h2: {
86
86
+
slots: {
87
87
+
base: 'text-[48px] font-normal',
88
88
+
leading: 'top-5.5',
89
89
+
},
90
90
+
},
91
91
+
h3: {
92
92
+
slots: {
93
93
+
base: 'text-[32px] font-normal',
94
94
+
leading: 'top-2 ',
95
95
+
},
96
96
+
},
97
97
+
98
98
+
pre: {
99
99
+
slots: {
100
100
+
filename: 'text-base',
101
101
+
},
102
102
+
},
103
103
+
104
104
+
code: {
105
105
+
base: 'alttp-text text-base font-normal',
106
106
+
variants: {
107
107
+
color: {
108
108
+
primary: 'text-alttp-white',
109
109
+
},
110
110
+
},
111
111
+
},
112
112
+
113
113
+
codeGroup: {
114
114
+
slots: {
115
115
+
trigger: 'text-base alttp-text',
116
116
+
triggerLabel: 'text-clip',
117
117
+
},
118
118
+
},
119
119
+
codeCollapse: {
120
120
+
slots: {
121
121
+
trigger:
122
122
+
'text-base font-normal alttp-text [&>span]:text-clip [&>span]:overflow-visible',
123
123
+
},
124
124
+
},
125
125
+
},
126
126
+
},
127
127
+
},
4
128
modules: [
5
129
// '@nuxt/eslint', FIXME: May remove entirely just for oxlint usage.
6
130
'@nuxt/ui',
···
44
168
typescriptBundlerResolution: true,
45
169
},
46
170
experimental: {
47
47
-
nitroAutoImports: true,
171
171
+
nitroAutoImports: false,
48
172
appManifest: true,
49
173
asyncContext: true,
50
174
asyncEntry: true,
+5
nuxt.config.ts
···
25
25
i18n: {
26
26
locales: [{ code: 'en', iso: 'en-US', file: 'en.ts', dir: 'ltr', language: 'en-US' }],
27
27
defaultLocale: 'en',
28
28
+
experimental: {
29
29
+
preload: true,
30
30
+
stripMessagesPayload: true,
31
31
+
typedOptionsAndMessages: 'default',
32
32
+
},
28
33
},
29
34
pwa: {
30
35
registerType: 'autoUpdate',
+3
package.json
···
40
40
"pnpm": {
41
41
"overrides": {
42
42
"vite": "npm:rolldown-vite@7.3.1"
43
43
+
},
44
44
+
"patchedDependencies": {
45
45
+
"@nuxtjs/i18n": "patches/@nuxtjs__i18n.patch"
43
46
}
44
47
},
45
48
"packageManager": "pnpm@10.30.2+sha512.36cdc707e7b7940a988c9c1ecf88d084f8514b5c3f085f53a2e244c2921d3b2545bc20dd4ebe1fc245feec463bb298aecea7a63ed1f7680b877dc6379d8d0cb4"
+26
patches/@nuxtjs__i18n.patch
···
1
1
+
diff --git a/dist/runtime/shared/detection.js b/dist/runtime/shared/detection.js
2
2
+
index f1acf851083906e21a2a429898d380d1b0adeb17..f7456a4a1125fc7bf2e716dec35c86670b790424 100644
3
3
+
--- a/dist/runtime/shared/detection.js
4
4
+
+++ b/dist/runtime/shared/detection.js
5
5
+
@@ -6,9 +6,8 @@ import { parseAcceptLanguage } from "@intlify/utils";
6
6
+
import { matchDomainLocale } from "./domain.js";
7
7
+
import { useRuntimeI18n } from "../shared/utils.js";
8
8
+
import { useCookie } from "#app";
9
9
+
-const getCookieLocale = (event, cookieName) => (import.meta.client ? useCookie(cookieName).value : getCookie(event, cookieName)) || void 0;
10
10
+
const getRouteLocale = (event, route) => getLocaleFromRoute(route);
11
11
+
-const getHeaderLocale = (event) => findBrowserLocale(normalizedLocales, parseAcceptLanguage(getRequestHeader(event, "accept-language") || ""));
12
12
+
+
13
13
+
const getNavigatorLocale = (event) => findBrowserLocale(normalizedLocales, navigator.languages);
14
14
+
const getHostLocale = (event, path, domainLocales) => {
15
15
+
const host = import.meta.client ? new URL(window.location.href).host : getRequestURL(event, { xForwardedHost: true }).host;
16
16
+
@@ -24,8 +23,8 @@ export const useDetectors = (event, config, nuxtApp) => {
17
17
+
}
18
18
+
const runtimeI18n = useRuntimeI18n(nuxtApp);
19
19
+
return {
20
20
+
- cookie: () => getCookieLocale(event, config.cookieKey),
21
21
+
- header: () => import.meta.server ? getHeaderLocale(event) : void 0,
22
22
+
+ cookie: () => (import.meta.client ? useCookie(config.cookieKey).value : getCookie(event, config.cookieKey)) || void 0,
23
23
+
+ header: () => import.meta.server ? findBrowserLocale(normalizedLocales, parseAcceptLanguage(getRequestHeader(event, "accept-language") || "")) : void 0,
24
24
+
navigator: () => import.meta.client ? getNavigatorLocale(event) : void 0,
25
25
+
host: (path) => getHostLocale(event, path, runtimeI18n.domainLocales),
26
26
+
route: (path) => getRouteLocale(event, path)
+7
-2
pnpm-lock.yaml
···
7
7
overrides:
8
8
vite: npm:rolldown-vite@7.3.1
9
9
10
10
+
patchedDependencies:
11
11
+
'@nuxtjs/i18n':
12
12
+
hash: ac0616015af3001274a134d593af55dc8a0e5823f2e43f27991e70d46598c82b
13
13
+
path: patches/@nuxtjs__i18n.patch
14
14
+
10
15
importers:
11
16
12
17
.:
···
50
55
version: 4.0.0(magicast@0.5.2)(rolldown-vite@7.3.1(@types/node@25.3.1)(esbuild@0.27.3)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.2))(typescript@5.9.3)(vitest@4.0.18(@types/node@25.3.1)(esbuild@0.27.3)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.2))
51
56
'@nuxtjs/i18n':
52
57
specifier: ^10.2.3
53
53
-
version: 10.2.3(@vue/compiler-dom@3.5.28)(db0@0.3.4(better-sqlite3@12.6.2))(eslint@10.0.0(jiti@2.6.1))(ioredis@5.9.2)(magicast@0.5.2)(rollup@4.57.1)(vue@3.5.28(typescript@5.9.3))
58
58
+
version: 10.2.3(patch_hash=ac0616015af3001274a134d593af55dc8a0e5823f2e43f27991e70d46598c82b)(@vue/compiler-dom@3.5.28)(db0@0.3.4(better-sqlite3@12.6.2))(eslint@10.0.0(jiti@2.6.1))(ioredis@5.9.2)(magicast@0.5.2)(rollup@4.57.1)(vue@3.5.28(typescript@5.9.3))
54
59
'@types/node':
55
60
specifier: ^25.3.1
56
61
version: 25.3.1
···
9529
9534
transitivePeerDependencies:
9530
9535
- magicast
9531
9536
9532
9532
-
'@nuxtjs/i18n@10.2.3(@vue/compiler-dom@3.5.28)(db0@0.3.4(better-sqlite3@12.6.2))(eslint@10.0.0(jiti@2.6.1))(ioredis@5.9.2)(magicast@0.5.2)(rollup@4.57.1)(vue@3.5.28(typescript@5.9.3))':
9537
9537
+
'@nuxtjs/i18n@10.2.3(patch_hash=ac0616015af3001274a134d593af55dc8a0e5823f2e43f27991e70d46598c82b)(@vue/compiler-dom@3.5.28)(db0@0.3.4(better-sqlite3@12.6.2))(eslint@10.0.0(jiti@2.6.1))(ioredis@5.9.2)(magicast@0.5.2)(rollup@4.57.1)(vue@3.5.28(typescript@5.9.3))':
9533
9538
dependencies:
9534
9539
'@intlify/core': 11.2.8
9535
9540
'@intlify/h3': 0.7.4