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