mirror of
https://codeberg.org/gothub/pages
synced 2024-12-06 19:16:41 +01:00
c2caafd521
Signed-off-by: Odyssey <hi@odyssey346.dev>
58 lines
2.1 KiB
PowerShell
58 lines
2.1 KiB
PowerShell
Import-Module PSHTML
|
|
|
|
html {
|
|
|
|
head {
|
|
title "GotHub instances"
|
|
meta -charset "utf-8"
|
|
meta -name "viewport" -content "width=device-width, initial-scale=1"
|
|
link -rel "stylesheet" -href "css/site.css"
|
|
}
|
|
|
|
body {
|
|
div -Class "header-container" {
|
|
h1 "GotHub instances"
|
|
$GotHubRepo = a -href "https://codeberg.org/gothub/gothub" -Content "the GotHub repository"
|
|
p "This page lists all the instances for GotHub. If you want to add your instance to this list, please create a PR on $GotHubRepo."
|
|
}
|
|
$instances = Invoke-WebRequest https://codeberg.org/gothub/gothub-instances/raw/branch/master/instances.json | ConvertFrom-Json
|
|
|
|
# Todo: don't use a table, instead use card design.
|
|
div -Class "table-container" {
|
|
table {
|
|
thead {
|
|
tr {
|
|
th "Link"
|
|
th "Cloudflare"
|
|
th "Version"
|
|
th "Branch"
|
|
th "Country"
|
|
th "Hosting provider"
|
|
}
|
|
}
|
|
tbody {
|
|
$instances | ForEach-Object {
|
|
tr {
|
|
td {
|
|
a -href $_.link -Content $_.link
|
|
}
|
|
td $_.cloudflare
|
|
td $_.version
|
|
td $_.branch
|
|
td $_.country
|
|
td $_.host
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
footer {
|
|
$OdysseyLink = a -href "https://odyssey346.dev" -Content "Odyssey346"
|
|
$PSHTMLLink = a -href "https://pshtml.readthedocs.io" -Content "PSHTML"
|
|
$SiteRepo = a -href "https://codeberg.org/gothub/gothub-instances" -Content "here"
|
|
p "Site made by $OdysseyLink. Updated every 12 hours. Last update: $(Get-Date -Format "dd/MM/yyyy HH:mm:ss")"
|
|
p "This site is made with $PSHTMLLink. Site source code is available $SiteRepo."
|
|
}
|
|
}
|
|
|
|
} |