All-in-One Cheatsheet für meine Tutorials
Layout-Parts als Copy & Paste für das schnelle Erstellen neuer Inhalte und gleichzeitig eine gute Dokumentation.
Das Grundgerüst für Tutorials
Das Grundgerüst als Copy & Paste ist der Quick Start für ein leeres Tutorial-Dokument.
Grundgerüst Tutorial
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="robots" content="index, follow">
<!------------------------------------------------
======== DESCRIPTION & KEYWORDS ERSETZEN ========
------------------------------------------------->
<meta name="description" content="----------- DIESER TEXT WIRD ERSETZT --------------">
<meta name="keywords" content="-------------- DIESER TEXT WIRD ERSETZT --------------">
<meta name="author" content="DevPanicZone">
<!------------------------------------------------
============== OPEN GRAPH (Optional) ==============
Benötigt: /assets/images/og-preview.jpg (1200x630px)
Nur aktivieren, wenn Bild existiert!
------------------------------------------------->
<!--
<meta property="og:type" content="website">
<meta property="og:title" content="DevPanicZone – Webentwicklung lernen mit Spaß">
<meta property="og:description" content="Deine Ressource für Webentwicklung, Tutorials und kreative Projekte.">
<meta property="og:image" content="https://devpaniczone.de/assets/images/og-preview.jpg">
<meta property="og:url" content="https://devpaniczone.de">
-->
<!------------------------------------------
============== TITLE ERSETZEN ==============
------------------------------------------->
<title>HTML Basics | DevPanicZone</title>
<link rel="icon" type="image/svg+xml" href="/assets/icons/favicon.svg">
<link rel="icon" type="image/png" href="/assets/icons/favicon.png">
<link rel="stylesheet" href="/assets/css/style.css">
<link rel="stylesheet" href="/assets/css/tutorials.css">
<link rel="stylesheet" href="/assets/css/sidebar.css">
<link rel="stylesheet" href="/assets/vendor/prism/prism.css">
</head>
<body>
<!-- Header-Start -->
<header class="site-header">
<!-- Main-Nav-Start -->
<!-- Main-Nav-End -->
</header>
<!-- Header-End -->
<main class="site-main">
<!-- Hero -->
<section class="hero tutorial-hero">
<div class="container">
<nav class="breadcrumbs"></nav>
<!-----------------------------------------------
================ HERO BEARBEITEN ================
------------------------------------------------>
<h1 class="hero-title">HERO Title</h1>
<p class="hero-subtitle">HERO Subtitle.</p>
</div>
</section>
<!-- Floating Button Links (Sidebar) -->
<button class="sidebar-toggle" id="sidebarToggle" aria-label="Inhaltsverzeichnis öffnen" title="Auf dieser Seite">
<span class="toggle-icon">☰</span>
</button>
<!-- Floating Button Rechts (Tutorial Navigation) -->
<button class="tutorial-nav-toggle" id="tutorialNavToggle" aria-label="Tutorial Navigation öffnen">
<span class="toggle-icon">
<img src="/assets/icons/library.svg" alt="Library Icon" class="library-icon">
</span>
</button>
<!-- Sidebar Overlay für Mobile -->
<div class="sidebar-overlay" id="sidebarOverlay"></div>
<!-- Tutorial Layout -->
<div class="tutorial-layout">
<!-- Linke Sidebar (Floating Panel) -->
<aside class="tutorial-sidebar" id="tutorialSidebar">
<div class="sidebar-header">
<h3 class="sidebar-title no-toc">Auf dieser Seite</h3>
<button class="sidebar-close" id="sidebarClose" aria-label="Schließen">
<span>×</span>
</button>
</div>
<nav class="sidebar-toc" aria-label="Inhaltsverzeichnis">
<ul class="toc-list">
<!-- Sidebar-Anchor-Start -->
<!-- Sidebar-Anchor-End -->
</ul>
</nav>
</aside>
<!-- Rechte Sidebar (Floating Panel) -->
<aside class="tutorial-related">
<div class="sidebar-header">
<h3 class="sidebar-title no-toc">Tutorials</h3>
<button class="sidebar-close" id="tutorialNavClose" aria-label="Schließen">
<span>×</span>
</button>
</div>
<div class="sidebar-nav">
<ul class="sidebar-nav-list"></ul>
</div>
</aside>
<!-- Wrapper .container -->
<div class="container">
<!-- Abschnitte in Sections -->
<section class="tutorials-content">
<h2>Abschnittstitel</h2>
<p>Inhalt...</p>
</section>
<!-- Weitere Sections nach Bedarf -->
<section class="tutorials-content">
<h2>Weiterer Abschnitt</h2>
<p>Inhalt...</p>
</section>
<!-- Weitere Sections nach Bedarf -->
<section class="tutorials-content">
<h3>Weiterer Abschnitt</h3>
<p>Inhalt...</p>
</section>
<!-- Weitere Sections nach Bedarf -->
<section class="tutorials-content">
<h4>Weiterer Abschnitt</h4>
<p>Inhalt...</p>
</section>
<!-- DELETE: Latest Tutorials Section wird automatisch geladen, keine Placeholder -->
<!-- Prev/Next Navigation -->
<section class="tutorials-content">
<nav class="tutorial-nav"></nav>
</section>
</div> <!-- Wrapper .container -->
</div> <!-- Tutorial Layout -->
</main>
<!-- Footer-Start -->
<footer class="site-footer">
<!-- Wird automatisch generiert -->
</footer>
<!-- Footer-End -->
<script src="/assets/js/code-copy.js" defer></script>
<script src="/assets/js/sidebar.js" defer></script>
<script src="/assets/vendor/prism/prism.js" defer></script>
</body>
</html>
Grundgerüst Category
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="robots" content="index, follow">
<!------------------------------------------------
========== DESCRIPTION & KEYWORDS ERSETZEN ==========
------------------------------------------------->
<meta name="description" content="-------------- DIESER TEXT WIRD ERSETZT --------------">
<meta name="keywords" content="-------------- DIESER TEXT WIRD ERSETZT --------------">
<meta name="author" content="DevPanicZone">
<!------------------------------------------
============== TITLE ERSETZEN ==============
------------------------------------------->
<title>Title | DevPanicZone</title>
<link rel="icon" type="image/svg+xml" href="/assets/icons/favicon.svg">
<link rel="icon" type="image/png" href="/assets/icons/favicon.png">
<link rel="stylesheet" href="/assets/css/style.css">
</head>
<body>
<!-- Header-Start -->
<header class="site-header">
<!-- Wird automatisch generiert -->
</header>
<!-- Header-End -->
<main class="site-main">
<!-- Hero -->
<section class="hero tutorial-hero">
<div class="container">
<nav class="breadcrumbs"></nav>
<h1 class="hero-title">Tutorial-Titel</h1>
<p class="hero-subtitle">Beschreibung</p>
</div>
</section>
<!-- Wrapper -->
<div class="container">
<!-- Intro -->
<section class="tutorials-content">
<div>
<div class="grid-2col">
<div class="grid-2col-bg">
<h2>Was dich hier erwartet</h2>
<p>Hier ertelle ich meine eigene Dokumentation.</p>
<p>Wo setzte ich welche Platzhalter für Automationen, schnelle Copy&Paste Code-Snippets und
Grundgerüste, CSS-Details.</p>
</div>
<div class="grid-2col-bg">
<h2>Warum das wichtig ist</h2>
<p>Für einen schnelleren Workflow.</p>
<p>Nachvollziehbarkeit, auch nach längerer Pause.</p>
</div>
</div>
</div>
</section>
<!-- Tutorial Links Section -->
<section class="tutorials-content">
<div>
<h2>Wähle ein Thema und starte direkt durch</h2>
<p class="section-subtitle"></p>
<!-- Wichtig: data-category muss mit dem Ordnernamen übereinstimmen -->
<!-- Tutorial-Buttons-Start -->
<div id="tutorialButtons" class="tutorial-buttons" data-category="documentation">
<!-- Wird automatisch generiert -->
</div>
<!-- Tutorial-Buttons-End -->
</div>
</section>
<!-- Latest Tutorials Section - IMPORTANT: data-category! -->
<section class="categories">
<h2>Zuletzt hinzugefügt</h2>
<div id="categoryLatestTutorials" class="tutorials-grid" data-category="documentation">
<!-- Wird per JavaScript aus /assets/data/tutorials.json geladen -->
<p class="text-muted">Tutorials werden geladen...</p>
</div>
</section>
</div> <!-- Wrapper .container -->
</main>
<!-- Footer-Start -->
<footer class="site-footer">
<!-- Wird automatisch generiert -->
</footer>
<!-- Footer-End -->
</body>
</html>
Code Escaper
Für ein noch schnelleres Copy & Paste, das Praktische Tool aus dem Tutorial HTML Escape Tool.
Layout Parts
Modulare Code-Komponenten für konsistentes Design: Von Syntax-highlighted Code-Blöcken bis zu responsiven Grid-Layouts – alle Tutorial-Elemente als Copy & Paste-ready Snippets mit vordefinierten CSS-Klassen.
Diese Snippets werden innerhalb der einzelnen <section class="tutorials-content">...</section>
eingefügt.
Die einzelnen Sections liegen im Wrapper <div class="container">...</div>
Eine schnelle Copy&Paste-Lösung zum erstellen neuer Inhalte - auch nach längerer Zeit gut nachvollziehbar.
Code-Block HTML
Standardisiertes Syntax-Highlighting mit Prism.js – zeigt HTML-Code professionell formatiert mit One-Click-Copy-Button.
<!-- Code Block language-html -->
<div class="code-block">
<div class="code-header">
<span class="code-lang">HTML</span>
<button class="code-copy">
<span class="copy-icon">
<img src="/assets/icons/clipboard.svg" alt="Copy Icon" width="16" height="16">
</span>
<span class="copy-text">Kopieren</span>
</button>
</div>
<pre><code class="language-html">
<!-- Hier wird der escapte Code eingefügt -->
</code></pre>
</div>
Code-Block CSS
Wie HTML-Blocks, aber optimiert für CSS-Syntax – perfekt für Styling-Beispiele und Responsive-Design-Snippets.
<!-- Code Block language-css -->
<div class="code-block">
<div class="code-header">
<span class="code-lang">CSS</span>
<button class="code-copy">
<span class="copy-icon">
<img src="/assets/icons/clipboard.svg" alt="Copy Icon" width="16" height="16">
</span>
<span class="copy-text">Kopieren</span>
</button>
</div>
<pre><code class="language-css">
<!-- Hier wird der CSS Code eingefügt -->
</code></pre>
</div>
Code-Block 2er Grid
Side-by-Side Code-Vergleiche – ideal für "Vorher/Nachher"-Beispiele oder Mobile-First vs. Desktop-First Ansätze.
<!-- HTML Code -->
/* CSS Code */
Open HTML
<div class="grid-2col">
<div class="code-block">
<div class="code-header">
<span class="code-lang">HTML</span>
<button class="code-copy">
<span class="copy-icon">
<img src="/assets/icons/clipboard.svg" alt="Copy Icon" width="16" height="16">
</span>
<span class="copy-text">Kopieren</span>
</button>
</div>
<pre><code class="language-html"><!-- HTML Code -->
</code></pre>
</div>
<div class="code-block">
<div class="code-header">
<span class="code-lang">CSS</span>
<button class="code-copy">
<span class="copy-icon">
<img src="/assets/icons/clipboard.svg" alt="Copy Icon" width="16" height="16">
</span>
<span class="copy-text">Kopieren</span>
</button>
</div>
<pre><code class="language-css">/* CSS Code */
</code></pre>
</div>
</div>
Code-Block Plain Text
Einfache Text-Darstellung ohne Syntax-Highlighting – perfekt für Output-Beispiele, Konsolenausgaben oder Listen-Formatierung.
1. Inhalt
2. Inhalt
3. Inhalt
4. Inhalt
5. Inhalt
6. Inhalt
Open HTML 1 col
<!-- Eine Spalte -->
<div class="code-block">
<div class="code-header">
<div class="box-title"><strong>Eine Spalte - hier ist kein Copy-Button nötig</strong></div>
</div>
<pre><code class="language-text">1. Inhalt
2. Inhalt
3. Inhalt</code></pre>
</div>
Open HTML 2 col
<!-- Zwei Spalten -->
<div class="code-block">
<div class="code-header">
<div class="box-title"><strong>Hier ist kein Copy-Button nötig</strong></div>
</div>
<div class="grid-2col">
<div>
<pre><code class="language-text">1. Inhalt
2. Inhalt
3. Inhalt</code></pre>
</div>
<div>
<pre><code class="language-text">4. Inhalt
5. Inhalt
6. Inhalt</code></pre>
</div>
</div>
</div>
Grid Boxes mit Hintergrund
Responsive 2-Spalten-Layout mit Hintergrund – hebt wichtige Inhalte visuell hervor und breaked automatisch auf Mobile zu einer Spalte.
Das Grid startet mit grid-template-columns: 1fr;
– eine Spalte für Mobile.
Ab 640px wird auf repeat(2, 1fr) gewechselt
– zwei gleichmäßige Spalten.
Die Klasse .grid-2col-bg fügt Hintergrund,
Padding und Border hinzu.
Perfekt für hervorgehobene Inhalte: Feature-Listen, Best Practices oder Key-Takeaways.
Open HTML
<h2>2 Spalten mit Hintergrund</h2>
<div class="grid-2col">
<div class="grid-2col-bg">
<strong class="box-title no-toc">Was dich hier erwartet</strong>
<p>Ein gutes Stylesheet ist logisch aufgebaut. Du kannst Regeln nach Themen ordnen, z. B.
Typografie, Layout, Navigation.</p>
<p>Die Kaskade (Cascading) sorgt dafür, dass später definierte Regeln frühere überschreiben –
das eröffnet viele Gestaltungsmöglichkeiten.</p>
</div>
<div class="grid-2col-bg">
<strong class="box-title no-toc">Warum CSS wichtig ist</strong>
<p>CSS trennt Content von Design – ein Prinzip, das deine Website wartbar und skalierbar macht.
</p>
<p>Mit modernen Features wie Flexbox, Grid und CSS Variables kannst du komplexe Layouts
erstellen, ohne auf JavaScript zurückgreifen zu müssen.</p>
</div>
</div>
Open CSS
/* Generisches 2-Spalten Grid */
.grid-2col {
display: grid;
gap: 1.5rem;
grid-template-columns: 1fr;
/* 1 Spalte auf Mobile (< 640px) */
align-items: stretch;
margin: 0;
}
.grid-2col>.code-block {
margin: auto 0 0 0;
}
.grid-2col .arrow-list {
margin: 0;
}
/* 640px: 2 Spalten */
@media (min-width: 640px) {
.grid-2col {
grid-template-columns: repeat(2, 1fr);
}
}
.grid-2col-bg {
padding: 1.5rem;
background-color: var(--bg-secondary);
border-radius: 8px;
border: 1px solid var(--border-color);
}
.grid-2col-bg h3 {
padding: 0.75rem 0 0;
}
.grid-2col .arrow-list,
.grid-2col-bg .arrow-list {
margin: 0;
}
.grid-2col ol,
.grid-2col-bg ol {
margin: 0;
}
Grid Boxes ohne Hintergrund
Minimalistisches 2-Spalten-Grid ohne visuelle Trennung – für dezentere Content-Aufteilung mit automatischer Mobile-Anpassung.
Die Klasse .grid-2col-bg wurde entfernt – das Grid
verwendet nur .grid-2col für Layout ohne Background-Styling.
Nutzt display: grid; mit responsive Breakpoint bei
640px.
Mobile: grid-template-columns: 1fr; (eine Spalte)
Desktop: grid-template-columns: repeat(2, 1fr);
- Gap:
1.5remfür visuellen Abstand - Keine Hintergrundfarbe oder Border
- Ideal für Text-Content ohne Emphasis
Ideal für Content ohne visuelle Emphasis:
- Vergleichende Textabschnitte
- Ergänzende Informationen
- Wenn
.grid-2col-bgzu dominant wirkt - Minimalistische Content-Organisation
Open HTML
<h2>2 Spalten ohne Hintergrund - Intro</h2>
<div class="grid-2col">
<div>
<strong class="no-toc">DevPanicZone!</strong>
<p>Hier dreht sich alles um Webentwicklung – von den Grundlagen mit HTML und CSS bis hin zu
Frameworks wie Bootstrap, JavaScript für dynamische Funktionen und PHP für serverseitige
Logik.</p>
</div>
<div>
<strong class="no-toc">Meine Cheatsheets</strong>
<p>Diese Seite wächst mit meinen Projekten und Experimenten: Du findest meine Sammlung an
Code-Beispielen, Lernnotizen, kleine Tests und vielleicht auch den ein oder anderen
Aha-Moment.</p>
</div>
</div>
Tag Grid - Kleine Infoboxen
Farbcodierte Info-Cards mit auto-fit Grid – ideal für HTML-Tags, CSS-Properties oder
Shortcuts.
10 Farbvarianten verfügbar, responsiv mit minmax(280px, 1fr).
<html> – Root-Element
Open HTML
<!-- Blue Tags -->
<div class="tag-item tag-blue">
<strong><code class="inline"><html></code></strong> – Root-Element
</div>
<!-- <div class="tag-item tag-green"> -->
<!-- <div class="tag-item tag-yellow"> -->
<!-- <div class="tag-item tag-purple"> -->
<!-- <div class="tag-item tag-red"> -->
<!-- <div class="tag-item tag-cyan"> -->
<!-- <div class="tag-item tag-gray"> -->
<!-- <div class="tag-item tag-orange"> -->
<!-- <div class="tag-item tag-mint"> -->
<!-- <div class="tag-item tag-magenta"> -->
</div>
<html> – Root-Element
<h1>-<h6> – Überschriften
<div> – Block-Container
<div> – Block-Container
<div> – Block-Container
<div> – Block-Container
<div> – Block-Container
<div> – Block-Container
<div> – Block-Container
Open HTML
<div class="tag-grid">
<!-- Blue Tags -->
<div class="tag-item tag-blue">
<strong><code class="inline"><html></code></strong> – Root-Element
</div>
<!-- Green Tags -->
<div class="tag-item tag-green">
<strong><code class="inline"><h1>-<h6></code></strong> – Überschriften
</div>
<!-- Yellow Tags -->
<div class="tag-item tag-yellow">
<strong><code class="inline"><div></code></strong> – Block-Container
</div>
<!-- Purple Tags -->
<div class="tag-item tag-purple">
<strong><code class="inline"><div></code></strong> – Block-Container
</div>
<!-- Red Tags -->
<div class="tag-item tag-red">
<strong><code class="inline"><div></code></strong> – Block-Container
</div>
<!-- Cyan Tags -->
<div class="tag-item tag-cyan">
<strong><code class="inline"><div></code></strong> – Block-Container
</div>
<!-- Orange Tags -->
<div class="tag-item tag-orange">
<strong><code class="inline"><div></code></strong> – Block-Container
</div>
<!-- Mint Tags -->
<div class="tag-item tag-mint">
<strong><code class="inline"><div></code></strong> – Block-Container
</div>
<!-- Magenta Tags -->
<div class="tag-item tag-magenta">
<strong><code class="inline"><div></code></strong> – Block-Container
</div>
</div>
Open CSS
/* ---- TAG GRID ---- */
.tag-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 1rem;
margin: 1.25rem 0;
}
.tag-grid h3 {
font-size: 1.4rem;
border-bottom: 2px solid var(--accent-blue);
padding: 0.5rem 0 0.5rem;
}
.tag-item {
background: var(--bg-secondary);
padding: 1rem;
border-radius: 0 8px 8px 0;
border-left: 4px solid var(--accent-blue);
transition: all 150ms ease;
}
.tag-item:hover {
transform: translateX(4px);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.tag-item .inline {
color: var(--accent-blue);
font-weight: 600;
}
/* ----- Tag Color Variants ----- */
.tag-item.tag-blue {
border-left-color: var(--accent-blue);
}
.tag-item.tag-blue .inline {
color: var(--accent-blue);
}
.tag-item.tag-green {
border-left-color: var(--accent-green);
}
.tag-item.tag-green .inline {
color: var(--accent-green);
}
.tag-item.tag-yellow {
border-left-color: var(--accent-yellow-light);
}
.tag-item.tag-yellow .inline {
color: var(--accent-yellow-light);
}
.tag-item.tag-orange {
border-left-color: var(--accent-orange);
}
.tag-item.tag-orange .inline {
color: var(--accent-orange);
}
.tag-item.tag-red {
border-left-color: var(--accent-red);
}
.tag-item.tag-red .inline {
color: var(--accent-red);
}
.tag-item.tag-cyan {
border-left-color: var(--accent-cyan);
}
.tag-item.tag-cyan .inline {
color: var(--accent-cyan);
}
.tag-item.tag-mint {
border-left-color: var(--accent-mint);
}
.tag-item.tag-mint .inline {
color: var(--accent-mint);
}
.tag-item.tag-purple {
border-left-color: var(--accent-purple);
}
.tag-item.tag-purple .inline {
color: var(--accent-purple);
}
.tag-item.tag-magenta {
border-left-color: var(--accent-magenta);
}
.tag-item.tag-magenta .inline {
color: var(--accent-magenta);
}
.tag-item.tag-gray {
border-left-color: var(--text-secondary);
}
.tag-item.tag-gray .inline {
color: var(--text-secondary);
}
Tag Grid mit <h3>
Erweiterte Variante des Tag Grids mit Überschriften und Fließtext – ideal für Best Practices, Tipps oder Feature-Highlights mit strukturiertem Content.
Regelmäßig pushen
Mindestens am Ende jedes Arbeitstages. So hast du immer ein Backup.
Vor der Arbeit pullen
Wenn du von mehreren Geräten arbeitest: Immer erst git pull,
dann arbeiten.
Sinnvolle .gitignore
Keine node_modules, keine .env-Dateien, keine
IDE-Einstellungen.
Gute README
Dein Repository ist nur so gut wie seine Dokumentation. Erkläre, was das Projekt macht und wie man es benutzt.
Private für Unfertiges
Wenn du noch lernst oder experimentierst: Private Repository. Du kannst es später public machen.
Branches für Features
Auch wenn du alleine arbeitest: Feature-Branches halten main sauber.
Open HTML
<div class="tag-grid">
<div class="tag-item tag-blue">
<h3 class="no-toc">Regelmäßig pushen</h3>
<p>Mindestens am Ende jedes Arbeitstages. So hast du immer ein Backup.</p>
</div>
<div class="tag-item tag-blue">
<h3 class="no-toc">Vor der Arbeit pullen</h3>
<p>Wenn du von mehreren Geräten arbeitest: Immer erst <code class="inline">git pull</code>,
dann arbeiten.
</p>
</div>
<div class="tag-item tag-blue">
<h3 class="no-toc">Sinnvolle .gitignore</h3>
<p>Keine <code class="inline">node_modules</code>, keine <code
class="inline">.env</code>-Dateien, keine
IDE-Einstellungen.</p>
</div>
<div class="tag-item tag-blue">
<h3 class="no-toc">Gute README</h3>
<p>Dein Repository ist nur so gut wie seine Dokumentation. Erkläre, was das Projekt macht
und wie man es benutzt.</p>
</div>
<div class="tag-item tag-blue">
<h3 class="no-toc">Private für Unfertiges</h3>
<p>Wenn du noch lernst oder experimentierst: Private Repository. Du kannst es später public
machen.
</p>
</div>
<div class="tag-item tag-blue">
<h3 class="no-toc">Branches für Features</h3>
<p>Auch wenn du alleine arbeitest: Feature-Branches halten main sauber.</p>
</div>
</div>
Open CSS
/* ---- TAG GRID ---- */
.tag-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 1rem;
margin: 1.25rem 0;
}
.tag-grid h3 {
font-size: 1.4rem;
border-bottom: 2px solid var(--accent-blue);
padding: 0.5rem 0 0.5rem;
}
.tag-item {
background: var(--bg-secondary);
padding: 1rem;
border-radius: 0 8px 8px 0;
border-left: 4px solid var(--accent-blue);
transition: all 150ms ease;
}
.tag-item:hover {
transform: translateX(4px);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.tag-item .inline {
color: var(--accent-blue);
font-weight: 600;
}
/* ----- Tag Color Variants ----- */
.tag-item.tag-blue {
border-left-color: var(--accent-blue);
}
.tag-item.tag-blue .inline {
color: var(--accent-blue);
}
.tag-item.tag-green {
border-left-color: var(--accent-green);
}
.tag-item.tag-green .inline {
color: var(--accent-green);
}
.tag-item.tag-yellow {
border-left-color: var(--accent-yellow-light);
}
.tag-item.tag-yellow .inline {
color: var(--accent-yellow-light);
}
.tag-item.tag-orange {
border-left-color: var(--accent-orange);
}
.tag-item.tag-orange .inline {
color: var(--accent-orange);
}
.tag-item.tag-red {
border-left-color: var(--accent-red);
}
.tag-item.tag-red .inline {
color: var(--accent-red);
}
.tag-item.tag-cyan {
border-left-color: var(--accent-cyan);
}
.tag-item.tag-cyan .inline {
color: var(--accent-cyan);
}
.tag-item.tag-mint {
border-left-color: var(--accent-mint);
}
.tag-item.tag-mint .inline {
color: var(--accent-mint);
}
.tag-item.tag-purple {
border-left-color: var(--accent-purple);
}
.tag-item.tag-purple .inline {
color: var(--accent-purple);
}
.tag-item.tag-magenta {
border-left-color: var(--accent-magenta);
}
.tag-item.tag-magenta .inline {
color: var(--accent-magenta);
}
.tag-item.tag-gray {
border-left-color: var(--text-secondary);
}
.tag-item.tag-gray .inline {
color: var(--text-secondary);
}
Icon-Grid Responsive & Mobile First
Grid Responsive
Pfeile
← → ↑ ↓
⇐ ⇒ ⇑ ⇓
⟵ ⟶ ⟷
↖︎ ↗︎ ↘︎ ↙︎
↺ ↻ ⟲ ⟳
Tastatur
⌘ ⌥ ⌃ ⇧
⎋ ↩︎ ⏎
⇥ ⇤ ␣
fn ⌤ ⌫ ⌦
Bullets
• ● ○
◦ ・ ⋅
❥ ✦ ✧ ✱ ✲
Formen
▭ ▮ ▯
▲ △ ▼ ▽
■ □ ▪ ▫
● ○ ◎ ◉ ◌
Sonstiges
⏱︎ ⏲︎ ⏰ ⏳
⚠︎ ⚡ ☢︎
✦ ✧ ✩ ★ ☆ ✪
✓ ✔ ✕ ✖ ✗
Grid Mobile First
Pfeile
← → ↑ ↓
⇐ ⇒ ⇑ ⇓
⟵ ⟶ ⟷
↖︎ ↗︎ ↘︎ ↙︎
↺ ↻ ⟲ ⟳
Tastatur
⌘ ⌥ ⌃ ⇧
⎋ ↩︎ ⏎
⇥ ⇤ ␣
fn ⌤ ⌫ ⌦
Bullets
• ● ○
◦ ・ ⋅
❥ ✦ ✧ ✱ ✲
Formen
▭ ▮ ▯
▲ △ ▼ ▽
■ □ ▪ ▫
● ○ ◎ ◉ ◌
Stars
✦ ✧ ✩ ★ ☆ ✪
Check / X
✓ ✔ ✕ ✖ ✗
Sonstiges
⏱︎ ⏲︎ ⏰ ⏳
⚠︎ ⚡ ☢︎
✓ ✔ ✕ ✖ ✗
Code Cards 2col Grid
Erweiterte Code-Blocks mit zusätzlichem Footer-Bereich – ideal für Code-Beispiele mit Kontext-Erklärungen, Bedeutungs-Hinweisen oder visuellen Status-Indikatoren (Success/Danger Icons).
<div class="code-footer">
<p>Erklärung mit Icons</p>
</div>
/* Unterstützte Sprachen */
class="language-html"
class="language-css"
class="language-javascript"
class="language-plaintext"
/* weitere können installiert werden */
/* Diese Sammlung wächst */
.grid-2col-cards {
display: grid;
gap: 1.5rem;
margin: 1rem 0;
grid-template-columns: 1fr;
align-items: stretch;
}
Open HTML
<div class="grid-2col-cards pb-lg">
<!-- block check -->
<div class="code-block">
<div class="code-header">
<span class="code-lang">Prism.js Language-Klassen</span>
<svg class="icon-ui icon-green">
<use href="#dpz-check-circle" />
</svg>
</div>
<pre><code class="language-css">/* Unterstützte Sprachen */
class="language-html"
class="language-css"
class="language-javascript"
class="language-plaintext"
/* weitere können installiert werden */
/* Diese Sammlung wächst */</code></pre>
<div class="code-footer">
<p><strong>Verwendung:</strong> Klasse auf <code><code></code>-Tag anwenden
</p>
<p>HTML/CSS/JS: Syntax-Highlighting aktiv
<svg class="icon icon--inline icon-red ml-sm">
<use href="#dpz-cross-inline" />
</svg>
</p>
<p>plaintext: Keine Farbcodierung
<svg class="icon icon--inline icon-red ml-sm">
<use href="#dpz-cross-inline" />
</svg>
</p>
</div>
</div> <!-- block check -->
<!-- block cross -->
<div class="code-block">
<div class="code-header">
<span class="code-lang">Grid für gleich hohe Cards</span>
<svg class="icon-ui icon-red">
<use href="#dpz-cross-circle" />
</svg>
</div>
<pre><code class="language-css"></code></pre>
<div class="code-footer">
<p><strong>stretch:</strong> Alle Grid-Items in einer Reihe werden auf die Höhe des
höchsten Elements gestreckt.
</p>
<p>optisch saubere, gleichmäßige Card-Darstellung
<svg class="icon icon--inline icon-green ml-sm">
<use href="#dpz-check-inline" />
</svg>
</p>
</div>
</div> <!-- block cross -->
</div>
Open CSS
.code-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0.75rem 1rem;
background-color: var(--bg-secondary);
border-bottom: 1px solid var(--border-color);
}
.code-footer {
padding: 1rem 1.5rem;
background-color: var(--bg-secondary);
border-top: 1px solid var(--border-color);
border-radius: 0 0 8px 8px; /* Untere Ecken abrunden */
font-size: 0.9rem;
}
.code-footer p {
margin: 0.5rem 0;
}
.code-footer p:first-child {
margin-top: 0;
}
.code-footer p:last-child {
margin-bottom: 0;
}
.code-footer {
color: var(--text-secondary);
}
Code Cards 2Col Grid V2
Erweiterte Grid-Cards mit Hintergrund und verschachtelten Code-Blocks – kombiniert .grid-2col-cards (für gleiche Höhe) mit .grid-2col-bg (für Styling). Ideal für strukturierte Vergleiche
mit
Code-Beispielen.
Grid + Flexbox Kombination
/* Äußeres Layout: Grid */
.grid-2col-cards {
display: grid;
align-items: stretch;
}
/* Innere Cards: Flexbox */
.grid-2col-cards > .code-block {
display: flex;
flex-direction: column;
height: 100%;
}
Wie es funktioniert:
- Grid erzwingt gleiche Höhe mit
align-items: stretch - Flexbox verteilt Content innerhalb der Cards gleichmäßig
Responsive Breakpoint
/* Mobile: Stack */
.grid-2col-cards {
grid-template-columns: 1fr;
}
/* Desktop: Side-by-Side */
@media (min-width: 1040px) {
.grid-2col-cards {
grid-template-columns: repeat(2, 1fr);
}
}
Warum 1040px?
- Höherer Breakpoint als Standard 640px für mehr Platz bei komplexem Content.
- Verhindert zu schmale Cards mit verschachtelten Code-Blocks.
Open HTML
<div class="grid-2col-cards mb-md">
<div class="grid-2col-bg">
<h4 class="no-toc">Mobile (ohne @media)</h4>
<div class="code-block">
<pre><code class="language-css">/* Basis = Mobile */
.grid {
grid-template-columns: 1fr;
font-size: 16px;
}</code></pre>
</div>
<p><strong>Was passiert:</strong></p>
<p>Gilt für ALLE Bildschirmgrößen als Startpunkt (0-∞px)</p>
</div>
<div class="grid-2col-bg">
<h4 class="no-toc">Desktop (mit @media)</h4>
<div class="code-block">
<pre><code class="language-css">/* Ab 768px: Erweitern */
@media (min-width: 768px) {
.grid {
grid-template-columns: 2fr 1fr;
font-size: 18px;
}
}</code></pre>
</div>
<p><strong>Was passiert:</strong> <strong>Überschreibt</strong> die Basis ab 768px aufwärts
</p>
</div>
</div>
Open CSS
/* Grid für gleich hohe Cards/Code-Blocks */
.grid-2col-cards {
display: grid;
gap: 1.5rem;
margin: 1rem 0;
grid-template-columns: 1fr; /* Mobile: untereinander */
align-items: stretch; /* Gleiche Höhe erzwingen */
}
.grid-2col-cards h4 {
padding: 15px 0 10px;
}
/* Code-Blocks in diesem Grid zu Flex-Containern machen */
.grid-2col-cards > .code-block {
display: flex;
flex-direction: column;
height: 100%; /* Volle Grid-Höhe nutzen */
}
/* Content-Bereich soll wachsen und restlichen Platz füllen */
.grid-2col-cards > .code-block > div:not(.code-header) {
flex: 1; /* Nimmt verfügbaren Platz */
}
@media (min-width: 1040px) {
.grid-2col-cards {
grid-template-columns: repeat(2, 1fr);
}
}
Do/Don't Grid Info-Box
Visueller Vergleich von Best Practices vs. Anti-Patterns – kombiniert .grid-2col mit .info-box notice/danger
und
Success/Error Icons für klare visuelle Unterscheidung.
- Semantisches HTML:
<button>für Buttons - Beschreibende Klassen:
.nav-link - Externe CSS-Dateien statt Inline-Styles
<div onclick="...">als Button missbrauchen- Kryptische Klassen:
.btn-grn-lrg style="color: red;"direkt im HTML
Open HTML
<div class="grid-2col">
<div class="info-box notice">
<strong class="box-title notice no-toc">Do
<svg class="icon-ui icon-green"><use href="#dpz-check-circle" /></svg>
</strong>
<ul class="arrow-list">
<li><strong>Richtig</strong>: So kannst du es machen.</li>
</ul>
</div>
<div class="info-box danger">
<strong class="box-title danger no-toc">Don't
<svg class="icon-ui icon-red-light"><use href="#dpz-cross-circle" /></svg>
</strong>
<ul class="arrow-list">
<li><strong>Falsch</strong>: So besser nicht.</li>
</ul>
</div>
</div>
Yes/No Code Card Grid
Visueller Vergleich mit Success/Danger Icons im Code-Header – kombiniert .grid-2col-cards (gleiche Höhe) mit farbcodierten Checkmark/Cross
Icons für klare Ja/Nein-Gegenüberstellung.
- Spezifische Selektoren:
.nav-link - Semantische Klassen:
.btn-primary - BEM Notation:
.card__title - Beschreibend: Namen erklären Funktion/Bedeutung
- Wartbar: Änderungen betreffen nur gezielt
- Generische Selektoren:
div,span - Styling im HTML:
style="color: red;" - IDs für Styling:
#header(nur für JS) - !important Missbrauch: Überschreibt alles unkontrolliert
- Zu spezifisch:
div.container div.box p.text
Open HTML
<div class="grid-2col-cards pb-lg">
<div class="code-block">
<div class="code-header">
<span class="code-lang">Richtig</span>
<svg class="icon-ui icon-green"><use href="#dpz-check-circle" /></svg>
</div>
<div class="pt-lg pb-0 mb-0 px-md">
<ul class="arrow-list">
<li>Für <strong>Card-Grids</strong> (z.B. Blog-Posts, Produkte)</li>
<li>Wenn <strong>flexible Spaltenzahl</strong> ok ist</li>
<li>Für <strong>gleich große Items</strong></li>
</ul>
</div>
</div>
<div class="code-block">
<div class="code-header">
<span class="code-lang">Falsch</span>
<svg class="icon-ui icon-red-light"><use href="#dpz-cross-circle" /></svg>
</div>
<div class="pt-lg pb-0 mb-0 px-md">
<ul class="arrow-list">
<li>Wenn du <strong>exakte Kontrolle</strong> über Breakpoints brauchst</li>
<li>Für <strong>komplexe Layouts</strong> mit unterschiedlichen Spaltenbreiten
</li>
</ul>
</div>
</div>
</div>
Open CSS
/* Grid für gleich hohe Cards/Code-Blocks */
.grid-2col-cards {
display: grid;
gap: 1.5rem;
margin: 1rem 0;
grid-template-columns: 1fr; /* Mobile: untereinander */
align-items: stretch; /* Gleiche Höhe erzwingen */
}
/* Code-Blocks in diesem Grid zu Flex-Containern machen */
.grid-2col-cards > .code-block {
display: flex;
flex-direction: column;
height: 100%; /* Volle Grid-Höhe nutzen */
}
/* Content-Bereich soll wachsen und restlichen Platz füllen */
.grid-2col-cards > .code-block > div:not(.code-header) {
flex: 1; /* Nimmt verfügbaren Platz */
}
/* 640px: 2 Spalten */
@media (min-width: 640px) {
.grid-2col-cards {
grid-template-columns: repeat(2, 1fr);
}
}
Cheatsheet Grid
In meinem Fall praktisch für die Utility Classes zum Pixelschubsen, um style=""
zu
vermeiden. Falls mal etwas aus der Reihe tanzt.
Text
.text-centertext-align: center;.text-lefttext-align: left;.text-righttext-align: right;
Margin
.m-0margin: 0;.m-smmargin: 0.5rem;.m-mdmargin: 1rem;.m-lgmargin: 1.5rem;.m-xlmargin: 2rem;
Margin Top
.mt-0margin-top: 0;.mt-smmargin-top: 0.5rem;.mt-mdmargin-top: 1rem;.mt-lgmargin-top: 1.5rem;.mt-xlmargin-top: 2rem;
Weitere Margin
.mb-*margin-bottom.ml-*margin-left.mr-*margin-right.mx-*margin-left/-right.my-*margin-top/-bottom
Padding
.p-*alle Seiten.pt-*padding-top.pb-*padding-bottom.pl-*padding-left.pr-*padding-right.px-*padding-left/-right.py-*padding-top/-bottom
Color
.redcolor: var(--accent-red-light).bluecolor: var(--accent-blue).graycolor: var(--text-secondary);
Display
.blockdisplay: block;.inlinedisplay: inline;.inline-blockdisplay: inline-block;.flexdisplay: flex;.griddisplay: grid;.hiddendisplay: none;
Width
.w-fullwidth: 100%;.w-autowidth: auto;.w-50width: 50%;
Border
.borderborder: 1px solid;.border-noneborder: none;.roundedborder-radius: 8px;.rounded-fullborder-radius: 50%;
Position
.relativeposition: relative;.absoluteposition: absolute;.fixedposition: fixed;.stickyposition: sticky;
Visibility
.visiblevisibility: visible;.invisiblevisibility: hidden;.opacity-0opacity: 0;.opacity-50opacity: 0.5;
Typography
.text-smfont-size: 0.875rem;.text-basefont-size: 1rem;.text-lgfont-size: 1.125rem;.font-boldfont-weight: 700;.font-normalfont-weight: 400;
Open HTML
<div class="cheatsheet-grid">
<div class="cheatsheet-section">
<h3 class="no-toc">Text</h3>
<ul>
<li><code class="inline">.text-center</code> text-align: center;</li>
<li><code class="inline">.text-left</code> text-align: left;</li>
<li><code class="inline">.text-right</code> text-align: right;</li>
</ul>
</div>
<div class="cheatsheet-section">
<h3 class="no-toc">Margin</h3>
<ul>
<li><code class="inline">.m-0</code> margin: 0;</li>
<li><code class="inline">.m-sm</code> margin: 0.5rem;</li>
<li><code class="inline">.m-md</code> margin: 1rem;</li>
<li><code class="inline">.m-lg</code> margin: 1.5rem;</li>
<li><code class="inline">.m-xl</code> margin: 2rem;</li>
</ul>
</div>
<div class="cheatsheet-section">
<h3 class="no-toc">Margin Top</h3>
<ul>
<li><code class="inline">.mt-0</code> margin-top: 0;</li>
<li><code class="inline">.mt-sm</code> margin-top: 0.5rem;</li>
<li><code class="inline">.mt-md</code> margin-top: 1rem;</li>
<li><code class="inline">.mt-lg</code> margin-top: 1.5rem;</li>
<li><code class="inline">.mt-xl</code> margin-top: 2rem;</li>
</ul>
</div>
<!-- ... -->
</div>
Open CSS
/* Spezialfall: auto-fit + minmax() */
/* ist von Natur aus responsiv und passt sich automatisch an */
.cheatsheet-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 1.5rem;
}
.cheatsheet-section h3 {
color: var(--heading-secondary);
font-size: 1.1rem;
margin: 0 0 1rem;
padding: 1rem 0 0.5rem;
border-bottom: 2px solid var(--border-color);
}
.cheatsheet-section ul {
list-style: none;
padding: 0;
margin: 0;
}
.cheatsheet-section li {
padding: 0.4rem 0;
font-size: 0.9rem;
}
@media (max-width: 768px) {
.cheatsheet-grid {
grid-template-columns: 1fr;
padding: 1rem;
}
}
Variante 2: Cheatsheet Grid Farbcodiert
Visuelle Kategorisierung durch Farbcodierung – jede Section erhält eine eigene Akzentfarbe für schnellere Orientierung.
Struktur
<header>Kopfbereich der Seite<main>Hauptinhalt<footer>Fußbereich<nav>Navigationsbereich<section>Thematische Gruppierung
Semantik
<article>Eigenständiger Inhalt<aside>Ergänzender Inhalt<figure>Medien mit Beschriftung<time>Zeitangaben<mark>Hervorgehobener Text
Formulare
<input>Eingabefeld<textarea>Mehrzeiliger Text<select>Dropdown-Menü<button>Schaltfläche<label>Feld-Beschriftung
Listen
<ul>Ungeordnete Liste<ol>Geordnete Liste<li>Listenelement<dl>Definitionsliste<dt>/<dd>Begriff / Definition
Open HTML
<div class="cheatsheet-grid-2">
<div class="cheatsheet-section-2">
<h3 class="no-toc">Struktur</h3>
<ul>
<li><code class="inline"><header></code> Kopfbereich der Seite</li>
<li><code class="inline"><main></code> Hauptinhalt</li>
<li><code class="inline"><footer></code> Fußbereich</li>
<li><code class="inline"><nav></code> Navigationsbereich</li>
<li><code class="inline"><section></code> Thematische Gruppierung</li>
</ul>
</div>
<div class="cheatsheet-section-2">
<h3 class="no-toc">Semantik</h3>
<ul>
<li><code class="inline"><article></code> Eigenständiger Inhalt</li>
<li><code class="inline"><aside></code> Ergänzender Inhalt</li>
<li><code class="inline"><figure></code> Medien mit Beschriftung</li>
<li><code class="inline"><time></code> Zeitangaben</li>
<li><code class="inline"><mark></code> Hervorgehobener Text</li>
</ul>
</div>
<div class="cheatsheet-section-2">
<h3 class="no-toc">Formulare</h3>
<ul>
<li><code class="inline"><input></code> Eingabefeld</li>
<li><code class="inline"><textarea></code> Mehrzeiliger Text</li>
<li><code class="inline"><select></code> Dropdown-Menü</li>
<li><code class="inline"><button></code> Schaltfläche</li>
<li><code class="inline"><label></code> Feld-Beschriftung</li>
</ul>
</div>
<div class="cheatsheet-section-2">
<h3 class="no-toc">Listen</h3>
<ul>
<li><code class="inline"><ul></code> Ungeordnete Liste</li>
<li><code class="inline"><ol></code> Geordnete Liste</li>
<li><code class="inline"><li></code> Listenelement</li>
<li><code class="inline"><dl></code> Definitionsliste</li>
<li><code class="inline"><dt></code> / <code class="inline"><dd></code>
Begriff / Definition</li>
</ul>
</div>
</div>
Open CSS
.cheatsheet-grid-2 {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 1.5rem;
}
.cheatsheet-section-2 {
background: var(--bg-secondary);
padding: 1.5rem;
border-radius: 0 8px 8px 0;
border-left: 4px solid var(--accent-blue);
transition: all 200ms ease;
}
.cheatsheet-section-2:hover {
transform: translateX(4px);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
/* Farbvarianten für verschiedene Kategorien */
.cheatsheet-section-2:nth-child(1) { border-left-color: var(--accent-blue); }
.cheatsheet-section-2:nth-child(2) { border-left-color: var(--accent-green); }
.cheatsheet-section-2:nth-child(3) { border-left-color: var(--accent-purple); }
.cheatsheet-section-2:nth-child(4) { border-left-color: var(--accent-orange); }
.cheatsheet-section-2:nth-child(5) { border-left-color: var(--accent-cyan); }
.cheatsheet-section-2:nth-child(6) { border-left-color: var(--accent-red); }
.cheatsheet-section-2:nth-child(7) { border-left-color: var(--accent-mint); }
.cheatsheet-section-2:nth-child(1) h3 { color: var(--accent-blue); }
.cheatsheet-section-2:nth-child(2) h3 { color: var(--accent-green); }
.cheatsheet-section-2:nth-child(3) h3 { color: var(--accent-purple); }
.cheatsheet-section-2:nth-child(4) h3 { color: var(--accent-orange); }
.cheatsheet-section-2:nth-child(5) h3 { color: var(--accent-cyan); }
.cheatsheet-section-2:nth-child(6) h3 { color: var(--accent-red); }
.cheatsheet-section-2:nth-child(7) h3 { color: var(--accent-mint); }
.cheatsheet-section-2 h3 {
font-size: 1.1rem;
margin: 0 0 1rem;
padding: 0 0 0.5rem;
border-bottom: 2px solid var(--border-color);
}
.cheatsheet-section-2 ul {
list-style: none;
padding: 0;
margin: 0;
}
.cheatsheet-section-2 li {
padding: 0.4rem 0;
font-size: 0.9rem;
}
@media (max-width: 768px) {
.cheatsheet-grid-2 {
grid-template-columns: 1fr;
padding: 1rem;
}
}
Variante 3 Cheatsheet Grid mit Akzenten
Die mittlere Variante: Auffälliger als dezente Schatten, zurückhaltender als bunte Kategorien – blauer Akzent-Border mit translateX-Hover für das gewisse Etwas.
Repository
git initNeues Repo initialisierengit clone <url>Repo klonengit statusAktueller Statusgit logCommit-Historiegit remote -vRemote-URLs anzeigen
Staging
git add .Alle Änderungen stagengit add <file>Datei stagengit reset <file>Unstage Dateigit diffÄnderungen anzeigengit restore <file>Änderungen verwerfen
Commits
git commit -m "msg"Commit erstellengit commit --amendLetzten Commit änderngit revert <hash>Commit rückgängiggit reset --hardZu Commit zurückgit cherry-pickCommit übernehmen
Branches
git branchBranches auflistengit branch <name>Branch erstellengit checkout <name>Branch wechselngit merge <branch>Branch mergengit branch -d <name>Branch löschen
Open HTML
<div class="cheatsheet-grid-3">
<div class="cheatsheet-section-3">
<h3 class="no-toc">Repository</h3>
<ul>
<li><code class="inline">git init</code> Neues Repo initialisieren</li>
<li><code class="inline">git clone <url></code> Repo klonen</li>
<li><code class="inline">git status</code> Aktueller Status</li>
<li><code class="inline">git log</code> Commit-Historie</li>
<li><code class="inline">git remote -v</code> Remote-URLs anzeigen</li>
</ul>
</div>
<div class="cheatsheet-section-3">
<h3 class="no-toc">Staging</h3>
<ul>
<li><code class="inline">git add .</code> Alle Änderungen stagen</li>
<li><code class="inline">git add <file></code> Datei stagen</li>
<li><code class="inline">git reset <file></code> Unstage Datei</li>
<li><code class="inline">git diff</code> Änderungen anzeigen</li>
<li><code class="inline">git restore <file></code> Änderungen verwerfen</li>
</ul>
</div>
<div class="cheatsheet-section-3">
<h3 class="no-toc">Commits</h3>
<ul>
<li><code class="inline">git commit -m "msg"</code> Commit erstellen</li>
<li><code class="inline">git commit --amend</code> Letzten Commit ändern</li>
<li><code class="inline">git revert <hash></code> Commit rückgängig</li>
<li><code class="inline">git reset --hard</code> Zu Commit zurück</li>
<li><code class="inline">git cherry-pick</code> Commit übernehmen</li>
</ul>
</div>
<div class="cheatsheet-section-3">
<h3 class="no-toc">Branches</h3>
<ul>
<li><code class="inline">git branch</code> Branches auflisten</li>
<li><code class="inline">git branch <name></code> Branch erstellen</li>
<li><code class="inline">git checkout <name></code> Branch wechseln</li>
<li><code class="inline">git merge <branch></code> Branch mergen</li>
<li><code class="inline">git branch -d <name></code> Branch löschen</li>
</ul>
</div>
</div>
Open CSS
.cheatsheet-grid-3 {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 1.5rem;
}
.cheatsheet-section-3 {
background: var(--bg-secondary);
padding: 1.5rem;
border-radius: 0 8px 8px 0;
border-left: 4px solid var(--accent-blue);
transition: all 200ms ease;
}
.cheatsheet-section-3:hover {
transform: translateX(4px);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
border-left-color: var(--accent-blue-hover);
}
.cheatsheet-section-3 h3 {
color: var(--accent-blue);
font-size: 1.1rem;
margin: 0 0 1rem;
padding: 0 0 0.5rem;
border-bottom: 2px solid var(--border-color);
}
.cheatsheet-section-3 ul {
list-style: none;
padding: 0;
margin: 0;
}
.cheatsheet-section-3 li {
padding: 0.4rem 0;
font-size: 0.9rem;
transition: color 150ms ease;
}
.cheatsheet-section-3 li:hover {
color: var(--accent-blue);
}
@media (max-width: 768px) {
.cheatsheet-grid-3 {
grid-template-columns: 1fr;
padding: 1rem;
}
}
Grid Cards auto-fit
Auto-fit Grid mit Card-Design für strukturierte Vergleiche – kombiniert
.tutorial-grid
(responsive auto-fit) mit .tutorial-card Styling. Ideal für
Tastenkombinationen,
Feature-Vergleiche oder Step-by-Step Anleitungen.
VS Code Editing Shortcuts
Zeile duplizieren
Shift + Opt + ↓
Shift + Alt + ↓
→ Kopiert aktuelle Zeile nach unten
Praktisch für: Wiederholende HTML-Strukturen
Multi-Cursor
Cmd + Opt + ↓
Ctrl + Alt + ↓
→ Mehrere Zeilen gleichzeitig bearbeiten
Praktisch für: Bulk-Änderungen in Listen
Zeile verschieben
Opt + ↑/↓
Alt + ↑/↓
→ Verschiebt Zeile nach oben/unten
Praktisch für: Code-Reorganisation
Kommentar Toggle
Cmd + / (⌘ + ⇧ + 7)
Ctrl + /
→ Kommentiert Zeile(n) aus/ein
Praktisch für: Schnelles Debugging
DevTools Shortcuts
DevTools öffnen
Cmd + Shift + I
⌥ ⌘ i
Ctrl + Shift + I
F12
Schnellzugriff:
Ctrl + Shift + C
für Element-Auswahl
Console
Cmd + Opt + J
Ctrl + Shift + J
→ Direkt zur Console
Praktisch für: JavaScript Debugging
Mobile View
Cmd + Shift + M
Ctrl + Shift + M
→ Toggle Device Toolbar
Praktisch für: Responsive Testing
Hard Refresh
Cmd + Shift + R
Ctrl + Shift + R
→ Lädt Seite ohne Cache
Praktisch für: CSS/JS Updates sehen
Open HTML
<div class="tutorial-grid">
<div class="tutorial-card">
<h3 class="no-toc">Zeile duplizieren</h3>
<p><kbd>Shift + Opt + ↓</kbd></p>
<p><kbd>Shift + Alt + ↓</kbd></p>
<p>→ Kopiert aktuelle Zeile nach unten</p>
<p>Praktisch für: Wiederholende HTML-Strukturen</p>
</div>
<div class="tutorial-card">
<h3 class="no-toc">Multi-Cursor</h3>
<p><kbd>Cmd + Opt + ↓</kbd></p>
<p><kbd>Ctrl + Alt + ↓</kbd></p>
<p>→ Mehrere Zeilen gleichzeitig bearbeiten</p>
<p>Praktisch für: Bulk-Änderungen in Listen</p>
</div>
<div class="tutorial-card">
<h3 class="no-toc">Zeile verschieben</h3>
<p><kbd>Opt + ↑/↓</kbd></p>
<p><kbd>Alt + ↑/↓</kbd></p>
<p>→ Verschiebt Zeile nach oben/unten</p>
<p>Praktisch für: Code-Reorganisation</p>
</div>
</div>
Open CSS
.tutorial-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 1.5rem;
margin: 2rem 0;
}
.tutorial-card {
background: var(--bg-secondary);
padding: 1.5rem;
border-radius: 8px;
border: 1px solid var(--border-color);
}
.tutorial-card h3 {
margin-top: 0;
margin-bottom: 0.5rem;
padding-top: 0;
color: var(--accent-blue);
font-size: 1.1rem;
}
.tutorial-card p {
margin: 1rem 0 0;
}
@media (max-width: 768px) {
.tutorial-grid {
grid-template-columns: 1fr;
}
}
/* Keyboard Keys */
kbd {
background: var(--card-bg);
border: 1px solid var(--border-color);
border-radius: 4px;
padding: 0.2rem 0.5rem;
font-family: 'Fira Code', monospace;
font-size: 0.9em;
box-shadow: 0 2px 0 var(--border-color);
}
Shortcut Grid Cards
Kompaktes Grid für Tastenkombinationen – kleinere Cards (180px minmax) mit zentriertem Layout
und
<kbd>-Styling. Ideal für Quick-Reference Listen mit
minimal
Content pro Item.
Browser Tab Navigation
Neuer Tab
Tab schließen
Nächster Tab
Vorheriger Tab
Zu Tab Nr. springen
Zum letzten Tab
Geschlossenen Tab wiederherstellen
URL-Leiste fokussieren
Git Commands
git status
Aktueller Repository-Status
git add .
Alle Änderungen stagen
git commit -m
Commit mit Message
git push
Zu Remote pushen
git pull
Von Remote pullen
git log
Commit-Historie anzeigen
git branch
Branches auflisten
git checkout
Branch wechseln
VS Code Navigation
Datei schnell öffnen
Command Palette
Sidebar toggle
Tab schließen
Alle Tabs schließen
Navigation zurück/vor
Explorer fokussieren
Markiertes suchen
Settings öffnen
Keyboard Shortcuts öffnen
Open HTML
<div class="shortcut-grid">
<div class="shortcut-card">
<kbd>Ctrl + T</kbd>
<p>Neuer Tab</p>
</div>
<div class="shortcut-card">
<kbd>Ctrl + W</kbd>
<p>Tab schließen</p>
</div>
<div class="shortcut-card">
<kbd>Ctrl + Tab</kbd>
<p>Nächster Tab</p>
</div>
<div class="shortcut-card">
<kbd>Ctrl + Shift + Tab</kbd>
<p>Vorheriger Tab</p>
</div>
</div>
Open CSS
.shortcut-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
gap: 1rem;
margin: 2rem 0;
}
.shortcut-card {
background: var(--card-bg);
padding: 1.5rem;
border-radius: 8px;
border: 1px solid var(--border-color);
text-align: center;
}
.shortcut-card kbd {
display: inline-block;
margin-bottom: 0.5rem;
font-size: 1rem;
}
.shortcut-card p {
margin: 0;
font-size: 0.85rem;
color: var(--text-muted);
}
@media (max-width: 768px) {
.shortcut-grid {
grid-template-columns: 1fr;
}
}
3er Grid
Flexibles 3-Spalten-Grid mit auto-fit – passt sich automatisch der Viewport-Breite an. Mobile: 1 Spalte, Tablet: 2-3 Spalten, Desktop: 3-4 Spalten.
Open HTML
<div class="grid-3">
<div class="grid-item">1</div>
<div class="grid-item">2</div>
<div class="grid-item">3</div>
</div>
Open CSS
/* Basis: Mobile = 1 Spalte */
.grid-3 {
display: grid;
grid-template-columns: 1fr;
gap: 15px;
}
/* Tablet: Mindestens 2 Spalten (ab ~350px pro Item) */
@media (min-width: 768px) {
.grid-3 {
grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}
}
/* Desktop: Spalten passen sich an (3-4 Spalten je nach Breite) */
@media (min-width: 1024px) {
.grid-3 {
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
}
.grid-item {
padding: 1rem;
border: 1px solid var(--border-color);
border-radius: 8px;
background-color: var(--card-bg);
}
Flexbox
Ideal für: Einzeilige/mehrzeilige Layouts
Ausrichtung: Items in einer Dimension (Reihe oder Spalte)
Use Case: Navigation, Button-Gruppen, Card-Reihen
CSS Grid
Ideal für: Komplexe 2D-Layouts
Ausrichtung: Items in beiden Dimensionen gleichzeitig
Use Case: Page-Layouts, Dashboard, Gallery
Float (Legacy)
Ideal für: Text-Umfluss
Ausrichtung: Veraltet für Layouts
Use Case: Nur noch für Bilder in Fließtext relevant
Mobile-First
Start: Mobile CSS (Base)
Dann: min-width Media Queries
Vorteil: Progressive Enhancement
Desktop-First
Start: Desktop CSS (Base)
Dann: max-width Media Queries
Nachteil: Mehr Overrides nötig
Fluid/Intrinsic
Keine festen Breakpoints
Nutzt: clamp(), minmax()
Vorteil: Passt sich automatisch an
4er Grid
Responsive 4-Spalten-Grid für umfangreichere Inhalte – Mobile: 1 Spalte, Tablet: 2 Spalten, Desktop: 3 Spalten, Large Desktop: 4 Spalten.
Open HTML
<div class="grid-4">
<div class="grid-item">1</div>
<div class="grid-item">2</div>
<div class="grid-item">3</div>
<div class="grid-item">4</div>
</div>
Open CSS
/* Basis: Mobile = 1 Spalte */
.grid-4 {
display: grid;
grid-template-columns: 1fr;
gap: 15px;
}
/* Tablet: 2 Spalten */
@media (min-width: 768px) {
.grid-4 {
grid-template-columns: repeat(2, 1fr);
}
}
/* Desktop: 3 Spalten */
@media (min-width: 1024px) {
.grid-4 {
grid-template-columns: repeat(3, 1fr);
}
}
/* Large Desktop: 4 Spalten */
@media (min-width: 1440px) {
.grid-4 {
grid-template-columns: repeat(4, 1fr);
}
}
1. Clone
git clone <url>
Repository lokal kopieren
Startet neues Projekt
2. Branch
git checkout -b feature
Neuen Branch erstellen
Isoliert deine Änderungen
3. Commit
git add .
git commit -m "msg"
Änderungen speichern
4. Push
git push origin feature
Zu Remote hochladen
Mit Team teilen
<header>
Logo, Navigation, Site-Titel
Oberer Bereich der Seite
<main>
Hauptinhalt der Seite
Nur einmal pro Seite
<aside>
Sidebar, Ergänzungen
Inhalt neben Main
<footer>
Copyright, Links, Kontakt
Unterer Bereich der Seite
Comparsion Grid
Diese Version ist aktuell nicht wirklich im Einsatz, ich dokumentiere sie aber.
// Führt HTML/JavaScript aus!
element.innerHTML = userInput;
Wann verwenden: Nur mit vertrauenswürdigen Daten, NIE mit User-Input!
// Zeigt nur Text, kein Code!
element.textContent = userInput;
Wann verwenden: Immer bei User-Input! Code wird nicht ausgeführt.
Open HTML
<div class="comparison-grid">
<div class="comparison-box unsafe-example">
<div class="example-label">UNSICHER - innerHTML</div>
<div class="code-block">
<pre><code class="language-javascript">// Führt HTML/JavaScript aus!
element.innerHTML = userInput;</code></pre>
</div>
<p><strong>Wann verwenden:</strong> Nur mit vertrauenswürdigen Daten, NIE mit
User-Input!
</p>
</div>
<div class="comparison-box safe-example">
<div class="example-label">SICHER - textContent</div>
<div class="code-block">
<pre><code class="language-javascript">// Zeigt nur Text, kein Code!
element.textContent = userInput;</code></pre>
</div>
<p><strong>Wann verwenden:</strong> Immer bei User-Input! Code wird nicht ausgeführt.
</p>
</div>
</div>
Open CSS
/* Comparison Grid - für Side-by-Side Vergleiche (z.B. unsafe vs safe code) */
.comparison-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 20px;
margin: 20px 0;
}
.comparison-box {
padding: 15px;
border-radius: 8px;
}
.unsafe-example {
background-color: var(--bg-secondary);
border: 1px solid var(--accent-red-light);
}
.safe-example {
background-color: var(--bg-secondary);
border: 1px solid var(--accent-green);
}
.example-label {
font-weight: bold;
margin-bottom: 10px;
display: flex;
align-items: center;
}
.example-label::before {
content: "✗";
display: inline-block;
margin-right: 8px;
font-size: 20px;
}
.safe-example .example-label::before {
content: "✓";
color: #28a745;
}
.unsafe-example .example-label::before {
content: "✗";
color: #dc3545;
}
/* Responsive: 768px untereinander */
@media (max-width: 768px) {
.comparison-grid {
grid-template-columns: 1fr;
}
}
Info Boxes
Info-Box Standard
Farbcodierte Hinweis-Boxen mit SVG-Icons – kombiniert .info-box
mit Varianten-Klassen (.notice, .warning, .danger...) für visuell
unterscheidbare Kontext-Hinweise. Icons nutzen fill="currentColor"
oder auch var(--)für
automatische
Farbanpassung.
- Info: Das ist eine allgemeine Info
<div class="info-box">
<strong class="box-title no-toc">Info
<svg class="icon-ui"><use href="#dpz-info-circle" /></svg>
</strong>
<ul class="arrow-list">
<li><strong>Info</strong>: Das ist eine allgemeine Info</li>
</ul>
</div>
Info-Box Notice
- Merke: Das ist wichtig
<div class="info-box notice">
<strong class="box-title notice no-toc">Merke
<svg class="icon-ui icon-gray"><use href="#dpz-check-circle" /></svg>
</strong>
<ul class="arrow-list">
<li><strong>Merke</strong>: Das ist wichtig</li>
</ul>
</div>
Info-Box Danger
- Achtung: Dies ist eine Warnung!
<div class="info-box danger">
<strong class="box-title danger no-toc" id="achtung">Achtung
<svg class="icon-ui icon-gray"><use href="#dpz-warning-circle" /></svg>
</strong>
<ul class="arrow-list">
<li><strong>Achtung:</strong> Dies ist eine Warnung!</li>
</ul>
</div>
Info-Box Warning
- Vorsicht: Hier ist Achtung geboten!
<div class="info-box warning">
<strong class="box-title warning no-toc">Vorsicht
<svg class="icon-ui icon-gray"><use href="#dpz-warning-circle" /></svg>
</strong>
<ul class="arrow-list">
<li><strong>Vorsicht:</strong> Hier ist Achtung geboten!</li>
</ul>
</div>
Icons
Copy-ready SVG-Snippets mit Accessibility Best Practices – dekorative Icons erhalten aria-hidden="true", bedeutungstragende Icons bekommen role="img" und aria-label. Bonus:
Attribut-Reihenfolge erklärt!
SVGs sind kein Bild-Tag, sondern eigener XML-Code, daher braucht man hier einen anderen Weg, um Barrierefreiheit und Semantik herzustellen. Meine Icons erfüllen in den meisten Fällen rein dekorative Zwecke.
Wenn das Icon rein dekorativ ist (z. B. visuelle Ergänzung ohne Informationswert), sollte es für Screenreader unsichtbar gemacht werden.
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30.5 30.5" width="30" height="30"
fill="currentColor" aria-hidden="true">
<!-- Pfade -->
</svg>
Wenn das Icon eine Bedeutung hat (z. B. „Warning“, „Error“, „Info“), sollte es für
Screenreader
mit
role="img" und aria-label
beschrieben
werden.
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30.5 30.5" width="30" height="30"
fill="currentColor" role="img" aria-label="Warnung">
<!-- currentColor: Passt sich automatisch der Textfarbe an -->
<!-- Pfade -->
</svg>
Reihenfolge der Attribute
Die Reihenfolge der Attribute ist funktional egal – der Browser interpretiert sie in beliebiger Reihenfolge korrekt.
Es gibt Best Practices für eine logische Sortierung:
<svg
xmlns="http://www.w3.org/2000/svg" <!-- 1. Namespace -->
viewBox="0 0 30.5 30.5" <!-- 2. Koordinatensystem -->
width="50" <!-- 3. Dimensionen -->
height="50"
class="icon-warning" <!-- 4. CSS-Klasse -->
fill="currentColor" <!-- 5. Styling -->
role="img" <!-- 6. Accessibility -->
aria-label="Warnung">
TextEdit gibt abereine andere Reihenfolge aus, zumindest bei Icons, die ich in Illustrator erstellt habe. Andere Tools nutze ich eigentlich nicht. Ehrlich gesagt nehme ich hier nur die Werte raus, die ich brauche.
Die Logik dahinter
- xmlns → Definiert, dass es SVG ist (immer zuerst)
- viewBox → Legt Koordinatensystem fest (wichtig für Skalierung)
- width/height → Sichtbare Größe
- class → CSS-Styling Hook
- fill → Visuelle Eigenschaften
- role/aria-* → Barrierefreiheit (am Ende)
<!-- Sprite Icon -->
<svg class="icon-ui icon-green"><use href="#dpz-check-circle" /></svg>
<!-- SVG -->
<!-- Screenreader überspringen dieses Icon -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30.5 30.5" width="30" height="30"
class="icon-success" fill="#20a66e" aria-hidden="true">
<path
d="M15.25,0C6.83,0,0,6.83,0,15.25s6.83,15.25,15.25,15.25,15.25-6.83,15.25-15.25S23.67,0,15.25,0ZM24.85,10.96l-10.96,10.96c-.33.33-.76.49-1.19.49s-.86-.16-1.19-.49l-5.13-5.13c-.66-.66-.66-1.73,0-2.39.66-.66,1.73-.66,2.39,0l3.94,3.94,9.76-9.76c.66-.66,1.73-.66,2.39,0,.66.66.66,1.73,0,2.39Z">
</path>
</svg>
<!-- Sprite Icon -->
<svg class="icon-ui icon-red-light"><use href="#dpz-cross-circle" /></svg>
<!-- SVG -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30.5 30.5" width="30" height="30"
class="icon-danger" fill="currentColor" role="img" aria-label="Falsch">
<path
d="M15.2,0C6.8,0,0,6.8,0,15.2s6.8,15.2,15.2,15.2,15.2-6.8,15.2-15.2S23.7,0,15.2,0ZM23.2,
20.7c.4.4.4,1,0,1.4l-1.1,1.1c-.4.4-1,.4-1.4,0l-5.5-5.5-5.5,5.5c-.4.4-1,.4-1.4,0l-1.1-1.1c-.4-.4-.4-1,
0-1.4l5.5-5.5-5.5-5.5c-.4-.4-.4-1,0-1.4l1.1-1.1c.4-.4,1-.4,1.4,0l5.5,5.5,5.5-5.5c.4-.4,1-.4,1.4,0l1.1,1.1c.4.4.4,1,0,1.4l-5.5,5.5,5.5,5.5Z">
</path>
</svg>
<!-- Sprite Icon -->
<svg class="icon-ui icon-orange"><use href="#dpz-warning-circle" /></svg>
<!-- SVG -->
<!-- Screenreader berücksichtigen dieses Icon -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30.5 30.5" width="30" height="30"
class="icon-warning" fill="currentColor" role="img" aria-label="Achtung">
<path
d="M15.25,0C6.83,0,0,6.83,0,15.25s6.83,15.25,15.25,15.25,15.25-6.83,15.25-15.25S23.67,0,15.25,0ZM14.35,4.75h1.71c.6,0,
1.07.49,1.06,1.09l-.35,12.32c-.02.57-.48,1.03-1.06,1.03h-.98c-.57,0-1.04-.45-1.06-1.02l-.38-12.32c-.02-.6.46-1.09,1.06-1.09ZM16.7,
25.2c-.39.37-.88.55-1.46.55s-1.04-.18-1.44-.55c-.39-.37-.59-.81-.59-1.33s.2-.95.59-1.32c.4-.37.88-.55,1.44-.55s1.07.18,1.46.55c.39.37.59.81.59,1.32s-.2.96-.59,1.33Z">
</path>
</svg>
<!-- Sprite Icon -->
<svg class="icon-ui"><use href="#dpz-info-circle" /></svg>
<!-- SVG -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30.5 30.5" width="30" height="30"
class="icon-blue" fill="currentColor" aria-hidden="true">
<path
d="M15.25,0C6.83,0,0,6.83,0,15.25s6.83,15.25,15.25,15.25,15.25-6.83,15.25-15.25S23.67,0,15.25,0ZM15.56,3.83c1.22,0,2.21.99,2.21,2.21s-.99,2.21-2.21,2.21-2.21-.99-2.21-2.21.99-2.21,2.21-2.21ZM18.51,25.93h-5.9c-.82,0-1.47-.66-1.47-1.47s.66-1.47,1.47-1.47h1.47v-8.84h-1.47c-.82,0-1.47-.66-1.47-1.47s.66-1.47,1.47-1.47h2.95c.82,0,1.47.66,1.47,1.47v10.32h1.47c.82,0,1.47.66,1.47,1.47s-.66,1.47-1.47,1.47Z">
</path>
</svg>
<!-- Sprite Icon -->
<svg class="icon-ui icon-gray"><use href="#dpz-help-circle" /></svg>
<!-- SVG -->
<!-- Screenreader überspringen dieses Icon -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30.5 30.5" width="30" height="30"
class="icon-blue" fill="currentColor" aria-hidden="true">
<path
d="M15.248,0C6.827,0,0,6.827,0,15.248s6.827,15.248,15.248,15.248,15.248-6.827,15.248-15.248S23.67,0,15.248,0ZM16.487,25.86c-.423.429-.954.646-1.579.646-.606,0-1.124-.218-1.538-.647-.411-.427-.619-.949-.619-1.554,0-.595.209-1.11.62-1.533.413-.424.93-.639,1.537-.639.626,0,1.157.214,1.578.637.423.423.637.939.637,1.535,0,.606-.214,1.13-.636,1.556ZM21.768,12.014c-.409.688-.926,1.275-1.534,1.747-.589.458-1.181.903-1.775,1.338-.569.417-1.051.909-1.431,1.463-.369.536-.557,1.241-.557,2.097,0,.764-.622,1.386-1.387,1.386h-.51c-.764,0-1.386-.622-1.386-1.386v-.164c0-1.104.207-2.036.615-2.771.402-.726.912-1.353,1.514-1.863.584-.495,1.176-.962,1.759-1.387.562-.407,1.038-.854,1.417-1.328.362-.452.538-.999.538-1.671,0-.853-.33-1.493-1.01-1.958-.7-.479-1.589-.722-2.641-.722-.739,0-1.513.184-2.299.546-.581.267-1.134.663-1.643,1.178-.414.418-1.087.469-1.564.118l-.394-.288c-.291-.214-.472-.543-.495-.905-.023-.359.111-.706.369-.951.766-.731,1.598-1.303,2.475-1.697,1.183-.533,2.472-.804,3.83-.804,1.383,0,2.592.252,3.593.75,1.006.501,1.788,1.163,2.327,1.97.541.812.815,1.687.815,2.6,0,1.095-.211,2.005-.628,2.704Z">
</path>
</svg>
<!-- Sprite Icon -->
<svg class="icon-ui"><use href="#dpz-bulb-circle" /></svg>
<!-- SVG -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30.5 30.5" width="30" height="30"
fill="currentColor" aria-hidden="true">
<path d="M15.25,0C6.83,0,0,6.83,0,15.25s6.83,15.25,15.25,15.25,15.25-6.83,15.25-15.25S23.67,0,15.25,0ZM17.73,22.73c-.04.34-.23.59-.56.74-.09.04-.18.15-.21.25-.28,1.04-.33,1.09-1.4,1.09-.35,0-.71,0-1.06,0-.47,0-.72-.21-.84-.66-.03-.1-.06-.2-.07-.3-.03-.22-.13-.34-.34-.44-.39-.18-.49-.57-.52-.96-.02-.3-.02-.6,0-.89.02-.42.3-.68.72-.69.6,0,1.21,0,1.81,0,.6,0,1.19,0,1.79,0,.43,0,.72.24.74.66.02.4,0,.8-.05,1.19ZM19.8,16.29c-.84.9-1.36,1.94-1.56,3.15-.09.55-.49.87-1.05.88-.64,0-1.28,0-1.93,0-.65,0-1.3,0-1.96,0-.55,0-.93-.33-1.03-.87-.21-1.22-.74-2.26-1.58-3.17-3.27-3.5-1.73-9.12,2.89-10.4,3.66-1.02,7.17,1.35,7.84,4.83.41,2.13-.15,4-1.62,5.58Z"></path>
</svg>
Inline Icons
Für Icons im Fließtext sind können zusätzliche Klassen verwendet werden.
Utility Classes wie ml-sm, mr-sm oder mx-sm für
beide Seiten, geben den Icons einen Abstand von 0.5rem nach links und/oder
rechts zum Fließtext.
Aktuell stelle ich auf eigene Icons im Sprite-Sheet um - schau dir den Unterschied an! Mehr dazu im Tutorial CSS Lucide Icons.
<svg class="icon icon--inline"><use href="#dpz-check-inline" /></svg>
Hier können zuätzliche Klassen genutzt werden, z. B.:
icon--inlinefür inline Icons mit einem leichten Versatz nach unten im Fließtexticon-greenund weitere Farben ändern die im Sprite hinterlegtecurrentColor- Utility Classes wie
pl-smkönnen ebenfalls verwendet werden.
<!-- Sprite Icon -->
<svg class="icon icon--inline icon-green ml-sm"><use href="#dpz-check-inline" /></svg>
<!-- SVG -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15 15" width="15" height="15"
fill="var(--accent-green)" class="icon-va-y-2 ml-sm mr-sm" aria-hidden="true">
<path
d="M6.285,15c-.47,0-.919-.21-1.22-.577L.359,8.696c-.554-.674-.456-1.668.217-2.222.673-.553,1.668-.457,2.222.217l3.287,4.001L12.069.764c.449-.748,1.419-.987,2.167-.537.747.45.988,1.42.537,2.167l-7.136,11.842c-.264.439-.726.722-1.237.76-.039.002-.077.004-.115.004Z">
</path>
</svg>
<!-- Sprite Icon -->
<svg class="icon icon--inline icon-red"><use href="#dpz-cross-inline" /></svg>
<!-- SVG -->
<p>Falsch
<svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 15 15"
class="icon-va-y-2 ml-sm mr-sm" fill="var(--accent-red)" aria-hidden="true">
<path
d="M14.516,12.177c.646.646.646,1.693,0,2.338h0c-.646.646-1.693.646-2.339,0l-4.342-4.342c-.185-.185-.484-.185-.669,0l-4.342,4.342c-.646.646-1.693.646-2.338,0h0c-.646-.646-.646-1.693,0-2.339l4.343-4.342c.185-.185.185-.484,0-.669L.484,2.823c-.646-.646-.646-1.693,0-2.338h0c.646-.646,1.693-.646,2.338,0l4.342,4.342c.185.185.484.185.669,0L12.177.484c.646-.646,1.693-.646,2.339,0h0c.646.646.646,1.693,0,2.338l-4.342,4.343c-.185.185-.185.484,0,.669l4.342,4.342Z"
/>
</svg>
</p>
<!-- Sprite Icon -->
<svg class="icon icon--inline icon-text"><use href="#dpz-bulb-inline"></use></svg>
<!-- SVG -->
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="20" viewBox="0 0 13 20"
class="icon-va-y-2 ml-sm mr-sm" fill="var(--text-primary)" aria-hidden="true">
<path
d="M8.344,15.947c-.614-.001-1.228,0-1.841,0-.623,0-1.247-.001-1.87,0-.428.001-.721.273-.741.706-.014.306-.02.614.004.918.032.401.13.8.533.984.223.102.327.23.355.456.013.103.05.204.076.306.12.462.381.671.863.68.364.006.729.002,1.093.002,1.105,0,1.161-.047,1.447-1.118.027-.1.121-.218.214-.26.34-.152.54-.414.581-.763.048-.406.068-.82.049-1.229-.02-.437-.322-.681-.763-.682Z" />
<path
d="M12.866,5.22C12.178,1.638,8.558-.802,4.781.244.016,1.565-1.578,7.354,1.798,10.954c.871.929,1.417,2.009,1.634,3.261.097.56.493.891,1.06.895.672.004,1.344.001,2.016.001.663,0,1.325.003,1.988,0,.582-.003.989-.337,1.084-.903.209-1.244.752-2.314,1.614-3.238,1.521-1.632,2.094-3.559,1.673-5.748Z" />
</svg>
<!-- Sprite SVG -->
<svg class="icon icon--inline"><use href="#dpz-arrow-tr-inline" /></svg>
<!-- SVG -->
<svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 15 15"
class="icon-va-y-2 ml-sm mr-sm" fill="currentColor" aria-hidden="true">
<path
d="M13.421,0H4.737c-.872,0-1.579.707-1.579,1.579s.707,1.579,1.579,1.579h4.873L.463,12.305c-.617.617-.617,1.616,0,2.233.308.308.712.463,1.116.463s.808-.154,1.116-.463L11.842,5.391v4.873c0,.872.707,1.579,1.579,1.579s1.579-.707,1.579-1.579V1.579c0-.872-.707-1.579-1.579-1.579Z" />
</svg>
<!-- Sprite SVG -->
<svg class="icon icon--inline"><use href="#dpz-arrow-br-inline" /></svg>
<!-- SVG -->
<svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 15 15"
class="icon-va-y-2 ml-sm mr-sm" fill="currentColor" aria-hidden="true">
<path
d="M15,13.421V4.737c0-.872-.707-1.579-1.579-1.579s-1.579.707-1.579,1.579v4.873L2.695.463C2.079-.154,1.079-.154.463.463c-.308.308-.463.712-.463,1.116s.154.808.463,1.116l9.147,9.147h-4.873c-.872,0-1.579.707-1.579,1.579s.707,1.579,1.579,1.579h8.684c.872,0,1.579-.707,1.579-1.579Z" />
</svg>
Gängige SVG-Attribute
Diese Attribute können den inline <style> im SVG erstetzen:
| CSS-Property | SVG-Attribut |
|---|---|
fill: #fff |
fill="#fff" |
stroke: #000 |
stroke="#000" |
stroke-width: 2px |
stroke-width="2" |
opacity: .5 |
opacity="0.5" |
fill-opacity: .3 |
fill-opacity="0.3" |
stroke-opacity: .7 |
stroke-opacity="0.7" |
Open CSS
svg.icon-inline {
vertical-align: middle;
}
/* Etwas nach unten - Ersatz für middle, da es oft optisch nicht gut sitzt */
svg.icon-va-y-2 {
vertical-align: -2px;
}
/* An Baseline des Textes */
svg.icon-va-tb {
vertical-align: text-bottom;
}
/* An Baseline der Kleinbuchstaben */
svg.icon-va-tbase {
vertical-align: baseline;
}
Table
Tabelle 3 Spalten
| Property | Funktion | Beispiel |
|---|---|---|
display |
Definiert Box-Modell des Elements | display: flex; |
position |
Positionierungskontext festlegen | position: relative; |
gap |
Abstand zwischen Grid/Flex-Items | gap: 1.5rem; |
z-index |
Stapelreihenfolge von Elementen | z-index: 100; |
Open HTML
<table class="ref-table">
<thead>
<tr>
<th>Tag</th>
<th>Beschreibung</th>
<th>Beispiel</th>
</tr>
</thead>
<tbody>
<tr>
<td><code><h1></code></td>
<td>Hauptüberschrift - wichtigste Überschrift der Seite</td>
<td><code><h1>Willkommen</h1></code></td>
</tr>
<tr>
<td><code><p></code></td>
<td>Absatz für Fließtext</td>
<td><code><p>Dies ist ein Text.</p></code></td>
</tr>
<tr>
<td><code><a></code></td>
<td>Link zu einer anderen Seite</td>
<td><code><a href="/">Home</a></code></td>
</tr>
</tbody>
</table>
Open CSS
.ref-table {
width: 100%;
border-collapse: collapse;
margin: 1.5rem 0;
background: var(--bg-secondary);
border-radius: 8px;
overflow: hidden;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.ref-table thead {
background: var(--bg-tertiary);
border-bottom: 2px solid var(--heading-primary);
}
.ref-table th {
padding: 1rem;
text-align: left;
font-family: var(--font-heading);
font-weight: 500;
font-size: 0.875rem;
color: var(--heading-secondary);
text-transform: uppercase;
letter-spacing: 0.05em;
}
.ref-table td {
padding: 0.875rem 1rem;
border-bottom: 1px solid var(--border-color);
vertical-align: top;
}
.ref-table tbody tr:last-child td {
border-bottom: none;
}
.ref-table tbody tr {
transition: background-color 150ms ease;
}
.ref-table tbody tr:hover {
background: var(--bg-tertiary);
}
.ref-table code {
font-family: var(--font-code);
font-size: 0.875rem;
background: var(--bg-tertiary);
padding: 0.2em 0.5em;
border-radius: 4px;
/* color: var(--accent-blue); */
white-space: nowrap;
}
/* ---- Flexible Spalten-Breiten ---- */
.ref-table th,
.ref-table td {
width: auto;
}
/* Erste Spalte bekommt eine Mindestbreite */
.ref-table thead th:first-child {
min-width: 100px;
white-space: nowrap;
}
/* Optional: Bestimmte Spalten sollen nicht umbrechen */
.ref-table td:first-child {
white-space: nowrap;
}
/* Falls doch mal fixe Breiten, diese explizite Klasse */
.ref-table.table-3col thead th:nth-child(1) {
width: 15%;
min-width: 100px;
}
.ref-table.table-3col thead th:nth-child(2) {
width: 45%;
}
.ref-table.table-3col thead th:nth-child(3) {
width: 40%;
}
/* ---- Responsive: Cards auf Mobile ---- */
@media (max-width: 767px) {
.ref-table thead {
display: none;
}
.ref-table,
.ref-table tbody,
.ref-table tr {
display: block;
width: 100%;
}
.ref-table tr {
margin-bottom: 1rem;
background: var(--bg-secondary);
border: 1px solid var(--border-color);
border-radius: 8px;
padding: 1rem;
}
.ref-table tr:hover {
background: var(--bg-tertiary);
}
.ref-table td {
display: block;
padding: 0.5rem 0;
border: none;
text-align: left;
}
.ref-table td::before {
content: attr(data-label);
display: block;
font-weight: 600;
color: var(--accent-blue);
font-size: 0.75rem;
text-transform: uppercase;
margin-bottom: 0.25rem;
}
.ref-table td:first-child {
font-size: 1.125rem;
padding-bottom: 0.75rem;
border-bottom: 1px solid var(--border-color);
margin-bottom: 0.5rem;
}
.ref-table td:first-child::before {
display: none;
}
}
Tabelle 2 Spalten
Passt sich an die Inhaltsbreite an
| Befehl | Funktion |
|---|---|
git status |
Zeigt aktuellen Status des Repositories |
git add . |
Staged alle Änderungen für nächsten Commit |
git commit -m "msg" |
Erstellt Commit mit Message |
git push |
Lädt Commits zu Remote-Repository hoch |
git pull |
Holt Änderungen vom Remote-Repository |
| Unit | Beschreibung |
|---|---|
px |
Absolute Einheit - fixe Pixelgröße |
rem |
Relativ zur Root-Schriftgröße (html) |
em |
Relativ zur Eltern-Schriftgröße |
% |
Prozentual zum Elternelement |
vw/vh |
Relativ zur Viewport-Breite/-Höhe |
fr |
Grid: Flexible Fraktion des verfügbaren Platzes |
Tabelle im 2er Grid
| Kategorie | Symbole |
|---|---|
| Grundpfeile | ← → ↑ ↓ |
| Doppelpfeile | ⇐ ⇒ ⇑ ⇓ |
| Lange Pfeile | ⟵ ⟶ ⟷ ⟸ ⟹ ⟺ |
| Diagonal | ↖︎ ↗︎ ↘︎ ↙︎ |
| Kreisförmig | ↺ ↻ ⟲ ⟳ |
| Sonstige Pfeile | ↩︎ ↪︎ ↵ ➜ ➔ ➤ |
| Modifier Keys | ⌘ ⌥ ⌃ ⇧ |
| Escape / Return | ⎋ ↩︎ ⏎ |
| Tab / Space | ⇥ ⇤ ␣ |
| Sonstige Tasten | fn ⌤ ⌫ ⌦ |
| Maus & Zeiger | 🖱︎ ↖︎ ↗︎ ↘︎ ↙︎ |
| Menü / Optionen | ⋮ ⋯ ≡ |
| Kategorie | Symbole |
|---|---|
| Standard Bullets | • ● ○ |
| Alternative Bullets | ◦ ・ ⋅ |
| Deko-Punkte | ❥ ✦ ✧ ✱ ✲ |
| Rechtecke | ▭ ▮ ▯ |
| Dreiecke | ▲ △ ▼ ▽ ▶ ▷ ◀ ◁ |
| Quadrate | ■ □ ▪ ▫ ◼︎ ◻︎ |
| Kreise | ● ○ ◎ ◉ ◌ |
| Zeit | ⏱︎ ⏲︎ ⏰ ⏳ |
| Warnung | ⚠︎ ⚡ ☢︎ |
| Info / Sterne | ✦ ✧ ✩ ★ ☆ ✪ |
| Check / X | ✓ ✔ ✕ ✖ ✗ |
CTA Buttons Hero
Zentrierte Buttons mit display: flex;.
<div class="hero-cta">
<a href="/tutorials/html/" class="btn btn-primary">Tutorials starten</a>
<a href="/glossary.html" class="btn btn-secondary">Zum Glossar</a>
</div>
Open CSS
.hero-cta {
display: flex;
flex-direction: column;
/* Untereinander auf Mobile */
gap: 1rem;
/* = 16px */
align-items: center;
}
CTA Buttons Content
Beispiele für verschiedene Button-Styles.
<div class="cta-content">
<a href="/tutorials/javascript/javascript-projects/js-code-escaper.html"
class="btn btn-primary">Zum HTML Code Escaper</a>
</div>
<div class="cta-content">
<a href="/glossary.html" class="btn btn-secondary">Zum Glossar</a>
</div>
<div class="cta-content">
<a href="/tutorials/css/" class="btn">Zu den CSS Tutorials</a>
</div>
<div class="cta-content">
<a href="/tutorials/css/css-basics/css-einbinden.html" class="btn tutorial-button">
Zum Tutorial CSS einbinden</a>
</div>
KBD Buttons mit Glow-Effekt
Beim Erstellen der
404-Page ↵ entstanden. sind
diese beleuchteten Tastatur-Buttons entstanden. Sie haben einen subtilen Glow im
Normalzustand und leuchten beim Hover wie eine RGB-Tastatur. Perfekt für moderne,
interaktive Navigation!
- Als einzelner Button mit
.keyKlasse - Als Button-Group in Navigation mit
.keyboard-nav - Für Shortcuts, Download-Links oder wichtige Actions
.keyboard-nav
Open HTML
Single Buttons
<!-- Single Buttons -->
<div>
<a href="#kbd-buttons">
<kbd class="key">Link ↵</kbd>
</a>
</div>
<div>
<a href="#kbd-buttons">
<kbd class="key-active">Link ↵</kbd>
</a>
</div>
<div>
<a href="#kbd-buttons">
<kbd class="key-active-blue key-active">Link ↵</kbd>
</a>
</div>
<div>
<a href="#kbd-buttons">
<kbd class="key key-active-green">Link ↵</kbd>
</a>
</div>
Keyboard Nav Buttons
<!-- .keyboard-nav -->
<div>
<nav class="keyboard-nav">
<a href="#kbd-buttons">
<kbd class="key-active">Link 1 ↵</kbd>
</a>
<a href="#kbd-buttons">
<kbd>Link 2 ↵</kbd>
</a>
<a href="#kbd-buttons">
<kbd>Link 3 ↵</kbd>
</a>
<a href="#kbd-buttons">
<kbd>Link 4 ↵</kbd>
</a>
<a href="#kbd-buttons">
<kbd>Link 5 ↵</kbd>
</a>
</nav>
</div>
Open CSS
.keyboard-nav {
display: flex;
flex-wrap: wrap;
gap: 1.5rem;
justify-content: left;
margin: 3rem 0;
max-width: 900px;
}
.key,
.keyboard-nav kbd {
display: inline-block;
padding: 0.75rem 1.5rem;
margin: 1rem 0.5rem;
background: var(--card-bg);
border: 3px solid var(--border-color);
border-radius: 6px;
font-family: var(--font-heading);
font-size: 1rem;
font-weight: 400;
color: var(--text-primary);
cursor: pointer;
transition: all 0.3s ease;
box-shadow:
0 3px 0 rgba(0, 0, 0, 0.2),
0 0 20px var(--accent-blue),
0 0 40px rgba(0, 122, 204, 0.3);
text-decoration: none;
position: relative;
}
/* Hover - kombiniert für beide */
a:hover .key,
.keyboard-nav a:hover kbd {
color: var(--accent-blue);
border-color: var(--accent-blue);
box-shadow:
0 3px 0 rgba(0, 0, 0, 0.2),
0 0 20px var(--accent-blue),
0 0 40px rgba(0, 122, 204, 0.3);
transform: translateY(1px);
}
/* Click - kombiniert für beide */
a:active .key,
.keyboard-nav a:active kbd {
transform: translateY(2px);
box-shadow:
0 1px 0 rgba(0, 0, 0, 0.2),
0 0 20px var(--accent-blue);
}
/* Key hervorgehoben */
kbd.key.key-active-green,
kbd.key-active-green {
color: var(--color-success);
border-color: var(--color-success, #2ecc71);
box-shadow:
0 3px 0 rgba(0, 0, 0, 0.2),
0 0 20px var(--color-success, #2ecc71),
0 0 40px rgba(46, 204, 113, 0.3);
}
a:hover kbd.key.key-active-green,
a:hover kbd.key-active-green {
box-shadow:
0 3px 0 rgba(0, 0, 0, 0.2),
0 0 20px var(--color-success, #2ecc71),
0 0 40px rgba(46, 204, 113, 0.3);
}
a:active kbd.key.key-active-green,
a:active kbd.key-active-green {
box-shadow:
0 1px 0 rgba(0, 0, 0, 0.2),
0 0 20px var(--color-success, #2ecc71);
}
kbd.key-active {
display: inline-block;
padding: 0.75rem 1.5rem;
margin: 1rem 0.5rem;
background: var(--card-bg);
border: 3px solid var(--border-color);
border-radius: 6px;
font-family: var(--font-heading);
font-size: 1rem;
font-weight: 400;
color: var(--text-primary);
cursor: pointer;
transition: all 0.3s ease;
box-shadow:
0 3px 0 var(--border-color),
0 2px 4px 3px var(--accent-blue),
0 0 0 transparent;
text-decoration: none;
position: relative;
}
/* Glow beim Hover - wie Tastatur-Beleuchtung */
a:hover kbd.key-active {
color: var(--accent-blue);
border-color: var(--accent-blue);
box-shadow:
0 3px 0 rgba(0, 0, 0, 0.2),
0 0 20px var(--accent-blue),
0 0 40px rgba(46, 109, 204, 0.3);
transform: translateY(1px);
}
/* Click Animation - runterdrücken */
a:active kbd.key-active {
transform: translateY(2px);
box-shadow:
0 1px 0 rgba(0, 0, 0, 0.2),
0 0 20px var(--accent-blue);
}
/* Home Key hervorgehoben */
kbd.key-active-blue {
color: var(--accent-blue);
border-color: var(--accent-blue);
box-shadow:
0 3px 0 rgba(0, 0, 0, 0.2),
0 0 10px var(--accent-blue),
0 0 40px rgba(46, 130, 204, 0.3);
}
.key-active-blue:hover kbd {
box-shadow:
0 3px 0 rgba(0, 0, 0, 0.2),
0 0 20px var(--accent-blue),
0 0 40px rgba(46, 130, 204, 0.3);
}
.keyboard-nav .key-active-blue:active kbd {
box-shadow:
0 1px 0 rgba(0, 0, 0, 0.2),
0 0 20px var(--accent-blue);
}
/* Responsive */
@media (max-width: 768px) {
.keyboard-nav {
gap: 0.75rem;
}
.key,
.keyboard-nav kbd {
padding: 0.65rem 1.25rem;
font-size: 0.95rem;
}
}
@media (max-width: 480px) {
.keyboard-nav {
gap: 0.5rem;
}
.key,
.keyboard-nav kbd {
padding: 0.6rem 1rem;
font-size: 0.85rem;
}
}
Toggle more Info
<summary> hat die Toggle-Funktion „von Haus aus“. Das
Verhalten
steckt nativ im HTML-Tag <details>.
So funktioniert das Prinzip
- Der
<summary>-Tag ist automatisch klickbar und steuert das Öffnen/Schließen. - Beim Klick: bekommt
<details>das Attribut open und der Browser zeigt den restlichen Inhalt an.
<details>
<summary>
Toggle für mehr Infos
</summary>
<div>
<!-- INHALT -->
</div>
</details>
<details>+<summary>funktionieren ohne JavaScript.<summary>ist automatisch klickbar.- Mit CSS kann das Styling angepasst und visuell erweitert werden.
- Das open-Attribut
details[open] summaryerlaubt gezieltes Styling für den geöffneten Zustand.
Open CSS
details {
margin-top: 1rem;
}
summary {
cursor: pointer;
user-select: none;
font-family: var(--font-code);
color: var(--accent-blue);
font-weight: bold;
/* padding: 0.5rem 0; */
text-align: left;
}
summary:hover {
color: var(--accent-blue-hover);
}
/* Falls mehr Abstand benötigt wird */
.toggle-detail {
padding: 0.5rem 0 0.5rem 0;
margin-top: 10px;
}
Typische Ergänzungen
details {
border: 1px solid var(--border-color);
border-radius: 6px;
padding: 0.5rem 1rem;
background: var(--bg-light);
}
summary {
cursor: pointer;
font-weight: bold;
list-style: none; /* entfernt das Standard-Dreieck bei Safari */
}
summary::-webkit-details-marker {
display: none; /* entfernt das Standard-Dreieck bei Chrome/Safari */
}
details[open] summary {
color: var(--accent-blue);
}
Benutzerdefinierter Tooltip
Das ist das zu erklärende WortDas ist die Erklärung
<p>Das ist das zu erklärende
<span class="tooltip">Wort<span class="tooltiptext">Das ist die
Erklärung</span></span>
</p>
.tooltip {
position: relative;
cursor: help;
border-bottom: 1px dashed var(--heading-secondary);
}
.tooltip .tooltiptext {
visibility: hidden;
opacity: 0;
position: absolute;
bottom: 125%;
left: 50%;
transform: translateX(-50%);
background: var(--bg-primary);
color: var(--text-primary);
padding: 0.5rem 0.75rem;
border-radius: 4px;
font-size: 0.85rem;
font-style: normal;
white-space: nowrap;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
border: 1px solid var(--border-color);
z-index: 100;
transition: opacity 0.2s, visibility 0.2s;
}
.tooltip .tooltiptext::after {
content: '';
position: absolute;
top: 100%;
left: 50%;
transform: translateX(-50%);
border: 6px solid transparent;
border-top-color: var(--bg-tertiary);
}
.tooltip:hover .tooltiptext {
visibility: visible;
opacity: 1;
}
Mehr aus DevPanicZone!
Tutorials werden geladen...