mirror of
https://github.com/benbusby/farside.git
synced 2025-04-29 23:20:03 +00:00
Display list of available instances on home page
This introduces a number of new changes: - Services are now inserted into redis with a prefix prepended to the key name. This allows for easier filtering to get only live instances. - The home page now uses an eex template for displaying all live instances for every service, determined by the last update - A "last_updated" field was added - farside.ex was added to contain all functionality related to querying for instances (WIP) - Other improvements
This commit is contained in:
parent
8042dcad0c
commit
56b9c52528
7 changed files with 131 additions and 12 deletions
50
index.eex
Normal file
50
index.eex
Normal file
|
@ -0,0 +1,50 @@
|
|||
<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%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="parent-div">
|
||||
<div id="child-div">
|
||||
<h1>Farside | <a href="https://github.com/benbusby/farside">View on GitHub</a></h1>
|
||||
<hr>
|
||||
<h3>Last synced <%= last_updated %> UTC</h2>
|
||||
<div>
|
||||
<ul>
|
||||
<%= for {service, instance_list} <- services do %>
|
||||
<li><a href="/<%= service %>"><%= service %></a></li>
|
||||
<ul>
|
||||
<%= for url <- instance_list do %>
|
||||
<li><a href="<%= url %>"><%= url %></a></li>
|
||||
<% end%>
|
||||
</ul>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
Loading…
Add table
Add a link
Reference in a new issue