Skip to content

Commit 4ebe851

Browse files
committed
fix html build output to be human-readable, add new route group for oldschool webpages
1 parent f255934 commit 4ebe851

File tree

8 files changed

+71
-27
lines changed

8 files changed

+71
-27
lines changed

src/routes/(oldschool)/+layout.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const csr = false; // no client-side JS
File renamed without changes.

src/routes/html-energy-webring/+page.svelte renamed to src/routes/(oldschool)/html-energy-webring/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
5454
function getHostname(url: string) {
5555
try {
56-
let hostname = new URL(url).hostname;
56+
const hostname = new URL(url).hostname;
5757
// Remove www. prefix if present
5858
return hostname.replace(/^www\./, '');
5959
} catch {

src/routes/patterns/+page.svelte renamed to src/routes/(oldschool)/patterns/+page.svelte

Lines changed: 60 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<script type="text/javascript" src="html-energy-webring/onionring/widget.js" defer></script>
55
</svelte:head>
66

7-
<aside class="border-b-4 border-black bg-lime-400 p-2 text-black">
7+
<aside class="aside-banner">
88
<p>
99
This page was made during <a
1010
href="https://www.gabriel-export.earth/html-day-austin-2025"
@@ -13,72 +13,66 @@
1313
</p>
1414
</aside>
1515
<main>
16-
<div
17-
style="width: fit-content; background: lightgray; border-radius: 20px; padding: 2rem; border: 5px solid black;"
18-
>
16+
<div class="main-content-box">
1917
<h1>What is a Pattern?</h1>
2018
<p>There's actually a lot of different kinds out there...</p>
2119

2220
<h2>Textiles, Fabrics, and Tiles</h2>
23-
<div style="display: flex; gap: 4rem;">
21+
<div class="flex-container">
2422
<div>
2523
<p>Maybe you think of plaid?</p>
2624
<img
27-
src="patterns/plaid.gif"
28-
style="width: 10rem;"
25+
src="/patterns/plaid.gif"
26+
class="small-image"
2927
alt="a dog in a picnic basekt with a plaid blanket"
3028
/>
3129
</div>
3230

3331
<div>
3432
<p>or houndstooth?</p>
35-
<img src="patterns/houndstooth.gif" style="width: 10rem;" alt="houndstooth pattern" />
33+
<img src="/patterns/houndstooth.gif" class="small-image" alt="houndstooth pattern" />
3634
</div>
3735

3836
<div>
3937
<p>or some bathroom tiles?</p>
40-
<img src="patterns/tiles.jpg" style="width: 10rem;" alt="houndstooth pattern" />
38+
<img src="/patterns/tiles.jpg" class="small-image" alt="houndstooth pattern" />
4139
</div>
4240
</div>
4341

4442
<h2>Nature</h2>
45-
<p style="padding-bottom: 1rem;">Maybe you might think of patterns in nature.</p>
46-
<div style="display: flex; gap: 4rem;">
43+
<p class="nature-intro">Maybe you might think of patterns in nature.</p>
44+
<div class="flex-container">
4745
<div>
4846
<p>Like the ripples in dunes...</p>
4947
<img
50-
src="patterns/dunes.jpg"
48+
src="/patterns/dunes.jpg"
5149
alt="sand dunes with ripples in the sand"
52-
style="width: 20rem;"
50+
class="large-image"
5351
/>
5452
</div>
5553

5654
<div>
5755
<p>or the waves of the sea</p>
58-
<img
59-
src="patterns/waves.gif"
60-
alt="a gif of waves in the sea"
61-
style="width: 20rem; height: 3rem;"
62-
/>
56+
<img src="/patterns/waves.gif" alt="a gif of waves in the sea" class="wave-image" />
6357
<p>
6458
or the spirals in shells <img
65-
src="patterns/shell.webp"
59+
src="/patterns/shell.webp"
6660
alt="a nautilus shell with the golden ratio spiral"
67-
style="width: 20rem;"
61+
class="large-image"
6862
/>
6963
</p>
7064
</div>
7165

7266
<div>
7367
<p>
7468
or how lightning, tree roots, tree branches, and human veins all look the same. <span
75-
style="background-color: yellow;">wtf is up with that</span
69+
class="highlight-text">wtf is up with that</span
7670
>
7771
</p>
7872
<img
79-
src="patterns/fractals.jpg"
73+
src="/patterns/fractals.jpg"
8074
alt="examples of fractals in nature looking the same like tree roots, tree branches, rivers, lightning, and leaf veins"
81-
style="width: 20rem;"
75+
class="large-image"
8276
/>
8377
</div>
8478
</div>
@@ -89,7 +83,7 @@
8983
<style>
9084
main {
9185
padding: 3rem;
92-
background-image: url('patterns/bg.gif');
86+
background-image: url('/patterns/bg.gif');
9387
}
9488
9589
h1 {
@@ -107,4 +101,46 @@
107101
margin: 0 auto;
108102
margin-top: 2rem;
109103
}
104+
105+
.aside-banner {
106+
border-bottom-width: 4px;
107+
border-bottom-color: black;
108+
background-color: #a3e635; /* lime-400 equivalent */
109+
padding: 0.5rem; /* p-2 equivalent */
110+
color: black;
111+
}
112+
113+
.main-content-box {
114+
width: fit-content;
115+
background: lightgray;
116+
border-radius: 20px;
117+
padding: 2rem;
118+
border: 5px solid black;
119+
}
120+
121+
.flex-container {
122+
display: flex;
123+
gap: 4rem;
124+
}
125+
126+
.small-image {
127+
width: 10rem;
128+
}
129+
130+
.large-image {
131+
width: 20rem;
132+
}
133+
134+
.wave-image {
135+
width: 20rem;
136+
height: 3rem;
137+
}
138+
139+
.nature-intro {
140+
padding-bottom: 1rem;
141+
}
142+
143+
.highlight-text {
144+
background-color: yellow;
145+
}
110146
</style>

src/routes/+layout.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const prerender = true;
1+
export const prerender = true; // generate HTML at build

svelte.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ const config = {
88
kit: {
99
adapter: adapter({ fallback: '404.html' })
1010
},
11+
compilerOptions: {
12+
preserveWhitespace: true
13+
},
1114
extensions: ['.svelte', '.svx']
1215
};
1316

vite.config.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,9 @@ import { sveltekit } from '@sveltejs/kit/vite';
44
import { defineConfig } from 'vite';
55

66
export default defineConfig({
7-
plugins: [tailwindcss(), sveltekit(), devtoolsJson()]
7+
plugins: [tailwindcss(), sveltekit(), devtoolsJson()],
8+
build: {
9+
minify: false,
10+
cssMinify: false
11+
}
812
});

0 commit comments

Comments
 (0)