--- # try also 'default' to start simple theme: default # random image from a curated Unsplash collection by Anthony # like them? see https://unsplash.com/collections/94734566/slidev background: assets/galaxy.jpg # some information about your slides (markdown enabled) title: Datastar # apply UnoCSS classes to the current slide class: text-center # https://sli.dev/features/drawing drawings: persist: false # slide transition: https://sli.dev/guide/animations.html#slide-transitions transition: slide-left # enable MDC Syntax: https://sli.dev/features/mdc mdc: true --- # To The Stars with Datastar An interstellar journey --- background: assets/galaxy.jpg ---

Drake Formular

$$ {1|2|3|4|5|6|7|all} \begin{aligned} N &= R_* \cdot f_p \cdot n_e \cdot f_l \cdot f_i \cdot f_c \cdot L \\ R_* &= \text{rate of star formation} \\ f_p &= \text{fraction of stars with planets} \\ n_e &= \text{number of habitable planets per star} \\ f_l &= \text{fraction where life develops} \\ f_i &= \text{fraction where intelligent life evolves} \\ f_c &= \text{fraction that develops detectable technology} \\ L &= \text{length of time civilizations are detectable} \end{aligned} $$
--- class: text-center ---

The "Drake" Formular of Webtechnologies

$$ {1|all} \begin{aligned} N_w &= D_b \cdot L_b \cdot F_b \cdot P_t \cdot F_f \cdot S_m \cdot C_{ss} \cdot C_l \cdot H_p \\ \\ N_w &= \text{Total Possible Tech Stacks} \\ D_b &= \text{databases (PostgreSQL, MongoDB, MySQL...)} \\ L_b &= \text{backend languages (Javascript, Python, Go...)} \\ F_b &= \text{backend frameworks (Express, Django, FastAPI...)} \\ P_t &= \text{transport protocols (REST, GraphQL, gRPC...)} \\ F_f &= \text{frontend frameworks (React, Vue, Svelte...)} \\ S_m &= \text{state management (Redux, Zustand, Pinia...)} \\ C_{ss} &= \text{CSS frameworks (Tailwind, UnoCSS, Bootstrap...)} \\ C_l &= \text{component libraries (shadcn, MUI, Ant Design...)} \\ H_p &= \text{hosting platforms (Vercel, AWS, VPS...)} \\ \end{aligned} $$
--- class: default ---

The Space of Webtechnologies

$$ \begin{aligned} N_w &= ( D_b , L_b , F_b , P_t , F_f , S_m , C_{ss} , C_l , H_p ) \\ \\ \end{aligned} $$ - Every website or web application is one star in this space. - There are many combinations that work well. While others no so much. - We all plot our path in this space. And have our current home there. - There are clusters in this space, i.e. the React-Cluster, oder Angular or Vue. - My current home is in the L-O-B with Go and Vue vicinity. - There is an old Cluster called Hypermedia. Where all Webapps once lived. - Hypermedia has developed a new bulge called HTMX. - Next to it is a new tiny blob, called Datastar.
--- class: text-center --- # My name is # Thomas Hedeler # A holistic developer --- class: default transition: fade-out --- # How did I find Datastar? What is my motivation? ### Finding my combination of web technologies for a minimal viable web application.
- Part 1: The Database: SQLite - Part 2: The No-ORM ORM - A very simple Data Abstraction Layer. - Part 3: Developing a Web Server Application in Go. - Part 4: Datastar - lightweight framework for real-time collaborative web apps. - Part 5: Modern CSS. - Part 6: Web components. - Part 7: Simple Deployments with VPS, Nginx, certbot and a single binary file. --- class: default --- Slidev is a slides maker and presenter designed for developers, consist of the following features - ๐Ÿ“ **Text-based** - focus on the content with Markdown, and then style them later - ๐ŸŽจ **Themable** - themes can be shared and re-used as npm packages - ๐Ÿง‘โ€๐Ÿ’ป **Developer Friendly** - code highlighting, live coding with autocompletion - ๐Ÿคน **Interactive** - embed Vue components to enhance your expressions - ๐ŸŽฅ **Recording** - built-in recording and camera view - ๐Ÿ“ค **Portable** - export to PDF, PPTX, PNGs, or even a hostable SPA - ๐Ÿ›  **Hackable** - virtually anything that's possible on a webpage is possible in Slidev

Read more about [Why Slidev?](https://sli.dev/guide/why) --- transition: slide-up level: 2 --- # Navigation Hover on the bottom-left corner to see the navigation's controls panel, [learn more](https://sli.dev/guide/ui#navigation-bar) ## Keyboard Shortcuts | | | | --------------------------------------------------- | --------------------------- | | right / space | next animation or slide | | left / shiftspace | previous animation or slide | | up | previous slide | | down | next slide |

Here!

--- layout: two-cols layoutClass: gap-16 --- # Table of contents You can use the `Toc` component to generate a table of contents for your slides: ```html ``` The title will be inferred from your slide content, or you can override it with `title` and `level` in your frontmatter. ::right:: --- layout: image-right image: https://cover.sli.dev --- # Code Use code snippets and get the highlighting directly, and even types hover! ```ts [filename-example.ts] {all|4|6|6-7|9|all} twoslash // TwoSlash enables TypeScript hover information // and errors in markdown code blocks // More at https://shiki.style/packages/twoslash import { computed, ref } from 'vue' const count = ref(0) const doubled = computed(() => count.value * 2) doubled.value = 2 ``` <<< @/snippets/external.ts#snippet [Learn more](https://sli.dev/features/line-highlighting) --- level: 2 --- # Shiki Magic Move Powered by [shiki-magic-move](https://shiki-magic-move.netlify.app/), Slidev supports animations across multiple code snippets. Add multiple code blocks and wrap them with ````md magic-move (four backticks) to enable the magic move. For example: ````md magic-move {lines: true} ```ts {*|2|*} // step 1 const author = reactive({ name: 'John Doe', books: [ 'Vue 2 - Advanced Guide', 'Vue 3 - Basic Guide', 'Vue 4 - The Mystery' ] }) ``` ```ts {*|1-2|3-4|3-4,8} // step 2 export default { data() { return { author: { name: 'John Doe', books: [ 'Vue 2 - Advanced Guide', 'Vue 3 - Basic Guide', 'Vue 4 - The Mystery' ] } } } } ``` ```ts // step 3 export default { data: () => ({ author: { name: 'John Doe', books: [ 'Vue 2 - Advanced Guide', 'Vue 3 - Basic Guide', 'Vue 4 - The Mystery' ] } }) } ``` Non-code blocks are ignored. ```vue ``` ```` --- # Components
You can use Vue components directly inside your slides. We have provided a few built-in components like `` and `` that you can use directly. And adding your custom components is also super easy. ```html ``` Check out [the guides](https://sli.dev/builtin/components.html) for more.
```html ```
--- class: px-20 --- # Themes Slidev comes with powerful theming support. Themes can provide styles, layouts, components, or even configurations for tools. Switching between themes by just **one edit** in your frontmatter:
```yaml --- theme: default --- ``` ```yaml --- theme: seriph --- ```
Read more about [How to use a theme](https://sli.dev/guide/theme-addon#use-theme) and check out the [Awesome Themes Gallery](https://sli.dev/resources/theme-gallery). --- # Clicks Animations You can add `v-click` to elements to add a click animation.
This shows up when you click the slide: ```html
This shows up when you click the slide.
```

The v-mark directive also allows you to add inline marks , powered by [Rough Notation](https://roughnotation.com/): ```html inline markers ```
[Learn more](https://sli.dev/guide/animations#click-animation)
--- # HTTP - Protocol #
POST https://api.example.com/api/users/search?page=2&limit=10 HTTP/1.1
Host: api.example.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64)
Accept: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9
Cookie: sessionId=abc123; theme=dark
Content-Length: 89
{
body: data for the search request
}
--- # Reducing the Network to a Remote Procedure Call ```js { const { data, error } = await to(fetch("https://api.example.com/api/users/11")); if (error) { // handle error return; } // handle data } // the function that "unwraps" the promise: export function to(promise: Promise) { return promise .then((response) => response.json()) .then((data) => ({ data, error: null })) .catch((error) => ({ data: null, error })); } ``` --- # LaTeX LaTeX is supported out-of-box. Powered by [KaTeX](https://katex.org/).
Inline $\sqrt{3x-1}+(1+x)^2$ Block $$ {1|3|all} \begin{aligned} \nabla \cdot \vec{E} &= \frac{\rho}{\varepsilon_0} \\ \nabla \cdot \vec{B} &= 0 \\ \nabla \times \vec{E} &= -\frac{\partial\vec{B}}{\partial t} \\ \nabla \times \vec{B} &= \mu_0\vec{J} + \mu_0\varepsilon_0\frac{\partial\vec{E}}{\partial t} \end{aligned} $$ --- $$ {1|2|3|4|5|6|7|all} \begin{aligned} N &= R_* \cdot f_p \cdot n_e \cdot f_l \cdot f_i \cdot f_c \cdot L \\ R_* &= \text{rate of star formation} \\ f_p &= \text{fraction of stars with planets} \\ n_e &= \text{number of habitable planets per star} \\ f_l &= \text{fraction where life develops} \\ f_i &= \text{fraction where intelligent life evolves} \\ f_c &= \text{fraction that develops detectable technology} \\ L &= \text{length of time civilizations are detectable} \end{aligned} $$

Drake Formular

---

Drake Formular

$$ {1|2|3|4|5|6|7|all} \begin{aligned} N &= R_* \cdot f_p \cdot n_e \cdot f_l \cdot f_i \cdot f_c \cdot L \\ R_* &= \text{rate of star formation} \\ f_p &= \text{fraction of stars with planets} \\ n_e &= \text{number of habitable planets per star} \\ f_l &= \text{fraction where life develops} \\ f_i &= \text{fraction where intelligent life evolves} \\ f_c &= \text{fraction that develops detectable technology} \\ L &= \text{length of time civilizations are detectable} \end{aligned} $$
--- class: text-center --- ## The "Drake" Formular of Webtechnologies $$ {1|all|1} \begin{aligned} N_w &= D_b \cdot L_b \cdot F_b \cdot P_t \cdot F_f \cdot S_m \cdot C_{ss} \cdot C_l \cdot H_p \\ \\ N_w &= \text{Total Possible Tech Stacks} \\ D_b &= \text{databases (PostgreSQL, MongoDB, MySQL...)} \\ L_b &= \text{backend languages (Javascript, Python, Go...)} \\ F_b &= \text{backend frameworks (Express, Django, FastAPI...)} \\ P_t &= \text{transport protocols (REST, GraphQL, gRPC...)} \\ F_f &= \text{frontend frameworks (React, Vue, Svelte...)} \\ S_m &= \text{state management (Redux, Zustand, Pinia...)} \\ C_{ss} &= \text{CSS frameworks (Tailwind, UnoCSS, Bootstrap...)} \\ C_l &= \text{component libraries (shadcn, MUI, Ant Design...)} \\ H_p &= \text{hosting platforms (Vercel, AWS, VPS...)} \\ \end{aligned} $$ --- # Diagrams You can create diagrams / graphs from textual descriptions, directly in your Markdown.
```mermaid {scale: 0.5, alt: 'A simple sequence diagram'} sequenceDiagram Alice->John: Hello John, how are you? Note over Alice,John: A typical interaction ``` ```mermaid {theme: 'neutral', scale: 0.8} graph TD B[Text] --> C{Decision} C -->|One| D[Result 1] C -->|Two| E[Result 2] ``` ```mermaid mindmap root((mindmap)) Origins Long history ::icon(fa fa-book) Popularisation British popular psychology author Tony Buzan Research On effectiveness
and features On Automatic creation Uses Creative techniques Strategic planning Argument mapping Tools Pen and paper Mermaid ``` ```plantuml {scale: 0.7} @startuml package "Some Group" { HTTP - [First Component] [Another Component] } node "Other Groups" { FTP - [Second Component] [First Component] --> FTP } cloud { [Example 1] } database "MySql" { folder "This is my folder" { [Folder 3] } frame "Foo" { [Frame 4] } } [Another Component] --> [Example 1] [Example 1] --> [Folder 3] [Folder 3] --> [Frame 4] @enduml ```
Learn more: [Mermaid Diagrams](https://sli.dev/features/mermaid) and [PlantUML Diagrams](https://sli.dev/features/plantuml) --- class: text-center --- # The Journey In the beginning, there was chaos... But then a hero emerged! And everything changed. --- foo: bar dragPos: square: 691,32,167,_,-16 --- # Draggable Elements Double-click on the draggable elements to edit their positions.
###### Directive Usage ```md ```
###### Component Usage ```md
Use the `v-drag` component to have a draggable container! ```
Double-click me!
###### Draggable Arrow ```md ``` --- src: ./pages/imported-slides.md hide: false --- --- # Monaco Editor Slidev provides built-in Monaco Editor support. Add `{monaco}` to the code block to turn it into an editor: ```ts {monaco} import { ref } from 'vue' import { emptyArray } from './external' const arr = ref(emptyArray(10)) ``` Use `{monaco-run}` to create an editor that can execute the code directly in the slide: ```ts {monaco-run} import { version } from 'vue' import { emptyArray, sayHello } from './external' sayHello() console.log(`vue ${version}`) console.log(emptyArray(10).reduce(fib => [...fib, fib.at(-1)! + fib.at(-2)!], [1, 1])) ``` --- layout: center class: text-center --- # Learn More [Documentation](https://sli.dev) ยท [GitHub](https://github.com/slidevjs/slidev) ยท [Showcases](https://sli.dev/resources/showcases)