Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
thonkinator committed Apr 29, 2024
1 parent 500de63 commit 050413b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/layouts/Base.astro
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ const { title } = Astro.props;
width: 100vw;
height: 100vh;
overflow-x: hidden;

background-color: var(--bg);
font-family:
system-ui,
Expand All @@ -66,6 +65,7 @@ const { title } = Astro.props;
font-size: 18px;
color: white;
scrollbar-color: #fff2 transparent;
tab-size: 4;
--bg: #0b0a0b;
--hbg: color-mix(in srgb, #0b0a0b, black); /* half background */
--acc: #ca3eed;
Expand Down
7 changes: 6 additions & 1 deletion src/pages/basic-html.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,18 @@ order: 1

# Basic HTML

>### Note
> ### Note
>
> For the purposes of easy documentation, all examples will be written with JSX syntax, which is not supported in the JavaScript standard and must be used with a preprocessor such as tsc, esbuild, Babel, etc. This is entirely optional, and the `html` tag function is provided to allow for use without a preprocessor:
>
> ```js
> return (
> html`<button on:click=${() => this.counter++}>I have been clicked ${use(this.counter)} times!</button>`;
> )
> ```
>
> Whereas the equivalent JSX would look like
>
> ```jsx
> return (
> <button on:click={() => this.counter++}>I have been clicked {use(this.counter)} times!</button>;
Expand All @@ -32,7 +35,9 @@ document.body.appendChild(button);
```
We just created a button, with the class "some-button", and added it to the document. This is the simplest possible way of using dreamland, and is why it's so easy to slowly transition to using it from a plain-js codebase.

> Note: If you are coming from react, you may be used to using `className` instead of `class`. In dreamland, we use `class` to match the standard HTML attribute.
### Extra (syntax) Sugar!

What if we wanted to do something when the button is clicked? For any DOM event, you can use `on:` handlers.
Expand Down
4 changes: 2 additions & 2 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ document.body.appendChild(root);
dreamland has <b>no virtual DOM</b>, <b>no JSX</b>, and <b>no build step</b>. Just write your
components in javascript and attach them to the DOM.
</p>
<br />
<p>
dreamland is <b>extremely small</b>, coming in at <b>1.6kb</b> minified and gzipped.
</p>
Expand Down Expand Up @@ -130,9 +129,10 @@ document.body.appendChild(root);
gap: 3rem;
text-align: left;
}
@media (max-width: 800px) {
@media (max-width: 60rem) {
.split {
flex-direction: column-reverse;
gap: 0;
}
}

Expand Down
1 change: 0 additions & 1 deletion src/styles/style.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
main {
color: #ddd;
tab-size: 4;
h1,
h2,
h3,
Expand Down

0 comments on commit 050413b

Please sign in to comment.