hugo-owu-se/layouts/shortcodes/network_upstream.html
minoplhy c2ce9d9a28
add charityhost 1C/1G/20G/1T / UI Improvement
mod: massive ui improvement
add: charityhost 1C/1G/20G/1T
add: desc for all provider index
2025-04-27 16:12:12 +07:00

27 lines
915 B
HTML

{{- /*
For use with 7
*/}}
<h3>Network Upstream</h3>
<details class="spoiler">
<summary>Click to show</summary>
<div class="spoiler-content">
<div class="infoblock-list">
<div class="spoiler-banner">
*WARNING: only incoming upstream is count!* <a target="_blank" href=https://bgp.tools/kb/what-is-a-upstream>see</a>
</div>
{{ range (split (string .Inner) "\n") }}
{{ $line := trim . " \t\r\n" }}
{{ if ne $line "" }}
{{ $asn := index (split $line " ") 0 }}
{{ $name := trim (replace $line $asn "" 1) " '" }}
{{ $asnNum := replace $asn "AS" "" }}
<div class="infoblock-item">
<span class="infoblock-value"><a target="_blank" href="https://bgp.tools/as/{{ $asnNum }}">{{ $asn }}</a> '{{ $name }}'</span>
</div>
{{ end }}
{{ end }}
</div>
</div>
</details>