hugo-owu-se/layouts/shortcodes/vps_location.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

25 lines
735 B
HTML

{{- /*
For use with 7
*/}}
{{- /* Get LOCATION Arguments. */}}
{{- $ASN := or (.Get "asn") "N/a" }}
{{- $ASN_NAME := or (.Get "asn_name") "N/a" }}
{{- $COUNTRY := or (.Get "country") "N/a" }}
{{- $CITY := or (.Get "city") "N/a" }}
{{ $location := slice
(dict "type" "ASN" "value" (safeHTML (print "<a target=_blank href='https://bgp.tools/as/" $ASN "'>AS" $ASN "</a> " $ASN_NAME)))
(dict "type" "Country" "value" (print $CITY ", " $COUNTRY))
}}
<h3>Location</h3>
<div class="infoblock-list">
{{- range $location }}
<div class="infoblock-item">
<span class="infoblock-type">{{ .type }}:</span>
<span class="infoblock-value">{{ .value | safeHTML }}</span>
</div>
{{- end }}
</div>