mirror of
https://codeberg.org/gothub/pages
synced 2024-12-06 19:16:41 +01:00
64 lines
2.6 KiB
PowerShell
64 lines
2.6 KiB
PowerShell
Import-Module PSHTML
|
|
|
|
html {
|
|
|
|
head {
|
|
title "GotHub"
|
|
meta -charset "utf-8"
|
|
meta -name "viewport" -content "width=device-width, initial-scale=1"
|
|
meta -name "description" -content "An alternative front-end for GitHub, written in Go."
|
|
link -rel "stylesheet" -href "css/site.css"
|
|
# TODO: SEO
|
|
}
|
|
|
|
body {
|
|
div -Class "header-container" {
|
|
div -Class "header-logo-and-text" {
|
|
img -src "imgs/logo.svg" -alt "GotHub logo" -width "48" -height "48"
|
|
h1 "GotHub"
|
|
}
|
|
p "An alternative front-end for GitHub, written in Go."
|
|
div -Class "header-buttons" {
|
|
a -href "https://codeberg.org/gothub/gothub" -Class "button" -Content "Source code"
|
|
a -href "https://matrix.to/#/#gothub:matrix.org" -Class "button" -Content "Matrix room"
|
|
a -href "https://gothub.app/docs" -Class "button" -Content "Documentation"
|
|
}
|
|
}
|
|
|
|
div -Class "instances-header-container" {
|
|
p "GotHub instances are listed below. The list is updated every 24 hours."
|
|
}
|
|
$instances = Invoke-WebRequest https://codeberg.org/gothub/gothub-instances/raw/branch/master/instances.json | ConvertFrom-Json
|
|
|
|
div -class "main" {
|
|
div -Class "instance-container" {
|
|
$instances | ForEach-Object {
|
|
a -href $_.link -Class "instance-card" {
|
|
div -Class "instance-header" {
|
|
p $_.link
|
|
}
|
|
div -Class "instance-body" {
|
|
if ($_.cloudflare) {
|
|
p "Cloudflare: Yes "
|
|
} else {
|
|
p "Cloudflare: No "
|
|
}
|
|
p "Version: $($_.version)"
|
|
p "Branch: $($_.branch)"
|
|
p "Country: $($_.country)"
|
|
p "Hosting provider: $($_.host)"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
footer {
|
|
$GothubLink = a -href "https://codeberg.org/org/gothub/members" -Content "the GotHub team"
|
|
$PSHTMLLink = a -href "https://pshtml.readthedocs.io" -Content "PSHTML"
|
|
$SiteRepo = a -href "https://codeberg.org/gothub/pages" -Content "here"
|
|
p "Site made by $GothubLink. Updated every 24 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."
|
|
}
|
|
}
|
|
} |