add slide content improvements and dev server setup
223015b: - add WTF hex code explanation slide (89=137 decimal, PNG signature) - add ASCII lead slide with historical context - remove Hilbert-Studie reference from title 223015c termin 2: - add OSI layer 5 (session) and layer 6 (presentation) slides - add URL/domain anatomy slide - mark HTTP/S section as klausur - improve status codes formatting with client/server examples - add CRUD column to HTTP methods table infrastructure: - add dev-server.sh for multi-course development - update generate-index.sh with course-specific colors - add QR codes for slide URLs
This commit is contained in:
57
Makefile
57
Makefile
@@ -7,14 +7,18 @@
|
||||
COURSES = 223015b 223015c
|
||||
COURSE_DIR = courses
|
||||
|
||||
# Port configuration (index starts at BASE_PORT, courses increment from there)
|
||||
BASE_PORT = 1310
|
||||
INDEX_PORT = $(BASE_PORT)
|
||||
|
||||
# Course-specific settings
|
||||
223015b_NAME = Dateiformate, Schnittstellen, Speichermedien
|
||||
223015b_PORT = 1312
|
||||
223015b_PORT = 1311
|
||||
223015b_TERMINS = 2025-12-19-termin-0-intro 2025-12-19-termin-1-grundlagen-text-audio 2026-01-09-termin-2-bild-audio-video 2026-01-23-termin-3-speichermedien-schnittstellen 2026-01-30-termin-4-distribution-apis-zukunft 2026-xx-xx-termin-5-vertiefung-offene-fragen
|
||||
223015b_DEPLOY_PATH = /home/tengo/html/hdm/223015b
|
||||
|
||||
223015c_NAME = Internettechnologien
|
||||
223015c_PORT = 1313
|
||||
223015c_PORT = 1312
|
||||
223015c_TERMINS = 2025-12-20-termin-1-geschichte-grundlagen-html 2026-01-10-termin-2-netzwerke-protokolle-css 2026-01-24-termin-3-interaktivitaet-javascript
|
||||
223015c_DEPLOY_PATH = /home/tengo/html/hdm/223015c
|
||||
|
||||
@@ -59,33 +63,23 @@ build/.exists:
|
||||
@touch $@
|
||||
|
||||
# Development servers
|
||||
dev: dev-index
|
||||
@echo "Starting all dev servers..."
|
||||
@echo ""
|
||||
@echo " Index: http://localhost:1311"
|
||||
@echo " 223015b: http://localhost:1312"
|
||||
@echo " 223015c: http://localhost:1313"
|
||||
@echo ""
|
||||
@echo "Press Ctrl+C to stop all servers"
|
||||
@trap 'kill 0' INT; \
|
||||
PORT=1312 npx @marp-team/marp-cli --server $(COURSE_DIR)/223015b/slides/ & \
|
||||
PORT=1313 npx @marp-team/marp-cli --server $(COURSE_DIR)/223015c/slides/ & \
|
||||
python3 -m http.server 1311 --directory .dev-index & \
|
||||
wait
|
||||
dev:
|
||||
@./scripts/dev-server.sh
|
||||
|
||||
dev-index:
|
||||
@mkdir -p .dev-index
|
||||
@echo '<!DOCTYPE html><html lang="de"><head><meta charset="UTF-8"><title>HdM Slides</title><style>*{box-sizing:border-box}body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;max-width:600px;margin:0 auto;padding:2rem;background:#1a1a2e;color:#eee}h1{color:#fff}a{display:block;background:#16213e;border-radius:8px;padding:1.5rem;margin:1rem 0;text-decoration:none;color:#fff;transition:all .2s}a:hover{background:#1f4068;transform:translateX(5px)}a small{color:#4ecca3;display:block;margin-top:.5rem}</style></head><body><h1>HdM Slides</h1><p style="color:#888">Development Server</p><a href="http://localhost:1312">223015b - Dateiformate<small>Port 1312</small></a><a href="http://localhost:1313">223015c - Internettechnik<small>Port 1313</small></a></body></html>' > .dev-index/index.html
|
||||
dev-kill:
|
||||
@-pkill -f "python3 -m http.server" 2>/dev/null || true
|
||||
@-pkill -f "marp-cli.*--server" 2>/dev/null || true
|
||||
@sleep 0.5
|
||||
|
||||
dev-b:
|
||||
@echo "Starting 223015b dev server on port 1312..."
|
||||
@echo "Open: http://localhost:1312"
|
||||
PORT=1312 npx @marp-team/marp-cli --server $(COURSE_DIR)/223015b/slides/
|
||||
@echo "Starting 223015b dev server on port $(223015b_PORT)..."
|
||||
@echo "Open: http://localhost:$(223015b_PORT)"
|
||||
PORT=$(223015b_PORT) npx @marp-team/marp-cli --server $(COURSE_DIR)/223015b/slides/
|
||||
|
||||
dev-c:
|
||||
@echo "Starting 223015c dev server on port 1313..."
|
||||
@echo "Open: http://localhost:1313"
|
||||
PORT=1313 npx @marp-team/marp-cli --server $(COURSE_DIR)/223015c/slides/
|
||||
@echo "Starting 223015c dev server on port $(223015c_PORT)..."
|
||||
@echo "Open: http://localhost:$(223015c_PORT)"
|
||||
PORT=$(223015c_PORT) npx @marp-team/marp-cli --server $(COURSE_DIR)/223015c/slides/
|
||||
|
||||
# Build functions
|
||||
define build_course
|
||||
@@ -188,10 +182,18 @@ else
|
||||
@echo "Done! Originals in assets-original/"
|
||||
endif
|
||||
|
||||
# Root index for /hdm/
|
||||
HDM_DEPLOY_PATH = /home/tengo/html/hdm
|
||||
|
||||
build-index: build/.exists
|
||||
@echo "Building root index..."
|
||||
@echo '<!DOCTYPE html><html lang="de"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>HdM Vorlesungen</title><style>*{box-sizing:border-box;margin:0;padding:0}body{font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","Segoe UI",Roboto,sans-serif;max-width:720px;margin:0 auto;padding:3rem 1.5rem;background:#fafafa;color:#1d1d1f;line-height:1.5}h1{font-size:2rem;font-weight:600;letter-spacing:-0.02em;margin-bottom:.5rem}.subtitle{color:#86868b;font-size:1rem}.courses{margin-top:2rem;display:flex;flex-direction:column;gap:.75rem}a.course{display:block;background:#fff;border-radius:12px;padding:1.5rem;text-decoration:none;color:inherit;box-shadow:0 1px 3px rgba(0,0,0,0.08);transition:all .2s ease;cursor:pointer}a.course:hover{transform:translateY(-2px);box-shadow:0 4px 12px rgba(0,0,0,0.12)}.course-label{font-size:.7rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em}.course-b .course-label{color:#5da9e9}.course-c .course-label{color:#d63384}.course-title{font-size:1.15rem;font-weight:500;color:#1d1d1f;margin:.25rem 0}.course-info{font-size:.85rem;color:#86868b}footer{margin-top:2.5rem;padding-top:1.5rem;border-top:1px solid #e5e5e7;color:#86868b;font-size:.85rem}footer a{color:#1d1d1f;text-decoration:none}footer a:hover{text-decoration:underline}</style></head><body><h1>HdM Vorlesungen</h1><p class="subtitle">Wintersemester 2025/26 · Michael Czechowski</p><div class="courses"><a class="course course-b" href="223015b/"><span class="course-label">223015b</span><div class="course-title">Dateiformate, Schnittstellen, Speichermedien & Distributionswege</div><span class="course-info">6 Termine · Modul "Technik 1"</span></a><a class="course course-c" href="223015c/"><span class="course-label">223015c</span><div class="course-title">Grundlagen IT- und Internettechnik</div><span class="course-info">3 Termine · Modul "Technik 1"</span></a></div><footer><a href="mailto:mail@librete.ch">Kontakt</a></footer></body></html>' > build/index.html
|
||||
|
||||
# Deploy
|
||||
define deploy_course
|
||||
@echo "Deploying $(1)..."
|
||||
scp build/$(1)/*.html $(DEPLOY_HOST):$($(1)_DEPLOY_PATH)/
|
||||
scp build/$(1)/*.pdf $(DEPLOY_HOST):$($(1)_DEPLOY_PATH)/ 2>/dev/null || true
|
||||
scp -r build/$(1)/assets/ $(DEPLOY_HOST):$($(1)_DEPLOY_PATH)/
|
||||
scp -r build/$(1)/materials/ $(DEPLOY_HOST):$($(1)_DEPLOY_PATH)/ 2>/dev/null || true
|
||||
@echo "$(1) deployed!"
|
||||
@@ -203,7 +205,12 @@ deploy-b: build-b
|
||||
deploy-c: build-c
|
||||
$(call deploy_course,223015c)
|
||||
|
||||
deploy: deploy-b deploy-c
|
||||
deploy-index: build-index
|
||||
@echo "Deploying root index..."
|
||||
scp build/index.html $(DEPLOY_HOST):$(HDM_DEPLOY_PATH)/
|
||||
@echo "Root index deployed!"
|
||||
|
||||
deploy: build-index deploy-b deploy-c deploy-index
|
||||
@echo "All courses deployed!"
|
||||
|
||||
# Clean
|
||||
|
||||
Reference in New Issue
Block a user