Skip to content

Commit

Permalink
create js chunk
Browse files Browse the repository at this point in the history
  • Loading branch information
thejackshelton committed Dec 26, 2024
1 parent 49c9c7a commit b6514b6
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 35 deletions.
12 changes: 0 additions & 12 deletions apps/website/src/components/counter.module.css

This file was deleted.

21 changes: 0 additions & 21 deletions apps/website/src/components/counter.tsx

This file was deleted.

Empty file.
31 changes: 31 additions & 0 deletions apps/website/src/components/home/js-chunk/js-chunk.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { component$, useStylesScoped$ } from "@builder.io/qwik";

export const JSChunk = component$(() => {
useStylesScoped$(
`
div {
width: 30px;
height: 30px;
color: var(--off-black);
background: #F1DC4E;
font-family: system-ui, sans-serif;
font-weight: 700;
display: flex;
align-items: end;
justify-content: end;
padding-right: 3px;
}
span {
display: block;
}
`
);

return (
<div>
<span>JS</span>
</div>
);
});
13 changes: 11 additions & 2 deletions apps/website/src/pages/index.astro
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
import { JSChunk } from "@components/home/js-chunk/js-chunk";
import Layout from "src/layouts/Layout.astro";
---

Expand All @@ -11,7 +12,15 @@ import Layout from "src/layouts/Layout.astro";
<span class="astro">ASTRO</span>
</h1>

<span>The web's most efficient power couple.</span>
<JSChunk />

<span
>Zero hydration. Zero compromise. The only instantly interactive UI
framework that's HTML and server-first, just like Astro.</span
>

<button>npm create @qwikdev/astro@latest</button>
<a href="/docs">Explore the docs</a>

<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Et nesciunt
Expand Down Expand Up @@ -40,7 +49,7 @@ import Layout from "src/layouts/Layout.astro";

.intro {
margin: 0 auto;
max-width: 600px;
max-width: 1240px;
border-inline: 1px solid var(--neutral-950);
padding: var(--space-m);
}
Expand Down

0 comments on commit b6514b6

Please sign in to comment.