Skip to content

Commit c643a2a

Browse files
authored
Merge pull request #280 from kravetsone/use-shiki
Rejection of prism in favor of shiki
2 parents 13d4bf4 + c3ec2d3 commit c643a2a

21 files changed

+383
-1081
lines changed

bun.lockb

1.5 KB
Binary file not shown.

components/blog/Layout.vue

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,7 @@
2020
</p>
2121
</div>
2222
</aside> -->
23-
<img
24-
:src="props.src"
25-
:alt="props.alt"
26-
class="w-full my-6"
27-
:class="props.shadow ? 'shadow-xl' : 'border'"
28-
/>
23+
<img :src="props.src" :alt="props.alt" class="w-full my-6" :class="props.shadow ? 'shadow-xl' : 'border'" />
2924
<main id="blog-content">
3025
<slot />
3126
</main>
@@ -64,14 +59,12 @@ onMounted(() => {
6459
mutated.forEach((selector) => {
6560
console.log(document.querySelector(selector))
6661
67-
// @ts-ignore
6862
document.querySelector(selector)?.classList.add('blog')
6963
})
7064
})
7165
7266
onUnmounted(() => {
7367
mutated.forEach((selector) => {
74-
// @ts-ignore
7568
document.querySelector(selector)?.classList.remove('blog')
7669
})
7770
})
@@ -97,26 +90,26 @@ onUnmounted(() => {
9790
@apply text-lg mt-0;
9891
}
9992
100-
#blog > img {
93+
#blog>img {
10194
@apply rounded-lg;
10295
}
10396
104-
#blog > h1 {
97+
#blog>h1 {
10598
@apply !text-3xl md:!text-4xl font-semibold;
10699
}
107100
108-
#blog > h2 {
101+
#blog>h2 {
109102
@apply !text-2xl md:!text-3xl font-semibold;
110103
}
111104
112-
#blog > h3 {
105+
#blog>h3 {
113106
@apply !text-xl md:!text-2xl font-semibold;
114107
}
115108
116-
#blog-content > video,
117-
#blog-content > * > video,
118-
#blog-content > img,
119-
#blog-content > * > img {
109+
#blog-content>video,
110+
#blog-content>*>video,
111+
#blog-content>img,
112+
#blog-content>*>img {
120113
@apply rounded-xl my-4;
121114
/* box-shadow: 0 8px 25px rgba(0,0,0,.1) */
122115
}
@@ -127,7 +120,7 @@ onUnmounted(() => {
127120
}
128121
129122
@media (min-width: 768px) {
130-
#blog > h1 {
123+
#blog>h1 {
131124
line-height: 3.25rem !important;
132125
}
133126
}

components/midori/e2e-type-safety.vue

Lines changed: 16 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,93 +1,38 @@
1-
<script setup lang="ts">
2-
import Prism from 'vue-prism-component'
3-
4-
const server = `// server.ts
5-
import { Elysia, t } from 'elysia'
6-
7-
const app = new Elysia()
8-
.patch(
9-
'/user/age',
10-
({ body }) => signIn(body),
11-
{
12-
body: t.Object({
13-
name: t.String(),
14-
age: t.Number()
15-
})
16-
}
17-
)
18-
.listen(80)
19-
20-
export type App = typeof app`
21-
22-
const client = `// client.ts
23-
import { edenTreaty } from '@elysiajs/eden'
24-
import type { App } from 'server'
25-
26-
const eden = edenTreaty<App>('http://localhost')
27-
28-
await eden.user.age.patch({
29-
name: 'saltyaom',
30-
age: '21'
31-
})`
32-
</script>
33-
341
<template>
35-
<section
36-
class="flex flex-col justify-center items-center w-full max-w-6xl mx-auto py-4"
37-
>
2+
<section class="flex flex-col justify-center items-center w-full max-w-6xl mx-auto py-4">
383
<!-- <h3 class="text-2xl mr-auto md:mx-auto font-medium text-gray-400">
394
Introducing
405
</h3> -->
416
<h2
42-
class="text-5xl md:text-6xl font-bold !leading-tight text-transparent bg-clip-text bg-gradient-to-r from-sky-300 to-indigo-400 mb-6 mr-auto md:mx-auto"
43-
>
7+
class="text-5xl md:text-6xl font-bold !leading-tight text-transparent bg-clip-text bg-gradient-to-r from-sky-300 to-indigo-400 mb-6 mr-auto md:mx-auto">
448
End–to-End Type Safety
459
</h2>
4610

47-
<p
48-
class="text-xl md:text-2xl leading-relaxed text-gray-400 text-left md:text-center w-full max-w-2xl"
49-
>
11+
<p class="text-xl md:text-2xl leading-relaxed text-gray-400 text-left md:text-center w-full max-w-2xl">
5012
Synchronize types across all applications.
5113
<br />
5214
Move fast and break nothing like tRPC.
5315
</p>
5416

55-
<a
56-
class="text-lg font-medium bg-blue-50 text-blue-500 dark:text-blue-400 dark:bg-blue-500/20 mr-auto md:mx-auto px-4 py-2 rounded-xl mt-6"
57-
href="/eden/overview"
58-
>
17+
<a class="text-lg font-medium bg-blue-50 text-blue-500 dark:text-blue-400 dark:bg-blue-500/20 mr-auto md:mx-auto px-4 py-2 rounded-xl mt-6"
18+
href="/eden/overview">
5919
See how it works
6020
</a>
6121

6222
<section class="flex flex-col lg:flex-row gap-8 w-full max-w-5xl my-8">
63-
<div class="w-full">
64-
<Prism
65-
class="!text-base !font-mono rounded-xl"
66-
language="typescript"
67-
>
68-
{{ server }}
69-
</Prism>
23+
<div class="w-full !text-base !font-mono rounded-xl">
24+
<slot name="server"></slot>
7025
</div>
71-
<div class="relative w-full">
72-
<Prism
73-
class="!text-base !font-mono rounded-xl"
74-
language="typescript"
75-
>
76-
{{ client }}
77-
</Prism>
78-
<div
79-
class="absolute p-1 rounded bg-red-400/25"
80-
style="
81-
top: 13.5em;
82-
left: 6.375em;
83-
width: 2.5em;
26+
<div class="relative w-full !text-base !font-mono rounded-xl">
27+
<slot name="client"></slot>
28+
<div class="absolute p-1 rounded bg-red-400/25" style="
29+
top: 13.2em;
30+
left: 5.9em;
31+
width: 2.2em;
8432
height: 1.375em;
85-
"
86-
/>
87-
<p
88-
class="absolute px-3 py-1.5 rounded bg-white dark:bg-gray-700 border dark:border-gray-600"
89-
style="top: 15.25em; left: 3.25em"
90-
>
33+
" />
34+
<p class="absolute px-3 py-1.5 rounded bg-white dark:bg-gray-700 border dark:border-gray-600"
35+
style="top: 15.25em; left: 3.25em">
9136
Type 'string' is not assignable to type 'number'
9237
</p>
9338
</div>

0 commit comments

Comments
 (0)