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