fix: add init background gradient (#2502)
This commit is contained in:
+13
-2
@@ -201,6 +201,13 @@ export default {
|
|||||||
await writeFile("tailwind.config.ts", TAILWIND_CONFIG_TS);
|
await writeFile("tailwind.config.ts", TAILWIND_CONFIG_TS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const GRADIENT_CSS = `
|
||||||
|
.fresh-gradient {
|
||||||
|
background-color: rgb(134, 239, 172);
|
||||||
|
background-image: linear-gradient(to right bottom, rgb(219, 234, 254), rgb(187, 247, 208), rgb(254, 249, 195));
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
const NO_TAILWIND_STYLES = `
|
const NO_TAILWIND_STYLES = `
|
||||||
*,
|
*,
|
||||||
*::before,
|
*::before,
|
||||||
@@ -330,11 +337,15 @@ html {
|
|||||||
.tabular-nums {
|
.tabular-nums {
|
||||||
font-variant-numeric: tabular-nums;
|
font-variant-numeric: tabular-nums;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
${GRADIENT_CSS}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const TAILWIND_CSS = `@tailwind base;
|
const TAILWIND_CSS = `@tailwind base;
|
||||||
@tailwind components;
|
@tailwind components;
|
||||||
@tailwind utilities;`;
|
@tailwind utilities;
|
||||||
|
${GRADIENT_CSS}
|
||||||
|
`;
|
||||||
|
|
||||||
const cssStyles = useTailwind ? TAILWIND_CSS : NO_TAILWIND_STYLES;
|
const cssStyles = useTailwind ? TAILWIND_CSS : NO_TAILWIND_STYLES;
|
||||||
await writeFile("static/styles.css", cssStyles);
|
await writeFile("static/styles.css", cssStyles);
|
||||||
@@ -412,7 +423,7 @@ export default define.page(function Home() {
|
|||||||
const count = useSignal(3);
|
const count = useSignal(3);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div class="px-4 py-8 mx-auto bg-[#86efac]">
|
<div class="px-4 py-8 mx-auto fresh-gradient">
|
||||||
<div class="max-w-screen-md mx-auto flex flex-col items-center justify-center">
|
<div class="max-w-screen-md mx-auto flex flex-col items-center justify-center">
|
||||||
<img
|
<img
|
||||||
class="my-6"
|
class="my-6"
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ export async function withBrowser(fn: (page: Page) => void | Promise<void>) {
|
|||||||
try {
|
try {
|
||||||
const browser = await launch({
|
const browser = await launch({
|
||||||
args: ["--no-sandbox"],
|
args: ["--no-sandbox"],
|
||||||
// headless: false,
|
headless: !Deno.args.includes("--headful"),
|
||||||
});
|
});
|
||||||
|
|
||||||
const page = await browser.newPage();
|
const page = await browser.newPage();
|
||||||
|
|||||||
Reference in New Issue
Block a user