From ea6ad72228a700ceca6690abb80ba71919240a7c Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 19 Jan 2021 19:06:24 +0000 Subject: [PATCH] cw color and style --- epicyon-profile.css | 7 +++++++ epicyon-search.css | 7 +++++++ theme/debian/theme.json | 1 + theme/hacker/theme.json | 1 + theme/henge/theme.json | 1 + theme/indymediaclassic/theme.json | 1 + theme/indymediamodern/theme.json | 1 + theme/lcd/theme.json | 1 + theme/light/theme.json | 1 + theme/night/theme.json | 1 + theme/purple/theme.json | 1 + theme/rc3/theme.json | 1 + theme/solidaric/theme.json | 1 + theme/starlight/theme.json | 1 + theme/zen/theme.json | 1 + webapp_post.py | 2 +- webapp_utils.py | 4 ++-- 17 files changed, 30 insertions(+), 3 deletions(-) diff --git a/epicyon-profile.css b/epicyon-profile.css index 135030495..eccd15bf8 100644 --- a/epicyon-profile.css +++ b/epicyon-profile.css @@ -17,6 +17,8 @@ --main-bg-color-report: #221c27; --main-header-color-roles: #282237; --main-fg-color: #dddddd; + --cw-color: #dddddd; + --cw-style: normal; --column-left-fg-color: #dddddd; --column-right-fg-color: yellow; --column-right-fg-color-voted-on: red; @@ -178,6 +180,11 @@ body, html { line-height: var(--line-spacing); } +.cw { + font-style: var(--cw-style); + color: var(--cw-color); +} + .leftColIcons { width: 100%; background-color: var(--column-left-color); diff --git a/epicyon-search.css b/epicyon-search.css index 65980b641..9f61bcd1f 100644 --- a/epicyon-search.css +++ b/epicyon-search.css @@ -10,6 +10,8 @@ --border-color: #505050; --font-size-header: 18px; --font-color-header: #ccc; + --cw-color: #dddddd; + --cw-style: normal; --font-size: 40px; --font-size2: 24px; --font-size3: 38px; @@ -100,6 +102,11 @@ a:focus { border: 2px solid var(--focus-color); } +.cw { + font-style: var(--cw-style); + color: var(--cw-color); +} + .domainHistogramLeft { float: right; } diff --git a/theme/debian/theme.json b/theme/debian/theme.json index 126109ff0..225bf948c 100644 --- a/theme/debian/theme.json +++ b/theme/debian/theme.json @@ -51,6 +51,7 @@ "main-bg-color-reply": "white", "main-bg-color-report": "#e3dbf0", "main-header-color-roles": "#ebebf0", + "cw-color": "#2d2c37", "main-fg-color": "#2d2c37", "login-fg-color": "white", "options-fg-color": "lightgrey", diff --git a/theme/hacker/theme.json b/theme/hacker/theme.json index bda1565e9..a33b48b7b 100644 --- a/theme/hacker/theme.json +++ b/theme/hacker/theme.json @@ -17,6 +17,7 @@ "main-bg-color-reply": "#030202", "main-bg-color-report": "#050202", "main-header-color-roles": "#1f192d", + "cw-color": "#00ff00", "main-fg-color": "#00ff00", "login-fg-color": "#00ff00", "options-fg-color": "#00ff00", diff --git a/theme/henge/theme.json b/theme/henge/theme.json index b8685b1ef..0048d7b0d 100644 --- a/theme/henge/theme.json +++ b/theme/henge/theme.json @@ -34,6 +34,7 @@ "title-color": "white", "main-visited-color": "#e1c4bc", "options-main-visited-color": "#e1c4bc", + "cw-color": "white", "main-fg-color": "white", "options-fg-color": "white", "column-left-fg-color": "white", diff --git a/theme/indymediaclassic/theme.json b/theme/indymediaclassic/theme.json index 32621e0a3..80d9c6eff 100644 --- a/theme/indymediaclassic/theme.json +++ b/theme/indymediaclassic/theme.json @@ -44,6 +44,7 @@ "options-main-link-color-hover": "#d09338", "main-visited-color": "#ffb900", "options-main-visited-color": "#ffb900", + "cw-color": "white", "main-fg-color": "white", "login-fg-color": "white", "options-fg-color": "white", diff --git a/theme/indymediamodern/theme.json b/theme/indymediamodern/theme.json index aab14209e..91859ddaa 100644 --- a/theme/indymediamodern/theme.json +++ b/theme/indymediamodern/theme.json @@ -99,6 +99,7 @@ "main-bg-color-reply": "white", "main-bg-color-report": "white", "main-header-color-roles": "#ebebf0", + "cw-color": "black", "main-fg-color": "black", "login-fg-color": "black", "options-fg-color": "black", diff --git a/theme/lcd/theme.json b/theme/lcd/theme.json index f0062ce12..8f80f567e 100644 --- a/theme/lcd/theme.json +++ b/theme/lcd/theme.json @@ -22,6 +22,7 @@ "main-bg-color-report": "#9fb42b", "main-bg-color-dm": "#5fb42b", "main-header-color-roles": "#9fb42b", + "cw-color": "#33390d", "main-fg-color": "#33390d", "login-fg-color": "#33390d", "options-fg-color": "#33390d", diff --git a/theme/light/theme.json b/theme/light/theme.json index c6a212772..d7ca0a1ac 100644 --- a/theme/light/theme.json +++ b/theme/light/theme.json @@ -32,6 +32,7 @@ "main-bg-color-reply": "white", "main-bg-color-report": "#e3dbf0", "main-header-color-roles": "#ebebf0", + "cw-color": "#2d2c37", "main-fg-color": "#2d2c37", "login-fg-color": "#2d2c37", "options-fg-color": "#2d2c37", diff --git a/theme/night/theme.json b/theme/night/theme.json index 8e93fa9d7..1762cfd2a 100644 --- a/theme/night/theme.json +++ b/theme/night/theme.json @@ -33,6 +33,7 @@ "main-link-color-hover": "#d09338", "options-main-link-color": "#6481f5", "options-main-link-color-hover": "#d09338", + "cw-color": "#0481f5", "main-fg-color": "#0481f5", "login-fg-color": "#0481f5", "options-fg-color": "#0481f5", diff --git a/theme/purple/theme.json b/theme/purple/theme.json index 710fd3b04..42ce3939e 100644 --- a/theme/purple/theme.json +++ b/theme/purple/theme.json @@ -23,6 +23,7 @@ "main-bg-color-reply": "#1a142d", "main-bg-color-report": "#12152d", "main-header-color-roles": "#1f192d", + "cw-color": "#f98bb0", "main-fg-color": "#f98bb0", "login-fg-color": "#f98bb0", "options-fg-color": "#f98bb0", diff --git a/theme/rc3/theme.json b/theme/rc3/theme.json index da23786e1..4eb466d6f 100644 --- a/theme/rc3/theme.json +++ b/theme/rc3/theme.json @@ -54,6 +54,7 @@ "main-link-color-hover": "#46eed5", "options-main-link-color": "#05b9ec", "options-main-link-color-hover": "#46eed5", + "cw-color": "white", "main-fg-color": "white", "login-fg-color": "white", "options-fg-color": "white", diff --git a/theme/solidaric/theme.json b/theme/solidaric/theme.json index 3031117e1..bc6c5ff23 100644 --- a/theme/solidaric/theme.json +++ b/theme/solidaric/theme.json @@ -40,6 +40,7 @@ "main-bg-color-reply": "white", "main-bg-color-report": "white", "main-header-color-roles": "#ebebf0", + "cw-color": "#2d2c37", "main-fg-color": "#2d2c37", "login-fg-color": "#2d2c37", "options-fg-color": "#2d2c37", diff --git a/theme/starlight/theme.json b/theme/starlight/theme.json index e05fca0a7..1be4c4002 100644 --- a/theme/starlight/theme.json +++ b/theme/starlight/theme.json @@ -33,6 +33,7 @@ "title-color": "#ffc4bc", "main-visited-color": "#e1c4bc", "options-main-visited-color": "#e1c4bc", + "cw-color": "#ffc4bc", "main-fg-color": "#ffc4bc", "login-fg-color": "#ffc4bc", "options-fg-color": "#ffc4bc", diff --git a/theme/zen/theme.json b/theme/zen/theme.json index 1635106c7..03b743247 100644 --- a/theme/zen/theme.json +++ b/theme/zen/theme.json @@ -1,5 +1,6 @@ { "dropdown-bg-color-hover": "#463b35", + "cw-color": "#d5c7b7", "main-fg-color": "#d5c7b7", "column-left-fg-color": "#d5c7b7", "button-text": "#d5c7b7", diff --git a/webapp_post.py b/webapp_post.py index ff1bfea8d..c836640aa 100644 --- a/webapp_post.py +++ b/webapp_post.py @@ -1521,7 +1521,7 @@ def individualPostAsHtml(allowDownloads: bool, addEmojiToDisplayName(baseDir, httpPrefix, nickname, domain, cwStr, False) - contentStr += '' + cwStr + '\n ' + contentStr += '\n ' if isModerationPost: containerClass = 'container report' # get the content warning text diff --git a/webapp_utils.py b/webapp_utils.py index 2de80bee8..d00d6f09a 100644 --- a/webapp_utils.py +++ b/webapp_utils.py @@ -167,8 +167,8 @@ def getContentWarningButton(postID: str, translate: {}, content: str) -> str: """Returns the markup for a content warning button """ - return '
' + \ - translate['SHOW MORE'] + '' + \ + return '
' + \ '
' + content + \ '
\n'