From 742d112018598c0260c7e578b5229a9b4209cc88 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 23 Oct 2020 18:13:02 +0100 Subject: [PATCH] Hashtag backgrounds --- epicyon-profile.css | 5 +++++ newsdaemon.py | 6 +++--- theme.py | 3 +++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/epicyon-profile.css b/epicyon-profile.css index d3535c199..ac76818fb 100644 --- a/epicyon-profile.css +++ b/epicyon-profile.css @@ -94,6 +94,7 @@ --button-event-corner-radius: 60px; --button-event-background-color: green; --button-event-fg-color: white; + --hashtag-background-color: black; } @font-face { @@ -374,6 +375,10 @@ a:focus { width: 90%; } +.addedHashtag { + background-color: var(--hashtag-background-color); +} + .message:focus{ border: 2px solid var(--focus-color); } diff --git a/newsdaemon.py b/newsdaemon.py index 1a304d743..2b0e034a9 100644 --- a/newsdaemon.py +++ b/newsdaemon.py @@ -307,7 +307,7 @@ def newswireHashtagProcessing(session, baseDir: str, postJsonObject: {}, # add corresponding html to the post content hashtagHtml = \ " #" + \ htId + "" content = postJsonObject['object']['content'] @@ -334,7 +334,7 @@ def newswireHashtagProcessing(session, baseDir: str, postJsonObject: {}, # remove tag html from the post content hashtagHtml = \ "#" + \ htId + "" content = postJsonObject['object']['content'] @@ -609,7 +609,7 @@ def convertRSStoActivityPub(baseDir: str, httpPrefix: str, if tagName in blog['object']['content']: hashtagHtml = \ "#" + \ htId + "" blog['object']['content'].replace(tagName, hashtagHtml) diff --git a/theme.py b/theme.py index 0ca64d8df..40c30a456 100644 --- a/theme.py +++ b/theme.py @@ -255,6 +255,7 @@ def setThemeIndymediaClassic(baseDir: str): "search": "jpg" } themeParams = { + "hashtag-background-color": "darkred", "font-size-newswire": "18px", "font-size-newswire-mobile": "48px", "line-spacing-newswire": "100%", @@ -795,6 +796,7 @@ def setThemeHacker(baseDir: str): def setThemeLight(baseDir: str): name = 'light' themeParams = { + "hashtag-background-color": "lightblue", "focus-color": "grey", "font-size-button-mobile": "26px", "font-size": "32px", @@ -853,6 +855,7 @@ def setThemeLight(baseDir: str): def setThemeSolidaric(baseDir: str): name = 'solidaric' themeParams = { + "hashtag-background-color": "lightred", "button-highlighted": "darkred", "button-selected-highlighted": "darkred", "newswire-date-color": "grey",