some style update
This commit is contained in:
44
index.html
44
index.html
@@ -30,10 +30,18 @@
|
|||||||
<h1>// Hex Studios</h1>
|
<h1>// Hex Studios</h1>
|
||||||
<i>Developer, biker, musician, engineer, and an unapologetic centrist in the deep red south. The real @hexstudios.</i>
|
<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">
|
<div id="sticky-posts-section">
|
||||||
<h2>Pinned posts</h2>
|
<h2>Pinned posts</h2>
|
||||||
<ul>
|
<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>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -46,26 +54,26 @@
|
|||||||
async function loadPosts() {
|
async function loadPosts() {
|
||||||
const list = document.getElementById('posts-list');
|
const list = document.getElementById('posts-list');
|
||||||
try {
|
try {
|
||||||
const res = await fetch('posts/list.php');
|
const res = await fetch('posts/list.php');
|
||||||
const posts = await res.json();
|
const posts = await res.json();
|
||||||
|
|
||||||
if (!posts.length) {
|
if (!posts.length) {
|
||||||
list.innerHTML = '<li>No posts yet.</li>';
|
list.innerHTML = '<li>No posts yet.</li>';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
posts.forEach(post => {
|
posts.forEach(post => {
|
||||||
const li = document.createElement('li');
|
const li = document.createElement('li');
|
||||||
const a = document.createElement('a');
|
const a = document.createElement('a');
|
||||||
a.textContent = post.title;
|
a.textContent = post.title + " | " + post.date;
|
||||||
a.href = post.type === 'html'
|
a.href = post.type === 'html'
|
||||||
? 'posts/' + post.file
|
? 'posts/' + post.file
|
||||||
: 'post.html?file=' + encodeURIComponent(post.file);
|
: 'post.html?file=' + encodeURIComponent(post.file);
|
||||||
li.appendChild(a);
|
li.appendChild(a);
|
||||||
list.appendChild(li);
|
list.appendChild(li);
|
||||||
});
|
});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
list.innerHTML = '<li>Couldn\u2019t load posts.</li>';
|
list.innerHTML = '<li>Couldn\u2019t load posts.</li>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -62,15 +62,23 @@ hr {
|
|||||||
|
|
||||||
/* post lists on the main page */
|
/* post lists on the main page */
|
||||||
#posts-section ul,
|
#posts-section ul,
|
||||||
#sticky-posts-section ul {
|
#sticky-posts-section ul,
|
||||||
|
#links-section ul {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
#posts-section li,
|
#posts-section li,
|
||||||
#sticky-posts-section li {
|
#sticky-posts-section li,
|
||||||
|
#links-section li {
|
||||||
margin: 0.5em 0;
|
margin: 0.5em 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#posts-section li::before,
|
||||||
|
#sticky-posts-section li::before,
|
||||||
|
#links-section li::before {
|
||||||
|
content: "> ";
|
||||||
|
}
|
||||||
|
|
||||||
/* post.html */
|
/* post.html */
|
||||||
.back-link {
|
.back-link {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
|||||||
Reference in New Issue
Block a user