mirror of
https://github.com/Akif9748/akf-forum.git
synced 2024-12-22 15:49:08 +03:00
Fix for threads page, black theme
This commit is contained in:
parent
7ecf0a51de
commit
ccbc1b8e45
6 changed files with 9 additions and 10 deletions
|
@ -41,12 +41,11 @@ Akf-forum has got an API for AJAX (fetch), other clients etc. And, you can learn
|
|||
- mod role, permissions
|
||||
- Fix footer's location.
|
||||
- upload other photos, model for it
|
||||
- category system bloat.
|
||||
- categories page is need a update.
|
||||
- preview for send messages in markdown format.
|
||||
- Limits for thread title, message content, username, user about
|
||||
- desp => description
|
||||
- threads title and desp black theme, center
|
||||
- scroll
|
||||
|
||||
## Major Version History
|
||||
- V4: Caching
|
||||
- V3: New Theme
|
||||
|
|
|
@ -42,8 +42,8 @@ app.get("/threads", async (req, res) => {
|
|||
if (req.query.authorID) query.authorID = req.query.authorID;
|
||||
const threads = await ThreadModel.find(query, null, req.so)
|
||||
res.reply("threads", {
|
||||
threads, page: req.page, title: "Threads with query " + req.query.q,
|
||||
pages: Math.ceil(await ThreadModel.count(query) / 10)
|
||||
threads, page: req.page, title: `Threads with query '${req.query.q}'`,
|
||||
pages: Math.ceil(await ThreadModel.count(query) / 10), desp: `${threads.length} threads are listed`
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ app.get("/", async (req, res) => {
|
|||
let threads = await ThreadModel.find(query).limit(10).skip(page * 10);
|
||||
threads = await Promise.all(threads.map(thread => thread.get_author()));
|
||||
|
||||
return res.reply("threads", { threads, page, title: "Threads", desp: threads.length + " thread listed", pages: Math.ceil(await ThreadModel.count(query) / 10) });
|
||||
return res.reply("threads", { threads, page, title: "Threads", desp: threads.length + " threads are listed", pages: Math.ceil(await ThreadModel.count(query) / 10) });
|
||||
});
|
||||
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<a id="login" href="/login" class="btn-primary">Login</a>
|
||||
<a href="/register" class="btn-outline-primary">Register</a>
|
||||
<script>
|
||||
document.getElementById("login").href += "?redirect=" + window.location.pathname;
|
||||
document.getElementById("login").href += "?redirect=" + location.pathname;
|
||||
</script>
|
||||
<% } %>
|
||||
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
|
||||
|
||||
<div style="text-align:center;padding:8px">
|
||||
<div class="title" id="title"><%= thread.title %></div>
|
||||
<a href="/categories/<%= thread.categoryID %>" class="title" id="title"><%= thread.title %></a>
|
||||
<div class="date">
|
||||
<%= new Date(thread.time).toLocaleString() %> • Views: <%= thread.views %>%>
|
||||
<%= new Date(thread.time).toLocaleString() %> • Views: <%= thread.views %>
|
||||
</div>
|
||||
<div class="date">
|
||||
<a style="color: var(--anti);" href="/users/<%= thread.author.id %>"><%= thread.author.name %></a> <%= "• "+(thread.edited ? "Edited" : "Not edited")%>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<html lang="en">
|
||||
<%- include("extra/meta", {title: "Thread list!" }) %>
|
||||
|
||||
<body>
|
||||
<body style="color: var(--anti); text-align: center;">
|
||||
<link href='https://unpkg.com/boxicons@2.1.2/css/boxicons.min.css' rel='stylesheet'>
|
||||
|
||||
<link rel="stylesheet" href="/css/threads.css" />
|
||||
|
|
Loading…
Reference in a new issue