fix: add init background gradient (#2502)

This commit is contained in:
Marvin Hagemeister
2024-06-05 14:00:57 +02:00
committed by GitHub
parent 7eb9a9b5ff
commit f09130cebf
2 changed files with 14 additions and 3 deletions
+13 -2
View File
@@ -201,6 +201,13 @@ export default {
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 = `
*,
*::before,
@@ -330,11 +337,15 @@ html {
.tabular-nums {
font-variant-numeric: tabular-nums;
}
${GRADIENT_CSS}
`;
const TAILWIND_CSS = `@tailwind base;
@tailwind components;
@tailwind utilities;`;
@tailwind utilities;
${GRADIENT_CSS}
`;
const cssStyles = useTailwind ? TAILWIND_CSS : NO_TAILWIND_STYLES;
await writeFile("static/styles.css", cssStyles);
@@ -412,7 +423,7 @@ export default define.page(function Home() {
const count = useSignal(3);
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">
<img
class="my-6"
+1 -1
View File
@@ -110,7 +110,7 @@ export async function withBrowser(fn: (page: Page) => void | Promise<void>) {
try {
const browser = await launch({
args: ["--no-sandbox"],
// headless: false,
headless: !Deno.args.includes("--headful"),
});
const page = await browser.newPage();