From eb12dd7700dfceff88d8d68acc720d86cdf90e05 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 9 Nov 2021 16:35:49 +0100 Subject: Add forum. --- views/forum_view.ejs | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 views/forum_view.ejs (limited to 'views/forum_view.ejs') diff --git a/views/forum_view.ejs b/views/forum_view.ejs new file mode 100644 index 0000000..7c3de75 --- /dev/null +++ b/views/forum_view.ejs @@ -0,0 +1,42 @@ +<%- include('header', { title: "Forum", refresh: 900 }) %> + + + + +<% threads.forEach((row) => { %> + + + +
SubjectAuthor +RepliesTime +
<%= row.subject %> +<%= row.author_name %> +<%= row.reply_count %> +<%= row.mtime %> +<% }); %> +
+<% +if (current_page > 1) { + %> <% +} +for (let p = 1; p <= page_count && p <= 30; ++p) { + if (p === current_page) { + %>(<%= p %>) <% + } else { + %><%= p %> <% + } +} +if (current_page < page_count) { + %> <% +} +%> +
+<% +if (user) { + %>

New thread<% +} +%> -- cgit v1.2.3