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