diff --git a/templates/mirrorlist-osm.html b/templates/mirrorlist-osm.html new file mode 100644 index 00000000..b2dbc453 --- /dev/null +++ b/templates/mirrorlist-osm.html @@ -0,0 +1,202 @@ +{{define "title"}}Mirrorlist {{.FileInfo.Path}}{{end}} +{{define "headline"}}{{.FileInfo.Path}}{{end}} + +{{define "head"}} + + + + + + +{{end}} + +{{define "body"}} + +
+
+

Client

+
You are connecting with IP address {{.IP}}, which belongs to autonomous system {{.ClientInfo.ASName}} (ASN{{.ClientInfo.ASNum}}).
+ {{if .ClientInfo.GeoIPRecord}}We believe you are {{if .ClientInfo.City}}near {{.ClientInfo.City}} in {{else}}somewhere in {{end}}{{.ClientInfo.CountryName}} and have selected mirrors based on this.{{else}}We were not able to use your IP to approximate your location, so have chosen the mirrors at random.{{end}}
+
+ +
+

File

+
The file {{.FileInfo.Path}} has a size of {{sizeof .FileInfo.Size}} ({{.FileInfo.Size}} bytes) and was last modified on {{dateutc .FileInfo.ModTime}}.
+
+
Known hashes: + + + + +
MD5{{if .FileInfo.Md5}}{{.FileInfo.Md5}}{{else}}N/A{{end}}
SHA1{{if .FileInfo.Sha1}}{{.FileInfo.Sha1}}{{else}}N/A{{end}}
SHA256{{if .FileInfo.Sha256}}{{.FileInfo.Sha256}}{{else}}N/A{{end}}
+
+
+
+
+ +
+
+
+
+ + + +
+
+

Mirrors

+ + {{if .Fallback}}

Warning: file not served by any mirror, fallbacks to the rescue.

{{end}} + + {{if .MirrorList}} + + + + + + {{range $i, $v := .MirrorList}} + + + + {{end}} + +
RankMirror NameURLCountryContinentDistanceSelection
{{add $i 1}}.{{if $v.SponsorName}}{{$v.SponsorName}}{{else}}{{$v.ID}}{{end}}{{$v.HttpURL}}{{$v.CountryCodes}}{{$v.ContinentCode}}{{printf "%.0f" $v.Distance}} Km{{if $v.Weight}}{{if ge $v.Weight 1.0}}{{printf "%.0f" $v.Weight}}{{else}}<1{{end}}%{{else}}n/a{{end}}
+ {{else}} + No mirrors for this file + {{end}} + + {{if .ExcludedList}} +

Excluded Mirrors

+ + + + {{range $i, $v := .ExcludedList}} + + + + {{end}} + +
Mirror NameURLCountryContinentDistanceExclude Reason
{{if $v.SponsorName}}{{$v.SponsorName}}{{else}}{{$v.ID}}{{end}}{{$v.HttpURL}}{{$v.CountryCodes}}{{$v.ContinentCode}}{{printf "%.0f" $v.Distance}} Km{{$v.ExcludeReason}}
+ {{end}} +
+{{end}}