replace ascii trees: dns hierarchy, dom structure
This commit is contained in:
@@ -810,19 +810,15 @@ SPEAKER NOTES:
|
|||||||
|
|
||||||
# Die DNS-Hierarchie
|
# Die DNS-Hierarchie
|
||||||
|
|
||||||
```
|

|
||||||
. (Root)
|
|
||||||
/|\
|
|
||||||
/ | \
|
|
||||||
.de .com .org ...
|
|
||||||
/
|
|
||||||
hdm-stuttgart
|
|
||||||
|
|
|
||||||
www
|
|
||||||
```
|
|
||||||
|
|
||||||
**Dezentral:** Niemand kennt alles.
|
**Dezentral:** Niemand kennt alles.
|
||||||
Jede Ebene kennt nur die nächste.
|
|
||||||
|
Jede Ebene kennt nur die nächste:
|
||||||
|
|
||||||
|
- Root → .de, .com, .org
|
||||||
|
- .de → alle .de-Domains
|
||||||
|
- hdm-stuttgart.de → www, mail, …
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
SPEAKER NOTES:
|
SPEAKER NOTES:
|
||||||
|
|||||||
@@ -491,15 +491,7 @@ Funktionale Programmierung, Original-Array bleibt unverändert
|
|||||||
- JavaScript kann diesen Baum **lesen und ändern**
|
- JavaScript kann diesen Baum **lesen und ändern**
|
||||||
- Jedes HTML-Element = ein "Node"
|
- Jedes HTML-Element = ein "Node"
|
||||||
|
|
||||||
```
|

|
||||||
document
|
|
||||||
└── html
|
|
||||||
├── head
|
|
||||||
│ └── title
|
|
||||||
└── body
|
|
||||||
├── h1
|
|
||||||
└── p
|
|
||||||
```
|
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
DOM = Programmierschnittstelle für HTML
|
DOM = Programmierschnittstelle für HTML
|
||||||
|
|||||||
58
slides/223015c/assets/demos/dns-tree.html
Normal file
58
slides/223015c/assets/demos/dns-tree.html
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="de">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>DNS-Hierarchie</title>
|
||||||
|
<style>
|
||||||
|
html, body { margin: 0; padding: 0; background: #fff; font-family: system-ui, sans-serif; }
|
||||||
|
body { padding: 30px; display: inline-block; }
|
||||||
|
.tree { display: flex; flex-direction: column; align-items: center; }
|
||||||
|
.node {
|
||||||
|
background: #fef3c7;
|
||||||
|
border: 2px solid #ca8a04;
|
||||||
|
color: #713f12;
|
||||||
|
padding: 8px 18px;
|
||||||
|
border-radius: 6px;
|
||||||
|
font-family: ui-monospace, monospace;
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: 0.95rem;
|
||||||
|
}
|
||||||
|
.root { background: #fde68a; border-color: #b45309; }
|
||||||
|
.leaf { background: #dbeafe; border-color: #1e40af; color: #1e3a8a; }
|
||||||
|
.level { display: flex; gap: 36px; margin-top: 12px; }
|
||||||
|
.edges {
|
||||||
|
width: 100%;
|
||||||
|
height: 20px;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
svg { display: block; }
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="tree">
|
||||||
|
<div class="node root">. (Root)</div>
|
||||||
|
<svg width="360" height="26">
|
||||||
|
<line x1="180" y1="0" x2="60" y2="26" stroke="#d63384" stroke-width="2"/>
|
||||||
|
<line x1="180" y1="0" x2="180" y2="26" stroke="#d63384" stroke-width="2"/>
|
||||||
|
<line x1="180" y1="0" x2="300" y2="26" stroke="#d63384" stroke-width="2"/>
|
||||||
|
</svg>
|
||||||
|
<div class="level">
|
||||||
|
<div class="node">.de</div>
|
||||||
|
<div class="node">.com</div>
|
||||||
|
<div class="node">.org</div>
|
||||||
|
</div>
|
||||||
|
<svg width="360" height="26">
|
||||||
|
<line x1="60" y1="0" x2="60" y2="26" stroke="#d63384" stroke-width="2"/>
|
||||||
|
</svg>
|
||||||
|
<div class="level">
|
||||||
|
<div class="node">hdm-stuttgart</div>
|
||||||
|
</div>
|
||||||
|
<svg width="240" height="26">
|
||||||
|
<line x1="120" y1="0" x2="120" y2="26" stroke="#d63384" stroke-width="2"/>
|
||||||
|
</svg>
|
||||||
|
<div class="level">
|
||||||
|
<div class="node leaf">www</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
BIN
slides/223015c/assets/demos/dns-tree.png
Normal file
BIN
slides/223015c/assets/demos/dns-tree.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 20 KiB |
55
slides/223015c/assets/demos/dom-tree.html
Normal file
55
slides/223015c/assets/demos/dom-tree.html
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="de">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>DOM-Baum</title>
|
||||||
|
<style>
|
||||||
|
html, body { margin: 0; padding: 0; background: #fff; font-family: system-ui, sans-serif; }
|
||||||
|
body { padding: 30px; display: inline-block; }
|
||||||
|
.tree { display: flex; flex-direction: column; align-items: center; }
|
||||||
|
.node {
|
||||||
|
background: #dbeafe;
|
||||||
|
border: 2px solid #1e40af;
|
||||||
|
color: #1e3a8a;
|
||||||
|
padding: 7px 16px;
|
||||||
|
border-radius: 6px;
|
||||||
|
font-family: ui-monospace, monospace;
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: 0.9rem;
|
||||||
|
}
|
||||||
|
.root { background: #e0e7ff; border-color: #4f46e5; color: #3730a3; }
|
||||||
|
.content { background: #dcfce7; border-color: #15803d; color: #14532d; font-weight: 400; font-style: italic; }
|
||||||
|
.level { display: flex; gap: 28px; margin-top: 10px; align-items: flex-start; }
|
||||||
|
.col { display: flex; flex-direction: column; align-items: center; }
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="tree">
|
||||||
|
<div class="node root">document</div>
|
||||||
|
<svg width="200" height="24"><line x1="100" y1="0" x2="100" y2="24" stroke="#d63384" stroke-width="2"/></svg>
|
||||||
|
<div class="node root"><html></div>
|
||||||
|
<svg width="380" height="26">
|
||||||
|
<line x1="190" y1="0" x2="90" y2="26" stroke="#d63384" stroke-width="2"/>
|
||||||
|
<line x1="190" y1="0" x2="290" y2="26" stroke="#d63384" stroke-width="2"/>
|
||||||
|
</svg>
|
||||||
|
<div class="level">
|
||||||
|
<div class="col">
|
||||||
|
<div class="node"><head></div>
|
||||||
|
<svg width="120" height="22"><line x1="60" y1="0" x2="60" y2="22" stroke="#d63384" stroke-width="2"/></svg>
|
||||||
|
<div class="node"><title></div>
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<div class="node"><body></div>
|
||||||
|
<svg width="220" height="26">
|
||||||
|
<line x1="110" y1="0" x2="55" y2="26" stroke="#d63384" stroke-width="2"/>
|
||||||
|
<line x1="110" y1="0" x2="165" y2="26" stroke="#d63384" stroke-width="2"/>
|
||||||
|
</svg>
|
||||||
|
<div class="level">
|
||||||
|
<div class="node"><h1></div>
|
||||||
|
<div class="node"><p></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
BIN
slides/223015c/assets/demos/dom-tree.png
Normal file
BIN
slides/223015c/assets/demos/dom-tree.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 23 KiB |
Reference in New Issue
Block a user