From 3a11bae514e53ae8920a161450bb8d53df0451b7 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sun, 8 Nov 2015 17:08:03 -0800 Subject: [PATCH] Move board title rice to custom CSS. #393 --- src/General/Config.coffee | 4 ++-- src/General/Settings.coffee | 4 ++++ src/General/css/custom.css | 20 ++++++++++++++++++++ src/General/css/photon.css | 6 ------ src/General/css/style.css | 3 --- src/General/css/tomorrow.css | 6 ------ src/General/css/yotsuba-b.css | 6 ------ src/General/css/yotsuba.css | 6 ------ 8 files changed, 26 insertions(+), 29 deletions(-) create mode 100644 src/General/css/custom.css diff --git a/src/General/Config.coffee b/src/General/Config.coffee index 7d262a616..f6b57155b 100755 --- a/src/General/Config.coffee +++ b/src/General/Config.coffee @@ -728,7 +728,7 @@ Config = FappeT: werk: false - 'Custom CSS': false + 'Custom CSS': true Index: 'Index Mode': 'paged' @@ -787,7 +787,7 @@ Config = favicon: 'ferongr' - usercss: '' + usercss: `<%= importCSS('custom') %>` hotkeys: # QR & Options diff --git a/src/General/Settings.coffee b/src/General/Settings.coffee index 1e7396361..1686ff606 100755 --- a/src/General/Settings.coffee +++ b/src/General/Settings.coffee @@ -289,6 +289,10 @@ Settings = for boardID, record of changes['selectedArchives'] for type, name of record when name of uids record[type] = uids[name] + if compareString < '00001.00011.00016.00000' + if (rice = Config['usercss'].match(/\/\* Board title rice \*\/(?:\n.+)*/)[0]) + if data['usercss']? and data['usercss'].indexOf(rice) < 0 + changes['usercss'] = rice + '\n\n' + data['usercss'] changes loadSettings: (data, cb) -> diff --git a/src/General/css/custom.css b/src/General/css/custom.css new file mode 100644 index 000000000..f20284d8c --- /dev/null +++ b/src/General/css/custom.css @@ -0,0 +1,20 @@ +/* Board title rice */ +div.boardTitle { + font-weight: 400 !important; +} +:root.yotsuba div.boardTitle { + font-family: sans-serif !important; + text-shadow: 1px 1px 1px rgba(100,0,0,0.6); +} +:root.yotsuba-b div.boardTitle { + font-family: sans-serif !important; + text-shadow: 1px 1px 1px rgba(105,10,15,0.6); +} +:root.photon div.boardTitle { + font-family: sans-serif !important; + text-shadow: 1px 1px 1px rgba(0,74,153,0.6); +} +:root.tomorrow div.boardTitle { + font-family: sans-serif !important; + text-shadow: 1px 1px 1px rgba(167,170,168,0.6); +} diff --git a/src/General/css/photon.css b/src/General/css/photon.css index d9815372b..7b431af34 100755 --- a/src/General/css/photon.css +++ b/src/General/css/photon.css @@ -84,9 +84,3 @@ { background-image: url("data:image/svg+xml,"); } - -/* Board Title */ -:root.photon div.boardTitle { - font-family: sans-serif !important; - text-shadow: 1px 1px 1px rgba(0,74,153,0.6); -} diff --git a/src/General/css/style.css b/src/General/css/style.css index faa237ae6..71520f656 100755 --- a/src/General/css/style.css +++ b/src/General/css/style.css @@ -1746,9 +1746,6 @@ a:only-of-type > .remove { .boardSubtitle[contenteditable="true"] { cursor: text !important; } -div.boardTitle { - font-weight: 400 !important; -} /* Link Title Favicons */ <%= grunt.file.expand('src/General/img/links/*.png').map(function(file) { diff --git a/src/General/css/tomorrow.css b/src/General/css/tomorrow.css index f18358d39..4fbdc7ae5 100755 --- a/src/General/css/tomorrow.css +++ b/src/General/css/tomorrow.css @@ -149,9 +149,3 @@ { background-image: url("data:image/svg+xml,"); } - -/* Board Title */ -:root.tomorrow div.boardTitle { - font-family: sans-serif !important; - text-shadow: 1px 1px 1px rgba(167,170,168,0.6); -} diff --git a/src/General/css/yotsuba-b.css b/src/General/css/yotsuba-b.css index ee6656311..b7c806ebe 100755 --- a/src/General/css/yotsuba-b.css +++ b/src/General/css/yotsuba-b.css @@ -77,9 +77,3 @@ { background-image: url("data:image/svg+xml,"); } - -/* Board Title */ -:root.yotsuba-b div.boardTitle { - font-family: sans-serif !important; - text-shadow: 1px 1px 1px rgba(105,10,15,0.6); -} diff --git a/src/General/css/yotsuba.css b/src/General/css/yotsuba.css index 14b37a10d..86bb8d9ae 100755 --- a/src/General/css/yotsuba.css +++ b/src/General/css/yotsuba.css @@ -76,9 +76,3 @@ { background-image: url("data:image/svg+xml,"); } - -/* Board Title */ -:root.yotsuba div.boardTitle { - font-family: sans-serif !important; - text-shadow: 1px 1px 1px rgba(100,0,0,0.6); -}