create-fiyuu-app 0.2.0 → 0.5.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/bin/create-fiyuu-app.mjs +52 -61
- package/package.json +1 -1
package/bin/create-fiyuu-app.mjs
CHANGED
|
@@ -280,11 +280,11 @@ function resolveDependencyStrategy(frameworkRoot, useLocalFlag) {
|
|
|
280
280
|
};
|
|
281
281
|
}
|
|
282
282
|
return {
|
|
283
|
-
cliDependency: "^0.
|
|
284
|
-
coreDependency: "^0.
|
|
285
|
-
runtimeDependency: "^0.
|
|
286
|
-
dbDependency: "^0.4.
|
|
287
|
-
realtimeDependency: "^0.4.
|
|
283
|
+
cliDependency: "^0.4.1",
|
|
284
|
+
coreDependency: "^0.4.1",
|
|
285
|
+
runtimeDependency: "^0.4.1",
|
|
286
|
+
dbDependency: "^0.4.1",
|
|
287
|
+
realtimeDependency: "^0.4.1",
|
|
288
288
|
clientImportModule: "@fiyuu/core/client",
|
|
289
289
|
};
|
|
290
290
|
}
|
|
@@ -987,7 +987,7 @@ export const description = "Loads starter websocket metadata for the live counte
|
|
|
987
987
|
|
|
988
988
|
function createLivePage() {
|
|
989
989
|
return `import { Component } from "@geajs/core";
|
|
990
|
-
import { definePage, escapeHtml, html, type PageProps } from "fiyuu/client";
|
|
990
|
+
import { definePage, escapeHtml, html, raw, type PageProps } from "fiyuu/client";
|
|
991
991
|
|
|
992
992
|
type LiveData = {
|
|
993
993
|
initialCount: number;
|
|
@@ -1279,73 +1279,64 @@ export const description = "Loads the starter content for the Fiyuu home page";
|
|
|
1279
1279
|
}
|
|
1280
1280
|
|
|
1281
1281
|
function createHomePage(answers) {
|
|
1282
|
-
const themeMainClasses = answers.theming
|
|
1283
|
-
? 'min-h-screen bg-[linear-gradient(180deg,#f7f3ea_0%,#f1ebde_58%,#e9e0d0_100%)] px-4 py-4 text-[#33412f] dark:bg-[linear-gradient(180deg,#121614_0%,#171f1a_100%)] dark:text-[#e6efe8] sm:px-6 sm:py-5'
|
|
1284
|
-
: 'min-h-screen bg-[linear-gradient(180deg,#f7f3ea_0%,#f1ebde_58%,#e9e0d0_100%)] px-4 py-4 text-[#33412f] sm:px-6 sm:py-5';
|
|
1285
|
-
const themeSectionClasses = answers.theming
|
|
1286
|
-
? 'flex min-h-[calc(100vh-2rem)] w-full flex-col justify-between rounded-[1.5rem] border border-[#7a8f6b]/20 bg-[#f8f4ec]/80 p-5 dark:border-[#4f6756]/35 dark:bg-[#1b241f]/90 sm:min-h-[calc(100vh-2.5rem)] sm:p-7'
|
|
1287
|
-
: 'flex min-h-[calc(100vh-2rem)] w-full flex-col justify-between rounded-[1.5rem] border border-[#7a8f6b]/20 bg-[#f8f4ec]/80 p-5 sm:min-h-[calc(100vh-2.5rem)] sm:p-7';
|
|
1288
|
-
const themeNav = answers.theming
|
|
1289
|
-
? '<nav class="flex items-center justify-between"><p class="text-xs uppercase tracking-[0.22em] text-[#627356] dark:text-[#95b39d]">Fiyuu starter</p><button id="fiyuu-theme-toggle" type="button" class="rounded-full border border-[#7a8f6b]/20 px-3 py-1 text-xs text-[#43523f] dark:border-[#6f8d77]/30 dark:text-[#d1e3d6]">Dark</button></nav>'
|
|
1290
|
-
: '<p class="text-xs uppercase tracking-[0.22em] text-[#627356]">Fiyuu starter</p>';
|
|
1291
1282
|
const themeScript = answers.theming
|
|
1292
|
-
?
|
|
1283
|
+
? `const root=document.documentElement;const saved=localStorage.getItem('fiyuu-theme');const prefersDark=window.matchMedia('(prefers-color-scheme: dark)').matches;if(saved==='dark'||(!saved&&prefersDark)){root.classList.add('dark');}`
|
|
1293
1284
|
: "";
|
|
1285
|
+
|
|
1294
1286
|
return `import { Component } from "@geajs/core";
|
|
1295
|
-
import { definePage,
|
|
1296
|
-
|
|
1297
|
-
type HomeData = {
|
|
1298
|
-
stats: Array<{
|
|
1299
|
-
label: string;
|
|
1300
|
-
value: string;
|
|
1301
|
-
}>;
|
|
1302
|
-
skills: string[];
|
|
1303
|
-
};
|
|
1287
|
+
import { definePage, html, type PageProps } from "fiyuu/client";
|
|
1304
1288
|
|
|
1305
1289
|
export const page = definePage({
|
|
1306
|
-
intent: "
|
|
1290
|
+
intent: "Simple one-page personal site",
|
|
1307
1291
|
});
|
|
1308
1292
|
|
|
1309
|
-
export default class
|
|
1310
|
-
template(
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
<
|
|
1331
|
-
<
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1293
|
+
export default class HomePage extends Component<PageProps> {
|
|
1294
|
+
template() {
|
|
1295
|
+
return html\\`
|
|
1296
|
+
<main class="min-h-screen bg-gradient-to-br from-slate-50 to-slate-100 dark:from-slate-900 dark:to-slate-800 flex items-center justify-center p-6">
|
|
1297
|
+
<div class="max-w-md w-full text-center">
|
|
1298
|
+
<div class="mb-8">
|
|
1299
|
+
<div class="w-24 h-24 mx-auto mb-4 rounded-full bg-gradient-to-br from-blue-500 to-purple-600 flex items-center justify-center text-white text-2xl font-bold shadow-lg">
|
|
1300
|
+
YN
|
|
1301
|
+
</div>
|
|
1302
|
+
<h1 class="text-3xl font-bold text-slate-800 dark:text-white mb-2">
|
|
1303
|
+
Your Name
|
|
1304
|
+
</h1>
|
|
1305
|
+
<p class="text-slate-600 dark:text-slate-300">
|
|
1306
|
+
Developer & Creator
|
|
1307
|
+
</p>
|
|
1308
|
+
</div>
|
|
1309
|
+
|
|
1310
|
+
<p class="text-slate-600 dark:text-slate-300 mb-8 leading-relaxed">
|
|
1311
|
+
Building things with code. Focused on creating simple, beautiful, and functional web experiences.
|
|
1312
|
+
</p>
|
|
1313
|
+
|
|
1314
|
+
<div class="space-y-3">
|
|
1315
|
+
<a href="https://github.com" target="_blank" rel="noopener"
|
|
1316
|
+
class="block w-full py-3 px-6 rounded-xl bg-slate-800 dark:bg-white text-white dark:text-slate-900 font-medium hover:opacity-90 transition-opacity shadow-md">
|
|
1317
|
+
GitHub
|
|
1318
|
+
</a>
|
|
1319
|
+
<a href="https://twitter.com" target="_blank" rel="noopener"
|
|
1320
|
+
class="block w-full py-3 px-6 rounded-xl bg-blue-500 text-white font-medium hover:opacity-90 transition-opacity shadow-md">
|
|
1321
|
+
Twitter
|
|
1322
|
+
</a>
|
|
1323
|
+
<a href="mailto:hello@example.com"
|
|
1324
|
+
class="block w-full py-3 px-6 rounded-xl border-2 border-slate-300 dark:border-slate-600 text-slate-700 dark:text-slate-200 font-medium hover:border-slate-400 dark:hover:border-slate-500 transition-colors">
|
|
1325
|
+
Contact
|
|
1326
|
+
</a>
|
|
1327
|
+
</div>
|
|
1328
|
+
|
|
1329
|
+
<p class="mt-8 text-sm text-slate-400 dark:text-slate-500">
|
|
1330
|
+
Built with Fiyuu
|
|
1331
|
+
</p>
|
|
1332
|
+
</div>
|
|
1341
1333
|
</main>
|
|
1342
|
-
${answers.theming ? `<script
|
|
1343
|
-
|
|
1334
|
+
${answers.theming ? `<script>${themeScript}</script>` : ''}
|
|
1335
|
+
\\`;
|
|
1344
1336
|
}
|
|
1345
1337
|
}
|
|
1346
1338
|
`;
|
|
1347
1339
|
}
|
|
1348
|
-
|
|
1349
1340
|
function createF1Schema() {
|
|
1350
1341
|
return `message TodoDraft {
|
|
1351
1342
|
string id = 1;
|