Initial commit

This commit is contained in:
2026-07-08 22:36:54 +02:00
commit 08f7d9c6a9
13 changed files with 414 additions and 0 deletions
+3
View File
@@ -0,0 +1,3 @@
/online
/releases/*
/config.php
+5
View File
@@ -0,0 +1,5 @@
# Supercardinality Website
The official Supercardinality website.
https://uncensored.hu/supercardinality
+35
View File
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg viewBox="0 0 1360 860" width="100%" height="100%" version="1.1" id="svg1" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">
<defs>
<g id="background">
<rect style="fill:#0b0b0d;" id="rect" width="1360" height="860" x="0" y="0"></rect>
</g>
<g id="leafg">
<path d="M0,0 C 8,-15 32,-19 52,-5 C 34,-1 20,10 0,0 Z" fill="#16161a" stroke="#2c2c31" stroke-width="1.4"></path>
<path d="M4,-3 C 20,-7 34,-9 48,-6" fill="none" stroke="#2c2c31" stroke-width="1"></path>
</g>
<g id="cluster">
<path d="M -30,900 C 130,840 70,690 200,640 C 320,594 250,470 380,440 C 452,423 486,486 470,540" fill="none" stroke="#2a2a30" stroke-width="3"></path>
<path d="M 200,640 C 150,600 118,548 56,522" fill="none" stroke="#242429" stroke-width="2"></path>
<path d="M 470,540 C 512,562 522,520 500,500 C 486,490 470,502 481,517" fill="none" stroke="#242429" stroke-width="2"></path>
<path d="M 380,440 C 420,410 458,404 500,414" fill="none" stroke="#242429" stroke-width="1.8"></path>
<use href="#leafg" transform="translate(206,632) rotate(-38) scale(1.15)"></use>
<use href="#leafg" transform="translate(300,500) rotate(210) scale(1.05)"></use>
<use href="#leafg" transform="translate(384,440) rotate(-8) scale(1.25)"></use>
<use href="#leafg" transform="translate(500,414) rotate(-24) scale(1.0)"></use>
<use href="#leafg" transform="translate(115,560) rotate(196) scale(0.95)"></use>
<use href="#leafg" transform="translate(58,522) rotate(228) scale(0.8)"></use>
</g>
<radialGradient id="vignette" cx="50%" cy="42%" rx="70%" ry="60%" gradientUnits="objectBoundingBox">
<stop offset="30%" stop-color="black" stop-opacity="0" />
<stop offset="100%" stop-color="black" stop-opacity="0.62" />
</radialGradient>
</defs>
<use href="#background"></use>
<use href="#cluster"></use>
<use href="#cluster" transform="rotate(180 680 430)"></use>
<use href="#leafg" transform="translate(1280,150) rotate(100) scale(0.9)" opacity="0.7"></use>
<use href="#leafg" transform="translate(120,690) rotate(-120) scale(0.85)" opacity="0.7"></use>
<rect width="100%" height="100%" fill="url(#vignette)" />
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

+4
View File
@@ -0,0 +1,4 @@
<?php
$contact_name = "Example Contact";
$contact_link = "https://example.com";
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 411 B

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 124 B

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 228 B

+46
View File
@@ -0,0 +1,46 @@
<?php
function timestamp_in_words($timestamp) {
if (!is_numeric($timestamp) || $timestamp < 0) {
return "";
}
$seconds = time() - $timestamp;
$future = $seconds < 0;
$seconds = abs($seconds);
$minutes = round($seconds / 60);
$hours = round($seconds / 3600);
$days = round($seconds / 86400);
$months = round($seconds / 2592000);
$years = round($seconds / 31536000);
if ($seconds < 60) { $w = 'less than a minute'; }
elseif ($seconds < 90) { $w = 'about a minute'; }
elseif ($minutes < 50) { $w = "$minutes minutes"; }
elseif ($hours < 2) { $w = 'about an hour'; }
elseif ($hours < 24) { $w = "$hours hours"; }
elseif ($days < 2) { $w = 'a day'; }
elseif ($days < 30) { $w = "$days days"; }
elseif ($days < 45) { $w = 'about a month'; }
elseif ($days < 365) { $w = "$months months"; }
elseif ($years < 2) { $w = 'about a year'; }
else { $w = "$years years"; }
return $future ? "$w from now" : "$w ago";
}
function guess_os() {
$os_guess = 'linux';
$user_agent = $_SERVER['HTTP_USER_AGENT'] ?? '';
if (stripos($user_agent, 'Android') !== false) {}
elseif (stripos($user_agent, 'iPhone') !== false) {}
elseif (stripos($user_agent, 'iPad') !== false) {}
elseif (stripos($user_agent, 'CrOS') !== false) { $os_guess = 'linux'; }
elseif (stripos($user_agent, 'Windows') !== false) { $os_guess = 'windows'; }
elseif (stripos($user_agent, 'Macintosh') !== false) {}
elseif (stripos($user_agent, 'Linux') !== false) { $os_guess = 'linux'; }
elseif (stripos($user_agent, 'FreeBSD') !== false) {}
return $os_guess;
}
+75
View File
@@ -0,0 +1,75 @@
<?php require "script.php"; ?>
<!doctype html>
<html>
<head>
<title>Supercardinality</title>
<meta name="robots" content="noindex" />
<meta name="description" content="If mid doesn't exist you can't run it down." />
<meta name="author" content="Thayol" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta charset="UTF-8" />
<link rel="icon" type="image/png" href="favicon/128.png">
<link rel="icon" type="image/png" sizes="64x64" href="favicon/64.png">
<link rel="icon" type="image/png" sizes="32x32" href="favicon/32.png">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div></div>
<main>
<div class="divider">
<div class="divider-gem"></div>
</div>
<h1>
Supercardinality
</h1>
<p class="divider subtitle">
NO MID NO FEED
</p>
<?php
$download_link = $options[$os_guess]["download_path"];
$download_filename = $options[$os_guess]["download_filename"];
?>
<a class="recommended build" href="<?= $download_link ?>" download="<?= $download_filename ?>">
<div>
<?php
$primary_button_text = [
"linux" => "Download for Linux",
"windows" => "Download for Windows",
];
?>
Download for <?= $options[$os_guess]["name"] ?>
</div>
</a>
<ul class="other-builds">
<p>Other builds</p>
<?php foreach($options as $os => $target): ?>
<li>
<a class="other build" href="<?= $target["download_path"] ?>" download="<?= $target["download_filename"] ?>">
<?= $target["name"] ?><span class="architecture"><?= $target["architecture"] ?></span>
</a>
</li>
<?php endforeach; ?>
</ul>
</main>
<footer>
<p>In case of any questions, message <a href="<?= $contact_link ?>"><?= $contact_name ?></a>.</p>
<?php if (!empty($version)): ?>
<p>
<?= $version ?>
<?php if (!empty($version_timestamp)): ?>
・ built <?= $version_timestamp_in_words ?>
<?php endif; ?>
</p>
<?php endif; ?>
</footer>
</body>
</html>
+16
View File
@@ -0,0 +1,16 @@
<?php
$options = [
"linux" => [
"name" => "Linux",
"architecture" => "x86-64",
"download_path" => "releases/supercardinality",
"download_filename" => "supercardinality",
],
"windows" => [
"name" => "Windows",
"architecture" => "x86-64",
"download_path" => "releases/supercardinality.exe",
"download_filename" => "supercardinality.exe",
],
];
View File
+20
View File
@@ -0,0 +1,20 @@
<?php
require "config.php";
require "functions.php";
require "options.php";
$os_guess = guess_os();
$latest = json_decode(file_get_contents('releases/latest.json'), true);
$version = empty($latest["version"]) ? "" : $latest["version"];
$version_timestamp = empty($latest["timestamp"]) ? -1 : $latest["timestamp"];
$version_timestamp_in_words = timestamp_in_words($version_timestamp);
if (!empty($latest["linux_path"])) {
$options["linux"]["download_path"] = "releases/" . $latest["linux_path"];
}
if (!empty($latest["windows_path"])) {
$options["windows"]["download_path"] = "releases/" . $latest["windows_path"];
}
+210
View File
@@ -0,0 +1,210 @@
:root {
--gold: #EBD08A;
--gold-dim: #C9A15B;
--gold-mid: #A67C3D;
--gold-dark: #6E501F;
--gold-very-dark: #5f451d;
--muted: #57575d;
}
* {
box-sizing: border-box;
}
html, body {
margin: 0;
padding: 0;
min-width: 100svw;
min-height: 100svh;
color: white;
font-family: sans-serif;
}
html {
background: transparent;
}
body {
background-image: url('background.svg');
background-position: center;
background-repeat: no-repeat;
background-size: cover;
display: flex;
flex-flow: column nowrap;
justify-content: space-between;
min-height: 100svh;
& > * {
flex: 0 0 auto;
}
}
h1 {
margin: 1.5rem 0;
font-size: 2.3rem;
letter-spacing: 0.05em;
color: var(--gold);
}
.subtitle {
color: var(--gold-mid);
letter-spacing: 1px;
font-size: 0.8em;
}
p {
margin: 0;
}
a {
&:link, &:visited {
color: var(--gold-dim);
}
&:hover,
&:active {
color: var(--gold);
}
}
main {
display: flex;
flex-flow: column nowrap;
align-items: center;
& > * {
flex: 1 0 auto;
}
}
footer {
display: flex;
flex-flow: row wrap;
justify-content: space-between;
color: var(--muted);
letter-spacing: 0.1em;
font-family: serif;
font-size: 0.9em;
padding: 1rem;
gap: 0.5rem;
& > * {
flex: 0 1 auto;
display: inline-block;
width: auto;
margin: 0;
}
}
.build {
&:link, &:hover, &:active, &:visited {
display: inline-block;
text-decoration: none;
border-radius: 2px;
padding: calc(0.5em - 0.3rem) calc(1em - 0.3rem);
border: 0.3rem solid white;
}
&.recommended {
font-size: 1.2rem;
margin: 5rem 0;
font-family: serif;
font-variant: small-caps;
display: inline-flex;
padding: 0.3rem;
border: none;
border-radius: 5px;
background: linear-gradient(152deg, var(--gold) 0%, var(--gold-mid) 28%, var(--gold-very-dark) 54%, var(--gold-mid) 76%, var(--gold) 100%);
&:hover,
&:active {
background: var(--gold);
}
& > * {
display: block;
padding: 1rem 2rem;
border-radius: 3px;
background: #17131a;
color: var(--gold);
font: 600 19px/1 var(--serif);
letter-spacing: 0.1em;
&:hover,
&:active {
background: #211e29;
color: white;
}
}
}
&.other {
display: inline-flex;
align-items: center;
gap: 0.5em;
border: 1px solid var(--gold-very-dark);
color: var(--gold-dim);
letter-spacing: 0;
background: #101010;
& .architecture {
color: var(--muted);
}
&:hover {
border-color: var(--gold-dim);
color: var(--gold);
}
}
}
.other-builds {
list-style-type: none;
padding: 0;
margin: 0;
display: flex;
flex-flow: row wrap;
align-items: center;
gap: 1em;
color: var(--muted);
font-family: serif;
letter-spacing: 0.1em;
justify-content: center;
font-size: 0.9em;
& > * {
flex: 0 0 auto;
}
}
.version {
text-align: center;
}
.divider {
display: flex;
align-items: center;
gap: 16px;
}
.divider::before,
.divider::after {
content: '';
width: 5rem;
height: 2px;
}
.divider::before {
background: linear-gradient(90deg, transparent, var(--gold-dark));
}
.divider::after {
background: linear-gradient(90deg, var(--gold-dark), transparent);
}
.divider-gem {
width: 0.8rem;
height: 0.8rem;
background: linear-gradient(135deg, var(--gold), var(--gold-dark));
transform: rotate(45deg);
}