some style update

This commit is contained in:
2026-08-13 12:35:23 -05:00
parent 3820341b50
commit 40695352ad
2 changed files with 36 additions and 20 deletions

View File

@@ -30,10 +30,18 @@
<h1>// Hex Studios</h1>
<i>Developer, biker, musician, engineer, and an unapologetic centrist in the deep red south. The real @hexstudios.</i>
<div id="links-section">
<h2>Links</h2>
<ul>
<li><a href="https://youtube.com/c/hexstudios">YouTube</a></li>
<li><a href="https://bellsworne.com">My company - Bellsworne</a></li>
</ul>
</div>
<div id="sticky-posts-section">
<h2>Pinned posts</h2>
<ul>
<li><a href="https://hexstudios.co/post.html?file=about.md">About</a></li>
<li><a href="https://hexstudios.co/post.html?file=about.md">About | 2026-08-13</a></li>
</ul>
</div>
@@ -46,26 +54,26 @@
async function loadPosts() {
const list = document.getElementById('posts-list');
try {
const res = await fetch('posts/list.php');
const posts = await res.json();
const res = await fetch('posts/list.php');
const posts = await res.json();
if (!posts.length) {
list.innerHTML = '<li>No posts yet.</li>';
return;
}
if (!posts.length) {
list.innerHTML = '<li>No posts yet.</li>';
return;
}
posts.forEach(post => {
const li = document.createElement('li');
const a = document.createElement('a');
a.textContent = post.title;
a.href = post.type === 'html'
? 'posts/' + post.file
: 'post.html?file=' + encodeURIComponent(post.file);
li.appendChild(a);
list.appendChild(li);
});
posts.forEach(post => {
const li = document.createElement('li');
const a = document.createElement('a');
a.textContent = post.title + " | " + post.date;
a.href = post.type === 'html'
? 'posts/' + post.file
: 'post.html?file=' + encodeURIComponent(post.file);
li.appendChild(a);
list.appendChild(li);
});
} catch (err) {
list.innerHTML = '<li>Couldn\u2019t load posts.</li>';
list.innerHTML = '<li>Couldn\u2019t load posts.</li>';
}
}