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