Skip to content

Commit

Permalink
Palette
Browse files Browse the repository at this point in the history
  • Loading branch information
bmingles committed Nov 23, 2023
1 parent 84c217b commit c01b086
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 1 deletion.
Binary file modified building-plans/public/scenes/rabbit-house.glb
Binary file not shown.
1 change: 0 additions & 1 deletion building-plans/src/components/GltfScene.module.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.canvas {
// margin: calc(0px - var(--main-padding));
width: 100vw;
height: calc(100vh - var(--nav-primary-height));
}
12 changes: 12 additions & 0 deletions building-plans/src/root.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
:root {
--color-gray-1: hwb(0 98% 2%);
--color-gray-2: hwb(0 93% 7%);
--color-gray-3: hwb(0 88% 12%);
--color-gray-4: hwb(0 74% 26%);
--color-gray-5: hwb(0 62% 38%);
--color-gray-6: hwb(0 46% 54%);
--color-gray-7: hwb(0 38% 62%);
--color-gray-8: hwb(0 26% 74%);
--color-gray-9: hwb(0 13% 87%);

/* hsl vs hsv/hsb */
--color-nav-primary-bg: hwb(0deg 100% 0%);
--color-nav-primary-bg: var(--color-gray-1);
--color-body-bg: hwb(240deg 20% 70.2%);
--color-body-fg: hwb(0deg 100% 0%);

Expand Down
1 change: 1 addition & 0 deletions building-plans/src/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export default function Root() {
<ErrorBoundary>
<nav>
<A href={BASE_URL}>Home</A>
<A href={`${BASE_URL}palette`}>Palette</A>
<A href={`${BASE_URL}scene/rabbit-house`}>Rabbits</A>
</nav>
<Suspense>
Expand Down
7 changes: 7 additions & 0 deletions building-plans/src/routes/palette.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.swatch {
display: flex;
align-items: center;
justify-content: center;
height: 40px;
width: 100px;
}
31 changes: 31 additions & 0 deletions building-plans/src/routes/palette.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { For } from 'solid-js'
import { Title } from 'solid-start'
import styles from './palette.module.scss'
function* range(start: number, end: number) {
for (let i = start; i <= end; ++i) {
yield i
}
}

export default function Palette() {
return (
<main>
<Title>Palette</Title>
<h1>Palette</h1>
<div>
<For each={[...range(1, 9)]}>
{(i) => (
<div
class={styles.swatch}
style={{
color: `var(--color-gray-${i > 3 ? 1 : 9})`,
['background-color']: `var(--color-gray-${i})`,
}}>
gray-{i}
</div>
)}
</For>
</div>
</main>
)
}

0 comments on commit c01b086

Please sign in to comment.