This commit is contained in:
Rizky 2024-07-16 23:31:37 +07:00
parent 92dcfe3955
commit 2888c7d60c
8 changed files with 46 additions and 5 deletions

View File

@ -23,8 +23,9 @@ export const _ = {
headers: { "content-type": "text/html" },
});
if (!validate(site_id))
if (!validate(site_id) && site_id !== "_") {
return new Response("site not found", { status: 403 });
}
if (pathname.startsWith("_prasi")) {
const action = pathname.split("/")[1];

1
app/srv/core/index.css Normal file

File diff suppressed because one or more lines are too long

View File

@ -1,2 +1 @@
@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-cyrillic-ext-400-normal.woff2") format("woff2"),url("./source-sans-3-cyrillic-ext-400-normal.woff") format("woff");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-cyrillic-400-normal.woff2") format("woff2"),url("./source-sans-3-cyrillic-400-normal.woff") format("woff");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-greek-ext-400-normal.woff2") format("woff2"),url("./source-sans-3-greek-ext-400-normal.woff") format("woff");unicode-range:U+1F00-1FFF}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-greek-400-normal.woff2") format("woff2"),url("./source-sans-3-greek-400-normal.woff") format("woff");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-vietnamese-400-normal.woff2") format("woff2"),url("./source-sans-3-vietnamese-400-normal.woff") format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-latin-ext-400-normal.woff2") format("woff2"),url("./source-sans-3-latin-ext-400-normal.woff") format("woff");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-latin-400-normal.woff2") format("woff2"),url("./source-sans-3-latin-400-normal.woff") format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
/*# sourceMappingURL=main.css.map */

View File

@ -196,4 +196,3 @@ react/cjs/react-jsx-runtime.production.min.js:
pako/dist/pako.esm.mjs:
(*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) *)
*/
//# sourceMappingURL=main.js.map

View File

@ -14,6 +14,8 @@ export const prodIndex = (
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, initial-scale=1.0, user-scalable=1.0, minimum-scale=1.0, maximum-scale=1.0">
<link rel="stylesheet" href="/prod/_/main.css">
<link rel="stylesheet" href="/prod/_/index.css">
${this.head.join("\n")}
</head>

View File

@ -124,6 +124,7 @@ export const Root = () => {
page.params = w._prasi.routed.params;
}
}
if (!page) return <DeadEnd>Page Not Found</DeadEnd>;
if (page.id !== local.page_id) {
@ -211,7 +212,7 @@ export const Root = () => {
if (found) {
if (base.page.cache[found.id]) {
return true;
}
}
}
return false;
}}

View File

@ -0,0 +1,33 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
html,
body,
#root {
width: 100%;
height: 100%;
padding: 0px;
margin: 0px;
display: flex;
flex-direction: column;
flex: 1;
-webkit-tap-highlight-color: transparent;
overscroll-behavior-y: none;
}
body {
font-family:
"Source Sans 3",
system-ui,
-apple-system,
BlinkMacSystemFont,
"Segoe UI",
Roboto,
Oxygen,
Ubuntu,
Cantarell,
"Open Sans",
"Helvetica Neue",
sans-serif;
}

View File

@ -1,5 +1,10 @@
import { dir } from "dir";
import { context } from "esbuild";
import { $ } from "bun";
await $`bun tailwindcss -i src/nova/prod/tailwind.css -m -o ../srv/core/index.css`
.cwd(dir.path(`/app/web`))
.quiet();
const ctx = await context({
bundle: true,
@ -10,7 +15,7 @@ const ctx = await context({
format: "esm",
jsx: "transform",
minify: true,
sourcemap: true,
sourcemap: false,
logLevel: "error",
assetNames: `[name]`,
loader: { ".woff": "file", ".ttf": "file", ".woff2": "file" },