flash.moe/pages/related.php

131 lines
4.7 KiB
PHP
Raw Normal View History

2020-07-30 00:55:37 +00:00
<?php
2022-02-04 20:30:52 +00:00
namespace Makai;
2022-02-05 03:35:42 +00:00
$router->get('/related.php', mkiRedirect('/related'));
$router->get('/related.html', mkiRedirect('/related'));
$router->get('/friends', mkiRedirect('/related'));
$router->get('/friends.php', mkiRedirect('/related'));
$router->get('/friends.html', mkiRedirect('/related'));
2020-07-30 00:55:37 +00:00
2022-02-05 03:35:42 +00:00
$router->get('/related', function() {
$related = [
[
'id' => 'own',
'name' => 'Other sites I own',
'sites' => [
[
'name' => 'Flashii.net',
'url' => '//flashii.net',
'desc' => 'Community site that I run, a lot of my projects relate to it in one way or another. Pronounced as flashy, it\'s not a sequel.',
],
[
'name' => 'Railgun',
'url' => '//railgun.sh',
'desc' => 'Website for my chat protocol and server related things, documentation for Sock Chat can be found here.',
],
[
'name' => 'YTKNS',
'url' => '//ytkns.com',
'desc' => 'Utility that lets people make very minimal micro sites with music and images. I use this to test certain ideas or to just get back in my element.',
],
[
'name' => 'Takozone',
'url' => '//tako.zone',
'desc' => 'A domain I wanted because it\'s available, generally used for shortening urls.',
],
],
],
[
'id' => 'friends',
'name' => 'Personal sites from friends',
'sites' => [
[
'name' => 'nook / unko',
'url' => 'https://nook.zone',
],
[
'name' => 'osk',
'url' => 'https://osk.sh',
],
[
'name' => 'reemo / malloc',
'url' => 'http://aroltd.com',
],
[
'name' => 'szymszl',
'url' => 'https://szymszl.xyz',
],
],
],
[
'id' => 'useful',
'name' => 'Useful sites',
'sites' => [
[
'name' => 'cppreference.com',
'url' => 'https://en.cppreference.com/w/',
'desc' => 'Great stdlib documentation for pretty much all standard C and C++ versions.',
],
[
'name' => 'devkitPro',
'url' => 'https://devkitpro.org/',
'desc' => 'Amazing homebrew toolchains for Nintendo hardware.',
],
2021-07-07 01:13:50 +00:00
[
'name' => 'DeepL',
'url' => 'https://www.deepl.com/translator',
'desc' => 'A machine translator that doesn\'t exclusively produce garbage.',
],
[
'name' => 'ImgOps',
'url' => 'https://imgops.com/',
'desc' => 'Provides quick links to various image reverse search utilities.',
],
[
'name' => 'TETOMOMOWARP',
'url' => 'https://aidn.jp/tetomomowarp/',
'desc' => 'tet',
],
[
'name' => 'Peppy\'s Windows XP Resources',
'url' => 'https://web.archive.org/web/20011202115409/xp.xyu.ca/',
'desc' => 'Useful resources for Windows XP, including news and downloads!',
],
],
],
];
2022-02-05 03:35:42 +00:00
$body = fm_component('header', [
2020-07-30 00:55:37 +00:00
'title' => 'flash.moe / related',
]);
2022-02-05 03:35:42 +00:00
foreach($related as $section) {
$body .= <<<HTML
<div class="section" id="{$section['id']}">
2020-07-30 00:55:37 +00:00
<div class="section-content">
<div class="section-background"></div>
2022-02-05 03:35:42 +00:00
<h1>{$section['name']}</h1>
2020-07-30 00:55:37 +00:00
</div>
</div>
2022-02-05 03:35:42 +00:00
HTML;
foreach($section['sites'] as $site) {
$body .= <<<HTML
<div class="related-site">
<div class="related-site-content">
2022-02-05 03:35:42 +00:00
<a href="{$site['url']}" class="related-site-link" rel="noopener" target="_blank"></a>
<h2>{$site['name']}</h2>
HTML;
if(isset($site['desc']))
$body .= "<p>{$site['desc']}</p>";
$body .= '</div></div>';
}
}
2022-02-05 03:35:42 +00:00
$body .= fm_component('footer');
2020-07-30 00:55:37 +00:00
2022-02-05 03:35:42 +00:00
return $body;
});