Added locale (english only at the moment) and modifed the EJS so I think

every string is customisable (via the /locales/selected locale)
This commit is contained in:
2025-08-09 16:57:31 +01:00
parent 8418318d80
commit 6fc1f85e18
17 changed files with 187 additions and 80 deletions

View File

@@ -2,14 +2,15 @@
<%= post.title %>
</h3>
<%- converter.makeHtml(post.content) %><br/>
<a href="/post/<%- index %>">Permalink</a><br/>
<a href="/post/<%- index %>"><%= locale.permalink %></a><br/>
<br/>
<!-- Comment form -->
<form method="POST" action="/submit_comment">
<input type="hidden" name="post_index" value="<%= index %>">
<input placeholder="username" name="name"><br/>
<textarea placeholder="comment" name="content"></textarea><br/>
<button type="submit">Submit</button>
<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>
<% comments[index].forEach((comment, index) => { %>