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

@@ -1,29 +1,34 @@
<div id="post-header">
<h1>
<%= post.title %>
<a href='/post/<%= post['id'] %>'><%= post.title %></a>
</h1>
</div>
<div id="post-tags">
<%- func.render_tags(post.tags) %><br/>
</div>
<div id="post-content">
<p>
<%- func.render_md(post.content) %><br/>
</p>
</div>
<div id="post-details">
<div id="post-author">
<i><%= locale.written_by %> <a href="/user/<%= user.username %>"><%= user.username %></a><br/></i>
</div>
<div id="post-tags">
<%- func.render_tags(post.tags) %><br/>
</div>
<div id="post-edit">
<a href="<%= config.edit_post_base_url %>/<%= post["id"] %>"><%= locale.edit_post %></a><br/>
</div>
<div id="post-pubdate">
<span id="post-author">
<i><%= locale.written_by %> <a href="/user/<%= user.username %>"><%= user.username %></a></i>
</span>
-
<span id="post-pubdate">
<i><%= locale.published %>: <%= func.unix_time_to_date_format(post.pubdate) %></i><br/>
</div>
</span>
<div id="post-editdate">
<i><%= locale.last_modified %>: <%= func.unix_time_to_date_format(post.pubdate) %></i><br/>
</div>
<div id="post-edit">
<a href="<%= config.edit_post_base_url %>/<%= post["id"] %>">
<img src='/icons/edit.png'>
</a><br/>
</div>
<% if (config.enable_hitcount == true) { %>
<div id='post-hitcount'>
Hitcount: <%- post.hitcount %>
@@ -31,6 +36,8 @@
<% } %>
</div>
<hr/>
<div id="post-commentform">
<!-- Comment form -->
<form method="POST" action="/submit_comment">

View File

@@ -1,51 +1,32 @@
<div id="post-header">
<h1>
<%= post.title %>
<a href='/post/<%= post['id'] %>'><%= post.title %></a>
</h1>
</div>
<div id="post-tags">
<%- func.render_tags(post.tags) %><br/>
</div>
<div id="post-content">
<p>
<%- func.render_md(post.content) %><br/>
<%- func.render_md(post.content) %>
</p>
</div>
<div id="post-details">
<div id="post-author">
<i><%= locale.written_by %> <a href="/user/<%= user.username %>"><%= user.username %></a><br/></i>
</div>
<div id="post-permalink">
<a href="/post/<%= post["id"] %>"><%= locale.permalink %><a/>
</div>
<div id="post-tags">
<%- func.render_tags(post.tags) %><br/>
</div>
<span id="post-author">
<i><a href="/user/<%= user.username %>"><%= user.username %></a></i>
</span>
-
<span id="post-pubdate">
<i><%= func.unix_time_to_date_format(post.pubdate) %></i><br/>
</span>
<br/>
<div id="post-edit">
<a href="<%= config.edit_post_base_url %>/<%= post["id"] %>"><%= locale.edit_post %></a><br/>
<a href="<%= config.edit_post_base_url %>/<%= post["id"] %>">
<img src='/icons/edit.png'>
</a><br/>
</div>
<div id="post-pubdate">
<i><%= locale.published %>: <%= func.unix_time_to_date_format(post.pubdate) %></i><br/>
</div>
<div id="post-editdate">
<i><%= locale.last_modified %>: <%= func.unix_time_to_date_format(post.pubdate) %></i><br/>
</div>
</div>
<div id="post-commentform">
<!-- Comment form -->
<form method="POST" action="/submit_comment">
<input type="hidden" name="post_index" value="<%= post["id"] %>">
<label><%= locale.username %>:</label><br/><input name="name"><br/><br/>
<label><%= locale.comment %>:</label><br/><textarea name="content"></textarea><br/>
<button type="submit"><%= locale.submit %></button>
</form>
</div>
<div id="post-comments">
<% comments.forEach((comment, index) => { %>
<div id="comment-no-<%= post.id %>-<%= comment.id %>" class="comment post-comment-<%= index %>">
<%- include('../partials/comment', {comment: comment}) %>
</div>
<% }) %>
</div>
<%- config.seperator %>

View File

@@ -3,49 +3,30 @@
<a href='/post/<%= post['id'] %>'><%= post.title %></a>
</h1>
</div>
<div id="post-tags">
<%- func.render_tags(post.tags) %><br/>
</div>
<div id="post-content">
<p>
<%- func.render_md(post.content) %>
</p>
</div>
<div id="post-details">
<div id="post-author">
<i><%= locale.written_by %> <a href="/user/<%= user.username %>"><%= user.username %></a><br/></i>
</div>
<div id="post-permalink">
<a href="/post/<%= post["id"] %>"><%= locale.permalink %><a/>
</div>
<div id="post-tags">
<%- func.render_tags(post.tags) %><br/>
</div>
<span id="post-author">
<i><a href="/user/<%= user.username %>"><%= user.username %></a></i>
</span>
-
<span id="post-pubdate">
<i><%= func.unix_time_to_date_format(post.pubdate) %></i><br/>
</span>
<br/>
<div id="post-edit">
<a href="<%= config.edit_post_base_url %>/<%= post["id"] %>"><%= locale.edit_post %></a><br/>
<a href="<%= config.edit_post_base_url %>/<%= post["id"] %>">
<img src='/icons/edit.png'>
</a><br/>
</div>
<div id="post-pubdate">
<i><%= locale.published %>: <%= func.unix_time_to_date_format(post.pubdate) %></i><br/>
</div>
<div id="post-editdate">
<i><%= locale.last_modified %>: <%= func.unix_time_to_date_format(post.pubdate) %></i><br/>
</div>
</div>
<div id="post-commentform">
<!-- Comment form -->
<form method="POST" action="/submit_comment">
<input type="hidden" name="post_index" value="<%= post["id"] %>">
<label><%= locale.username %>:</label><br/><input name="name"><br/><br/>
<label><%= locale.comment %>:</label><br/><textarea name="content"></textarea><br/>
<button type="submit"><%= locale.submit %></button>
</form>
</div>
<div id="post-comments">
<% comments.forEach((comment, index) => { %>
<div id="comment-no-<%= post.id %>-<%= comment.id %>" class="comment post-comment-<%= index %>">
<%- include('../partials/comment', {comment: comment}) %>
</div>
<% }) %>
</div>
<%- config.seperator %>

View File

@@ -1,48 +1,32 @@
<div id="post-header">
<h1>
<%= post.title %>
<a href='/post/<%= post['id'] %>'><%= post.title %></a>
</h1>
</div>
<div id="post-tags">
<%- func.render_tags(post.tags) %><br/>
</div>
<div id="post-content">
<p>
<%- func.render_md(post.content) %><br/>
<%- func.render_md(post.content) %>
</p>
</div>
<div id="post-details">
<div id="post-permalink">
<a href="/post/<%= post["id"] %>"><%= locale.permalink %><a/>
</div>
<div id="post-tags">
<%- func.render_tags(post.tags) %><br/>
</div>
<span id="post-author">
<i><a href="/user/<%= user.username %>"><%= user.username %></a></i>
</span>
-
<span id="post-pubdate">
<i><%= func.unix_time_to_date_format(post.pubdate) %></i><br/>
</span>
<br/>
<div id="post-edit">
<a href="<%= config.edit_post_base_url %>/<%= post["id"] %>"><%= locale.edit_post %></a><br/>
<a href="<%= config.edit_post_base_url %>/<%= post["id"] %>">
<img src='/icons/edit.png'>
</a><br/>
</div>
<div id="post-pubdate">
<i><%= locale.published %>: <%= func.unix_time_to_date_format(post.pubdate) %></i><br/>
</div>
<div id="post-editdate">
<i><%= locale.last_modified %>: <%= func.unix_time_to_date_format(post.pubdate) %></i><br/>
</div>
</div>
<div id="post-commentform">
<!-- Comment form -->
<form method="POST" action="/submit_comment">
<input type="hidden" name="post_index" value="<%= post["id"] %>">
<label><%= locale.username %>:</label><br/><input name="name"><br/><br/>
<label><%= locale.comment %>:</label><br/><textarea name="content"></textarea><br/>
<button type="submit"><%= locale.submit %></button>
</form>
</div>
<div id="post-comments">
<% comments.forEach((comment, index) => { %>
<div id="comment-no-<%= post.id %>-<%= comment.id %>" class="comment post-comment-<%= index %>">
<%- include('../partials/comment', {comment: comment}) %>
</div>
<% }) %>
</div>
<%- config.seperator %>