@cbnventures/nova 0.34.0 → 0.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/package.json +1 -1
- package/build/src/lib/docker-packaging.d.ts.map +1 -1
- package/build/src/lib/docker-packaging.js +4 -0
- package/build/src/lib/docker-packaging.js.map +1 -1
- package/build/src/types/tests/cli/scaffold/app/android.test.d.ts +2 -0
- package/build/src/types/tests/scaffold-output-contract.test.d.ts +27 -0
- package/build/templates/scaffold/app/android/package.json +1 -1
- package/build/templates/scaffold/app/apple/Sources/ContentView.swift +6 -6
- package/build/templates/scaffold/app/apple/Sources/Localizable.xcstrings +75 -0
- package/build/templates/scaffold/app/apple/package.json +1 -1
- package/build/templates/scaffold/app/astro/package.json +1 -1
- package/build/templates/scaffold/app/astro/src/i18n/en.json +48 -0
- package/build/templates/scaffold/app/astro/src/pages/index.astro +31 -30
- package/build/templates/scaffold/app/discord-bot/package.json +1 -1
- package/build/templates/scaffold/app/express/package.json +1 -1
- package/build/templates/scaffold/app/nextjs/package.json +1 -1
- package/build/templates/scaffold/app/nextjs/src/app/[lang]/dictionaries/en.json +31 -0
- package/build/templates/scaffold/app/nextjs/src/app/[lang]/dictionaries.ts +33 -0
- package/build/templates/scaffold/app/nextjs/src/app/[lang]/layout.tsx +92 -0
- package/build/templates/scaffold/app/nextjs/src/app/{page.tsx → [lang]/page.tsx} +54 -34
- package/build/templates/scaffold/app/nextjs/src/i18n/config.ts +42 -0
- package/build/templates/scaffold/app/nextjs/src/proxy.ts +56 -0
- package/build/templates/scaffold/app/nextjs/src/types/app/[lang]/dictionaries.d.ts +21 -0
- package/build/templates/scaffold/app/nextjs/src/types/app/[lang]/layout.d.ts +63 -0
- package/build/templates/scaffold/app/nextjs/src/types/app/[lang]/page.d.ts +22 -0
- package/build/templates/scaffold/app/nextjs/src/types/i18n/config.d.ts +22 -0
- package/build/templates/scaffold/app/nextjs/src/types/proxy.d.ts +30 -0
- package/build/templates/scaffold/app/vite/package.json +1 -1
- package/build/templates/scaffold/docs/docusaurus/package.json +2 -2
- package/build/templates/scaffold/docs/docusaurus/src/pages/index.tsx +81 -20
- package/build/templates/scaffold/package/github-action/package.json +1 -1
- package/build/templates/scaffold/package/homebridge/package.json +1 -1
- package/build/templates/scaffold/package/pfsense/package.json +1 -1
- package/build/templates/scaffold-options/app/android-launchpad/app/src/main/java/[__ANDROID_PACKAGE_PATH__]/ui/main/MainScreen.kt +40 -34
- package/build/templates/scaffold-options/app/android-native/app/src/main/res/values/strings.xml +27 -0
- package/build/templates/scaffold-options/app/astro/cloudflare/astro.config.mjs +7 -0
- package/build/templates/scaffold-options/app/astro/node/astro.config.mjs +7 -0
- package/build/templates/scaffold-options/app/astro/static/astro.config.mjs +7 -0
- package/build/templates/scaffold-options/docker-image/common/Dockerfile +1 -0
- package/build/templates/scaffold-options/tool/serverless/cloudflare-workers/package.json +1 -1
- package/build/templates/scaffold-options/tool/serverless/vercel-functions/package.json +1 -1
- package/package.json +1 -1
- package/build/templates/scaffold/app/nextjs/src/app/layout.tsx +0 -46
- package/build/templates/scaffold/app/nextjs/src/types/app/layout.d.ts +0 -25
- package/build/templates/scaffold/app/nextjs/src/types/app/page.d.ts +0 -8
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { Metadata } from 'next';
|
|
2
|
+
import type {
|
|
3
|
+
ReactElement,
|
|
4
|
+
ReactNode,
|
|
5
|
+
} from 'react';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Layout.
|
|
9
|
+
*
|
|
10
|
+
* @since 0.0.0
|
|
11
|
+
*/
|
|
12
|
+
export type App_Lang_Layout_GenerateMetadata_Props_Params_Lang = string;
|
|
13
|
+
|
|
14
|
+
export type App_Lang_Layout_GenerateMetadata_Props_Params = {
|
|
15
|
+
lang: App_Lang_Layout_GenerateMetadata_Props_Params_Lang;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export type App_Lang_Layout_GenerateMetadata_Props = {
|
|
19
|
+
params: Promise<App_Lang_Layout_GenerateMetadata_Props_Params>;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export type App_Lang_Layout_GenerateMetadata_Returns = Promise<Metadata>;
|
|
23
|
+
|
|
24
|
+
export type App_Lang_Layout_GenerateMetadata_Params = App_Lang_Layout_GenerateMetadata_Props_Params;
|
|
25
|
+
|
|
26
|
+
export type App_Lang_Layout_GenerateMetadata_Dictionary = Record<string, string>;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Layout.
|
|
30
|
+
*
|
|
31
|
+
* @since 0.0.0
|
|
32
|
+
*/
|
|
33
|
+
export type App_Lang_Layout_GenerateStaticParams_Returns = App_Lang_Layout_GenerateStaticParams_StaticParams;
|
|
34
|
+
|
|
35
|
+
export type App_Lang_Layout_GenerateStaticParams_StaticParam_Lang = 'en';
|
|
36
|
+
|
|
37
|
+
export type App_Lang_Layout_GenerateStaticParams_StaticParam = {
|
|
38
|
+
lang: App_Lang_Layout_GenerateStaticParams_StaticParam_Lang;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export type App_Lang_Layout_GenerateStaticParams_StaticParams = App_Lang_Layout_GenerateStaticParams_StaticParam[];
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Layout.
|
|
45
|
+
*
|
|
46
|
+
* @since 0.0.0
|
|
47
|
+
*/
|
|
48
|
+
export type App_Lang_Layout_RootLayout_Props_Children = ReactNode;
|
|
49
|
+
|
|
50
|
+
export type App_Lang_Layout_RootLayout_Props_Params_Lang = string;
|
|
51
|
+
|
|
52
|
+
export type App_Lang_Layout_RootLayout_Props_Params = {
|
|
53
|
+
lang: App_Lang_Layout_RootLayout_Props_Params_Lang;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export type App_Lang_Layout_RootLayout_Props = {
|
|
57
|
+
children: App_Lang_Layout_RootLayout_Props_Children;
|
|
58
|
+
params: Promise<App_Lang_Layout_RootLayout_Props_Params>;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export type App_Lang_Layout_RootLayout_Returns = Promise<ReactElement>;
|
|
62
|
+
|
|
63
|
+
export type App_Lang_Layout_RootLayout_Params = App_Lang_Layout_RootLayout_Props_Params;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Page.
|
|
5
|
+
*
|
|
6
|
+
* @since 0.0.0
|
|
7
|
+
*/
|
|
8
|
+
export type App_Lang_Page_Home_Props_Params_Lang = string;
|
|
9
|
+
|
|
10
|
+
export type App_Lang_Page_Home_Props_Params = {
|
|
11
|
+
lang: App_Lang_Page_Home_Props_Params_Lang;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export type App_Lang_Page_Home_Props = {
|
|
15
|
+
params: Promise<App_Lang_Page_Home_Props_Params>;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export type App_Lang_Page_Home_Returns = Promise<ReactElement>;
|
|
19
|
+
|
|
20
|
+
export type App_Lang_Page_Home_Params = App_Lang_Page_Home_Props_Params;
|
|
21
|
+
|
|
22
|
+
export type App_Lang_Page_Home_Dictionary = Record<string, string>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Config.
|
|
3
|
+
*
|
|
4
|
+
* @since 0.0.0
|
|
5
|
+
*/
|
|
6
|
+
export type I18n_Config_DefaultLocale = 'en';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Config.
|
|
10
|
+
*
|
|
11
|
+
* @since 0.0.0
|
|
12
|
+
*/
|
|
13
|
+
export type I18n_Config_HasLocale_Locale = string;
|
|
14
|
+
|
|
15
|
+
export type I18n_Config_HasLocale_TypeGuard = I18n_Config_DefaultLocale;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Config.
|
|
19
|
+
*
|
|
20
|
+
* @since 0.0.0
|
|
21
|
+
*/
|
|
22
|
+
export type I18n_Config_Locales = readonly I18n_Config_DefaultLocale[];
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
NextRequest,
|
|
3
|
+
NextResponse,
|
|
4
|
+
} from 'next/server';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Proxy - Config.
|
|
8
|
+
*
|
|
9
|
+
* @since 0.0.0
|
|
10
|
+
*/
|
|
11
|
+
export type Proxy_Config_Matcher = string[];
|
|
12
|
+
|
|
13
|
+
export type Proxy_Config = {
|
|
14
|
+
matcher: Proxy_Config_Matcher;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Proxy - Localize Request.
|
|
19
|
+
*
|
|
20
|
+
* @since 0.0.0
|
|
21
|
+
*/
|
|
22
|
+
export type Proxy_LocalizeRequest_Request = NextRequest;
|
|
23
|
+
|
|
24
|
+
export type Proxy_LocalizeRequest_Returns = NextResponse;
|
|
25
|
+
|
|
26
|
+
export type Proxy_LocalizeRequest_Pathname = string;
|
|
27
|
+
|
|
28
|
+
export type Proxy_LocalizeRequest_PathnameHasLocale = boolean;
|
|
29
|
+
|
|
30
|
+
export type Proxy_LocalizeRequest_Url = NextRequest['nextUrl'];
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"node": "[__SCAFFOLD_VERSION_NODE_ENGINE__]"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@cbnventures/docusaurus-preset-nova": "0.
|
|
31
|
-
"@cbnventures/nova": "0.
|
|
30
|
+
"@cbnventures/docusaurus-preset-nova": "0.35.0",
|
|
31
|
+
"@cbnventures/nova": "0.35.0",
|
|
32
32
|
"@docusaurus/core": "[__SCAFFOLD_VERSION_DOCUSAURUS__]",
|
|
33
33
|
"react": "[__SCAFFOLD_VERSION_REACT__]",
|
|
34
34
|
"react-dom": "[__SCAFFOLD_VERSION_REACT_DOM__]"
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
Hero,
|
|
5
5
|
Stats,
|
|
6
6
|
} from '@cbnventures/docusaurus-preset-nova/blocks';
|
|
7
|
+
import { translate } from '@docusaurus/Translate';
|
|
7
8
|
import Layout from '@theme/Layout';
|
|
8
9
|
|
|
9
10
|
import type {
|
|
@@ -35,66 +36,126 @@ function Home(): Pages_Index_Home_Returns {
|
|
|
35
36
|
return (
|
|
36
37
|
<Layout>
|
|
37
38
|
<Hero
|
|
38
|
-
eyebrow=
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
eyebrow={translate({
|
|
40
|
+
id: 'homepage.hero.eyebrow',
|
|
41
|
+
message: 'Nova × Docusaurus',
|
|
42
|
+
})}
|
|
43
|
+
heading={translate({
|
|
44
|
+
id: 'homepage.hero.heading',
|
|
45
|
+
message: 'Docusaurus starts here.',
|
|
46
|
+
})}
|
|
47
|
+
tagline={translate({
|
|
48
|
+
id: 'homepage.hero.tagline',
|
|
49
|
+
message: 'A documentation workspace with a cohesive Nova preset, strict checks, local search, and room to grow.',
|
|
50
|
+
})}
|
|
51
|
+
ctaLabel={translate({
|
|
52
|
+
id: 'homepage.hero.ctaLabel',
|
|
53
|
+
message: 'Read the introduction',
|
|
54
|
+
})}
|
|
42
55
|
ctaLink="/docs/intro"
|
|
43
|
-
secondaryCtaLabel=
|
|
56
|
+
secondaryCtaLabel={translate({
|
|
57
|
+
id: 'homepage.hero.secondaryCtaLabel',
|
|
58
|
+
message: 'Read Nova Docs',
|
|
59
|
+
})}
|
|
44
60
|
secondaryCtaLink="https://nova.cbnventures.io/docs/quickstart/"
|
|
45
61
|
/>
|
|
46
62
|
<main id="components">
|
|
47
63
|
<Stats
|
|
48
|
-
heading=
|
|
49
|
-
|
|
64
|
+
heading={translate({
|
|
65
|
+
id: 'homepage.stats.heading',
|
|
66
|
+
message: 'Ready from the first build',
|
|
67
|
+
})}
|
|
68
|
+
description={translate({
|
|
69
|
+
id: 'homepage.stats.description',
|
|
70
|
+
message: 'The generated workspace demonstrates the preset instead of leaving its most useful surfaces empty.',
|
|
71
|
+
})}
|
|
50
72
|
surface="alt"
|
|
51
73
|
items={[
|
|
52
74
|
{
|
|
53
75
|
value: '6',
|
|
54
|
-
label:
|
|
76
|
+
label: translate({
|
|
77
|
+
id: 'homepage.stats.visualPresets',
|
|
78
|
+
message: 'Visual presets',
|
|
79
|
+
}),
|
|
55
80
|
color: 'primary',
|
|
56
81
|
},
|
|
57
82
|
{
|
|
58
83
|
value: '1',
|
|
59
|
-
label:
|
|
84
|
+
label: translate({
|
|
85
|
+
id: 'homepage.stats.localSearchIndex',
|
|
86
|
+
message: 'Local search index',
|
|
87
|
+
}),
|
|
60
88
|
color: 'accent',
|
|
61
89
|
},
|
|
62
90
|
{
|
|
63
91
|
value: '0',
|
|
64
|
-
label:
|
|
92
|
+
label: translate({
|
|
93
|
+
id: 'homepage.stats.swizzlesRequired',
|
|
94
|
+
message: 'Swizzles required',
|
|
95
|
+
}),
|
|
65
96
|
color: 'primary',
|
|
66
97
|
},
|
|
67
98
|
{
|
|
68
99
|
value: '100%',
|
|
69
|
-
label:
|
|
100
|
+
label: translate({
|
|
101
|
+
id: 'homepage.stats.typescriptConfigured',
|
|
102
|
+
message: 'TypeScript configured',
|
|
103
|
+
}),
|
|
70
104
|
color: 'accent',
|
|
71
105
|
},
|
|
72
106
|
]}
|
|
73
107
|
/>
|
|
74
108
|
<Features
|
|
75
|
-
heading=
|
|
109
|
+
heading={translate({
|
|
110
|
+
id: 'homepage.features.heading',
|
|
111
|
+
message: 'A complete documentation starting point',
|
|
112
|
+
})}
|
|
76
113
|
items={[
|
|
77
114
|
{
|
|
78
115
|
icon: 'lucide:pencil',
|
|
79
|
-
title:
|
|
80
|
-
|
|
116
|
+
title: translate({
|
|
117
|
+
id: 'homepage.features.write.title',
|
|
118
|
+
message: 'Write',
|
|
119
|
+
}),
|
|
120
|
+
description: translate({
|
|
121
|
+
id: 'homepage.features.write.description',
|
|
122
|
+
message: 'Start with the sample guides and grow the sidebar around the way your readers think.',
|
|
123
|
+
}),
|
|
81
124
|
},
|
|
82
125
|
{
|
|
83
126
|
icon: 'lucide:compass',
|
|
84
|
-
title:
|
|
85
|
-
|
|
127
|
+
title: translate({
|
|
128
|
+
id: 'homepage.features.navigate.title',
|
|
129
|
+
message: 'Navigate',
|
|
130
|
+
}),
|
|
131
|
+
description: translate({
|
|
132
|
+
id: 'homepage.features.navigate.description',
|
|
133
|
+
message: 'Use the populated navbar, footer, search, and sidebar as a real information architecture.',
|
|
134
|
+
}),
|
|
86
135
|
},
|
|
87
136
|
{
|
|
88
137
|
icon: 'lucide:rocket',
|
|
89
|
-
title:
|
|
90
|
-
|
|
138
|
+
title: translate({
|
|
139
|
+
id: 'homepage.features.publish.title',
|
|
140
|
+
message: 'Publish',
|
|
141
|
+
}),
|
|
142
|
+
description: translate({
|
|
143
|
+
id: 'homepage.features.publish.description',
|
|
144
|
+
message: 'Build the same optimized and searchable documentation site Nova validates locally and in automation.',
|
|
145
|
+
}),
|
|
91
146
|
},
|
|
92
147
|
]}
|
|
93
148
|
/>
|
|
94
149
|
{(blogEnabled === true) && (
|
|
95
150
|
<BlogPreview
|
|
96
|
-
heading=
|
|
97
|
-
|
|
151
|
+
heading={translate({
|
|
152
|
+
id: 'homepage.blog.heading',
|
|
153
|
+
message: 'From the starter blog',
|
|
154
|
+
})}
|
|
155
|
+
description={translate({
|
|
156
|
+
id: 'homepage.blog.description',
|
|
157
|
+
message: 'The most recent posts appear automatically when the docs-and-blog content model is selected.',
|
|
158
|
+
})}
|
|
98
159
|
auto={true}
|
|
99
160
|
limit={3}
|
|
100
161
|
sort="newest"
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
package [__ANDROID_APPLICATION_ID__].ui.main
|
|
2
2
|
|
|
3
|
+
import androidx.annotation.StringRes
|
|
3
4
|
import androidx.compose.foundation.background
|
|
4
5
|
import androidx.compose.foundation.border
|
|
5
6
|
import androidx.compose.foundation.clickable
|
|
@@ -33,6 +34,7 @@ import androidx.compose.ui.Modifier
|
|
|
33
34
|
import androidx.compose.ui.draw.clip
|
|
34
35
|
import androidx.compose.ui.platform.LocalUriHandler
|
|
35
36
|
import androidx.compose.ui.res.painterResource
|
|
37
|
+
import androidx.compose.ui.res.stringResource
|
|
36
38
|
import androidx.compose.ui.semantics.heading
|
|
37
39
|
import androidx.compose.ui.semantics.Role
|
|
38
40
|
import androidx.compose.ui.semantics.semantics
|
|
@@ -116,7 +118,7 @@ public fun MainScreen(
|
|
|
116
118
|
*/
|
|
117
119
|
@Composable
|
|
118
120
|
internal fun MainScreen(data: List<String>, modifier: Modifier = Modifier) {
|
|
119
|
-
val platformName = data.firstOrNull() ?:
|
|
121
|
+
val platformName = data.firstOrNull() ?: stringResource(R.string.platform_android)
|
|
120
122
|
val uriHandler = LocalUriHandler.current
|
|
121
123
|
|
|
122
124
|
Column(
|
|
@@ -196,11 +198,11 @@ private fun MainScreenHeader(
|
|
|
196
198
|
Image(
|
|
197
199
|
modifier = Modifier.size(36.dp),
|
|
198
200
|
painter = painterResource(R.drawable.nova_logo),
|
|
199
|
-
contentDescription =
|
|
201
|
+
contentDescription = stringResource(R.string.nova_logo_content_description),
|
|
200
202
|
)
|
|
201
203
|
|
|
202
204
|
Text(
|
|
203
|
-
text =
|
|
205
|
+
text = stringResource(R.string.nova_platform_name, platformName),
|
|
204
206
|
fontWeight = FontWeight.Bold,
|
|
205
207
|
style = MaterialTheme.typography.labelLarge,
|
|
206
208
|
)
|
|
@@ -211,7 +213,7 @@ private fun MainScreenHeader(
|
|
|
211
213
|
horizontalArrangement = Arrangement.spacedBy(6.dp),
|
|
212
214
|
verticalAlignment = Alignment.CenterVertically,
|
|
213
215
|
) {
|
|
214
|
-
Text(
|
|
216
|
+
Text(stringResource(R.string.read_nova_docs))
|
|
215
217
|
|
|
216
218
|
Icon(
|
|
217
219
|
modifier = Modifier.size(16.dp),
|
|
@@ -242,7 +244,7 @@ private fun MainScreenIntroduction(
|
|
|
242
244
|
Column(modifier = modifier) {
|
|
243
245
|
Text(
|
|
244
246
|
modifier = Modifier.semantics { heading() },
|
|
245
|
-
text =
|
|
247
|
+
text = stringResource(R.string.starter_title),
|
|
246
248
|
fontSize = 48.sp,
|
|
247
249
|
fontWeight = FontWeight.Bold,
|
|
248
250
|
letterSpacing = (-1.8).sp,
|
|
@@ -252,7 +254,7 @@ private fun MainScreenIntroduction(
|
|
|
252
254
|
Spacer(modifier = Modifier.height(18.dp))
|
|
253
255
|
|
|
254
256
|
Text(
|
|
255
|
-
text =
|
|
257
|
+
text = stringResource(R.string.starter_description),
|
|
256
258
|
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
|
257
259
|
lineHeight = 24.sp,
|
|
258
260
|
style = MaterialTheme.typography.bodyLarge,
|
|
@@ -265,7 +267,7 @@ private fun MainScreenIntroduction(
|
|
|
265
267
|
horizontalArrangement = Arrangement.spacedBy(6.dp),
|
|
266
268
|
verticalAlignment = Alignment.CenterVertically,
|
|
267
269
|
) {
|
|
268
|
-
Text(
|
|
270
|
+
Text(stringResource(R.string.explore_android_docs))
|
|
269
271
|
|
|
270
272
|
Icon(
|
|
271
273
|
modifier = Modifier.size(16.dp),
|
|
@@ -278,7 +280,7 @@ private fun MainScreenIntroduction(
|
|
|
278
280
|
Spacer(modifier = Modifier.height(14.dp))
|
|
279
281
|
|
|
280
282
|
Text(
|
|
281
|
-
text =
|
|
283
|
+
text = stringResource(R.string.starter_edit_hint),
|
|
282
284
|
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
|
283
285
|
style = MaterialTheme.typography.labelMedium,
|
|
284
286
|
)
|
|
@@ -299,7 +301,7 @@ private fun MainScreenIntroduction(
|
|
|
299
301
|
private fun MainScreenFooter(onSocialClick: (String) -> Unit) {
|
|
300
302
|
Column(verticalArrangement = Arrangement.spacedBy(10.dp)) {
|
|
301
303
|
Text(
|
|
302
|
-
text =
|
|
304
|
+
text = stringResource(R.string.generated_with_nova),
|
|
303
305
|
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
|
304
306
|
fontWeight = FontWeight.SemiBold,
|
|
305
307
|
letterSpacing = 1.1.sp,
|
|
@@ -309,43 +311,43 @@ private fun MainScreenFooter(onSocialClick: (String) -> Unit) {
|
|
|
309
311
|
Row {
|
|
310
312
|
MainScreenSocialLink(
|
|
311
313
|
icon = R.drawable.social_facebook,
|
|
312
|
-
label =
|
|
314
|
+
label = R.string.social_facebook,
|
|
313
315
|
url = "https://www.facebook.com/cbnventures",
|
|
314
316
|
onSocialClick = onSocialClick,
|
|
315
317
|
)
|
|
316
318
|
MainScreenSocialLink(
|
|
317
319
|
icon = R.drawable.social_x,
|
|
318
|
-
label =
|
|
320
|
+
label = R.string.social_x,
|
|
319
321
|
url = "https://x.com/cbnventures",
|
|
320
322
|
onSocialClick = onSocialClick,
|
|
321
323
|
)
|
|
322
324
|
MainScreenSocialLink(
|
|
323
325
|
icon = R.drawable.social_youtube,
|
|
324
|
-
label =
|
|
326
|
+
label = R.string.social_youtube,
|
|
325
327
|
url = "https://www.youtube.com/@cbnventures",
|
|
326
328
|
onSocialClick = onSocialClick,
|
|
327
329
|
)
|
|
328
330
|
MainScreenSocialLink(
|
|
329
331
|
icon = R.drawable.social_instagram,
|
|
330
|
-
label =
|
|
332
|
+
label = R.string.social_instagram,
|
|
331
333
|
url = "https://www.instagram.com/cbnventures/",
|
|
332
334
|
onSocialClick = onSocialClick,
|
|
333
335
|
)
|
|
334
336
|
MainScreenSocialLink(
|
|
335
337
|
icon = R.drawable.social_github,
|
|
336
|
-
label =
|
|
338
|
+
label = R.string.social_github,
|
|
337
339
|
url = "https://github.com/cbnventures",
|
|
338
340
|
onSocialClick = onSocialClick,
|
|
339
341
|
)
|
|
340
342
|
MainScreenSocialLink(
|
|
341
343
|
icon = R.drawable.social_google_play,
|
|
342
|
-
label =
|
|
344
|
+
label = R.string.social_google_play,
|
|
343
345
|
url = "https://play.google.com/store/apps/dev?id=6419450160526226105",
|
|
344
346
|
onSocialClick = onSocialClick,
|
|
345
347
|
)
|
|
346
348
|
MainScreenSocialLink(
|
|
347
349
|
icon = R.drawable.social_linkedin,
|
|
348
|
-
label =
|
|
350
|
+
label = R.string.social_linkedin,
|
|
349
351
|
url = "https://www.linkedin.com/company/cbnventures/",
|
|
350
352
|
onSocialClick = onSocialClick,
|
|
351
353
|
)
|
|
@@ -369,7 +371,7 @@ private fun MainScreenFooter(onSocialClick: (String) -> Unit) {
|
|
|
369
371
|
@Composable
|
|
370
372
|
private fun MainScreenSocialLink(
|
|
371
373
|
icon: Int,
|
|
372
|
-
label:
|
|
374
|
+
@StringRes label: Int,
|
|
373
375
|
url: String,
|
|
374
376
|
onSocialClick: (String) -> Unit,
|
|
375
377
|
) {
|
|
@@ -397,7 +399,7 @@ private fun MainScreenSocialLink(
|
|
|
397
399
|
Icon(
|
|
398
400
|
modifier = Modifier.size(18.dp),
|
|
399
401
|
painter = painterResource(icon),
|
|
400
|
-
contentDescription = label,
|
|
402
|
+
contentDescription = stringResource(label),
|
|
401
403
|
tint = MaterialTheme.colorScheme.onSurfaceVariant,
|
|
402
404
|
)
|
|
403
405
|
}
|
|
@@ -425,7 +427,7 @@ private fun MainScreenSequence(modifier: Modifier = Modifier) {
|
|
|
425
427
|
verticalArrangement = Arrangement.spacedBy(22.dp),
|
|
426
428
|
) {
|
|
427
429
|
Text(
|
|
428
|
-
text =
|
|
430
|
+
text = stringResource(R.string.launch_sequence),
|
|
429
431
|
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
|
430
432
|
fontWeight = FontWeight.Bold,
|
|
431
433
|
letterSpacing = 1.2.sp,
|
|
@@ -433,21 +435,21 @@ private fun MainScreenSequence(modifier: Modifier = Modifier) {
|
|
|
433
435
|
)
|
|
434
436
|
|
|
435
437
|
MainScreenStep(
|
|
436
|
-
number =
|
|
437
|
-
title =
|
|
438
|
-
description =
|
|
438
|
+
number = R.string.launch_step_one_number,
|
|
439
|
+
title = R.string.launch_step_one_title,
|
|
440
|
+
description = R.string.launch_step_one_description,
|
|
439
441
|
)
|
|
440
442
|
|
|
441
443
|
MainScreenStep(
|
|
442
|
-
number =
|
|
443
|
-
title =
|
|
444
|
-
description =
|
|
444
|
+
number = R.string.launch_step_two_number,
|
|
445
|
+
title = R.string.launch_step_two_title,
|
|
446
|
+
description = R.string.launch_step_two_description,
|
|
445
447
|
)
|
|
446
448
|
|
|
447
449
|
MainScreenStep(
|
|
448
|
-
number =
|
|
449
|
-
title =
|
|
450
|
-
description =
|
|
450
|
+
number = R.string.launch_step_three_number,
|
|
451
|
+
title = R.string.launch_step_three_title,
|
|
452
|
+
description = R.string.launch_step_three_description,
|
|
451
453
|
)
|
|
452
454
|
}
|
|
453
455
|
}
|
|
@@ -465,14 +467,18 @@ private fun MainScreenSequence(modifier: Modifier = Modifier) {
|
|
|
465
467
|
* @since UNRELEASED
|
|
466
468
|
*/
|
|
467
469
|
@Composable
|
|
468
|
-
private fun MainScreenStep(
|
|
470
|
+
private fun MainScreenStep(
|
|
471
|
+
@StringRes number: Int,
|
|
472
|
+
@StringRes title: Int,
|
|
473
|
+
@StringRes description: Int,
|
|
474
|
+
) {
|
|
469
475
|
Column(verticalArrangement = Arrangement.spacedBy(4.dp)) {
|
|
470
476
|
Row(verticalAlignment = Alignment.Top) {
|
|
471
477
|
Text(
|
|
472
478
|
modifier =
|
|
473
479
|
Modifier
|
|
474
480
|
.width(34.dp),
|
|
475
|
-
text = number,
|
|
481
|
+
text = stringResource(number),
|
|
476
482
|
color = MaterialTheme.colorScheme.primary,
|
|
477
483
|
fontWeight = FontWeight.Bold,
|
|
478
484
|
style = MaterialTheme.typography.titleMedium,
|
|
@@ -482,7 +488,7 @@ private fun MainScreenStep(number: String, title: String, description: String) {
|
|
|
482
488
|
modifier =
|
|
483
489
|
Modifier
|
|
484
490
|
.weight(1f),
|
|
485
|
-
text = title,
|
|
491
|
+
text = stringResource(title),
|
|
486
492
|
fontWeight = FontWeight.SemiBold,
|
|
487
493
|
style = MaterialTheme.typography.titleMedium,
|
|
488
494
|
)
|
|
@@ -490,7 +496,7 @@ private fun MainScreenStep(number: String, title: String, description: String) {
|
|
|
490
496
|
|
|
491
497
|
Text(
|
|
492
498
|
modifier = Modifier.padding(start = 34.dp),
|
|
493
|
-
text = description,
|
|
499
|
+
text = stringResource(description),
|
|
494
500
|
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
|
495
501
|
lineHeight = 20.sp,
|
|
496
502
|
style = MaterialTheme.typography.bodyMedium,
|
|
@@ -530,7 +536,7 @@ private fun MainScreenLoading(modifier: Modifier = Modifier) {
|
|
|
530
536
|
private fun MainScreenError(message: String?, modifier: Modifier = Modifier) {
|
|
531
537
|
Box(modifier = modifier.fillMaxSize(), contentAlignment = Alignment.Center) {
|
|
532
538
|
Text(
|
|
533
|
-
text = message ?:
|
|
539
|
+
text = message ?: stringResource(R.string.starter_error),
|
|
534
540
|
color = MaterialTheme.colorScheme.error,
|
|
535
541
|
textAlign = TextAlign.Center,
|
|
536
542
|
)
|
|
@@ -550,7 +556,7 @@ private fun MainScreenPreview() {
|
|
|
550
556
|
[__WORKSPACE_IDENTIFIER__]Theme {
|
|
551
557
|
Surface {
|
|
552
558
|
MainScreen(
|
|
553
|
-
data =
|
|
559
|
+
data = emptyList(),
|
|
554
560
|
modifier = Modifier.padding(20.dp),
|
|
555
561
|
)
|
|
556
562
|
}
|
package/build/templates/scaffold-options/app/android-native/app/src/main/res/values/strings.xml
CHANGED
|
@@ -1,3 +1,30 @@
|
|
|
1
1
|
<resources>
|
|
2
2
|
<string name="app_name">[__WORKSPACE_TITLE__]</string>
|
|
3
|
+
<string name="explore_android_docs">Explore Android docs</string>
|
|
4
|
+
<string name="generated_with_nova">Generated with Nova</string>
|
|
5
|
+
<string name="launch_sequence">Launch sequence</string>
|
|
6
|
+
<string name="launch_step_one_description">Replace this starter with your first real product experience.</string>
|
|
7
|
+
<string name="launch_step_one_number">01</string>
|
|
8
|
+
<string name="launch_step_one_title">Shape the experience</string>
|
|
9
|
+
<string name="launch_step_three_description">Build the same production artifact Nova already validates.</string>
|
|
10
|
+
<string name="launch_step_three_number">03</string>
|
|
11
|
+
<string name="launch_step_three_title">Ship confidently</string>
|
|
12
|
+
<string name="launch_step_two_description">Run the workspace checks while the project takes shape.</string>
|
|
13
|
+
<string name="launch_step_two_number">02</string>
|
|
14
|
+
<string name="launch_step_two_title">Keep the contract</string>
|
|
15
|
+
<string name="nova_logo_content_description">Nova</string>
|
|
16
|
+
<string name="nova_platform_name">Nova × %1$s</string>
|
|
17
|
+
<string name="platform_android">Android</string>
|
|
18
|
+
<string name="read_nova_docs">Read Nova Docs</string>
|
|
19
|
+
<string name="social_facebook">Facebook</string>
|
|
20
|
+
<string name="social_github">GitHub</string>
|
|
21
|
+
<string name="social_google_play">Google Play</string>
|
|
22
|
+
<string name="social_instagram">Instagram</string>
|
|
23
|
+
<string name="social_linkedin">LinkedIn</string>
|
|
24
|
+
<string name="social_x">X</string>
|
|
25
|
+
<string name="social_youtube">YouTube</string>
|
|
26
|
+
<string name="starter_description">A native Android workspace with strict checks, tests, and a clean path from first screen to release.</string>
|
|
27
|
+
<string name="starter_edit_hint">Start in ui/main/MainScreen.kt</string>
|
|
28
|
+
<string name="starter_error">Unable to load the starter experience.</string>
|
|
29
|
+
<string name="starter_title">[__WORKSPACE_TITLE__] starts here.</string>
|
|
3
30
|
</resources>
|
|
@@ -11,6 +11,13 @@ import { defineConfig } from 'astro/config';
|
|
|
11
11
|
*/
|
|
12
12
|
const config = defineConfig({
|
|
13
13
|
adapter: cloudflare(),
|
|
14
|
+
i18n: {
|
|
15
|
+
defaultLocale: 'en',
|
|
16
|
+
locales: ['en'],
|
|
17
|
+
routing: {
|
|
18
|
+
prefixDefaultLocale: false,
|
|
19
|
+
},
|
|
20
|
+
},
|
|
14
21
|
outDir: './build',
|
|
15
22
|
output: 'server',
|
|
16
23
|
});
|