fix the link date again, hopefully
This commit is contained in:
@@ -67,11 +67,15 @@
|
|||||||
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 + '<i class="post-link-date">' + post.date + '</i>';
|
const i = document.createElement('i');
|
||||||
|
a.textContent = post.title;
|
||||||
|
i.textContent = 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);
|
||||||
|
a.appendChild(i);
|
||||||
|
i.classList.add("post-link-date");
|
||||||
list.appendChild(li);
|
list.appendChild(li);
|
||||||
});
|
});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
Reference in New Issue
Block a user