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