]> 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         {% endif %}
88         <div class="scoreboard">
89             <table>
90                 <th>№</th>
91                 <th>Instance</th>
92                 <th>Defederations</th>
93                 {% for entry in scores %}
94                     <tr>
95                         <td>{{loop.index}}</td>
96                         <td>
97                             <img src="https://proxy.duckduckgo.com/ip3/{{entry['domain']}}.ico" width="16" />
98                             <b><a href="../?{% if blockers %}reverse{% elif blocked %}domain{% endif %}={{entry['domain']}}" rel="nofollow noopener noreferrer">{{entry['domain']}}</a></b>&nbsp;
99                             <a class="listlink" href="https://{{entry['domain']}}" rel="external" target="_blank">↗</a>
100                         </td>
101                         <td>{{entry['highscore']}}</td>
102                     </tr>
103                 {% endfor %}
104             </table>
105         </div>
106     {% elif reason or domain or reverse %}
107         {% if reason %}
108             <h1>Instances that use "{{reason}}" in their reason</h1>
109         {% elif reverse %}
110             <h1>Instances that are blocked by {{reverse}}</h1>
111         {% elif domain %}
112             <h1>Instances that block {{domain}}</h1>
113         {% endif %}
114         {% for block_level in blocks %}
115             <div class="block_level" id="{{block_level}}">
116                 <h2>{{block_level}} ({{blocks[block_level]|length}})</h2>
117                 <table>
118                     <th>Blocker</th>
119                     <th>{% if block_level == 'accept' %}Accepted{% else %}Blocked{% endif %}</th>
120                     <th>Reason</th>
121                     <th>First added</th>
122                     <th>Last seen</th>
123                     {% for block in blocks[block_level] %}
124                         <tr>
125                             <td>
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                                 <b><a href="https://{{domain or block['blocked']}}" rel="nofollow noopener noreferrer">{{block['blocked']}}</a></b>
131                                 {% if reason or reverse %}<a class="listlink" href="./?domain={{domain or block['blocked']}}">↘</a>{% endif %}
132                             </td>
133                             <td>{{block['reason']}}</td>
134                             <td>{{block['first_added']}}</td>
135                             <td>{{block['last_seen']}}</td>
136                         </tr>
137                     {% endfor %}
138                 </table>
139             </div>
140         {% endfor %}
141     {% else %}
142         <h1>Enter a Domain</h1>
143         <form>
144             <input type="text" name="domain" placeholder="example.com" required="required" />
145             <input type="submit" value="Submit" />
146         </form>
147         <h1>Enter a Reason</h1>
148         <form>
149             <input type="text" name="reason" placeholder="free speech" required="required" />
150             <input type="submit" value="Submit" />
151         </form>
152         <h1>Reverse search</h1>
153         <form>
154             <input type="text" name="reverse" placeholder="example.com" required="required" />
155             <input type="submit" value="Submit" />
156         </form>
157         <p>
158             <a href="./scoreboard?blockers=50">top 50 defederating</a> / <a href="./scoreboard?blocked=50">defederated instances</a>
159         </p>
160         <div class="info">
161             known instances: {{info.known_instances}}<br/>
162             indexed instances: {{info.indexed_instances}}<br/>
163             blocks recorded: {{info.blocks_recorded}}<br/>
164             source code: <a href="https://git.mxchange.org/?p=fba.git;a=summary" rel="source" target="_blank">git.mxchange.org</a><br /><br />
165             {{info.slogan}}
166         </div>
167     {% endif %}
168 </body>
169 </html>