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