farside/server/index.html
Ben Busby b5bad4defc
Rewrite project, add daily update of services list
The project was rewritten from Elixir to Go, primarily because:

- I don't write Elixir anymore and don't want to maintain a project in a
  language I no longer write
- I already write Go for other projects, including my day job, so it's
  a safer bet for a project that I want to maintain long term
- Go allows me to build portable executables that will make it easier
  for others to run farside on their own machines

The Go version of Farsside also has a built in task to fetch the latest
services{-full}.json file from the repo and ingest it, which makes
running a farside server a lot simpler.

It also automatically fetches the latest instance state from
https://farside.link unless configured as a primary farside node, which
will allow others to use farside without increasing traffic to all
instances that are queried by farside (just to the farside node itself).
2025-01-21 13:46:29 -07:00

67 lines
1.3 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<title>Farside</title>
<style>
html {
font-family: monospace;
font-size: 16px;
color: #66397C;
}
#parent-div {
text-align: center;
}
#child-div {
text-align: left;
width: 50%;
display: inline-block;
}
hr {
border: 1px dashed;
}
a:link, a:visited {
color: #66397C;
}
@media only screen and (max-width: 1000px) {
#child-div {
width: 90%;
}
}
ul {
margin: 10px;
}
@media (prefers-color-scheme: dark) {
html {
color: #fff;
background: #121517;
}
a:link, a:visited {
color: #AA8AC1;
}
}
</style>
</head>
<body>
<div id="parent-div">
<div id="child-div">
<h1>Farside [<a href="https://sr.ht/~benbusby/farside">SourceHut</a>, <a href="https://github.com/benbusby/farside">GitHub</a>]</h1>
<hr>
<h3>Updated: {{ .LastUpdated }}</h2>
<div>
<ul>
{{ range $i, $service := .ServiceList }}
<li><a href="/{{ $service.Type }}">{{ $service.Type }}</a></li>
<ul>
{{ range $j, $instance := $service.Instances }}
<li><a href="{{ $instance }}">{{ $instance }}</li>
{{ end }}
</ul>
{{ end }}
</ul>
</div>
</div>
</div>
</body>