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