minecraft-site/index.html

64 lines
2 KiB
HTML
Raw Permalink Normal View History

2020-03-19 23:20:59 -05:00
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<title>ChandlerSwift.com Minecraft</title>
<style>
body{margin:1em auto;max-width:40em;padding:0 .62em;font:1.2em sans-serif; line-height: 1.62em;}h1,h2,h3{line-height:1.2em;}@media print{body{max-width:none}}
/* https://html.spec.whatwg.org/multipage/rendering.html#phrasing-content-3 */
.light {
color: #888;
}
.light a {
color: #88f;
}
.light a:hover {
color: #00e;
}
.light a:visited {
color: #a9b;
}
.light a:visited:hover {
color: #518;
}
:not(:hover) .optional-port {
color: #666;
}
</style>
<link rel="shortcut icon" href="https://chandlerswift.com/favicon.ico" />
</head>
<body>
<header>
<h1>{{.Title}}</h1>
<p>{{.Content}}</p>
</header>
{{range .Servers}}
<section>
<h2 style="margin-bottom: 0;"><code>{{.Host}}{{if eq .Port 25565}}<span class="optional-port">:{{.Port}}</span>{{else}}:{{.Port}}{{end}}</code></h2>
{{if .Status}}
<span style="color: #666; font-style: italic;">{{.Status.Description.String}}</span>
<ul>
<li>Minecraft Version: {{.Status.VersionName}}</li>
<li>Players Online: {{.Status.OnlinePlayers}}/{{.Status.MaxPlayers}}
{{if gt .Status.OnlinePlayers 0}}
<ul>
{{range $i, $player := .Status.SamplePlayers}}
<li>{{$player.Nickname}}</li>
2021-02-14 00:11:52 -06:00
{{end}}
</ul>
{{end}}
</li>
</ul>
{{else}}
<span style="color: #666;">Unable to connect to server to check status</span>
{{end}}
</section>
{{end}}
2023-10-12 22:40:37 -05:00
<p class="light">
This page maintained by chandlerswift's <a href="https://git.chandlerswift.com/chandlerswift/minecraft-site">minecraft server list</a>.
<a href="/data.json">API at /data.json</a>.
</p>
</body>
2020-03-19 23:20:59 -05:00
</html>