Create instance list
This commit is contained in:
parent
fe77d1a7a7
commit
ea925d9144
1 changed files with 50 additions and 0 deletions
50
src/components/InstanceList.astro
Normal file
50
src/components/InstanceList.astro
Normal file
|
@ -0,0 +1,50 @@
|
|||
---
|
||||
const InstanceList = await fetch('https://codeberg.org/MinPluto/MinPluto/raw/branch/master/instances.json').then((response) => response.json());
|
||||
---
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>URL</th>
|
||||
<th>Official</th>
|
||||
<th>Region</th>
|
||||
<th>Cloudflare</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{InstanceList.map((server) =>
|
||||
<tr>
|
||||
<td><a href={server[1].uri}>{server[1].uri}</a></td>
|
||||
<td>{server[1].official}</td>
|
||||
<td>{server[1].region}</td>
|
||||
<td>{server[1].CLOUDFLARE}</td>
|
||||
</tr>
|
||||
)}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<style>
|
||||
table {
|
||||
border: 1px solid #3d3846;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
table-layout: fixed;
|
||||
border-collapse: collapse;
|
||||
border-spacing: 1px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
th {
|
||||
border: 1px solid #3d3846;
|
||||
background-color: #000000;
|
||||
color: #ffffff;
|
||||
padding: 6px;
|
||||
}
|
||||
|
||||
td {
|
||||
border: 1px solid #3d3846;
|
||||
background-color: #241f31;
|
||||
color: #f6f5f4;
|
||||
padding: 6px;
|
||||
}
|
||||
</style>
|
Reference in a new issue