Full Refactor

This commit is contained in:
sistav committed 2026-06-01 18:08:37 -04:00
1 parent 70fe6ddfb6
commit bfe333e396
18 files changed
+296 -220

No files matched your search

+28 -1
View File
@@ -1,2 +1,29 @@
Options -Indexes
ServerSignature Off
ServerSignature Off
AddType font/woff2 .woff2
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/css text/plain application/javascript image/svg+xml application/xml
</IfModule>
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/css "access plus 1 year"
ExpiresByType font/woff2 "access plus 1 year"
ExpiresByType image/gif "access plus 6 months"
ExpiresByType image/png "access plus 6 months"
ExpiresByType image/jpeg "access plus 6 months"
ExpiresByType image/svg+xml "access plus 6 months"
ExpiresByType image/x-icon "access plus 1 year"
ExpiresByType text/html "access plus 0 seconds"
</IfModule>
<IfModule mod_headers.c>
<FilesMatch "\.(woff2|css|gif|png|jpe?g|svg|ico)$">
Header set Cache-Control "public, max-age=31536000, immutable"
</FilesMatch>
<FilesMatch "\.(html|php)$">
Header set Cache-Control "no-cache"
</FilesMatch>
</IfModule>
+1
View File
@@ -8,5 +8,6 @@ RUN apt-get update && apt-get install -y \
COPY . /var/www/html
RUN rm -f /var/www/html/index.html
RUN sed -i 's/AllowOverride None/AllowOverride All/g' /etc/apache2/apache2.conf
RUN a2enmod expires headers deflate
EXPOSE 80
CMD ["apache2ctl", "-D", "FOREGROUND"]
+5 -5
View File
@@ -3,13 +3,13 @@ $title = 'About';
$description = "The self bleeds into creation.";
include $_SERVER['DOCUMENT_ROOT'] . '/includes/head.php';
?>
<body class="bg-[#0a0a0a] text-white min-h-screen">
<body>
<?php include $_SERVER['DOCUMENT_ROOT'] . '/includes/nav.php'; ?>
<main class="pt-16">
<div class="max-w-3xl mx-auto px-4 sm:px-6 py-12">
<h1 class="text-2xl font-semibold mb-8">About</h1>
<div class="space-y-5 text-neutral-300 leading-relaxed text-base">
<main class="page">
<div class="wrap">
<h1>About</h1>
<div class="prose">
<p>Welcome to sistav.com,</p>
<p>I'm Sistav, assuming you haven't figured that out already.</p>
<p>I'm a developer. I like Linux, Counter-Strike, and BMWs. I don't do web development very often, but I don't mind it for my own domain, it's quite fun trying to figure out what fits best.</p>
+138
View File
@@ -0,0 +1,138 @@
@font-face { font-family:'Cinzel'; font-style:normal; font-weight:400; font-display:swap; src:url('/assets/fonts/cinzel-400.woff2') format('woff2'); }
@font-face { font-family:'Cinzel'; font-style:normal; font-weight:600; font-display:swap; src:url('/assets/fonts/cinzel-600.woff2') format('woff2'); }
@font-face { font-family:'EB Garamond'; font-style:normal; font-weight:400; font-display:swap; src:url('/assets/fonts/ebgaramond-400.woff2') format('woff2'); }
@font-face { font-family:'EB Garamond'; font-style:italic; font-weight:400; font-display:swap; src:url('/assets/fonts/ebgaramond-400i.woff2') format('woff2'); }
@font-face { font-family:'UnifrakturMaguntia'; font-style:normal; font-weight:400; font-display:swap; src:url('/assets/fonts/unifrakturmaguntia-400.woff2') format('woff2'); }
:root { --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; }
*, *::before, *::after { box-sizing:border-box; }
body, h1, h2, h3, p, figure, blockquote, dl, dd { margin:0; }
ul { margin:0; padding:0; list-style:none; }
a { color:inherit; text-decoration:none; }
img { display:block; max-width:100%; }
button { font-family:inherit; font-size:inherit; color:inherit; }
html { overflow-y:scroll; scrollbar-gutter:stable; }
body {
min-height:100vh;
color:#e8e2d8;
background-color:#0a0a0a;
background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48'%3E%3Cg fill='none' stroke='%23c0392b' stroke-opacity='0.12'%3E%3Cpath d='M24 3 L45 24 L24 45 L3 24 Z'/%3E%3Ccircle cx='24' cy='24' r='2.5'/%3E%3Cpath d='M24 14 L34 24 L24 34 L14 24 Z' stroke-opacity='0.07'/%3E%3C/g%3E%3C/svg%3E");
font-family:'EB Garamond', serif;
font-size:1.06rem;
}
h1 {
font-family:'Cinzel', serif; font-weight:600;
font-size:clamp(1.6rem, 3.5vw, 2rem);
color:#c0392b; letter-spacing:0.16em; text-transform:uppercase; text-align:center;
margin-bottom:1.5rem;
}
article h2, section h2 {
font-family:'Cinzel', serif; font-weight:600; font-size:1.2rem;
color:#c0392b; letter-spacing:0.2em; text-transform:uppercase; text-align:left;
}
.incantation {
font-family:'EB Garamond', serif; font-style:italic; font-size:1.35rem;
color:#e8e2d8; text-align:center; letter-spacing:0.02em;
margin-bottom:4rem;
}
.home-tagline {
font-family:'UnifrakturMaguntia', serif; font-size:1.9rem;
color:#c0392b; text-align:center;
}
.page { padding-top:4rem; }
.wrap { max-width:48rem; margin:0 auto; padding:3rem 1rem; }
@media (min-width:640px) { .wrap { padding-left:1.5rem; padding-right:1.5rem; } }
.home {
min-height:100vh; padding-top:4rem;
display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2rem;
}
.prose { display:flex; flex-direction:column; gap:1.25rem; color:#e8e2d8; font-size:1.25rem; line-height:1.625; }
.entry-list { display:flex; flex-direction:column; gap:2rem; }
.card-list { display:flex; flex-direction:column; gap:1.5rem; }
.cat-box { border:1px solid #222; border-top:3px solid #c0392b; background:#0c0c0c; padding:1.5rem; }
.cat-box > h2 { text-align:center; margin-bottom:1.25rem; }
.cat-box > h2::before, .cat-box > h2::after { content:'\2756'; color:#5a2420; margin:0 .6rem; font-size:.8rem; }
.link-list { display:flex; flex-direction:column; gap:.25rem; margin:0 -.5rem; }
.glow-link {
display:block; padding:.6rem .85rem; border-radius:4px;
transition:background-color .15s ease, box-shadow .2s ease;
}
.glow-link:hover {
background-color:rgba(192,57,43,.08);
box-shadow:0 0 22px rgba(192,57,43,.32), inset 0 0 0 1px rgba(192,57,43,.5);
}
.lk-row { display:flex; align-items:baseline; justify-content:space-between; gap:.5rem; }
.lk-title { font-family:'Cinzel', serif; font-size:1.125rem; letter-spacing:.03em; color:#e8e2d8;
transition:color .15s ease, text-shadow .2s ease; }
.glow-link:hover .lk-title { color:#e0483b; text-shadow:0 0 10px rgba(224,72,59,.6); }
.lk-domain { color:#8f897e; font-size:1.125rem; font-family:var(--mono); font-style:italic; flex-shrink:0; }
.lk-note { display:block; color:#e8e2d8; font-size:1.25rem; margin-top:.125rem; }
.log-head { display:flex; align-items:baseline; justify-content:space-between; gap:1rem;
border-bottom:1px solid #242424; padding-bottom:.75rem; margin-bottom:1.25rem; }
.log-date { color:#8f897e; font-size:1.125rem; font-family:var(--mono); font-style:italic; flex-shrink:0; }
.log-fields { display:flex; flex-direction:column; gap:.625rem; }
.log-row { display:grid; grid-template-columns:140px 1fr; column-gap:1.5rem; align-items:baseline; }
.log-key { color:#e8e2d8; font-size:1.25rem; }
.log-val { color:#e8e2d8; font-size:1.25rem; }
.card {
display:block; border:1px solid #242424; background:#0c0c0c; padding:1.5rem;
transition:background-color .15s ease, box-shadow .2s ease, border-color .15s ease;
}
.card:hover {
border-color:#c0392b; background:#111;
box-shadow:0 0 22px rgba(192,57,43,.32), inset 0 0 0 1px rgba(192,57,43,.5);
}
.card-row { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; }
.card-title { font-family:'Cinzel', serif; font-size:1.25rem; font-weight:600; color:#e8e2d8;
margin-bottom:.25rem; transition:color .15s ease; }
.card:hover .card-title { color:#c0392b; }
.card-note { color:#e8e2d8; font-size:1.25rem; line-height:1.625; }
.card-host { color:#8f897e; font-size:1.125rem; font-family:var(--mono); font-style:italic;
flex-shrink:0; margin-top:.25rem; }
.empty { color:#e8e2d8; }
.site-nav { position:fixed; top:0; left:0; right:0; z-index:50; background:rgba(10,10,10,.95); -webkit-backdrop-filter:blur(4px); backdrop-filter:blur(4px); border-bottom:3px double #c0392b; }
.nav-inner { max-width:64rem; margin:0 auto; padding:0 1rem; display:flex; align-items:center; justify-content:space-between; height:4rem; }
.nav-brand { font-family:'Cinzel', serif; font-size:1.15rem; font-weight:600; letter-spacing:0.08em; color:#e8e2d8; transition:color .15s ease, text-shadow .2s ease; }
.nav-brand:hover { color:#e0483b; text-shadow:0 0 10px rgba(224,72,59,.6); }
.nav-links { display:none; align-items:center; gap:2rem; font-family:'Cinzel', serif; letter-spacing:0.08em; font-weight:600; font-size:1.125rem; }
.nav-links a { color:#e8e2d8; transition:color .15s ease, text-shadow .2s ease; }
.nav-links a:hover { color:#e0483b; text-shadow:0 0 10px rgba(224,72,59,.6); }
.nav-toggle-btn { display:inline-flex; align-items:center; color:#e8e2d8; padding:.25rem; background:none; border:0; }
.nav-toggle-btn svg { width:1.25rem; height:1.25rem; }
.nav-mobile { border-top:1px solid #242424; background:#0a0a0a; }
.nav-mobile-inner { max-width:64rem; margin:0 auto; padding:1.25rem 1rem; display:flex; flex-direction:column; gap:1.25rem; font-family:'Cinzel', serif; letter-spacing:0.08em; font-weight:600; }
.nav-mobile-inner a { color:#e8e2d8; font-size:1rem; transition:color .15s ease; }
.nav-mobile-inner a:hover { color:#f4efe8; }
.nav-hidden { display:none !important; }
@media (min-width:768px) { .nav-links { display:flex; } .nav-toggle-btn { display:none; } }
.nav-active { color:#e0483b !important; }
#gif-frame {
display:inline-block; padding:14px; background:#0a0a0a;
border:2px solid #c0392b;
box-shadow:0 0 0 6px #0a0a0a, 0 0 0 7px rgba(192,57,43,.3), 0 20px 50px rgba(0,0,0,.8);
}
#main-gif { display:block; width:auto; height:auto; animation:gifin .5s ease both; }
@keyframes gifin { from{opacity:0;} to{opacity:1;} }
#grain { position:fixed; inset:0; z-index:-1; pointer-events:none; opacity:.05;
background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
background-size:200px 200px; }
* { cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Cg stroke='%23c0392b' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M11 2 L11 20'/%3E%3Cpath d='M5 7 L17 7'/%3E%3C/g%3E%3C/svg%3E") 11 11, auto; }
a, a *, button, [role=button], summary {
cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26'%3E%3Cg stroke='%23e0483b' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M13 2 L13 24'/%3E%3Cpath d='M6 8 L20 8'/%3E%3C/g%3E%3C/svg%3E") 13 13, pointer; }
+8
View File
@@ -0,0 +1,8 @@
{
"contacts": [
{ "label": "Email", "value": "admin@sistav.com", "url": "mailto:admin@sistav.com" },
{ "label": "GitHub", "value": "sistav", "url": "https://github.com/sistav" },
{ "label": "Mastodon", "value": "@Sistav", "url": "https://fosstodon.org/@Sistav" },
{ "label": "Twitter", "value": "@NotSistav", "url": "https://twitter.com/NotSistav" }
]
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+27 -39
View File
@@ -1,50 +1,38 @@
<?php
$title = 'Contact';
$description = 'The wise man does not hide. He simply waits to be found.';
$data = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . '/assets/data/contact.json'), true);
$contacts = $data['contacts'] ?? [];
include $_SERVER['DOCUMENT_ROOT'] . '/includes/head.php';
?>
<body class="bg-[#0a0a0a] text-white min-h-screen">
<body>
<?php include $_SERVER['DOCUMENT_ROOT'] . '/includes/nav.php'; ?>
<main class="pt-16">
<div class="max-w-3xl mx-auto px-4 sm:px-6 py-12">
<h1 class="text-2xl mb-4">Contact</h1>
<p class="text-neutral-300 text-base mb-16 text-center">Get in touch. Feel free to send me gifs.</p>
<ul class="space-y-5">
<li>
<a href="mailto:admin@sistav.com" class="group">
<span class="flex items-baseline gap-2">
<span class="text-neutral-300 text-base group-hover:text-white transition-colors">Email</span>
<span class="text-neutral-400 text-base">admin@sistav.com</span>
</span>
</a>
</li>
<li>
<a href="https://github.com/sistav" target="_blank" rel="noopener" class="group">
<span class="flex items-baseline gap-2">
<span class="text-neutral-300 text-base group-hover:text-white transition-colors">GitHub</span>
<span class="text-neutral-400 text-base">sistav</span>
</span>
</a>
</li>
<li>
<a href="https://fosstodon.org/@Sistav" target="_blank" rel="noopener" class="group">
<span class="flex items-baseline gap-2">
<span class="text-neutral-300 text-base group-hover:text-white transition-colors">Mastodon</span>
<span class="text-neutral-400 text-base">@Sistav</span>
</span>
</a>
</li>
<li>
<a href="https://twitter.com/NotSistav" target="_blank" rel="noopener" class="group">
<span class="flex items-baseline gap-2">
<span class="text-neutral-300 text-base group-hover:text-white transition-colors">Twitter</span>
<span class="text-neutral-400 text-base">@NotSistav</span>
</span>
</a>
</li>
</ul>
<main class="page">
<div class="wrap">
<h1>Contact</h1>
<p class="incantation">Get in touch. Feel free to send me gifs.</p>
<div class="card-list">
<?php foreach ($contacts as $c):
$external = strpos($c['url'], 'mailto:') !== 0;
$host = parse_url($c['url'], PHP_URL_HOST);
?>
<a href="<?= htmlspecialchars($c['url']) ?>"<?= $external ? ' target="_blank" rel="noopener"' : '' ?> class="card">
<div class="card-row">
<div>
<h2 class="card-title"><?= htmlspecialchars($c['label']) ?></h2>
<p class="card-note"><?= htmlspecialchars($c['value']) ?></p>
</div>
<?php if ($host): ?>
<span class="card-host"><?= htmlspecialchars($host) ?></span>
<?php endif; ?>
</div>
</a>
<?php endforeach; ?>
</div>
</div>
</main>
</body>
</html>
-5
View File
@@ -1,5 +0,0 @@
<footer class="border-t border-[#1c1c1c] mt-20">
<div class="max-w-5xl mx-auto px-4 sm:px-6 py-8 text-neutral-700 text-xs">
sistav.com
</div>
</footer>
+3 -100
View File
@@ -9,104 +9,7 @@
<?php endif; ?>
<link rel="icon" href="/assets/favicon/favicon.ico" sizes="any">
<link rel="apple-touch-icon" href="/assets/favicon/apple-touch-icon.png">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://api.fontshare.com/v2/css?f[]=clash-display@400,500,600,700&f[]=satoshi@400,500,600,700&display=swap" rel="stylesheet">
<script src="https://cdn.tailwindcss.com"></script>
<script>
tailwind.config = {
theme: {
extend: {
colors: { cream: '#e0d5c0' }
}
}
}
</script>
<style>
/* Global text softening */
body { color: #e6dfd8 !important; background-color: #0b0a09 !important; font-family: 'Satoshi', sans-serif !important; }
/* Headings */
h1 {
font-family: 'ClashDisplay-Variable', sans-serif !important;
font-weight: 400 !important;
font-size: 2rem !important;
color: #e6dfd8;
letter-spacing: 0.05em;
text-align: center;
}
article h2 {
font-family: 'Satoshi', sans-serif !important;
font-weight: 400 !important;
font-size: 1rem !important;
color: #d4d4d4 !important;
letter-spacing: 0.1em !important;
text-transform: uppercase !important;
text-align: left !important;
}
/* Gif frame */
#gif-frame {
display: inline-block;
padding: 14px;
border: 2px solid #6b6b6b;
box-shadow:
inset 0 1px 0 rgba(255,255,255,0.05),
0 4px 8px rgba(0,0,0,0.55),
0 16px 40px rgba(0,0,0,0.75),
0 40px 90px rgba(0,0,0,0.35);
}
/* Grain overlay */
body::after {
content: '';
position: fixed;
inset: 0;
z-index: 9998;
pointer-events: none;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.5' numOctaves='6' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
opacity: 0.07;
}
/* Custom cursor */
* { cursor: none !important; }
#site-cursor {
position: fixed;
top: 0; left: 0;
width: 5px;
height: 5px;
background: #ffffff;
border-radius: 50%;
pointer-events: none;
z-index: 99999;
transform: translate(-50%, -50%);
transition: width .2s ease, height .2s ease, opacity .2s ease;
opacity: 0;
}
#site-cursor.visible { opacity: 1; }
#site-cursor.expanded { width: 22px; height: 22px; opacity: 0.3; }
</style>
<script>
document.addEventListener('DOMContentLoaded', function () {
var cursor = document.getElementById('site-cursor');
if (!cursor || !window.matchMedia('(hover: hover)').matches) return;
document.addEventListener('mousemove', function (e) {
cursor.style.left = e.clientX + 'px';
cursor.style.top = e.clientY + 'px';
cursor.classList.add('visible');
});
document.addEventListener('mouseleave', function () {
cursor.classList.remove('visible');
});
document.addEventListener('mouseover', function (e) {
if (e.target.closest('a, button, [role="button"]'))
cursor.classList.add('expanded');
else
cursor.classList.remove('expanded');
});
});
</script>
<link rel="preload" href="/assets/fonts/cinzel-600.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="/assets/fonts/ebgaramond-400.woff2" as="font" type="font/woff2" crossorigin>
<link rel="stylesheet" href="/assets/css/site.css?v=<?= @filemtime($_SERVER['DOCUMENT_ROOT'] . '/assets/css/site.css') ?>">
</head>
+26 -15
View File
@@ -16,35 +16,35 @@ $_nav_pages = [
'/contact/' => 'Contact',
];
?>
<nav class="fixed top-0 left-0 right-0 z-50 bg-[#0a0a0a] border-b border-[#1c1c1c]">
<div class="max-w-5xl mx-auto px-4 sm:px-6 flex items-center justify-between h-16">
<a href="/" style="font-family: 'Satoshi', sans-serif; font-size: 1.2rem; font-weight: 600; letter-spacing: 0.02em;">sistav.com</a>
<div id="grain"></div>
<nav class="site-nav">
<div class="nav-inner">
<a href="/" class="nav-brand">Sistav</a>
<div class="hidden md:flex items-center gap-8 text-lg">
<div class="nav-links">
<?php foreach ($_nav_pages as $href => $label): ?>
<a href="<?= $href ?>" class="<?= _nav_active($href) ? '' : 'text-neutral-400 hover:text-[#e6dfd8]' ?> transition-colors duration-150"><?= $label ?></a>
<a href="<?= $href ?>"<?= _nav_active($href) ? ' class="nav-active"' : '' ?>><?= $label ?></a>
<?php endforeach; ?>
</div>
<button id="nav-toggle" class="md:hidden text-neutral-400 hover:text-white p-1" aria-label="Toggle menu" aria-expanded="false">
<svg id="nav-icon-open" class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<button id="nav-toggle" class="nav-toggle-btn" aria-label="Toggle menu" aria-expanded="false">
<svg id="nav-icon-open" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M4 6h16M4 12h16M4 18h16"/>
</svg>
<svg id="nav-icon-close" class="w-5 h-5 hidden" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<svg id="nav-icon-close" class="nav-hidden" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M6 18L18 6M6 6l12 12"/>
</svg>
</button>
</div>
<div id="nav-mobile" class="hidden border-t border-[#1c1c1c] bg-[#0a0a0a]">
<div class="max-w-5xl mx-auto px-4 py-5 flex flex-col gap-5 text-sm">
<div id="nav-mobile" class="nav-mobile nav-hidden">
<div class="nav-mobile-inner">
<?php foreach ($_nav_pages as $href => $label): ?>
<a href="<?= $href ?>" class="<?= _nav_active($href) ? '' : 'text-neutral-300 hover:text-[#e6dfd8]' ?> transition-colors text-base"><?= $label ?></a>
<a href="<?= $href ?>"<?= _nav_active($href) ? ' class="nav-active"' : '' ?>><?= $label ?></a>
<?php endforeach; ?>
</div>
</div>
</nav>
<div id="site-cursor"></div>
<script>
(function () {
@@ -52,11 +52,22 @@ $_nav_pages = [
var mobile = document.getElementById('nav-mobile');
var iconOpen = document.getElementById('nav-icon-open');
var iconClose = document.getElementById('nav-icon-close');
function closeMenu() {
mobile.classList.add('nav-hidden');
iconOpen.classList.remove('nav-hidden');
iconClose.classList.add('nav-hidden');
toggle.setAttribute('aria-expanded', 'false');
}
toggle.addEventListener('click', function () {
var justHid = mobile.classList.toggle('hidden');
iconOpen.classList.toggle('hidden', !justHid);
iconClose.classList.toggle('hidden', justHid);
var justHid = mobile.classList.toggle('nav-hidden');
iconOpen.classList.toggle('nav-hidden', !justHid);
iconClose.classList.toggle('nav-hidden', justHid);
toggle.setAttribute('aria-expanded', String(!justHid));
});
mobile.querySelectorAll('a').forEach(function (link) {
link.addEventListener('click', closeMenu);
});
})();
</script>
+19 -16
View File
@@ -1,35 +1,38 @@
<?php
$description = 'Always changing. Always here.';
$description = 'Welcome in. Make yourself at home.';
$gif_files = glob($_SERVER['DOCUMENT_ROOT'] . '/assets/gifs/*.gif');
$gifs = array_map(fn($f) => '/assets/gifs/' . basename($f), $gif_files);
$default = !empty($gifs) ? $gifs[0] : '';
$default = !empty($gifs) ? $gifs[array_rand($gifs)] : ''; // random gif, server-side, no JS
include $_SERVER['DOCUMENT_ROOT'] . '/includes/head.php';
?>
<body class="bg-[#0a0a0a] text-white min-h-screen">
<body>
<?php include $_SERVER['DOCUMENT_ROOT'] . '/includes/nav.php'; ?>
<main class="h-screen flex items-center justify-center pt-16">
<main class="home">
<div id="gif-frame">
<img id="main-gif" src="<?= htmlspecialchars($default) ?>" alt="" style="display:block;opacity:0;transition:opacity 0.4s ease">
<img id="main-gif" src="<?= htmlspecialchars($default) ?>" alt="">
</div>
<p class="home-tagline">Welcome in. Make yourself at home.</p>
</main>
<script>
var gifs = <?= json_encode($gifs) ?>;
var img = document.getElementById('main-gif');
function sizeGif() {
// scale the gif so its longer side hits a target — small gifs scale up, large scale down, frame hugs
(function () {
var img = document.getElementById('' +
'main-gif');
if (!img) return;
function size() {
if (!img.naturalWidth) return;
var maxPx = Math.min(window.innerWidth, window.innerHeight) * 0.5;
var scale = Math.min(maxPx / img.naturalWidth, maxPx / img.naturalHeight);
var target = Math.min(window.innerWidth, window.innerHeight) * 0.46;
var scale = target / Math.max(img.naturalWidth, img.naturalHeight);
img.style.width = Math.round(img.naturalWidth * scale) + 'px';
img.style.height = Math.round(img.naturalHeight * scale) + 'px';
img.style.opacity = '1';
}
img.src = gifs[Math.floor(Math.random() * gifs.length)];
img.addEventListener('load', sizeGif);
if (img.complete && img.naturalWidth) sizeGif();
img.addEventListener('load', size);
if (img.complete && img.naturalWidth) size();
window.addEventListener('resize', size);
})();
</script>
</body>
</html>
+14 -14
View File
@@ -6,30 +6,30 @@ include $_SERVER['DOCUMENT_ROOT'] . '/includes/head.php';
$data = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . '/assets/data/links.json'), true);
$categories = $data['categories'] ?? [];
?>
<body class="bg-[#0a0a0a] text-white min-h-screen">
<body>
<?php include $_SERVER['DOCUMENT_ROOT'] . '/includes/nav.php'; ?>
<main class="pt-16">
<div class="max-w-3xl mx-auto px-4 sm:px-6 py-12">
<h1 class="text-2xl font-semibold mb-6">Links</h1>
<p class="text-neutral-300 text-lg mb-16 text-center">A collection of interesting and useful websites.</p>
<main class="page">
<div class="wrap">
<h1>Links</h1>
<p class="incantation">A collection of interesting and useful websites.</p>
<div class="space-y-12">
<div class="entry-list">
<?php foreach ($categories as $cat): ?>
<section>
<h2 class="text-base text-neutral-300 uppercase tracking-widest mb-5"><?= htmlspecialchars($cat['name']) ?></h2>
<ul class="space-y-4">
<section class="cat-box">
<h2><?= htmlspecialchars($cat['name']) ?></h2>
<ul class="link-list">
<?php foreach ($cat['links'] as $link):
$domain = preg_replace('/^www\./', '', parse_url($link['url'], PHP_URL_HOST));
?>
<li>
<a href="<?= htmlspecialchars($link['url']) ?>" target="_blank" rel="noopener" class="group">
<span class="flex items-baseline gap-2">
<span class="text-neutral-300 text-base group-hover:text-white transition-colors"><?= htmlspecialchars($link['title']) ?></span>
<span class="text-neutral-400 text-base"><?= $domain ?></span>
<a href="<?= htmlspecialchars($link['url']) ?>" target="_blank" rel="noopener" class="glow-link">
<span class="lk-row">
<span class="lk-title"><?= htmlspecialchars($link['title']) ?></span>
<span class="lk-domain"><?= $domain ?></span>
</span>
<?php if (!empty($link['note'])): ?>
<span class="block text-neutral-400 text-base mt-0.5"><?= htmlspecialchars($link['note']) ?></span>
<span class="lk-note"><?= htmlspecialchars($link['note']) ?></span>
<?php endif; ?>
</a>
</li>
+16 -14
View File
@@ -7,29 +7,31 @@ $data = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . '/assets/da
$entries = $data['entries'] ?? [];
$fields = ['listening', 'watching','playing', 'reading', 'working on', 'thinking'];
?>
<body class="bg-[#0a0a0a] text-white min-h-screen">
<body>
<?php include $_SERVER['DOCUMENT_ROOT'] . '/includes/nav.php'; ?>
<main class="pt-16">
<div class="max-w-3xl mx-auto px-4 sm:px-6 py-12">
<h1 class="text-2xl font-semibold mb-6">Log</h1>
<p class="text-neutral-300 text-lg mb-16 text-center">What I've been spending my time on. It's most likely not upto date.</p>
<main class="page">
<div class="wrap">
<h1>Log</h1>
<p class="incantation">What I've been spending my time on. It's most likely not upto date.</p>
<div class="space-y-12">
<div class="entry-list">
<?php if (empty($entries)): ?>
<p class="text-neutral-700 text-base">Nothing yet.</p>
<p class="empty">Nothing yet.</p>
<?php endif; ?>
<?php foreach ($entries as $entry): ?>
<article>
<h2 class="text-xl text-neutral-300 uppercase tracking-widest mb-5"><?= htmlspecialchars($entry['title']) ?></h2>
<p class="text-[#a3a3a3] text-sm font-mono mb-6"><?= date('F j, Y', strtotime($entry['date'])) ?></p>
<dl class="space-y-3">
<article class="cat-box">
<div class="log-head">
<h2><?= htmlspecialchars($entry['title']) ?></h2>
<span class="log-date"><?= date('F j, Y', strtotime($entry['date'])) ?></span>
</div>
<dl class="log-fields">
<?php foreach ($fields as $field): ?>
<?php if (!empty($entry[$field])): ?>
<div class="grid grid-cols-[110px_1fr] gap-4">
<dt class="text-neutral-400 text-base"><?= $field ?></dt>
<dd class="text-neutral-200 text-base"><?= htmlspecialchars($entry[$field]) ?></dd>
<div class="log-row">
<dt class="log-key"><?= $field ?></dt>
<dd class="log-val"><?= htmlspecialchars($entry[$field]) ?></dd>
</div>
<?php endif; ?>
<?php endforeach; ?>
+11 -11
View File
@@ -5,25 +5,25 @@ $data = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . '/assets/d
$projects = $data['projects'] ?? [];
include $_SERVER['DOCUMENT_ROOT'] . '/includes/head.php';
?>
<body class="bg-[#0a0a0a] text-white min-h-screen">
<body>
<?php include $_SERVER['DOCUMENT_ROOT'] . '/includes/nav.php'; ?>
<main class="pt-16">
<div class="max-w-3xl mx-auto px-4 sm:px-6 py-12">
<h1 class="text-2xl font-semibold mb-6">Projects</h1>
<p class="text-neutral-300 text-lg mb-12 text-center">He who mistakes completion for mastery has learned only the shape of his own ignorance.</p>
<main class="page">
<div class="wrap">
<h1>Projects</h1>
<p class="incantation">He who mistakes completion for mastery has learned only the shape of his own ignorance.</p>
<div class="space-y-6">
<div class="card-list">
<?php foreach ($projects as $project): ?>
<a href="<?= htmlspecialchars($project['url']) ?>" class="group block border border-[#1c1c1c] hover:border-[#333] bg-[#060606] hover:bg-[#0d0d0d] transition-colors p-6">
<div class="flex items-start justify-between gap-4">
<a href="<?= htmlspecialchars($project['url']) ?>" class="card">
<div class="card-row">
<div>
<h2 class="text-sm font-semibold mb-1 group-hover:text-[#e6dfd8] transition-colors"><?= htmlspecialchars($project['title']) ?></h2>
<h2 class="card-title"><?= htmlspecialchars($project['title']) ?></h2>
<?php if (!empty($project['note'])): ?>
<p class="text-neutral-400 text-base leading-relaxed"><?= htmlspecialchars($project['note']) ?></p>
<p class="card-note"><?= htmlspecialchars($project['note']) ?></p>
<?php endif; ?>
</div>
<span class="text-neutral-400 text-base shrink-0 mt-1"><?= htmlspecialchars(parse_url($project['url'], PHP_URL_HOST)) ?></span>
<span class="card-host"><?= htmlspecialchars(parse_url($project['url'], PHP_URL_HOST)) ?></span>
</div>
</a>
<?php endforeach; ?>