From 6c610f8e9bd1a5bef99ebe597416e8163d165a8c Mon Sep 17 00:00:00 2001 From: fatchan Date: Fri, 28 Jun 2019 16:08:19 +0000 Subject: [PATCH] remove unnecessary negative margin here and improve catalog appearance --- gulp/res/css/style.css | 9 +++++---- views/includes/pages.pug | 5 ++++- views/mixins/catalogtile.pug | 29 ++++++++++++++--------------- views/pages/home.pug | 6 +++--- 4 files changed, 26 insertions(+), 23 deletions(-) diff --git a/gulp/res/css/style.css b/gulp/res/css/style.css index 990796aa..18ef51e9 100644 --- a/gulp/res/css/style.css +++ b/gulp/res/css/style.css @@ -134,6 +134,7 @@ p { width: 64px; height: 64px; object-fit: cover; + margin: 5px; } .catalog { @@ -462,17 +463,17 @@ input textarea { .post-info { background-color: #00000010; border-bottom: 1px solid #00000010; - margin: -5px; + margin: -5px -5px 0 -5px; padding: 5px; padding-left: 3px; } .post-info * { - margin-bottom: 0; - margin-top: -2px; + /*margin-bottom: 0;*/ + /*margin-top: -2px;*/ } -.post-container.op .post-info, .catalog-tile .post-info { +.post-container.op .post-info { background: none; border: none; } diff --git a/views/includes/pages.pug b/views/includes/pages.pug index 41aaec96..a1b29fde 100644 --- a/views/includes/pages.pug +++ b/views/includes/pages.pug @@ -1,5 +1,8 @@ | Page: - for(let i = 1; i <= maxPage; i++) - a(class=`${page === i ? 'bold' : ''}` href=`/${board._id}/${i === 1 ? 'index' : i}.html`) [#{i}] + if page === i + a.bold(href=`/${board._id}/${i === 1 ? 'index' : i}.html`) [#{i}] + else + a(href=`/${board._id}/${i === 1 ? 'index' : i}.html`) #{i} | | | diff --git a/views/mixins/catalogtile.pug b/views/mixins/catalogtile.pug index 65941266..2d794989 100644 --- a/views/mixins/catalogtile.pug +++ b/views/mixins/catalogtile.pug @@ -1,15 +1,6 @@ mixin catalogtile(board, post, truncate) article(class='catalog-tile') - const postURL = `/${board._id}/thread/${post.postId}.html#${post.postId}` - if post.files.length > 0 - .post-file-src - a(href=postURL) - if post.spoiler - img(src='/img/spoiler.png' width='64' height='64') - else - object.catalog-thumb(data=`/img/thumb-${post.files[0].filename.split('.')[0]}.jpg` width='64' height='64') - img(src='/img/deleted.png' width='64' height='64') - br header.post-info if post.sticky img(src='/img/sticky.svg' height='12') @@ -20,11 +11,19 @@ mixin catalogtile(board, post, truncate) if post.locked img(src='/img/locked.svg' height='12') | - span: a.no-decoration.post-subject(href=postURL) #{post.subject || 'No Subject'} - br - span Replies: #{post.replyposts} - | - span Files: #{post.replyfiles} + span + a.no-decoration.post-subject(href=postURL) #{post.subject || 'No Subject #'+post.postId} + | - + | R: #{post.replyposts} + | / + | F: #{post.replyfiles} + if post.files.length > 0 + .post-file-src + a(href=postURL) + if post.spoiler + img.catalog-thumb(src='/img/spoiler.png' width='64' height='64') + else + object.catalog-thumb(data=`/img/thumb-${post.files[0].filename.split('.')[0]}.jpg` width='64' height='64') + img(src='/img/deleted.png' width='64' height='64') if post.message - br pre.no-m-p.post-message !{post.message} diff --git a/views/pages/home.pug b/views/pages/home.pug index c7d7a6bc..652873ce 100644 --- a/views/pages/home.pug +++ b/views/pages/home.pug @@ -17,14 +17,14 @@ block content | The most notable feature of imageboards and primary difference to traditional forums is | that anybody can make a post without the need to register an account or provide | any personal information. This way, what is said becomes more important than who says it. - | As new threads are started, the least recently replied to are pruned. This creates an + | Threads do not last forever and the least recently bumped threads are pruned as they fall off the last page. This creates an | element of transience and keeps making room for new content. p | Pick a board below to join the discussion. .table-container.flex-center.mv-10 table.table-body tr.table-head - th Board + th Id th Name th Description each board in boards @@ -41,4 +41,4 @@ block content p | The source code for this site is available a(href='https://github.com/fatchan/jschan/') here - | and is licensed under the Affero General Public License v3. + | (and in the footer of each page) and is licensed under the Affero General Public License v3.