From e5045f61712f8ba6b8f3636fdd0d959da3dcbc60 Mon Sep 17 00:00:00 2001 From: Bob Mottram <bob@freedombone.net> Date: Sun, 25 Oct 2020 21:16:51 +0000 Subject: [PATCH] Style of happening button --- webinterface.py | 47 ++++++++++++++++++++++++++++++++++------------- 1 file changed, 34 insertions(+), 13 deletions(-) diff --git a/webinterface.py b/webinterface.py index e6745a2d..e169b6b2 100644 --- a/webinterface.py +++ b/webinterface.py @@ -6054,25 +6054,46 @@ def getTimelineButtonHeader(defaultTimeline: str, now = datetime.now() # happening today button - tlStr += \ - ' <a href="' + usersPath + '/calendar?year=' + \ - str(now.year) + '?month=' + str(now.month) + \ - '?day=' + str(now.day) + '"><button class="buttonevent">' + \ - translate['Happening Today'] + '</button></a>\n' + if not iconsAsButtons: + tlStr += \ + ' <a href="' + usersPath + '/calendar?year=' + \ + str(now.year) + '?month=' + str(now.month) + \ + '?day=' + str(now.day) + '">' + \ + '<button class="buttonevent">' + \ + translate['Happening Today'] + '</button></a>\n' + else: + tlStr += \ + ' <a href="' + usersPath + '/calendar?year=' + \ + str(now.year) + '?month=' + str(now.month) + \ + '?day=' + str(now.day) + '">' + \ + '<button class="button">' + \ + translate['Happening Today'] + '</button></a>\n' # happening this week button if thisWeeksEventsCheck(baseDir, nickname, domain): - tlStr += \ - ' <a href="' + usersPath + \ - '/calendar"><button class="buttonevent">' + \ - translate['Happening This Week'] + '</button></a>\n' + if not iconsAsButtons: + tlStr += \ + ' <a href="' + usersPath + \ + '/calendar"><button class="buttonevent">' + \ + translate['Happening This Week'] + '</button></a>\n' + else: + tlStr += \ + ' <a href="' + usersPath + \ + '/calendar"><button class="button">' + \ + translate['Happening This Week'] + '</button></a>\n' else: # happening this week button if thisWeeksEventsCheck(baseDir, nickname, domain): - tlStr += \ - ' <a href="' + usersPath + \ - '/calendar"><button class="buttonevent">' + \ - translate['Happening This Week'] + '</button></a>\n' + if not iconsAsButtons: + tlStr += \ + ' <a href="' + usersPath + \ + '/calendar"><button class="buttonevent">' + \ + translate['Happening This Week'] + '</button></a>\n' + else: + tlStr += \ + ' <a href="' + usersPath + \ + '/calendar"><button class="button">' + \ + translate['Happening This Week'] + '</button></a>\n' if not iconsAsButtons: # the search button