From b1a885ac229892bac528e6fea4e011a1b240867b Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Fri, 10 Oct 2025 20:55:37 +0500 Subject: initial commit --- .gitignore | 2 + database.sql | 13 ++ favicon.ico | Bin 0 -> 1150 bytes index.php | 93 ++++++++++++++ lib/time.php | 21 ++++ links.json | 22 ++++ projects.json | 46 +++++++ rss.php | 49 ++++++++ static/img/bot.png | Bin 0 -> 6136 bytes static/img/git.png | Bin 0 -> 302 bytes static/img/letter.png | Bin 0 -> 641 bytes static/img/pepe.png | Bin 0 -> 65268 bytes static/img/pfp.png | Bin 0 -> 3280 bytes static/img/radicle.png | Bin 0 -> 1082 bytes static/img/rain.gif | Bin 0 -> 92393 bytes static/img/rss.png | Bin 0 -> 691 bytes static/img/wiki.png | Bin 0 -> 593 bytes static/projects/maxon/banner.png | Bin 0 -> 43859 bytes static/projects/maxon/screenshots/1.png | Bin 0 -> 114418 bytes static/projects/maxon/screenshots/2.png | Bin 0 -> 68548 bytes static/projects/voxelphalia/banner.png | Bin 0 -> 42425 bytes static/projects/voxelphalia/screenshots/1.png | Bin 0 -> 173964 bytes static/projects/voxelphalia/screenshots/2.png | Bin 0 -> 141993 bytes static/style.css | 174 ++++++++++++++++++++++++++ status/index.php | 52 ++++++++ status/post.php | 84 +++++++++++++ 26 files changed, 556 insertions(+) create mode 100644 .gitignore create mode 100644 database.sql create mode 100644 favicon.ico create mode 100644 index.php create mode 100644 lib/time.php create mode 100644 links.json create mode 100644 projects.json create mode 100644 rss.php create mode 100644 static/img/bot.png create mode 100644 static/img/git.png create mode 100755 static/img/letter.png create mode 100755 static/img/pepe.png create mode 100644 static/img/pfp.png create mode 100644 static/img/radicle.png create mode 100644 static/img/rain.gif create mode 100755 static/img/rss.png create mode 100755 static/img/wiki.png create mode 100644 static/projects/maxon/banner.png create mode 100644 static/projects/maxon/screenshots/1.png create mode 100644 static/projects/maxon/screenshots/2.png create mode 100644 static/projects/voxelphalia/banner.png create mode 100644 static/projects/voxelphalia/screenshots/1.png create mode 100644 static/projects/voxelphalia/screenshots/2.png create mode 100644 static/style.css create mode 100644 status/index.php create mode 100644 status/post.php diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..14ab828 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.db +*.ini \ No newline at end of file diff --git a/database.sql b/database.sql new file mode 100644 index 0000000..ab284a5 --- /dev/null +++ b/database.sql @@ -0,0 +1,13 @@ +CREATE TABLE IF NOT EXISTS statuses ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + title TEXT NOT NULL, + contents TEXT, + posted_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP +); + +CREATE TABLE IF NOT EXISTS comments ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + name TEXT, + contents TEXT NOT NULL, + posted_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP +); \ No newline at end of file diff --git a/favicon.ico b/favicon.ico new file mode 100644 index 0000000..0541c52 Binary files /dev/null and b/favicon.ico differ diff --git a/index.php b/index.php new file mode 100644 index 0000000..6126901 --- /dev/null +++ b/index.php @@ -0,0 +1,93 @@ +query("SELECT id, title, posted_at FROM statuses ORDER BY posted_at DESC LIMIT 1"); +$last_status = $stmt->fetch(PDO::FETCH_ASSOC) ?: null; +?> + + + + + ilotterytea + + + + + + + + +
+
+

FeelsBadMan ☔ I'm just a memer

+
+ +
+ +
+
+ +
+
+
+

+ + + +
+

No description' ?>

+ +
+ + Screenshot + +
+ +
+
+ +
+ + +
+

Last status posted ago:

+

[more...] [rss]

+
+ + + + +
+ + + + + \ No newline at end of file diff --git a/lib/time.php b/lib/time.php new file mode 100644 index 0000000..dc8b54f --- /dev/null +++ b/lib/time.php @@ -0,0 +1,21 @@ + 1 ? "s" : ""); + } else if ($years == 0 && $days == 0 && $hours == 0) { + return "$minutes minute" . ($minutes > 1 ? "s" : ""); + } else if ($years == 0 && $days == 0) { + return "$hours hour" . ($hours > 1 ? "s" : ""); + } else if ($years == 0) { + return "$days day" . ($days > 1 ? "s" : ""); + } else { + return "$years year" . ($years > 1 ? "s" : ""); + } +} \ No newline at end of file diff --git a/links.json b/links.json new file mode 100644 index 0000000..033c4e6 --- /dev/null +++ b/links.json @@ -0,0 +1,22 @@ +[ + { + "title": "wiki", + "icon": "wiki", + "url": "https://wiki.alright.party" + }, + { + "title": "@teabot", + "icon": "bot", + "url": "https://bot.alright.party" + }, + { + "title": "radicle", + "icon": "radicle", + "url": "https://app.radicle.xyz/nodes/seed.ilt.su" + }, + { + "title": "git", + "icon": "git", + "url": "https://git.ilt.su" + } +] \ No newline at end of file diff --git a/projects.json b/projects.json new file mode 100644 index 0000000..15491ff --- /dev/null +++ b/projects.json @@ -0,0 +1,46 @@ +[ + { + "title": "Maxon Petting Simulator", + "year": "2022", + "description": "A clicker game about a cute kitty whose cheeks must always be squished.", + "banner": "/static/projects/maxon/banner.png", + "links": [ + { + "url": "https://ilotterytea.itch.io/maxon", + "name": "Download", + "style": "green" + }, + { + "url": "https://git.ilt.su/maxon.git", + "name": "Source code", + "style": "gray" + } + ], + "screenshots": [ + "/static/projects/maxon/screenshots/1.png", + "/static/projects/maxon/screenshots/2.png" + ] + }, + { + "title": "Voxelphalia", + "year": "2025", + "description": "Another voxel-based sandbox game where you can build whatever you want...", + "banner": "/static/projects/voxelphalia/banner.png", + "links": [ + { + "url": "https://ilotterytea.itch.io/voxelphalia", + "name": "Download", + "style": "green" + }, + { + "url": "https://git.ilt.su/voxelphalia.git", + "name": "Source code", + "style": "gray" + } + ], + "screenshots": [ + "/static/projects/voxelphalia/screenshots/1.png", + "/static/projects/voxelphalia/screenshots/2.png" + ] + } +] \ No newline at end of file diff --git a/rss.php b/rss.php new file mode 100644 index 0000000..5a7c78c --- /dev/null +++ b/rss.php @@ -0,0 +1,49 @@ +query("SELECT * FROM statuses ORDER BY posted_at DESC"); +$statuses = $stmt->fetchAll(PDO::FETCH_ASSOC); + +header('Content-Type: application/xml'); + +echo ""; +echo ""; +echo ""; + +echo "ilt.su"; +echo "https://ilt.su"; +echo "ilotterytea's racist schizo thoughts. read and learn."; +echo "en-us"; + + +if (!empty($statuses)) { + $date = new DateTime($statuses[0]['posted_at']); + echo ""; + echo $date->format('D, d M Y H:i:s O'); + echo ""; +} + +foreach ($statuses as $s) { + $date = new DateTime($s['posted_at']); + + echo ""; + echo ""; + echo $s['title'] ?: '-NO TITLE-'; + echo ""; + + echo ''; + echo "https://ilt.su/statuses/?id=" . $s['id']; + echo ""; + + echo ""; + echo $date->format('D, d M Y H:i:s O'); + echo ""; + + echo ""; + echo ""; +} + +echo ""; +?> \ No newline at end of file diff --git a/static/img/bot.png b/static/img/bot.png new file mode 100644 index 0000000..4a30b26 Binary files /dev/null and b/static/img/bot.png differ diff --git a/static/img/git.png b/static/img/git.png new file mode 100644 index 0000000..e1f8acf Binary files /dev/null and b/static/img/git.png differ diff --git a/static/img/letter.png b/static/img/letter.png new file mode 100755 index 0000000..7348aed Binary files /dev/null and b/static/img/letter.png differ diff --git a/static/img/pepe.png b/static/img/pepe.png new file mode 100755 index 0000000..d5bf04f Binary files /dev/null and b/static/img/pepe.png differ diff --git a/static/img/pfp.png b/static/img/pfp.png new file mode 100644 index 0000000..e3cf428 Binary files /dev/null and b/static/img/pfp.png differ diff --git a/static/img/radicle.png b/static/img/radicle.png new file mode 100644 index 0000000..429f5c2 Binary files /dev/null and b/static/img/radicle.png differ diff --git a/static/img/rain.gif b/static/img/rain.gif new file mode 100644 index 0000000..ad0426b Binary files /dev/null and b/static/img/rain.gif differ diff --git a/static/img/rss.png b/static/img/rss.png new file mode 100755 index 0000000..315c4f4 Binary files /dev/null and b/static/img/rss.png differ diff --git a/static/img/wiki.png b/static/img/wiki.png new file mode 100755 index 0000000..b0f4dd7 Binary files /dev/null and b/static/img/wiki.png differ diff --git a/static/projects/maxon/banner.png b/static/projects/maxon/banner.png new file mode 100644 index 0000000..baac0a6 Binary files /dev/null and b/static/projects/maxon/banner.png differ diff --git a/static/projects/maxon/screenshots/1.png b/static/projects/maxon/screenshots/1.png new file mode 100644 index 0000000..30823a2 Binary files /dev/null and b/static/projects/maxon/screenshots/1.png differ diff --git a/static/projects/maxon/screenshots/2.png b/static/projects/maxon/screenshots/2.png new file mode 100644 index 0000000..35f9bc6 Binary files /dev/null and b/static/projects/maxon/screenshots/2.png differ diff --git a/static/projects/voxelphalia/banner.png b/static/projects/voxelphalia/banner.png new file mode 100644 index 0000000..981ae05 Binary files /dev/null and b/static/projects/voxelphalia/banner.png differ diff --git a/static/projects/voxelphalia/screenshots/1.png b/static/projects/voxelphalia/screenshots/1.png new file mode 100644 index 0000000..54df9a8 Binary files /dev/null and b/static/projects/voxelphalia/screenshots/1.png differ diff --git a/static/projects/voxelphalia/screenshots/2.png b/static/projects/voxelphalia/screenshots/2.png new file mode 100644 index 0000000..8ea6616 Binary files /dev/null and b/static/projects/voxelphalia/screenshots/2.png differ diff --git a/static/style.css b/static/style.css new file mode 100644 index 0000000..74332eb --- /dev/null +++ b/static/style.css @@ -0,0 +1,174 @@ +* { + margin: 0; + padding: 0; +} + +body { + width: 100%; + min-height: 100vh; + display: flex; + justify-content: center; +} + +main { + width: 50%; + display: flex; + flex-direction: column; + gap: 32px; + margin-top: 32px; +} + +a { + color: black; +} + +a.gray { + background: lightgray; +} + +a.green { + background: lime; +} + +a:hover { + color: white; + background: black; + text-decoration: line-through; +} + +p img { + vertical-align: bottom; +} + +.status { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; +} + +.main-links { + display: flex; + flex-direction: row; + justify-content: space-around; +} + +.main-links img { + vertical-align: middle; +} + +.rain { + width: 100%; + min-height: 10%; + background-image: url('/static/img/rain.gif'); + background-repeat: repeat; + + display: flex; + justify-content: end; + align-items: end; +} + +.rain p { + padding: 0 32px; + font-family: cursive, serif; +} + +.rain img { + vertical-align: bottom; +} + +.projects { + display: flex; + flex-direction: column; + gap: 8px; +} + +.project { + padding-top: 16px; + display: flex; + flex-direction: row; + gap: 8px; +} + +.project .icon-wrapper { + display: flex; + justify-content: center; + align-items: center; +} + +.icon-wrapper img { + width: 256px; +} + +.project .summary { + display: flex; + flex-direction: column; + justify-content: space-between; +} + +.summary .title { + display: flex; + flex-direction: row; + gap: 16px; +} + +.title .year { + font-size: 10px; +} + +.project .screenshots { + display: flex; + flex-direction: row; + gap: 8px; +} + +.screenshots a:hover { + background: unset; + color: unset +} + +.screenshots img { + vertical-align: bottom; + width: 128px; +} + +.links { + display: flex; + flex-direction: row; + gap: 8px; + align-items: center; +} + +.projects>.project { + border-top: 1px solid black; +} + +.projects>.project:first-child { + border-top: none; +} + +@media only screen and (max-width: 1400px) { + main { + width: 70%; + } +} + +@media only screen and (max-width: 1200px) { + main { + width: 80%; + } +} + +@media only screen and (max-width: 1000px) { + main { + width: unset; + } + + .project { + flex-direction: column; + } + + .screenshots { + justify-content: center; + } +} \ No newline at end of file diff --git a/status/index.php b/status/index.php new file mode 100644 index 0000000..13d5405 --- /dev/null +++ b/status/index.php @@ -0,0 +1,52 @@ +prepare('SELECT * FROM statuses WHERE id = ?'); + $stmt->execute([$_GET['id']]); + + $status = $stmt->fetch(PDO::FETCH_ASSOC) ?: null; +} else { + $stmt = $db->query('SELECT id, title, posted_at FROM statuses ORDER BY posted_at DESC'); + $statuses = $stmt->fetchAll(PDO::FETCH_ASSOC); +} +?> + + + + + statuses - ilt.su + + + + + + + + +
+

ilt.su - statuses

+ +

No title.' ?>

+
+ No contents.' ?> +
+

Posted ago

+ + + +

Statuses

+ + +
+ + + \ No newline at end of file diff --git a/status/post.php b/status/post.php new file mode 100644 index 0000000..064d86f --- /dev/null +++ b/status/post.php @@ -0,0 +1,84 @@ +prepare('INSERT INTO statuses(title, contents) VALUES (?, ?)') + ->execute([$title, $contents]); + + $id = $db->lastInsertId(); + + header("Location: /status/?id=$id"); + exit; +} + +if (isset($_GET['id']) && !empty(trim($_GET['id']))) { + $stmt = $db->prepare('SELECT * FROM statuses WHERE id = ?'); + $stmt->execute([$_GET['id']]); + + $status = $stmt->fetch(PDO::FETCH_ASSOC) ?: null; +} else { + $stmt = $db->query('SELECT id, title, posted_at FROM statuses ORDER BY posted_at DESC'); + $statuses = $stmt->fetchAll(PDO::FETCH_ASSOC); +} +?> + + + + + new status - ilt.su + + + + + + + + +
+

ilt.su - statuses

+

post a new status

+
+ + + + + + + + + + + + + +
title:
contents:
+
+
+ + + \ No newline at end of file -- cgit v1.2.3