From 1245306d6dc13403b65207954da5b3a61c6933c2 Mon Sep 17 00:00:00 2001 From: Thomas Lynch Date: Wed, 15 Dec 2021 12:56:17 +1100 Subject: [PATCH] =?UTF-8?q?change=20"x"=20button=20for=20.close=20to=20be?= =?UTF-8?q?=20=C3=97=20(multiplication=20symbol),=20looks=20better.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gulp/res/css/style.css | 7 ++++++- gulp/res/js/localstorage.js | 1 + gulp/res/js/pugfilters.js | 4 ++-- gulp/res/js/titlescroll.js | 6 ++---- gulp/res/js/uploaditem.js | 2 +- gulp/res/js/watchedthread.js | 2 +- views/includes/postform.pug | 4 ++-- views/mixins/filters.pug | 2 +- views/mixins/modal.pug | 2 +- views/mixins/uploaditem.pug | 2 +- views/mixins/watchedthread.pug | 2 +- 11 files changed, 19 insertions(+), 15 deletions(-) diff --git a/gulp/res/css/style.css b/gulp/res/css/style.css index 70963087..0940766f 100644 --- a/gulp/res/css/style.css +++ b/gulp/res/css/style.css @@ -456,6 +456,7 @@ p { margin-left: auto; width: 25px; cursor: pointer; + font-size: initial; } .reports { @@ -1210,10 +1211,14 @@ input[type="file"] { } .watched-thread a { - width: unset; margin-right: 5px; } +.watched-thread .close { + margin-left: 0px; + width: 1em; +} + .watched-thread[data-unread]::after { content: "(" attr(data-unread) ")"; font-weight: bold; diff --git a/gulp/res/js/localstorage.js b/gulp/res/js/localstorage.js index d5cb1140..e8649682 100644 --- a/gulp/res/js/localstorage.js +++ b/gulp/res/js/localstorage.js @@ -48,6 +48,7 @@ setDefaultLocalStorage('notifications', settings.notificationsEnabled); setDefaultLocalStorage('notification-yous-only', settings.notificationsYousOnly); setDefaultLocalStorage('yous-setting', settings.showYous); setDefaultLocalStorage('threadwatcher', settings.threadWatcher); +setDefaultLocalStorage('threadwatcher-minimise', false); setDefaultLocalStorage('disableboardcss', false); setDefaultLocalStorage('filters1', '[]'); diff --git a/gulp/res/js/pugfilters.js b/gulp/res/js/pugfilters.js index 8a903843..3cf8fd12 100644 --- a/gulp/res/js/pugfilters.js +++ b/gulp/res/js/pugfilters.js @@ -14,14 +14,14 @@ if (filterArr.length > 0) { if ('number' == typeof $$obj.length) { for (var pug_index0 = 0, $$l = $$obj.length; pug_index0 < $$l; pug_index0++) { var filter = $$obj[pug_index0]; -pug_html = pug_html + "\u003Ctr\u003E\u003Ctd\u003E" + (pug_escape(null == (pug_interp = filterTypeMap[filter.type]) ? "" : pug_interp)) + "\u003C\u002Ftd\u003E\u003Ctd\u003E" + (pug_escape(null == (pug_interp = filter.val.toString()) ? "" : pug_interp)) + "\u003C\u002Ftd\u003E\u003Ctd\u003E\u003Cinput" + (pug_attr("disabled", true, true, false)+" type=\"checkbox\""+pug_attr("checked", filter.type.endsWith('r'), true, false)) + "\u002F\u003E\u003C\u002Ftd\u003E\u003Ctd\u003E\u003Ca" + (" class=\"right close\""+pug_attr("data-type", filter.type, true, false)+pug_attr("data-data", filter.val, true, false)) + "\u003EX\u003C\u002Fa\u003E\u003C\u002Ftd\u003E\u003C\u002Ftr\u003E"; +pug_html = pug_html + "\u003Ctr\u003E\u003Ctd\u003E" + (pug_escape(null == (pug_interp = filterTypeMap[filter.type]) ? "" : pug_interp)) + "\u003C\u002Ftd\u003E\u003Ctd\u003E" + (pug_escape(null == (pug_interp = filter.val.toString()) ? "" : pug_interp)) + "\u003C\u002Ftd\u003E\u003Ctd\u003E\u003Cinput" + (pug_attr("disabled", true, true, false)+" type=\"checkbox\""+pug_attr("checked", filter.type.endsWith('r'), true, false)) + "\u002F\u003E\u003C\u002Ftd\u003E\u003Ctd\u003E\u003Ca" + (" class=\"right close\""+pug_attr("data-type", filter.type, true, false)+pug_attr("data-data", filter.val, true, false)) + "\u003E×\u003C\u002Fa\u003E\u003C\u002Ftd\u003E\u003C\u002Ftr\u003E"; } } else { var $$l = 0; for (var pug_index0 in $$obj) { $$l++; var filter = $$obj[pug_index0]; -pug_html = pug_html + "\u003Ctr\u003E\u003Ctd\u003E" + (pug_escape(null == (pug_interp = filterTypeMap[filter.type]) ? "" : pug_interp)) + "\u003C\u002Ftd\u003E\u003Ctd\u003E" + (pug_escape(null == (pug_interp = filter.val.toString()) ? "" : pug_interp)) + "\u003C\u002Ftd\u003E\u003Ctd\u003E\u003Cinput" + (pug_attr("disabled", true, true, false)+" type=\"checkbox\""+pug_attr("checked", filter.type.endsWith('r'), true, false)) + "\u002F\u003E\u003C\u002Ftd\u003E\u003Ctd\u003E\u003Ca" + (" class=\"right close\""+pug_attr("data-type", filter.type, true, false)+pug_attr("data-data", filter.val, true, false)) + "\u003EX\u003C\u002Fa\u003E\u003C\u002Ftd\u003E\u003C\u002Ftr\u003E"; +pug_html = pug_html + "\u003Ctr\u003E\u003Ctd\u003E" + (pug_escape(null == (pug_interp = filterTypeMap[filter.type]) ? "" : pug_interp)) + "\u003C\u002Ftd\u003E\u003Ctd\u003E" + (pug_escape(null == (pug_interp = filter.val.toString()) ? "" : pug_interp)) + "\u003C\u002Ftd\u003E\u003Ctd\u003E\u003Cinput" + (pug_attr("disabled", true, true, false)+" type=\"checkbox\""+pug_attr("checked", filter.type.endsWith('r'), true, false)) + "\u002F\u003E\u003C\u002Ftd\u003E\u003Ctd\u003E\u003Ca" + (" class=\"right close\""+pug_attr("data-type", filter.type, true, false)+pug_attr("data-data", filter.val, true, false)) + "\u003E×\u003C\u002Fa\u003E\u003C\u002Ftd\u003E\u003C\u002Ftr\u003E"; } } }).call(this); diff --git a/gulp/res/js/titlescroll.js b/gulp/res/js/titlescroll.js index bd9d896b..819e64b5 100644 --- a/gulp/res/js/titlescroll.js +++ b/gulp/res/js/titlescroll.js @@ -24,10 +24,8 @@ window.addEventListener('DOMContentLoaded', (event) => { const updateTitle = () => { if (unread.length === 0) { document.title = originalTitle; -// changeFavicon('/favicon.ico'); } else { document.title = `(${unread.length}) ${originalTitle}`; -// changeFavicon('/file/favicon2.ico'); } } @@ -49,8 +47,8 @@ window.addEventListener('DOMContentLoaded', (event) => { } } - window.onfocus = focusChange; - window.onblur = focusChange; + window.addEventListener('focus', focusChange); + window.addEventListener('blur', focusChange); window.addEventListener('scroll', updateVisible); window.addEventListener('addPost', function(e) { diff --git a/gulp/res/js/uploaditem.js b/gulp/res/js/uploaditem.js index aacd407e..4d0d78ea 100644 --- a/gulp/res/js/uploaditem.js +++ b/gulp/res/js/uploaditem.js @@ -6,7 +6,7 @@ var pug_match_html=/["&<>]/;function uploaditem(locals) {var pug_html = "", pug_ (function (uploaditem) { pug_mixins["uploaditem"] = pug_interp = function(item){ var block = (this && this.block), attributes = (this && this.attributes) || {}; -pug_html = pug_html + "\u003Cdiv\u003E\u003Cdiv class=\"upload-item\"\u003E\u003Cimg" + (" class=\"upload-thumb\""+pug_attr("src", item.url, true, false)) + "\u002F\u003E\u003Cp\u003E" + (pug_escape(null == (pug_interp = item.name) ? "" : pug_interp)) + "\u003C\u002Fp\u003E\u003Ca class=\"close\"\u003EX\u003C\u002Fa\u003E\u003C\u002Fdiv\u003E"; +pug_html = pug_html + "\u003Cdiv\u003E\u003Cdiv class=\"upload-item\"\u003E\u003Cimg" + (" class=\"upload-thumb\""+pug_attr("src", item.url, true, false)) + "\u002F\u003E\u003Cp\u003E" + (pug_escape(null == (pug_interp = item.name) ? "" : pug_interp)) + "\u003C\u002Fp\u003E\u003Ca class=\"close\"\u003E×\u003C\u002Fa\u003E\u003C\u002Fdiv\u003E"; if (item.hash) { pug_html = pug_html + "\u003Cdiv class=\"row sb\"\u003E"; if (item.spoilers) { diff --git a/gulp/res/js/watchedthread.js b/gulp/res/js/watchedthread.js index bc51b9b4..9e806cc4 100644 --- a/gulp/res/js/watchedthread.js +++ b/gulp/res/js/watchedthread.js @@ -6,7 +6,7 @@ var pug_match_html=/["&<>]/;function watchedthread(locals) {var pug_html = "", p (function (watchedthread) { pug_mixins["watchedthread"] = pug_interp = function(thread){ var block = (this && this.block), attributes = (this && this.attributes) || {}; -pug_html = pug_html + "\u003Cdiv" + (" class=\"row watched-thread\""+pug_attr("data-id", `${thread.board}-${thread.postId}`, true, false)+pug_attr("data-unread", (thread.unread||null), true, false)) + "\u003E\u003Ca class=\"close\"\u003EX\u003C\u002Fa\u003E"; +pug_html = pug_html + "\u003Cdiv" + (" class=\"row watched-thread\""+pug_attr("data-id", `${thread.board}-${thread.postId}`, true, false)+pug_attr("data-unread", (thread.unread||null), true, false)) + "\u003E\u003Ca class=\"close\"\u003E×\u003C\u002Fa\u003E"; const watchedThreadLink = `/${thread.board}/thread/${thread.postId}.html`; pug_html = pug_html + "\u003Ca" + (pug_attr("href", watchedThreadLink, true, false)) + "\u003E\u002F" + (pug_escape(null == (pug_interp = thread.board) ? "" : pug_interp)) + "\u002F - " + (pug_escape(null == (pug_interp = thread.subject || 'No subject') ? "" : pug_interp)) + "\u003C\u002Fa\u003E\u003Ca" + (pug_attr("href", `${watchedThreadLink}#bottom`, true, false)) + "\u003E[▼]\u003C\u002Fa\u003E\u003C\u002Fdiv\u003E"; }; diff --git a/views/includes/postform.pug b/views/includes/postform.pug index 7831bb7a..a5cd99e1 100644 --- a/views/includes/postform.pug +++ b/views/includes/postform.pug @@ -15,13 +15,13 @@ section.form-wrapper.flex-center .label Sage label.postform-style.ph-5 input(type='checkbox', name='email', value='sage') - a.close.postform-style(href='#!') X + a.close.postform-style(href='#!') × include ./subjectfield.pug else section.row .label Name input.mr-1(type='text', name='name', placeholder=board.settings.defaultName maxlength=globalLimits.fieldLength.name) - a.close.postform-style(href='#!') X + a.close.postform-style(href='#!') × if board.settings.sageOnlyEmail section.row .label Sage diff --git a/views/mixins/filters.pug b/views/mixins/filters.pug index 7d7f79a4..f053290b 100644 --- a/views/mixins/filters.pug +++ b/views/mixins/filters.pug @@ -6,6 +6,6 @@ mixin filters(filterArr) td #{filterTypeMap[filter.type]} td #{filter.val.toString()} td: input(disabled type='checkbox' checked=filter.type.endsWith('r')) - td: a.right.close(data-type=filter.type data-data=filter.val) X + td: a.right.close(data-type=filter.type data-data=filter.val) × else td(colspan=4) No Filters diff --git a/views/mixins/modal.pug b/views/mixins/modal.pug index 2c63549d..cfa069c2 100644 --- a/views/mixins/modal.pug +++ b/views/mixins/modal.pug @@ -3,7 +3,7 @@ mixin modal(data) .modal(id=(data.settings ? 'settingsmodal' : '') style=data.hidden?'display:none':'') .row p.bold #{data.title} - a.close.postform-style#modalclose X + a.close.postform-style#modalclose × if data.message || data.messages || data.error || data.errors .row ul.nomarks diff --git a/views/mixins/uploaditem.pug b/views/mixins/uploaditem.pug index a6da14ec..6cd3c112 100644 --- a/views/mixins/uploaditem.pug +++ b/views/mixins/uploaditem.pug @@ -3,7 +3,7 @@ mixin uploaditem(item) .upload-item img.upload-thumb(src=item.url) p #{item.name} - a.close X + a.close × if item.hash .row.sb if item.spoilers diff --git a/views/mixins/watchedthread.pug b/views/mixins/watchedthread.pug index 30a0cfd4..1eded595 100644 --- a/views/mixins/watchedthread.pug +++ b/views/mixins/watchedthread.pug @@ -1,6 +1,6 @@ mixin watchedthread(thread) .row.watched-thread(data-id=`${thread.board}-${thread.postId}` data-unread=(thread.unread||null)) - a.close X + a.close × - const watchedThreadLink = `/${thread.board}/thread/${thread.postId}.html`; a(href=watchedThreadLink) /#{thread.board}/ - #{thread.subject || 'No subject'} a(href=`${watchedThreadLink}#bottom`) [▼]