Compare commits
2 commits
master
...
mobile_fix
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9bab05a6af | ||
|
|
eee155f343 |
4 changed files with 23 additions and 18 deletions
|
|
@ -51,6 +51,7 @@ $logo-height: $navbar-height - 20px;
|
||||||
// Unfortunately we must colour the controls in the navbar manually.
|
// Unfortunately we must colour the controls in the navbar manually.
|
||||||
.search-input {
|
.search-input {
|
||||||
@extend .form-input;
|
@extend .form-input;
|
||||||
|
min-width: 120px;
|
||||||
border-color: $navbar-border-color-dark;
|
border-color: $navbar-border-color-dark;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -128,6 +129,9 @@ $logo-height: $navbar-height - 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.category-status {
|
.category-status {
|
||||||
|
font-size: small;
|
||||||
|
font-weight: bold;
|
||||||
|
|
||||||
.topic-count {
|
.topic-count {
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
opacity: 0.7;
|
opacity: 0.7;
|
||||||
|
|
@ -258,7 +262,7 @@ $threads-meta-color: #545d70;
|
||||||
.category-color {
|
.category-color {
|
||||||
width: 0;
|
width: 0;
|
||||||
height: 0;
|
height: 0;
|
||||||
border: 0.3rem solid $default-category-color;
|
border: 0.25rem solid $default-category-color;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
|
|
@ -297,6 +301,10 @@ $threads-meta-color: #545d70;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.thread-replies, .thread-time, .thread-users, .views-text, .centered-header {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
.thread-time {
|
.thread-time {
|
||||||
color: $threads-meta-color;
|
color: $threads-meta-color;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ when defined(js):
|
||||||
tdiv(class="category-color",
|
tdiv(class="category-color",
|
||||||
style=style(
|
style=style(
|
||||||
(StyleAttr.border,
|
(StyleAttr.border,
|
||||||
kstring"0.3rem solid #" & category.color)
|
kstring"0.25rem solid #" & category.color)
|
||||||
))
|
))
|
||||||
span(class="category-name"):
|
span(class="category-name"):
|
||||||
text category.name
|
text category.name
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@ when defined(js):
|
||||||
return true
|
return true
|
||||||
|
|
||||||
proc genUserAvatars(users: seq[User]): VNode =
|
proc genUserAvatars(users: seq[User]): VNode =
|
||||||
result = buildHtml(td):
|
result = buildHtml(td(class="thread-users")):
|
||||||
for user in users:
|
for user in users:
|
||||||
render(user, "avatar avatar-sm", showStatus=true)
|
render(user, "avatar avatar-sm", showStatus=true)
|
||||||
text " "
|
text " "
|
||||||
|
|
@ -114,14 +114,13 @@ when defined(js):
|
||||||
if thread.isSolved:
|
if thread.isSolved:
|
||||||
italic(class="fas fa-check-square fa-xs",
|
italic(class="fas fa-check-square fa-xs",
|
||||||
title="Thread has a solution")
|
title="Thread has a solution")
|
||||||
a(href=makeUri("/t/" & $thread.id),
|
a(href=makeUri("/t/" & $thread.id), onClick=anchorCB):
|
||||||
onClick=anchorCB):
|
|
||||||
text thread.topic
|
text thread.topic
|
||||||
td(class=class({"d-none": not displayCategory})):
|
tdiv(class=class({"d-none": not displayCategory})):
|
||||||
render(thread.category)
|
render(thread.category)
|
||||||
genUserAvatars(thread.users)
|
genUserAvatars(thread.users)
|
||||||
td(): text $thread.replies
|
td(class="thread-replies"): text $thread.replies
|
||||||
td(class=class({
|
td(class="hide-sm" & class({
|
||||||
"views-text": thread.views < 999,
|
"views-text": thread.views < 999,
|
||||||
"popular-text": thread.views > 999 and thread.views < 5000,
|
"popular-text": thread.views > 999 and thread.views < 5000,
|
||||||
"super-popular-text": thread.views > 5000
|
"super-popular-text": thread.views > 5000
|
||||||
|
|
@ -209,12 +208,10 @@ when defined(js):
|
||||||
thead():
|
thead():
|
||||||
tr:
|
tr:
|
||||||
th(text "Topic")
|
th(text "Topic")
|
||||||
th(class=class({"d-none": not displayCategory})):
|
th(class="centered-header"): text "Users"
|
||||||
text "Category"
|
th(class="centered-header"): text "Replies"
|
||||||
th(style=style((StyleAttr.width, kstring"8rem"))): text "Users"
|
th(class="hide-sm centered-header"): text "Views"
|
||||||
th(text "Replies")
|
th(class="centered-header"): text "Activity"
|
||||||
th(text "Views")
|
|
||||||
th(text "Activity")
|
|
||||||
tbody():
|
tbody():
|
||||||
for i in 0 ..< list.threads.len:
|
for i in 0 ..< list.threads.len:
|
||||||
let thread = list.threads[i]
|
let thread = list.threads[i]
|
||||||
|
|
|
||||||
|
|
@ -113,18 +113,18 @@ proc categoriesUserTests(session: Session, baseUrl: string) =
|
||||||
ensureExists "#categories-list"
|
ensureExists "#categories-list"
|
||||||
|
|
||||||
click "#category-default"
|
click "#category-default"
|
||||||
checkText "#threads-list .thread-title", "Post 3"
|
checkText "#threads-list .thread-title a", "Post 3"
|
||||||
for element in session.waitForElements("#threads-list .category-name"):
|
for element in session.waitForElements("#threads-list .category-name"):
|
||||||
# Have to user "innerText" because elements are hidden on this page
|
# Have to user "innerText" because elements are hidden on this page
|
||||||
assert element.getProperty("innerText") == "Default"
|
assert element.getProperty("innerText") == "Default"
|
||||||
|
|
||||||
selectCategory "announcements"
|
selectCategory "announcements"
|
||||||
checkText "#threads-list .thread-title", "Post 2"
|
checkText "#threads-list .thread-title a", "Post 2"
|
||||||
for element in session.waitForElements("#threads-list .category-name"):
|
for element in session.waitForElements("#threads-list .category-name"):
|
||||||
assert element.getProperty("innerText") == "Announcements"
|
assert element.getProperty("innerText") == "Announcements"
|
||||||
|
|
||||||
selectCategory "fun"
|
selectCategory "fun"
|
||||||
checkText "#threads-list .thread-title", "Post 1"
|
checkText "#threads-list .thread-title a", "Post 1"
|
||||||
for element in session.waitForElements("#threads-list .category-name"):
|
for element in session.waitForElements("#threads-list .category-name"):
|
||||||
assert element.getProperty("innerText") == "Fun"
|
assert element.getProperty("innerText") == "Fun"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue