Skip to content

Commit dd3e79e

Browse files
committed
chore: tiny beautification
1 parent 156aa32 commit dd3e79e

File tree

2 files changed

+52
-1
lines changed

2 files changed

+52
-1
lines changed

index.html

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,26 @@
1-
<p>Coming soon...</p>
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>Tiny Town.Studio</title>
7+
<script type="module" src="/uno.mjs"></script>
8+
<style id="uno">
9+
[un-cloak] {
10+
display: none;
11+
}
12+
</style>
13+
<link
14+
rel="stylesheet"
15+
href="https://cdn.jsdelivr.net/npm/@unocss/reset/tailwind.min.css"
16+
/>
17+
</head>
18+
<body class="max-w-2xl mx-auto px-2 py-2 bg-bg" un-cloak>
19+
<hgroup>
20+
<h2 class="font-semibold">TinyTown.studio</h2>
21+
</hgroup>
22+
<div class="flex flex-col gap-4 mt-10">
23+
<p class="text-sm">Coming soon...</p>
24+
</div>
25+
</body>
26+
</html>

uno.mjs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import presetWind from "https://esm.sh/@unocss/[email protected]";
2+
import presetUno from "https://esm.sh/@unocss/[email protected]";
3+
import presetTypography from "https://esm.sh/@unocss/[email protected]";
4+
import { createGenerator } from "https://esm.sh/@unocss/[email protected]";
5+
6+
const uno = createGenerator({
7+
theme: {
8+
colors: {
9+
dark: "var(--dark)",
10+
light: "var(--light)",
11+
gray: "var(--gray)",
12+
accent: "var(--accent)",
13+
bg: "var(--bg)",
14+
},
15+
},
16+
presets: [presetUno(), presetWind(), presetTypography()],
17+
});
18+
19+
const style = document.querySelector("style#uno");
20+
21+
const container = document.body.parentElement.innerHTML;
22+
const { css } = await uno.generate(container, {
23+
id: "index.html",
24+
});
25+
26+
style.innerHTML = css;

0 commit comments

Comments
 (0)