summaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-09-11 15:21:24 +0200
committerTor Andersson <tor@ccxvii.net>2023-09-15 19:38:13 +0200
commitf5ea88328ef1b4dabd5f58b4c78ad4e175c96765 (patch)
tree7ae9b9cf8b1e1d44b3dbd18ae6a6e26f39c2f11f /views
parent55625376e409a96bda56a65dfd8266c6dcb215da (diff)
downloadserver-f5ea88328ef1b4dabd5f58b4c78ad4e175c96765.tar.gz
Add user links to join page.
Diffstat (limited to 'views')
-rw-r--r--views/contacts.pug4
-rw-r--r--views/forum_search.pug4
-rw-r--r--views/forum_view.pug8
-rw-r--r--views/head.pug7
-rw-r--r--views/join.pug46
-rw-r--r--views/message_inbox.pug4
-rw-r--r--views/message_outbox.pug4
-rw-r--r--views/stats.pug2
8 files changed, 39 insertions, 40 deletions
diff --git a/views/contacts.pug b/views/contacts.pug
index 62840f9..78f1f5b 100644
--- a/views/contacts.pug
+++ b/views/contacts.pug
@@ -25,7 +25,7 @@ html
each who in friends
tr
td
- a(href="/user/"+who.name)= who.name
+ a.black(href="/user/"+who.name)= who.name
td= who.atime
td.r
a.blue(href="/message/send/"+who.name) &#x1f4dd;
@@ -46,7 +46,7 @@ html
each who in enemies
tr
td
- a(href="/user/"+who.name)= who.name
+ a.black(href="/user/"+who.name)= who.name
td.r
a.red(href="/contact/remove/"+who.name) &#x274c;
else
diff --git a/views/forum_search.pug b/views/forum_search.pug
index 1301b76..f7d1b42 100644
--- a/views/forum_search.pug
+++ b/views/forum_search.pug
@@ -18,8 +18,8 @@ html
tobdy
each row in results
tr
- td: a(href="/user/"+row.author)= row.author
- td: a(href="/forum/thread/"+row.thread_id+"#"+row.post_id)= row.subject
+ td: a.black(href="/user/"+row.author)= row.author
+ td: a.black(href="/forum/thread/"+row.thread_id+"#"+row.post_id)= row.subject
td= row.snippet
if user
diff --git a/views/forum_view.pug b/views/forum_view.pug
index ac9201d..1f70c8c 100644
--- a/views/forum_view.pug
+++ b/views/forum_view.pug
@@ -23,24 +23,24 @@ html
each row in threads
tr(class=row.is_read?"read":"unread")
td
- a(href="/forum/thread/"+row.thread_id)= row.subject
+ a.black(href="/forum/thread/"+row.thread_id)= row.subject
td.r= row.count
td.w= row.mtime
tfoot
tr
td(colspan=4)
if current_page > 1
- | #[a(href="/forum/page/"+(current_page-1)) &#x2190;]
+ | #[a.black(href="/forum/page/"+(current_page-1)) &#x2190;]
|
- for (let p=1; p<=page_count && p<=30; ++p)
if p === current_page
| (#{p})
|
else
- | #[a(href="/forum/page/"+p)= p]
+ | #[a.black(href="/forum/page/"+p)= p]
|
if current_page < page_count
- | #[a(href="/forum/page/"+(current_page+1)) &#x2192;]
+ | #[a.black(href="/forum/page/"+(current_page+1)) &#x2192;]
if user
p
diff --git a/views/head.pug b/views/head.pug
index fa2b042..0fc415b 100644
--- a/views/head.pug
+++ b/views/head.pug
@@ -43,8 +43,8 @@ mixin gamelist(list,hide_title=0)
div
-
let className = "game_item"
+ let chat_icon = ""
if (item.your_turn) className += " your_turn"
- if (item.is_unread) className += " unread"
if (item.status === 0 && item.join_count === 0) className += " open replacement"
else if (item.status === 0 && item.join_count !== item.player_count) className += " open"
else if (item.status === 0 && item.join_count === item.player_count) className += " ready"
@@ -52,15 +52,16 @@ mixin gamelist(list,hide_title=0)
else if (item.status === 1 && item.join_count === item.player_count) className += " active"
else if (item.status === 2) className += " finished"
else if (item.status === 3) className += " archived"
+ if (item.is_unread) chat_icon = "\u{1f4dd}"
div(class=className)
div.game_head
if item.scenario.length <= 2
div
- | <a href="/join/#{item.game_id}">#{item.game_id} &#x2013; #{item.title_name} (#{item.scenario})</a>
+ | <a href="/join/#{item.game_id}">#{item.game_id} &#x2013; #{item.title_name} (#{item.scenario})</a> #{chat_icon}
else
div
- | <a href="/join/#{item.game_id}">#{item.game_id} &#x2013; #{item.title_name}</a>
+ | <a href="/join/#{item.game_id}">#{item.game_id} &#x2013; #{item.title_name}</a> #{chat_icon}
case item.status
when 0
diff --git a/views/join.pug b/views/join.pug
index 2e6bf08..ced1fe3 100644
--- a/views/join.pug
+++ b/views/join.pug
@@ -10,14 +10,13 @@ html
style.
table { min-width: 0; }
th,td { border: 1px solid black; }
- td a.red { text-decoration: none; color: brown; font-size: 15px; float: right; }
- td a.green { text-decoration: none; color: green; font-size: 15px; float: right; }
- td a { text-decoration: underline; color: blue; }
+ a.red { text-decoration: none; color: brown; font-size: 15px; float: right; }
+ a.green { text-decoration: none; color: green; font-size: 15px; float: right; }
th { white-space: nowrap; background-color: gainsboro; }
td { width: 180px; background-color: white; }
#message { background-color: whitesmoke; }
.hide { display: none; }
- td.is_invite { color: gray }
+ td.is_invite { background-color: honeydew }
td.enemy { background-color: #f66 }
td.enemy::before { content: "\1f6ab "; color: #000; font-size: 15px; }
script.
@@ -33,34 +32,33 @@ html
body
include header
article
- h1= game.title_name
+ if game.scenario === "Standard"
+ h1 #{game.title_name}
+ else
+ h1 #{game.title_name} - #{game.scenario}
p.error#error
div.logo
+gamecover(game.title_id)
- div Scenario: #{game.scenario}
-
- unless game.human_options === "None"
- div Options: #{game.human_options}
-
if game.owner_id
- div
- if game.is_private
- | Owner: <a href="/user/#{game.owner_name}">#{game.owner_name}</a> (private)
- else
- | Owner: <a href="/user/#{game.owner_name}">#{game.owner_name}</a>
+ if game.is_private
+ p Created #{game.ctime} by <a class="black" href="/user/#{game.owner_name}">#{game.owner_name}</a> (private).
+ else
+ p Created #{game.ctime} by <a class="black" href="/user/#{game.owner_name}">#{game.owner_name}</a>.
+ else
+ p Created #{game.ctime}.
- div Created: #{game.ctime}
- unless game.mtime === "never"
- div Changed: #{game.mtime}
+ if game.status > 1
+ p Finished #{game.mtime}.
+ else if game.mtime !== "never"
+ p Last changed #{game.mtime}.
- if game.status === 2
- div Result: #{game.result}
+ unless game.human_options === "None"
+ p Options: #{game.human_options}.
if game.notice
- br
- div
+ p
i= game.notice
br(clear="left")
@@ -83,9 +81,9 @@ html
each role in roles
tr
th(id="role_"+role.replace(/ /g, "_")+"_name")= role
- td.command(id="role_"+role.replace(/ /g, "_")) -
+ td(id="role_"+role.replace(/ /g, "_")) -
tr
- td.command#message(colspan=2) -
+ td#message(colspan=2) -
p
button.hide#delete_button(onclick="confirm_delete()") Delete
diff --git a/views/message_inbox.pug b/views/message_inbox.pug
index 10c4626..0e39ea2 100644
--- a/views/message_inbox.pug
+++ b/views/message_inbox.pug
@@ -25,9 +25,9 @@ html
each row in messages
tr
td
- a(href="/user/"+row.from_name)= row.from_name
+ a.black(href="/user/"+row.from_name)= row.from_name
td(class=row.is_read?"read":"unread")
- a(href="/message/read/"+row.message_id)= row.subject
+ a.black(href="/message/read/"+row.message_id)= row.subject
td= row.time
else
tr
diff --git a/views/message_outbox.pug b/views/message_outbox.pug
index 5da84c6..267a8b3 100644
--- a/views/message_outbox.pug
+++ b/views/message_outbox.pug
@@ -29,8 +29,8 @@ html
tbody
each row in messages
tr
- td: a(href="/user/"+row.to_name)= row.to_name
- td: a(href="/message/read/"+row.message_id)= row.subject
+ td: a.black(href="/user/"+row.to_name)= row.to_name
+ td: a.black(href="/message/read/"+row.message_id)= row.subject
td= row.time
else
tr
diff --git a/views/stats.pug b/views/stats.pug
index 4d275b0..6c8a268 100644
--- a/views/stats.pug
+++ b/views/stats.pug
@@ -20,7 +20,7 @@ html
thead
tr
th
- a(href="/"+row.title_id)= row.title_name
+ a.black(href="/"+row.title_id)= row.title_name
unless row.scenario === "Standard"
| &#x2013; #{row.scenario}
th= row.total