diff --git a/forms.tmpl b/forms.tmpl index c51c41e..8bf1fe5 100644 --- a/forms.tmpl +++ b/forms.tmpl @@ -112,13 +112,13 @@ # count = 0 # let posts = getAllRows(db, query, threadId, $((c.pageNum-1) * PostsPerPage), $PostsPerPage)
-
+
forum index > ${posts[0][postHeader]}
-
???
?
+
???
?
# for row in posts: diff --git a/forum.nim b/forum.nim index 2247bf0..2e3148a 100644 --- a/forum.nim +++ b/forum.nim @@ -427,6 +427,10 @@ proc login(c: var TForumData, name, pass: string): bool = else: return c.setError("password", "Login failed!") +proc hasReplyBtn(c: var TForumData): bool = + result = c.req.pathInfo != "/donewthread" and c.req.pathInfo != "/doreply" + return c.threadId >= 0 and result + proc genActionMenu(c: var TForumData): string = result = "" var btns: seq[TStyledButton] = @[] diff --git a/main.tmpl b/main.tmpl index 4789387..d5417cb 100644 --- a/main.tmpl +++ b/main.tmpl @@ -82,7 +82,7 @@
${genPagenumNav(c, stats)}
- #else: + #elif hasReplyBtn(c):
diff --git a/public/css/style.css b/public/css/style.css index e3aa313..e7481d5 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -469,6 +469,7 @@ pre .end { background:url("/images/tabEnd.png") no-repeat left bottom; } #talk-info > .info-post { width: 85%; } #talk-head > .user, #talk-info > .user { width:20%; background:rgba(0,0,0,.2); } + #talk-head > .user-post, #talk-info > .user-post { width: 15%; background:rgba(0,0,0,.2); } #talk-info > .user-post > div > .reply { font-weight:bold; padding-left:22px; background:url("/images/forum-reply.png") no-repeat left; } #talk-head > div > div,