diff options
author | Tor Andersson <tor@ccxvii.net> | 2022-06-20 09:50:19 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2022-06-21 12:25:52 +0200 |
commit | 97f041de8cb593d46ccb15141d92e1984d9847d1 (patch) | |
tree | 4826a72780bbd7546a20590e0b6e9ecbb81572f0 | |
parent | 28dbcd115dc23d920bf30de512a63efed8eeb58f (diff) | |
download | server-97f041de8cb593d46ccb15141d92e1984d9847d1.tar.gz |
Some more mobile friendly layout tuning.
-rw-r--r-- | schema.sql | 4 | ||||
-rw-r--r-- | views/forum_view.pug | 11 | ||||
-rw-r--r-- | views/index.pug | 24 |
3 files changed, 17 insertions, 22 deletions
@@ -180,12 +180,12 @@ create view thread_view as author.name as author_name, ( select - count(*) - 1 + count(*) from posts where posts.thread_id = threads.thread_id - ) as replies, + ) as count, ( select max(posts.mtime) diff --git a/views/forum_view.pug b/views/forum_view.pug index 6100e60..990d3d3 100644 --- a/views/forum_view.pug +++ b/views/forum_view.pug @@ -7,7 +7,6 @@ html meta(http-equiv="refresh" content=3600) style. tbody a { display: block } - td:nth-child(3) { text-align: right } body include header article @@ -17,16 +16,14 @@ html thead tr th Subject - th Author - th Replies - th Time + th + th tbody each row in threads tr td: a(href="/forum/thread/"+row.thread_id)= row.subject - td: a(href="/user/"+row.author_name)= row.author_name - td= row.replies - td= row.mtime + td.r= row.count + td.w= row.mtime tfoot tr td(colspan=4) diff --git a/views/index.pug b/views/index.pug index 85cc130..1b9ef21 100644 --- a/views/index.pug +++ b/views/index.pug @@ -8,25 +8,21 @@ html title= SITE_NAME style. div.list { - max-width: 800px; - display: flex; - flex-wrap: wrap; - justify-content: left; + display: grid; + grid-template-columns: repeat(auto-fit, minmax(0, 160px)); + gap: 16px; } - div.list div { - min-width: 150px; - margin: 10px 15px; + div.item { text-align: center; } - div.list a:not(:hover) { + div.item a:not(:hover) { color: black; text-decoration: none; } - div.list img { + div.item img { box-shadow: 2px 2px 4px 0px rgba(0,0,0,0.5); height: 200px; margin: 5px auto; - display: block; } body include header @@ -41,8 +37,10 @@ html each title in titles unless title.is_hidden - let cover = "/" + title.title_id + "/cover" - div - +gamecover(title.title_id) - | #{title.title_name} + div.item + div + +gamecover(title.title_id) + div + a(href="/"+title.title_id)= title.title_name p!= process.env.SITE_INVITE |