flash.moe/pages/related.php

114 lines
4.1 KiB
PHP
Raw Normal View History

2020-07-30 00:55:37 +00:00
<?php
if($reqPath === '/related.php' || $reqPath === '/related.html'
|| $reqPath === '/friends' || $reqPath === '/friends.html' || $reqPath === '/friends.php') {
if($reqMethod !== 'GET')
return FM_ERR | 405;
header('Location: /related');
return FM_HIT | 302;
}
if($reqPath === '/related') {
if($reqMethod !== 'GET')
return FM_ERR | 405;
$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.',
],
[
'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!',
],
],
],
];
2020-07-30 00:55:37 +00:00
fm_component('header', [
'title' => 'flash.moe / related',
]);
foreach($related as $section):
2020-07-30 00:55:37 +00:00
?>
<div class="section" id="<?=$section['id'];?>">
2020-07-30 00:55:37 +00:00
<div class="section-content">
<div class="section-background"></div>
<h1><?=$section['name'];?></h1>
2020-07-30 00:55:37 +00:00
</div>
</div>
<?php foreach($section['sites'] as $site): ?>
<div class="related-site">
<div class="related-site-content">
<a href="<?=$site['url'];?>" class="related-site-link" rel="noopener" target="_blank"></a>
<h2><?=$site['name'];?></h2>
<?php if(isset($site['desc'])): ?>
<p><?=$site['desc'];?></p>
<?php endif; ?>
2020-07-30 00:55:37 +00:00
</div>
</div>
<?php endforeach; endforeach;
2020-07-30 00:55:37 +00:00
fm_component('footer');
return FM_HIT;
}