Skip to content

Commit 7936253

Browse files
committed
feat: add slide "Client-Side & Server-Side"
1 parent f47bc2e commit 7936253

File tree

4 files changed

+71
-0
lines changed

4 files changed

+71
-0
lines changed

assets/excalidraw-drawings/client-side-and-server-side_light.svg

Lines changed: 5 additions & 0 deletions
Loading
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<script setup lang="ts">
2+
import { useNav } from '@slidev/client'
3+
import { computed } from 'vue'
4+
import SvgElementFilter from '../SvgElementFilter.vue'
5+
import mySvgContent from '/assets/excalidraw-drawings/client-side-and-server-side_light.svg?raw'
6+
7+
const { clicks } = useNav()
8+
9+
const elementsToShow = computed<number[] | 'all'>(() => {
10+
if (clicks.value >= 7) {
11+
return 'all'
12+
}
13+
14+
let res: number[] = []
15+
if (clicks.value >= 1) { // container backend
16+
res = [...res, 0, 1, 2, 3, 6, 8, 10, 22]
17+
}
18+
if (clicks.value >= 2) { // container frontend
19+
res = [...res, 4, 5, 9]
20+
}
21+
if (clicks.value >= 3) { // frontend to backend connection
22+
res = [...res, 7]
23+
}
24+
if (clicks.value >= 4) { // content backend
25+
res = [...res, 11, 12, 13, 14, 15, 16, 17, 18, 19]
26+
}
27+
if (clicks.value >= 5) { // content frontend
28+
res = [...res, 20, 21, 23, 24, 25, 26, 27, 28, 29]
29+
}
30+
if (clicks.value >= 6) { // APIs
31+
res = [...res, 30]
32+
}
33+
if (clicks.value >= 7) { // note
34+
res = [...res, 31, 32, 33]
35+
}
36+
return res
37+
})
38+
</script>
39+
40+
<template>
41+
<SvgElementFilter
42+
:display-indices="elementsToShow"
43+
svg-class="w-full"
44+
:svg-content="mySvgContent"
45+
/>
46+
</template>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
layout: basic
3+
---
4+
5+
# Client-Side & Server-Side
6+
7+
<div class="w-full flex justify-center -mt-20">
8+
<ClientSideAndServerSideSvg class="w-[90%]" />
9+
</div>
10+
11+
<!-- dummy only to force the click count on this slide manually -->
12+
<div v-click="7" />
13+
14+
<!--
15+
Backend: many languages possible, depends on the Interpreter on the Server.
16+
-->

slides.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ src: content/internet-foundation.md
7575
src: content/osi-layers.md
7676
---
7777

78+
---
79+
src: content/client-side-and-server-side.md
80+
---
81+
7882
---
7983
src: content/need-for-portfolio.md
8084
---

0 commit comments

Comments
 (0)