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-out
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,
@embedFile("root.html"),
.{
(if (show_unbuilt_assets)
"/src/favicon.svg"
else
"/favicon.svg"),
(if (show_unbuilt_assets)
"/src/main.ts"
else
"/build/main.js"),
"/main.js"),
(if (show_unbuilt_assets)
"/src/style.css"
else
"/build/style.css"),
"/style.css"),
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">
<div class="max-w-5xl flex gap-2 mx-auto">
<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>
</Link>
</div>

View file

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<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>
<link href="{s}" rel="stylesheet">
</head>

View file

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