replace ascii trees: dns hierarchy, dom structure
This commit is contained in:
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>
|
||||
Reference in New Issue
Block a user