diff --git a/Assets/wsl-intallation.png b/Assets/wsl-intallation.png new file mode 100644 index 0000000..0edc376 Binary files /dev/null and b/Assets/wsl-intallation.png differ diff --git a/Code/HelloWorld.java b/Code/HelloWorld.java new file mode 100644 index 0000000..9bc1603 --- /dev/null +++ b/Code/HelloWorld.java @@ -0,0 +1,5 @@ +public class HelloWorld { + public static void main(String[] args) { + System.out.println("Hello World!"); + } +} diff --git a/Code/helloworld.cpp b/Code/helloworld.cpp new file mode 100644 index 0000000..7dd560a --- /dev/null +++ b/Code/helloworld.cpp @@ -0,0 +1,6 @@ +#include + +int main() { + std::cout<<"Hello world!"< "Command Palette" + - Statt `Cmd+N`: Datei > New File +] + +--- + +== Reflexion + +#Spiel[ + *Frage 1:* Du hast jetzt drei Komponenten installiert: Python, VSCode und ein Terminal. Welche dieser drei ist der "Computer" und welche sind die "Werkzeuge"? + + *Frage 2:* Warum brauchst du ein Terminal/Shell, wenn es VSCode gibt? Kann man nicht alles in VSCode machen? + + *Frage 3 (für Windows-Nutzer):* Warum haben wir WSL installiert, obwohl Python auch direkt auf Windows läuft? Hätte das nicht reichen können? + + Denke über diese Fragen nach. Die Antworten werden im nächsten Kapitel wichtig. +] diff --git a/lib/helpers.typ b/lib/helpers.typ index 9614250..2931db3 100644 --- a/lib/helpers.typ +++ b/lib/helpers.typ @@ -52,14 +52,38 @@ let content = { // Remove trailing newline if (raw_c.last() == "\n") { str.slice(raw_c, 0, -1) - - + + } else {raw_c} } +let ext-to-lang(ext) = { + let mapping = ( + "py": "Python", + "cpp": "C++", + "java": "Java", + "js": "JavaScript", + "ts": "TypeScript", + "rs": "Rust", + "go": "Go", + "rb": "Ruby", + "php": "PHP", + "c": "C", + "h": "C", + "hpp": "C++", + ) + mapping.at(ext, default: "") +} + +let ext = path.split(".").last() +let lang = ext-to-lang(ext) -zebraw(raw(lang: "Python", content, block: true)) +stack( + if lang != "" {text(size: 0.85em, weight: "bold", fill: gray)[#lang]} else [], + zebraw(raw(lang: lang, content, block: true)), + spacing: 0.3em +) } diff --git a/main.typ b/main.typ index 9cd20fc..3d7377f 100644 --- a/main.typ +++ b/main.typ @@ -35,8 +35,7 @@ = Intro -== Vorbereitung eigener Computer - +#include "Lektionen/vorbereitung.typ" = Unix artige Betriebssysteme