How I designed, routed, and engineered my portfolio at hannahstemerdink.info, keeping it simple, fast, and easy to extend.
This site began as a lightweight, portfolio using HTML, CSS, a dash of jQuery, and a few small PHP utilities. I focused on clarity, accessible navigation, and clean URLs. A reusable gallery powers multiple pages with one source of truth.
This was my first time developing full pages in HTML and CSS, so I relied heavily on a very old open-source theme from 2012, called Piccolo, to construct a base. But this also meant that I needed to make a lot of changes. The main problem was all the repetitive work for headers, footers, items and outdated interactive functions. I first started with getting the structure that I wanted on one page and then worked my way to different PHP methods to improve oversight and consistency for new pages.
Currently, I am in the middle of converting the colour palette of my website, so it might still look a bit funky at the moment.
In a week or two I will follow an extensive course on Responsive Web Design to improve and clean up my website. So hopefully, I can make this site a bit faster with some cool features by then.
.htaccess so pages read like /skills/festivals instead of .php endings.HTML CSS Bootstrap 2 jQuery PHP Apache (.htaccess) YAML (automation)
I use simple rewrite rules to keep URLs tidy and allow both folder and file views:
# skills index without trailing slash
RewriteRule ^skills$ skills/index.php [L,QSA]
# map /skills/slug to skills/slug.php (with optional trailing slash)
RewriteRule ^skills/([^/.]+)/?$ skills/$1.php [L,QSA]
Items live in a single array; each page filters by tags. The renderer outputs only <li> items so layout stays aligned.
// gallery-data.php (excerpt)
$GALLERY = [
[
'id' => 'id-1',
'types' => ['html','css','coding'],
'href' => '/skills/website',
'title' => 'Designing This Website',
'subtitle' => 'For personal branding.',
'kind' => 'image',
'images' => [['/img/gallery/gallery-img-1-4col.jpg','Gallery']],
],
// ...
];
// gallery-render.php (returns only <li>s)
echo render_gallery($GALLERY, ['coding'], 'any', false);
<a>.<ul>s (Bootstrap’s .thumbnails adds negative margins).target="_self".?v=2 and provide both /favicon.ico and PNG sizes.The theme’s original FlexSlider from 2012 caused problems: slides stacked vertically in Chrome, controls vanished in Firefox and Vivaldi, and the arrow UI felt outdated. I rewrote parts of the JS plugin and cleaned up its CSS to stabilise behaviour and add modern navigation.
.slides > li to float and have explicit widths to prevent Chrome/Edge from stacking two images. Appended the dot navigation manually in Firefox/Vivaldi where the scaffold wouldn’t attach..slides > li to float:left with explicit widths.Clickable project item card:
<li class="span3 gallery-item" data-type="html css coding">
<a href="/skills/website" class="gallery-link">
<img src="/img/gallery/gallery-img-1-4col.jpg" alt="Designing This Website">
<span class="project-details">
<span class="project-title">Designing This Website</span>For personal branding.
</span>
</a>
</li>
Dynamic navigation bar:
<?php
// Expect $page to be one of: 'home','arts','entertainment','coding','contact'
\$page = \$page ?? 'home';
\$active = fn(\$key) => \$page === \$key ? ' class="active"' : '';
\$inPortfolio = in_array(\$page, ['arts','entertainment','coding'], true);
?>
<div class="span4 navigation">
<div class="navbar hidden-phone" style="margin:20px 0px 0px 0px">
<ul class="nav">
<li<?= \$active('home') ?>><a href="/skills">Home</a></li>
<li class="dropdown<?= \$inPortfolio ? ' active' : '' ?>">
<a class="dropdown-toggle" data-toggle="dropdown" href="">Portfolio<b class="caret"></b></a>
<ul class="dropdown-menu">
<li<?= \$active('arts') ?>><a href="/skills/arts">Arts</a></li>
<li<?= \$active('entertainment') ?>><a href="/skills/entertainment">Entertainment</a></li>
<li<?= \$active('coding') ?>><a href="/skills/coding">Coding - Web & Scientific</a></li>
</ul>
</li>
<li<?= \$active('contact') ?>><a href="/#Contact">Contact</a></li>
</ul>
</div>
</div>