fedi-block-api/index.html

170 lines
6 KiB
HTML
Raw Normal View History

2022-04-22 17:49:23 +00:00
<!DOCTYPE html>
<head>
2022-04-22 18:42:39 +00:00
<title>fedi-block-api{% if domain %} {{domain}}{% endif %}</title>
2022-04-22 17:49:23 +00:00
<style>
body {
background-color: #000022;
color: #ffffff;
text-align: center;
2022-08-14 15:25:58 +00:00
font-family: "Open Sans", "Roboto", sans-serif;
2022-04-22 17:49:23 +00:00
}
.block_level {
background-color: #1c1c3c;
2022-11-29 23:36:35 +00:00
width: 80em;
2022-04-22 17:49:23 +00:00
padding: 5px;
margin: auto;
margin-top: 10px;
}
2022-11-29 23:36:35 +00:00
.scoreboard {
background-color: #1c1c3c;
width: 40em;
padding: 5px;
margin: auto;
margin-top: 10px;
}
table {
width: 100%;
background-color: #2d2d4d;
border-spacing: 0px;
}
table tr:nth-of-type(2n) {
background-color: #1c1c3c;
}
table td {
padding: 4px;
}
.block_level table td:nth-of-type(1), .block_level table td:nth-of-type(2),
.block_level table td:nth-of-type(4), .block_level table td:nth-of-type(5) {
white-space: nowrap;
}
2022-04-22 17:49:23 +00:00
.block {
background-color: #2d2d4d;
padding: 5px;
margin: 5px;
}
a {
color: #ffffff;
}
2022-11-30 20:11:44 +00:00
a.listlink {
text-decoration: none;
font-size: 0.8em;
}
2022-04-22 17:49:23 +00:00
.info {
2022-04-22 20:10:17 +00:00
margin-top: 25px;
2022-04-22 17:49:23 +00:00
}
2022-07-12 15:31:43 +00:00
input[type="text"], input[type="submit"] {
padding: 5px;
border-radius: 5px;
color: white;
background: #445;
font-size: 16px;
}
input[type="text"]:hover {
border-color: #f08;
}
input[type="submit"] {
cursor: pointer;
}
input[type="submit"]:hover {
border-color: #f08;
}
2022-08-08 11:29:44 +00:00
span[title] {
text-decoration: underline dotted;
}
2022-04-22 17:49:23 +00:00
</style>
</head>
<body>
2022-11-29 23:36:35 +00:00
{% if scoreboard %}
{% if blockers %}
<h1>Top {{blockers}} defederating instances</h1>
{% elif blocked %}
<h1>Top {{blocked}} defederated instances</h1>
{% endif %}
<div class="scoreboard">
<table>
2022-11-29 23:52:22 +00:00
<th></th>
2022-11-29 23:36:35 +00:00
<th>Instance</th>
<th>Defederations</th>
{% for entry in scores %}
<tr>
2022-11-29 23:52:22 +00:00
<td>{{loop.index}}</td>
2022-11-29 23:36:35 +00:00
<td>
<img src="https://proxy.duckduckgo.com/ip3/{{entry['domain']}}.ico" width=16/>
2022-11-30 20:11:44 +00:00
<b><a href="/?{% if blockers %}reverse{% elif blocked %}domain{% endif %}={{entry['domain']}}" rel="nofollow noopener noreferrer">{{entry['domain']}}</a></b>&nbsp;
<a class="listlink" href="https://{{entry['domain']}}"></a>
2022-11-29 23:36:35 +00:00
</td>
<td>{{entry['highscore']}}</td>
</tr>
2022-04-23 13:06:31 +00:00
{% endfor %}
2022-11-29 23:36:35 +00:00
</table>
</div>
{% elif reason or domain or reverse %}
2022-11-29 23:36:35 +00:00
{% if reason %}
<h1>Instances that use "{{reason}}" in their reason</h1>
{% elif reverse %}
<h1>Instances that are blocked by {{reverse}}</h1>
{% elif domain %}
2022-11-29 23:36:35 +00:00
<h1>Instances that block {{domain}}</h1>
{% endif %}
{% for block_level in blocks %}
2022-06-17 22:25:26 +00:00
<div class="block_level" id="{{block_level}}">
2022-11-29 23:36:35 +00:00
<h2>{{block_level}} ({{blocks[block_level]|length}})</h2>
<table>
<th>Blocker</th>
<th>{% if block_level == 'accept' %}Accepted{% else %}Blocked{% endif %}</th>
<th>Reason</th>
<th>First added</th>
<th>Last seen</th>
{% for block in blocks[block_level] %}
<tr>
<td>
<img src="https://proxy.duckduckgo.com/ip3/{{block['blocker']}}.ico" width=16/>
<b><a href="https://{{block['blocker']}}" rel="nofollow noopener noreferrer">{{block['blocker']}}</a></b>
</td>
<td>
<img src="https://proxy.duckduckgo.com/ip3/{{domain or block['blocked']}}.ico" width=16/>
<b><a href="https://{{domain or block['blocked']}}" rel="nofollow noopener noreferrer">{{block['blocked']}}</a></b>
</td>
<td>{{block['reason']}}</td>
<td>{{block['first_added']}}</td>
<td>{{block['last_seen']}}</td>
</tr>
{% endfor %}
</table>
2022-04-22 17:49:23 +00:00
</div>
{% endfor %}
{% else %}
<h1>Enter a Domain</h1>
<form>
<input type="text" name="domain" placeholder="example.com" />
<input type="submit" value="Submit" />
</form>
2022-04-23 13:06:31 +00:00
<h1>Enter a Reason</h1>
<form>
<input type="text" name="reason" placeholder="free speech" />
<input type="submit" value="Submit" />
</form>
2022-11-29 23:36:35 +00:00
<h1>Reverse search</h1>
<form>
<input type="text" name="reverse" placeholder="example.com" />
<input type="submit" value="Submit" />
</form>
<p>
<a href="./scoreboard?blockers=50">top 50 defederating</a> / <a href="./scoreboard?blocked=50">defederated instances</a>
</p>
2022-04-22 17:49:23 +00:00
<div class="info">
known instances: {{info.known_instances}}<br/>
indexed instances: {{info.indexed_instances}}<br/>
blocks recorded: {{info.blocks_recorded}}<br/>
source code: <a href="https://git.kiwifarms.net/mint/fedi-block-api">git.kiwifarms.net/mint/fedi-block-api</a> (<a href="https://gitgud.io/mintplg/fedi-block-api">mirror</a>)<br/><br/>
2022-11-30 20:11:44 +00:00
fuck jannies<br/>
#FreeMyNigga
2022-04-22 17:49:23 +00:00
</div>
{% endif %}
</body>
2022-07-22 20:55:09 +00:00
</html>