data.getdata() is fully implemented

I think it all works now...

Signed-off-by: deadvey <deadvey@deadvey.com>
This commit is contained in:
2025-09-24 19:31:32 +01:00
parent e597fd78f7
commit 22a7983737
10 changed files with 28 additions and 16 deletions

View File

@@ -6,7 +6,7 @@
<body>
<form action="/submit_edit_post" method="POST" onsubmit="sha512password()">
<input name="userID" type="hidden" value="<%= post['userID'] %>">
<input name="postID" type="hidden" value="<%= post_id %>">
<input name="postID" type="hidden" value="<%= postID %>">
<label><%= locale.password %>:</label><br/>
<input type="password" required id="password" name="password"><br/><br/>

View File

@@ -1,7 +1,7 @@
<h1>
<%= user.prettyname %>
</h1>
<p><%# func.render_md(user.description) %></p>
<p><%- func.render_md(user.description) %></p>
<a href="<%= config.edit_account_base_url %>/<%= userID %>"><%= locale.edit_account %></a><br/>
<a href="/user/<%= user.username %>/rss"><%= locale.rss_feed %></a><br/>
<a href="/user/<%= user.username %>/atom"><%= locale.atom_feed %></a>

View File

@@ -21,7 +21,7 @@
Comments:<br/>
<% for (let postID = 0; postID < comments.length; postID++) { %>
<% for (let comment_index = 0; comment_index < comments[postID].length; comment_index++) { %>
<a href="/comment/<%= comments[postID][comment_index]["id"] %>"><%= comments[postID][comment_index]["id"] %></a><br/>
<a href="/comment/<%= postID %>-<%= comment_index %>"><%= postID %>-<%= comment_index %></a><br/>
<% }; %>
<% }; %>
Users:<br/>
@@ -33,13 +33,13 @@
Edit Posts:<br/>
<% for (let postID = 0; postID < posts.length; postID++) { %>
<% if (posts[postID]["deleted"] != true) { %>
<a href="/<%= config.edit_post_base_url %>/<%= postID %>">Edit <%= posts[postID]["title"] %></a><br/>
<a href="<%= config.edit_post_base_url %>/<%= postID %>">Edit <%= posts[postID]["title"] %></a><br/>
<% }; %>
<% }; %>
Edit Users:<br/>
<% for (let userID = 0; userID < users.length; userID++) { %>
<% if (users[userID]["deleted"] != true) { %>
<a href="/<%= config.edit_account_base_url %>/<%= users[userID]["username"] %>">Edit <%= users[userID]["username"] %></a><br/>
<a href="<%= config.edit_account_base_url %>/<%= users[userID]["username"] %>">Edit <%= users[userID]["username"] %></a><br/>
<% }; %>
<% }; %>
<!-- TODO add tags -->

View File

@@ -6,7 +6,7 @@
<body>
<% for (let postID = 0; postID < comments.length; postID++) { %>
<% for (let comment_index = 0; comment_index < comments[postID].length; comment_index++) { %>
<a href="/comment/<%= comments[postID][comment_index]["id"] %>"><%= comments[postID][comment_index]["id"] %></a><br/>
<a href="/comment/<%= postID %>-<%= comment_index %>"><%= postID %>-<%= comment_index %></a><br/>
<% }; %>
<% }; %>
</body>

View File

@@ -13,7 +13,7 @@
<% if ( posts[index].deleted != true) { %>
<% posts[index].tags.forEach((current_tag, tag_index) => { %>
<% if (current_tag == tag) { %>
<%- include('../posts/tag', {post: posts[index], user: users[posts[index].userID], comments: comments[index]}); %>
<%- include('../posts/tag', {post: posts[index], postID: index, user: users[posts[index].userID], comments: comments[index]}); %>
<% } %>
<% }) %>
<% } %>