36 lines
1.3 KiB
PHP
36 lines
1.3 KiB
PHP
<?php
|
|
$title = 'Projects';
|
|
$description = "My personal projects.";
|
|
$data = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . '/assets/data/projects.json'), true);
|
|
$projects = $data['projects'] ?? [];
|
|
include $_SERVER['DOCUMENT_ROOT'] . '/includes/head.php';
|
|
?>
|
|
<body>
|
|
<?php include $_SERVER['DOCUMENT_ROOT'] . '/includes/nav.php'; ?>
|
|
|
|
<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="card-list">
|
|
<?php foreach ($projects as $project): ?>
|
|
<a href="<?= htmlspecialchars($project['url']) ?>" class="card">
|
|
<div class="card-row">
|
|
<div>
|
|
<h2 class="card-title"><?= htmlspecialchars($project['title']) ?></h2>
|
|
<?php if (!empty($project['note'])): ?>
|
|
<p class="card-note"><?= htmlspecialchars($project['note']) ?></p>
|
|
<?php endif; ?>
|
|
</div>
|
|
<span class="card-host"><?= htmlspecialchars(parse_url($project['url'], PHP_URL_HOST)) ?></span>
|
|
</div>
|
|
</a>
|
|
<?php endforeach; ?>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
|
|
</body>
|
|
</html>
|