Fixed an issue with an incomplete example-config.json that made the

server not work at all.
Also added a default.css file
This commit is contained in:
deadvey
2025-10-24 12:28:22 +01:00
parent 66423cb3c0
commit 35163b5584
14 changed files with 105 additions and 131 deletions

View File

@@ -20,6 +20,11 @@ export function increment_hitcount(postID = -1) { // -1 Means it will increment
writedata('posts', post, postID)
return 0
}
else {
post.hitcount = 1;
writedata('posts', post, postID)
return 0
}
return 1
}
}
@@ -72,9 +77,7 @@ export function getdata(data, index=-1) {
if (index < result.length) {
return result[index]
}
else {
return 1 // This index doesn't exist
}
return 1 // This index doesn't exist
}
return result
}

View File

@@ -54,14 +54,11 @@ export function unix_time_to_atom_date(unix_time) {
export function render_tags(tags) {
let string = "" // Initialises the string
if (tags.length == 1 && tags[0] == "") {
string = locale.no_tags; // If there are no tags, output something
string = ''; // If there are no tags, output nothing
}
else {
for (let tag_index = 0; tag_index < tags.length; tag_index++) { // Loop over each tag
string += `<a href="/tag/${tags[tag_index].trim()}">${tags[tag_index].trim()}</a>` // Adds the tag to the string as a HTML href
if (tag_index < tags.length - 1) { // If there are more tags, then insert a comma
string += ", ";
}
string += `<a href="/tag/${tags[tag_index].trim()}">#${tags[tag_index].trim()}</a> ` // Adds the tag to the string as a HTML href
}
}
return string