Skip to content

Commit f3038c4

Browse files
Rename example app to docs and reorganize project structure
1 parent bef480f commit f3038c4

File tree

27 files changed

+2564
-1787
lines changed

27 files changed

+2564
-1787
lines changed

apps/docs/docs.html

Lines changed: 521 additions & 0 deletions
Large diffs are not rendered by default.

apps/docs/index.html

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{{#> base title="launch.css" }}
2+
<main>
3+
<div class="hero">
4+
<div>
5+
<h1>Launch Your Ideas Faster</h1>
6+
<h4>
7+
A classless CSS framework built for speed. Style your website
8+
later—build it now.
9+
</h4>
10+
<div class="actions">
11+
<a role="button" href="docs">Get started</a>
12+
<a
13+
href="https://github.com/TorstenDittmann/launch-css"
14+
target="_blank"
15+
>View on GitHub</a
16+
>
17+
</div>
18+
</div>
19+
</div>
20+
</main>
21+
<style>
22+
.hero {
23+
display: grid;
24+
align-items: center;
25+
min-height: 90vh;
26+
}
27+
.hero > div {
28+
display: flex;
29+
flex-direction: column;
30+
gap: 2rem;
31+
}
32+
.hero .actions {
33+
display: flex;
34+
gap: 2rem;
35+
align-items: center;
36+
}
37+
</style>
38+
{{/base}}

apps/docs/main.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import "htmx.org";
2+
import "@dittmann/ui";

apps/docs/package.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "docs",
3+
"private": true,
4+
"version": "0.0.0",
5+
"type": "module",
6+
"scripts": {
7+
"dev": "vite",
8+
"build": "vite build",
9+
"preview": "vite preview"
10+
},
11+
"devDependencies": {
12+
"@dittmann/ui": "workspace:*",
13+
"@yoichiro/vite-plugin-handlebars": "^1.4.0",
14+
"htmx.org": "^1.9.12",
15+
"vite": "^6.2.0",
16+
"vite-plugin-handlebars": "^2.0.0"
17+
}
18+
}

apps/docs/partials/base.hbs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!doctype html>
2+
<html lang="en" data-theme="dark">
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1" />
6+
<meta name="color-scheme" content="light dark" />
7+
<title>{{ title }}</title>
8+
</head>
9+
10+
<body data-layout="website" hx-boost="true">
11+
<header>
12+
<nav>
13+
<a href="/">launch.css</a>
14+
<menu>
15+
<li><a href="/docs">Docs</a></li>
16+
<li><a href="#">Examples</a></li>
17+
<li><a role="button" href="https://github.com/torstendittmann/launch-css">GitHub</a></li>
18+
</menu>
19+
</nav>
20+
</header>
21+
{{> @partial-block }}
22+
</body>
23+
<script type="module" src="./main.js"></script>
24+
</html>

apps/docs/public/vite.svg

Lines changed: 1 addition & 0 deletions
Loading

apps/docs/vite.config.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import handlebars from "vite-plugin-handlebars";
2+
3+
/**
4+
* @param {string} relative
5+
* @returns {string}
6+
*/
7+
function get_path(relative) {
8+
return new URL(relative, import.meta.url).pathname;
9+
}
10+
11+
/**
12+
* @type {import('vite').UserConfig}
13+
*/
14+
export default {
15+
plugins: [
16+
handlebars({
17+
partialDirectory: get_path("./partials"),
18+
}),
19+
],
20+
build: {
21+
rollupOptions: {
22+
input: {
23+
index: get_path("./index.html"),
24+
},
25+
},
26+
},
27+
};

0 commit comments

Comments
 (0)