move assets around

move assets around
This commit is contained in:
Alan Daniels 2025-11-02 13:35:02 +11:00
parent 50117ff78d
commit 8f8f6fcd8d
7 changed files with 11 additions and 6 deletions

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
.zig-cache .zig-cache
zig-out zig-out
node_modules node_modules
public/*

1
public/.gitignore vendored
View file

@ -1 +0,0 @@
build

View file

@ -44,14 +44,18 @@ pub fn SendInertiaResponse(endpoint: anytype, r: zap.Request, arena: Allocator,
arena, arena,
@embedFile("root.html"), @embedFile("root.html"),
.{ .{
(if (show_unbuilt_assets)
"/src/favicon.svg"
else
"/favicon.svg"),
(if (show_unbuilt_assets) (if (show_unbuilt_assets)
"/src/main.ts" "/src/main.ts"
else else
"/build/main.js"), "/main.js"),
(if (show_unbuilt_assets) (if (show_unbuilt_assets)
"/src/style.css" "/src/style.css"
else else
"/build/style.css"), "/style.css"),
HtmlEncodeFormatter{ .input = inertia_json }, HtmlEncodeFormatter{ .input = inertia_json },
}, },
); );

View file

Before

Width:  |  Height:  |  Size: 773 B

After

Width:  |  Height:  |  Size: 773 B

Before After
Before After

View file

@ -6,7 +6,7 @@ import { Link } from "@inertiajs/vue3";
<header class="p-3 bg-rose-800 dark:bg-rose-950"> <header class="p-3 bg-rose-800 dark:bg-rose-950">
<div class="max-w-5xl flex gap-2 mx-auto"> <div class="max-w-5xl flex gap-2 mx-auto">
<Link href="/" class="text-white font-extrabold"> <Link href="/" class="text-white font-extrabold">
<img src="../../favicon.svg" class="h-8 inline" /> <img src="@/favicon.svg" class="h-8 inline" />
<span class="px-1 relative top-0.5">OwnMedia</span> <span class="px-1 relative top-0.5">OwnMedia</span>
</Link> </Link>
</div> </div>

View file

@ -1,7 +1,7 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<link rel="icon" type="image/svg+xml" href="/favicon.svg"/> <link rel="icon" type="image/svg+xml" href="{s}"/>
<script type="module" src="{s}"></script> <script type="module" src="{s}"></script>
<link href="{s}" rel="stylesheet"> <link href="{s}" rel="stylesheet">
</head> </head>

View file

@ -6,6 +6,7 @@ import tailwindcss from "@tailwindcss/vite";
const inputs = { const inputs = {
main: "./src/main.ts", main: "./src/main.ts",
style: "./src/style.css", style: "./src/style.css",
favicon: "./src/favicon.svg",
}; };
export default defineConfig({ export default defineConfig({
@ -13,7 +14,7 @@ export default defineConfig({
base: "/", base: "/",
publicDir: false, publicDir: false,
build: { build: {
outDir: "public/build", outDir: "public",
minify: false, minify: false,
sourcemap: "inline", sourcemap: "inline",