flash.moe/pages/contact.php

109 lines
3.6 KiB
PHP

<?php
namespace Makai;
$router->get('/contact.php', mkiRedirect('/contact'));
$router->get('/contact.html', mkiRedirect('/contact'));
$router->get('/nintendo', mkiRedirect('/contact'));
$router->get('/nintendo.php', mkiRedirect('/contact'));
$router->get('/contact', function() {
$contact = [
[
'id' => 'contact',
'title' => 'Direct Contact',
'items' => [
[
'id' => 'email',
'name' => 'E-mail',
'icon' => 'fmi fmi-email',
'display' => 'contact@flash.moe',
'link' => 'mailto:contact@flash.moe',
],
],
],
[
'id' => 'communities',
'title' => 'Communities & Social Media',
'items' => [
[
'id' => 'flashii',
'name' => 'Flashii',
'icon' => 'fmi fmi-flashii',
'display' => 'flash',
'link' => '//flashii.net/profile.php?u=1',
],
[
'id' => 'twitter',
'name' => 'Twitter',
'icon' => 'fmi fmi-twitter',
'display' => '@smugwave',
'link' => '//twitter.com/smugwave',
],
[
'id' => 'youtube',
'name' => 'YouTube',
'icon' => 'fmi fmi-youtube',
'display' => 'flashwave',
'link' => '//youtube.com/c/flashwave',
],
[
'id' => 'github',
'name' => 'Github',
'icon' => 'fmi fmi-github',
'display' => 'flashwave',
'link' => '//github.com/flashwave',
],
[
'id' => 'lastfm',
'name' => 'Last.fm',
'icon' => 'fmi fmi-lastfm',
'display' => 'flashwave_',
'link' => '//last.fm/user/flashwave_',
],
],
],
];
$body = fm_component('header', [
'title' => 'flash.moe / contact',
]);
foreach($contact as $section) {
$body .= <<<HTML
<div class="section" id="section-{$section['id']}">
<div class="section-content">
<div class="section-background"></div>
<h1>{$section['title']}</h1>
</div>
</div>
<div class="socials">
HTML;
foreach($section['items'] as $social) {
$body .= '<div class="social social-' . $social['id'] . '">';
if(isset($social['link'])) {
$body .= '<a href="' . $social['link'] . '" class="social-background" target="_blank" rel="noopener"></a>';
} else {
$body .= '<div class="social-background" onclick="fm.selectTextInElement(this.parentNode.querySelector(\'.social-handle\')); fm.copySelectedText();"></div>';
}
$body .= <<<HTML
<div class="social-icon {$social['icon']}"></div>
<div class="social-content">
<div class="social-name">{$social['name']}</div>
<div class="social-handle">{$social['display']}</div>
</div>
</div>
HTML;
}
$body .= '</div>';
}
$body .= fm_component('footer');
return $body;
});