Hashtag backgrounds

main
Bob Mottram 2020-10-23 18:13:02 +01:00
parent 152eb754ff
commit 742d112018
3 changed files with 11 additions and 3 deletions

View File

@ -94,6 +94,7 @@
--button-event-corner-radius: 60px; --button-event-corner-radius: 60px;
--button-event-background-color: green; --button-event-background-color: green;
--button-event-fg-color: white; --button-event-fg-color: white;
--hashtag-background-color: black;
} }
@font-face { @font-face {
@ -374,6 +375,10 @@ a:focus {
width: 90%; width: 90%;
} }
.addedHashtag {
background-color: var(--hashtag-background-color);
}
.message:focus{ .message:focus{
border: 2px solid var(--focus-color); border: 2px solid var(--focus-color);
} }

View File

@ -307,7 +307,7 @@ def newswireHashtagProcessing(session, baseDir: str, postJsonObject: {},
# add corresponding html to the post content # add corresponding html to the post content
hashtagHtml = \ hashtagHtml = \
" <a href=\"" + hashtagUrl + \ " <a href=\"" + hashtagUrl + \
"\" class=\"mention hashtag\" " + \ "\" class=\"addedHashtag\" " + \
"rel=\"tag\">#<span>" + \ "rel=\"tag\">#<span>" + \
htId + "</span></a>" htId + "</span></a>"
content = postJsonObject['object']['content'] content = postJsonObject['object']['content']
@ -334,7 +334,7 @@ def newswireHashtagProcessing(session, baseDir: str, postJsonObject: {},
# remove tag html from the post content # remove tag html from the post content
hashtagHtml = \ hashtagHtml = \
"<a href=\"" + hashtagUrl + \ "<a href=\"" + hashtagUrl + \
"\" class=\"mention hashtag\" " + \ "\" class=\"addedHashtag\" " + \
"rel=\"tag\">#<span>" + \ "rel=\"tag\">#<span>" + \
htId + "</span></a>" htId + "</span></a>"
content = postJsonObject['object']['content'] content = postJsonObject['object']['content']
@ -609,7 +609,7 @@ def convertRSStoActivityPub(baseDir: str, httpPrefix: str,
if tagName in blog['object']['content']: if tagName in blog['object']['content']:
hashtagHtml = \ hashtagHtml = \
"<a href=\"" + hashtagUrl + \ "<a href=\"" + hashtagUrl + \
"\" class=\"mention hashtag\" " + \ "\" class=\"addedHashtag\" " + \
"rel=\"tag\">#<span>" + \ "rel=\"tag\">#<span>" + \
htId + "</span></a>" htId + "</span></a>"
blog['object']['content'].replace(tagName, hashtagHtml) blog['object']['content'].replace(tagName, hashtagHtml)

View File

@ -255,6 +255,7 @@ def setThemeIndymediaClassic(baseDir: str):
"search": "jpg" "search": "jpg"
} }
themeParams = { themeParams = {
"hashtag-background-color": "darkred",
"font-size-newswire": "18px", "font-size-newswire": "18px",
"font-size-newswire-mobile": "48px", "font-size-newswire-mobile": "48px",
"line-spacing-newswire": "100%", "line-spacing-newswire": "100%",
@ -795,6 +796,7 @@ def setThemeHacker(baseDir: str):
def setThemeLight(baseDir: str): def setThemeLight(baseDir: str):
name = 'light' name = 'light'
themeParams = { themeParams = {
"hashtag-background-color": "lightblue",
"focus-color": "grey", "focus-color": "grey",
"font-size-button-mobile": "26px", "font-size-button-mobile": "26px",
"font-size": "32px", "font-size": "32px",
@ -853,6 +855,7 @@ def setThemeLight(baseDir: str):
def setThemeSolidaric(baseDir: str): def setThemeSolidaric(baseDir: str):
name = 'solidaric' name = 'solidaric'
themeParams = { themeParams = {
"hashtag-background-color": "lightred",
"button-highlighted": "darkred", "button-highlighted": "darkred",
"button-selected-highlighted": "darkred", "button-selected-highlighted": "darkred",
"newswire-date-color": "grey", "newswire-date-color": "grey",