Skip to content

Commit dc6996f

Browse files
committed
chore(templates): bump ilha version
1 parent 64dfe47 commit dc6996f

File tree

13 files changed

+104
-49
lines changed

13 files changed

+104
-49
lines changed

apps/website/src/lib/components/tutorial.ts

Lines changed: 15 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -114,19 +114,7 @@ export const Tutorial = ({ content, code, key }: TutorialProps) => {
114114
})
115115
.render(
116116
() => html`
117-
<div class="flex h-full flex-col gap-2 overflow-hidden">
118-
<div class="tabs w-full shrink-0" id="demo-tabs-with-panels">
119-
<nav role="tablist" aria-orientation="horizontal" class="w-full">
120-
<button type="button" role="tab" aria-selected="true" tabindex="0" data-tab="script">
121-
Script
122-
</button>
123-
<button type="button" role="tab" aria-selected="false" tabindex="0" data-tab="template">
124-
Template
125-
</button>
126-
</nav>
127-
</div>
128-
<div id="editor" class="flex-1 overflow-hidden rounded-lg border"></div>
129-
</div>
117+
<div id="editor" class="flex-1 overflow-hidden"></div>
130118
`,
131119
);
132120

@@ -176,9 +164,7 @@ export const Tutorial = ({ content, code, key }: TutorialProps) => {
176164
})
177165
.render(
178166
() => html`
179-
<div class="h-full min-h-[36rem] lg:min-h-auto overflow-hidden border rounded-lg p-4">
180-
<iframe class="w-full h-full" srcdoc="${buildSrcDoc()}"></iframe>
181-
</div>
167+
<iframe class="flex-1" srcdoc="${buildSrcDoc()}"></iframe>
182168
`,
183169
);
184170

@@ -187,19 +173,21 @@ export const Tutorial = ({ content, code, key }: TutorialProps) => {
187173
.slot("preview", Preview)
188174
.render(
189175
({ slots }) => html`
190-
<div class="w-full lg:h-[100rem]">
191-
<div class="grid gap-4 h-full grid-cols-1 lg:grid-cols-2 grid-cols-none lg:grid-rows-2">
192-
<div class="overflow-hidden rounded-lg border p-4 flex flex-col">
193-
<h2 class="text-xl font-semibold shrink-0">Tutorials</h2>
194-
<div class="flex flex-col mt-4 overflow-auto">
195-
${TUTORIAL_LIST.map((t) => html`<a href="${t.href}" class="${isActive(t.href) ? "btn-secondary" : "btn-ghost"} justify-start">${t.label}</a>`)}
196-
</div>
197-
</div>
198-
<div class="relative overflow-hidden rounded-lg border">
199-
<div class="h-full overflow-auto prose p-4 pb-16">${raw(contentHtml)}</div>
200-
<div class="pointer-events-none absolute bottom-0 left-0 right-0 h-16 bg-gradient-to-t from-white via-white/80 to-transparent dark:from-gray-900 dark:via-gray-900/80"></div>
176+
<div class="flex-1 flex flex-col lg:grid grid-cols-6 grid-rows-2 border rounded-2xl overflow-hidden *:max-h-[40rem] h-full">
177+
<div class="col-span-2 bg-neutral-50 border-r p-4 border-b">
178+
<h2 class="text-xl font-semibold shrink-0">Tutorials</h2>
179+
<div class="flex flex-col mt-4 overflow-auto">
180+
${TUTORIAL_LIST.map((t) => html`<a href="${t.href}" class="${isActive(t.href) ? "btn-outline" : "btn-ghost"} justify-start">${t.label}</a>`)}
201181
</div>
182+
</div>
183+
<div class="col-span-4 col-start-3 relative overflow-auto border-b">
184+
<div class="prose mx-auto p-4 pb-16">${raw(contentHtml)}</div>
185+
<div class="pointer-events-none sticky bottom-0 left-0 right-0 h-16 bg-gradient-to-t from-white via-white/80 to-transparent dark:from-gray-900 dark:via-gray-900/80 mt-[-4rem]"></div>
186+
</div>
187+
<div class="flex col-span-3 row-start-2 overflow-hidden">
202188
${slots.editor()}
189+
</div>
190+
<div class="flex col-span-3 col-start-4 row-start-2 overflow-hidden p-4 min-h-[36rem]">
203191
${slots.preview()}
204192
</div>
205193
</div>

apps/website/src/pages/tutorial/counter-derived.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ const code = {
3535
script: dedent`
3636
import ilha, { html, mount } from "ilha";
3737
38-
3938
const counter = ilha
4039
.state("count", 1)
4140
.derived("doubled", ({ state }) => state.count() * 2)
@@ -50,7 +49,6 @@ const code = {
5049
\`
5150
);
5251
53-
5452
mount({ counter });
5553
`,
5654
};

apps/website/src/pages/tutorial/counter-on.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ const code = {
3434
script: dedent`
3535
import ilha, { html, mount } from "ilha";
3636
37-
3837
const counter = ilha
3938
.state("count", 0)
4039
.on("[data-action=increase]@click", ({ state }) => {
@@ -47,7 +46,6 @@ const code = {
4746
\`
4847
);
4948
50-
5149
mount({ counter });
5250
`,
5351
};

apps/website/src/pages/tutorial/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ const code = {
3232
);
3333
3434
mount({ counter });
35+
36+
// HTML: <div data-ilha="counter"></div>
3537
`,
3638
};
3739

apps/website/src/pages/tutorial/pokedex-onmount.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ const code = {
8383
});
8484
8585
mount({ pokedex });
86+
87+
// HTML: <div data-ilha="pokedex"></div>
8688
`,
8789
};
8890

templates/bun-orpc/bun.lock

Lines changed: 67 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

templates/bun-orpc/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"dependencies": {
1111
"@orpc/client": "^1.13.13",
1212
"@orpc/server": "^1.13.13",
13-
"ilha": "https://pkg.pr.new/ilhajs/ilha@442b13f"
13+
"ilha": "https://pkg.pr.new/ilhajs/ilha@64dfe47"
1414
},
1515
"devDependencies": {
1616
"@types/bun": "latest",

templates/hono/bun.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

templates/hono/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"dependencies": {
1010
"@hono/node-server": "^1.19.12",
1111
"hono": "^4.12.9",
12-
"ilha": "https://pkg.pr.new/ilhajs/ilha@442b13f"
12+
"ilha": "https://pkg.pr.new/ilhajs/ilha@64dfe47"
1313
},
1414
"devDependencies": {
1515
"@types/node": "^20.11.17",

templates/nitro/bun.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)