From 0b5f0dd8898fe57bd004c8cd2d978e599016bb08 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Wed, 27 Apr 2016 10:45:11 -0700 Subject: [PATCH] Add Fappe and Werk Tyme indicators. --- src/Images/FappeTyme.coffee | 11 +++++++++++ src/css/burichan.css | 5 +++++ src/css/futaba.css | 5 +++++ src/css/photon.css | 5 +++++ src/css/style.css | 18 ++++++++++++++++-- src/css/tomorrow.css | 5 +++++ src/css/yotsuba-b.css | 5 +++++ src/css/yotsuba.css | 5 +++++ 8 files changed, 57 insertions(+), 2 deletions(-) diff --git a/src/Images/FappeTyme.coffee b/src/Images/FappeTyme.coffee index cda1a96e6..14831968a 100644 --- a/src/Images/FappeTyme.coffee +++ b/src/Images/FappeTyme.coffee @@ -20,6 +20,17 @@ FappeTyme = el: el order: 97 + indicator = $.el 'span', + className: 'indicator' + textContent: type[0] + title: "#{type} Tyme active" + $.on indicator, 'click', -> + check = FappeTyme.nodes[@parentNode.id.split('-')[0]] + check.checked = !check.checked + $.event 'change', null, check + Header.addShortcut indicator, 410 + indicator.parentNode.id = "#{lc}-indicator" + if Conf['Werk Tyme'] $.sync 'werk', @set.bind(@, 'werk') diff --git a/src/css/burichan.css b/src/css/burichan.css index 544be887c..131787875 100644 --- a/src/css/burichan.css +++ b/src/css/burichan.css @@ -39,6 +39,11 @@ background-color: rgba(255, 255, 255, .14); } +/* Fappe and Werk Tyme */ +:root.burichan .indicator { + color: #D6DAF0; +} + /* QR */ .burichan #dump-list::-webkit-scrollbar-thumb { background-color: #D6DAF0; diff --git a/src/css/futaba.css b/src/css/futaba.css index 16bbbcdae..d31d923d7 100644 --- a/src/css/futaba.css +++ b/src/css/futaba.css @@ -39,6 +39,11 @@ background-color: rgba(255, 255, 255, .14); } +/* Fappe and Werk Tyme */ +:root.futaba .indicator { + color: #F0E0D6; +} + /* QR */ .futaba #dump-list::-webkit-scrollbar-thumb { background-color: #F0E0D6; diff --git a/src/css/photon.css b/src/css/photon.css index 7b431af34..694186961 100644 --- a/src/css/photon.css +++ b/src/css/photon.css @@ -47,6 +47,11 @@ background-color: rgba(255, 255, 255, .14); } +/* Fappe and Werk Tyme */ +:root.photon .indicator { + color: #DDD; +} + /* QR */ .photon #dump-list::-webkit-scrollbar-thumb { background-color: #DDD; diff --git a/src/css/style.css b/src/css/style.css index 89d55ba65..8a95af526 100644 --- a/src/css/style.css +++ b/src/css/style.css @@ -1108,12 +1108,11 @@ input[name="Default Volume"] { vertical-align: middle; margin: 0px; } -/* Fappe Tyme */ +/* Fappe and Werk Tyme */ :root.fappeTyme .thread > .noFile, :root.fappeTyme .threadContainer > .noFile { display: none; } -/* Werk Tyme */ :root.werkTyme .postContainer:not(.noFile) .fileThumb, :root.werkTyme .catalog-thumb:not(.deleted-file):not(.no-file), :root:not(.werkTyme) .werkTyme-filename { @@ -1127,6 +1126,21 @@ input[name="Default Volume"] { -webkit-align-self: stretch; align-self: stretch; } +.indicator { + background: rgba(255,0,0,0.8); + font-weight: bold; + display: inline-block; + min-width: 9px; + padding: 0px 2px; + text-align: center; + color: white; + border-radius: 2px; + cursor: pointer; +} +:root:not(.fappeTyme) #fappe-indicator, +:root:not(.werkTyme) #werk-indicator { + display: none; +} /* Index/Reply Navigation */ #navlinks { diff --git a/src/css/tomorrow.css b/src/css/tomorrow.css index 12507db3c..c257729e7 100644 --- a/src/css/tomorrow.css +++ b/src/css/tomorrow.css @@ -46,6 +46,11 @@ background-color: rgba(0, 0, 0, .14); } +/* Fappe and Werk Tyme */ +:root.tomorrow .indicator { + color: #282A2E; +} + /* Highlighting */ :root.tomorrow .qphl { outline: 2px solid rgba(145, 182, 214, .8); diff --git a/src/css/yotsuba-b.css b/src/css/yotsuba-b.css index b7c806ebe..66b59bcce 100644 --- a/src/css/yotsuba-b.css +++ b/src/css/yotsuba-b.css @@ -39,6 +39,11 @@ background-color: rgba(255, 255, 255, .14); } +/* Fappe and Werk Tyme */ +:root.yotsuba-b .indicator { + color: #D6DAF0; +} + /* QR */ .yotsuba-b #dump-list::-webkit-scrollbar-thumb { background-color: #D6DAF0; diff --git a/src/css/yotsuba.css b/src/css/yotsuba.css index 86bb8d9ae..9acd569fb 100644 --- a/src/css/yotsuba.css +++ b/src/css/yotsuba.css @@ -39,6 +39,11 @@ background-color: rgba(255, 255, 255, .14); } +/* Fappe and Werk Tyme */ +:root.yotsuba .indicator { + color: #F0E0D6; +} + /* QR */ .yotsuba #dump-list::-webkit-scrollbar-thumb { background-color: #F0E0D6;