]> git.mxchange.org Git - fba.git/blob - index.html
Continued:
[fba.git] / index.html
1 <!DOCTYPE html>
2 <head>
3     <title>fedi-block-api{% if domain %} {{domain}}{% endif %}</title>
4     <link rel="alternate" type="application/rss+xml" title="RSS Feed for latest blocked instances" href="{{base_url}}/rss" />
5     {% if domain %}
6     <link rel="alternate" type="application/rss+xml" title="RSS Feed for blocked domain {{domain}}" href="{{base_url}}/rss?domain={{domain}}" />
7     {% elif reverse %}
8     <link rel="alternate" type="application/rss+xml" title="RSS Feed for blocking domain {{reverse}}" href="{{base_url}}/rss?reverse={{reverse}}" />
9     {% endif %}
10     <style>
11         body {
12             background-color: #000022;
13             color: #ffffff;
14             text-align: center;
15             font-family: sans;
16         }
17         .block_level {
18             background-color: #1c1c3c;
19             width: 80em;
20             padding: 5px;
21             margin: auto;
22             margin-top: 10px;
23         }
24         .scoreboard {
25             background-color: #1c1c3c;
26             width: 40em;
27             padding: 5px;
28             margin: auto;
29             margin-top: 10px;
30         }
31         table {
32             width: 100%;
33             background-color: #2d2d4d;
34             border-spacing: 0px;
35         }
36         table tr:nth-of-type(2n) {
37             background-color: #1c1c3c;
38         }
39         table td {
40             padding: 4px;
41         }
42         .block_level table td:nth-of-type(1), .block_level table td:nth-of-type(2),
43         .block_level table td:nth-of-type(4), .block_level table td:nth-of-type(5) {
44             white-space: nowrap;
45         }
46         .block {
47             background-color: #2d2d4d;
48             padding: 5px;
49             margin: 5px;
50         }
51         a {
52             color: #ffffff;
53         }
54         a.listlink {
55             text-decoration: none;
56             font-size: 0.8em;
57         }
58         .info {
59             margin-top: 25px;
60         }
61         input[type="text"], input[type="submit"] {
62             padding: 5px;
63             border-radius: 5px;
64             color: white;
65             background: #445;
66             font-size: 16px;
67         }
68
69         input[type="text"]:hover {
70             border-color: #f08;
71         }
72
73         input[type="submit"] {
74             cursor: pointer;
75         }
76
77         input[type="submit"]:hover {
78             border-color: #f08;
79         }
80
81         span[title] {
82             text-decoration: underline dotted;
83         }
84     </style>
85 </head>
86 <body>
87     {% if scoreboard %}
88         {% if blockers %}
89             <h1>Top {{blockers}} defederating instances</h1>
90         {% elif blocked %}
91             <h1>Top {{blocked}} defederated instances</h1>
92         {% elif reference %}
93             <h1>Top {{reference}} referencing instances</h1>
94         {% elif software %}
95             <h1>Top {{software}} used software</h1>
96         {% endif %}
97         <div class="scoreboard">
98             <table>
99                 <th>№</th>
100                 <th>{% if software %}Software{% else %}Instance{% endif %}</th>
101                 <th>{% if reference %}References{% elif software %}Total{% else %}Blocks{% endif %}</th>
102                 {% for entry in scores %}
103                     <tr>
104                         <td>{{loop.index}}</td>
105                         <td>
106                             {% if software %}
107                                 {{entry['domain']}}
108                             {% else %}
109                                 <b><a href="{{base_url}}/?{% if blockers %}reverse{% elif blocked or reference %}domain{% endif %}={{entry['domain']}}" rel="nofollow noopener noreferrer">{{entry['domain']}}</a></b>&nbsp;
110                                 <a class="listlink" href="https://{{entry['domain']}}" rel="external" target="_blank">↗</a>
111                             {% endif %}
112                         </td>
113                         <td>{{entry['highscore']}}</td>
114                     </tr>
115                 {% endfor %}
116             </table>
117         </div>
118     {% elif reason or domain or reverse %}
119         {% if reason %}
120             <h1>Instances that use "{{reason}}" in their reason</h1>
121         {% elif reverse %}
122             <h1>Instances that are blocked by {{reverse}}</h1>
123         {% elif domain %}
124             <h1>Instances that block {{domain}}</h1>
125         {% endif %}
126         {% for block_level in blocks %}
127             <div class="block_level" id="{{block_level}}">
128                 <h2>{{block_level}} ({{blocks[block_level]|length}})</h2>
129                 <table>
130                     <th>Blocker</th>
131                     <th>{% if block_level == 'accept' %}Accepted{% else %}Blocked{% endif %}</th>
132                     <th>Reason</th>
133                     <th>First added</th>
134                     <th>Last seen</th>
135                     {% for block in blocks[block_level] %}
136                         <tr>
137                             <td>
138                                 <b><a href="https://{{block['blocker']}}" rel="nofollow noopener noreferrer">{{block['blocker']}}</a></b>
139                                 {% if reason or domain %}<a class="listlink" href="{{base_url}}/?reverse={{block['blocker']}}">↘</a>{% endif %}
140                             </td>
141                             <td>
142                                 <b><a href="https://{{domain or block['blocked']}}" rel="nofollow noopener noreferrer">{{block['blocked']}}</a></b>
143                                 {% if reason or reverse %}<a class="listlink" href="{{base_url}}/?domain={{domain or block['blocked']}}">↘</a>{% endif %}
144                             </td>
145                             <td>{{block['reason']}}</td>
146                             <td>{{block['first_seen']}}</td>
147                             <td>{{block['last_seen']}}</td>
148                         </tr>
149                     {% endfor %}
150                 </table>
151             </div>
152         {% endfor %}
153     {% else %}
154         <h1>Enter a Domain</h1>
155         <form>
156             <input type="text" name="domain" placeholder="example.com" required="required" />
157             <input type="submit" value="Submit" />
158         </form>
159         <h1>Enter a Reason</h1>
160         <form>
161             <input type="text" name="reason" placeholder="free speech" required="required" />
162             <input type="submit" value="Submit" />
163         </form>
164         <h1>Reverse search</h1>
165         <form>
166             <input type="text" name="reverse" placeholder="example.com" required="required" />
167             <input type="submit" value="Submit" />
168         </form>
169         <p>
170             <a href="{{base_url}}/scoreboard?blockers=50">top 50 defederating</a> /
171             <a href="{{base_url}}/scoreboard?blocked=50">defederated instances</a> /
172             <a href="{{base_url}}/scoreboard?reference=50">referencing instances</a> /
173             <a href="{{base_url}}/scoreboard?software=50">used software</a>
174         </p>
175         <div class="info">
176             known instances: {{info.known_instances}}<br/>
177             indexed instances: {{info.indexed_instances}}<br/>
178             blocks recorded: {{info.blocks_recorded}}<br/>
179             errorous instances: {{info.errorous_instances}}<br/>
180             source code: <a href="https://git.mxchange.org/?p=fba.git;a=summary" rel="source" target="_blank">git.mxchange.org</a><br /><br />
181             {{info.slogan}}
182         </div>
183     {% endif %}
184 </body>
185 </html>