The IPv4 and IPv6 prefix lists on the AS page are each a <details> element. Its <summary> holds the list's heading and count, so a click on the heading folds or unfolds the list without a script. Both lists start open. The peer list is unchanged. The summary keeps the look of the other section headings. It hides the browser's own marker, which not every browser shows on a flex element, and draws a triangle before the heading that points down while the list is open. Model: opus-5-5
This commit was merged in pull request #182.
This commit is contained in:
@@ -126,6 +126,26 @@
|
||||
margin: 0;
|
||||
color: #2c3e50;
|
||||
}
|
||||
/* A click on a prefix list's heading folds or unfolds the list. Not
|
||||
every browser shows its own marker on a flex element, so the page
|
||||
hides it and draws a triangle before the heading. The triangle
|
||||
points down while the list is open. */
|
||||
summary.prefix-header {
|
||||
cursor: pointer;
|
||||
list-style: none;
|
||||
}
|
||||
summary.prefix-header::-webkit-details-marker {
|
||||
display: none;
|
||||
}
|
||||
summary.prefix-header h2::before {
|
||||
content: "\25B8";
|
||||
display: inline-block;
|
||||
margin-right: 10px;
|
||||
transition: transform 0.2s;
|
||||
}
|
||||
details[open] > summary.prefix-header h2::before {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
.prefix-count {
|
||||
background: #e74c3c;
|
||||
color: white;
|
||||
@@ -242,11 +262,11 @@
|
||||
</div>
|
||||
|
||||
{{if .IPv4Prefixes}}
|
||||
<div class="prefix-section">
|
||||
<div class="prefix-header">
|
||||
<details class="prefix-section" open>
|
||||
<summary class="prefix-header">
|
||||
<h2>IPv4 Prefixes</h2>
|
||||
<span class="prefix-count">{{.IPv4Count}}</span>
|
||||
</div>
|
||||
</summary>
|
||||
<table class="prefix-table">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -267,15 +287,15 @@
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</details>
|
||||
{{end}}
|
||||
|
||||
{{if .IPv6Prefixes}}
|
||||
<div class="prefix-section">
|
||||
<div class="prefix-header">
|
||||
<details class="prefix-section" open>
|
||||
<summary class="prefix-header">
|
||||
<h2>IPv6 Prefixes</h2>
|
||||
<span class="prefix-count">{{.IPv6Count}}</span>
|
||||
</div>
|
||||
</summary>
|
||||
<table class="prefix-table">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -296,7 +316,7 @@
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</details>
|
||||
{{end}}
|
||||
|
||||
{{if eq .TotalCount 0}}
|
||||
|
||||
Reference in New Issue
Block a user