143 lines
3.8 KiB
PHP
143 lines
3.8 KiB
PHP
<?php
|
||
|
||
if ($_SERVER['HTTP_HOST'] == 'localhost') {
|
||
$main_url = "http://localhost/public_html_git";
|
||
} else {
|
||
$main_url = "https://tilde.team/~grizzly";
|
||
}
|
||
|
||
if(!isset($_COOKIE['theme'])) {
|
||
setcookie('theme', 'dark', time() + (86400 * 30 * 30), "/");
|
||
$theme = 'dark';
|
||
} else {
|
||
$theme = $_COOKIE['theme'];
|
||
}
|
||
|
||
if (@$_GET['theme'] == 'dark') {
|
||
setcookie('theme', 'dark', time() + (86400 * 30 * 30), "/");
|
||
header("Location: " . $main_url);
|
||
}
|
||
if (@$_GET['theme'] == 'light') {
|
||
setcookie('theme', 'light', time() + (86400 * 30 * 30), "/");
|
||
header("Location: " . $main_url);
|
||
}
|
||
|
||
?><!DOCTYPE html>
|
||
<html lang="en">
|
||
<head>
|
||
<meta charset="UTF-8" />
|
||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||
<link rel="icon" href="<?=$main_url?>/components/favicon.svg" />
|
||
<link rel="stylesheet" href="<?=$main_url?>/components/css/style.css" />
|
||
<?php if ($theme === 'dark') { ?>
|
||
<link rel="stylesheet" href="<?=$main_url?>/components/css/dark.css" />
|
||
<?php } ?>
|
||
<title>grizzly’s space</title>
|
||
</head>
|
||
<body>
|
||
<div class="app">
|
||
<header>
|
||
<span><a href="https://tilde.team/~grizzly" style="float: left;">~grizzly</a></span>
|
||
<span class="quote">security does not exist, no system is safe</span>
|
||
<span><a href="https://tilde.team/"><- back to tilde.team</a></span>
|
||
</header>
|
||
<main>
|
||
<div class="container">
|
||
<div class="content">
|
||
<div class="theme">
|
||
<?php
|
||
if ($theme == 'dark') { echo '<a href="' . $main_url . '/?theme=light">light mode</a>'; }
|
||
if ($theme == 'light') { echo '<a href="' . $main_url . '/?theme=dark">dark mode</a>'; }
|
||
?>
|
||
</div>
|
||
|
||
<h2>hi, i'm grizzly!</h2>
|
||
have a great day! :)
|
||
<div class="widgets">
|
||
<?=Ascii()?>
|
||
<div class="botany">
|
||
<h3>botany: my plant</h3>
|
||
<?php require_once('components/botany.php'); ?>
|
||
</div>
|
||
</div>
|
||
|
||
<?php echo More(); ?>
|
||
|
||
</div>
|
||
<div class="side">
|
||
<?php require_once('components/comments/comment.php'); ?>
|
||
<?php require_once('components/comments/form.php'); ?>
|
||
</div>
|
||
</div>
|
||
|
||
<?php if ($theme === 'dark') { ?>
|
||
<style>.plant { background-color: transparent !important; }</style>
|
||
<?php } ?>
|
||
</main>
|
||
<footer>
|
||
<?=WebRing()?>
|
||
<div>
|
||
copyleft echo date("Y");
|
||
|
||
<p>
|
||
sorted to ravenclaw on <a href="https://wizardingworld.com/">wizardingworld</a>
|
||
</p>
|
||
|
||
<p>
|
||
<a href="https://tildegit.org/grizzly/website">opensource</a>
|
||
</p>
|
||
|
||
</div>
|
||
</footer>
|
||
</div>
|
||
</body>
|
||
</html>
|
||
|
||
<?php
|
||
|
||
function Ascii() {
|
||
return '
|
||
<pre>
|
||
_________________
|
||
< hello, everyone >
|
||
-----------------
|
||
\
|
||
\
|
||
___
|
||
{~._.~}
|
||
( Y )
|
||
()~*~()
|
||
(_)-(_)
|
||
</pre>';
|
||
}
|
||
|
||
function More() {
|
||
return '
|
||
<div class="more">
|
||
<div class="links">
|
||
' . file_get_contents('components/more/Contact.html') . '
|
||
' . file_get_contents('components/more/Me.html') . '
|
||
' . file_get_contents('components/more/Projects.html') . '
|
||
' . file_get_contents('components/more/CoolLinks.html') . '
|
||
</div>
|
||
</div>';
|
||
}
|
||
|
||
|
||
function WebRing() {
|
||
return '<!-- tilde.team ring fragment-->
|
||
<div class="newring">
|
||
[<a href="https://tilde.team/ring/?action=prev&me=grizzly"
|
||
>previous</a
|
||
>] [<a href="https://tilde.team/ring/?action=random&me=grizzly"
|
||
>random</a
|
||
>] [<a href="https://tilde.team/ring/?action=next&me=grizzly"
|
||
>next</a
|
||
>]
|
||
<br />
|
||
<a href="https://tilde.team/ring/">how to join this webring</a>
|
||
</div>';
|
||
}
|
||
|
||
?>
|