forked from indymedia/epicyon
Search banner
parent
079edc2593
commit
8f872c6fac
|
@ -8620,7 +8620,6 @@ def htmlSearch(cssCache: {}, translate: {},
|
||||||
followStr = htmlHeader(cssFilename, profileStyle)
|
followStr = htmlHeader(cssFilename, profileStyle)
|
||||||
|
|
||||||
# show a banner above the search box
|
# show a banner above the search box
|
||||||
usersPath = baseDir + '/accounts/' + searchNickname + '@' + domain
|
|
||||||
searchBannerFile, searchBannerFilename = \
|
searchBannerFile, searchBannerFilename = \
|
||||||
getSearchBannerFile(baseDir, searchNickname, domain)
|
getSearchBannerFile(baseDir, searchNickname, domain)
|
||||||
if not os.path.isfile(searchBannerFilename):
|
if not os.path.isfile(searchBannerFilename):
|
||||||
|
@ -8633,17 +8632,20 @@ def htmlSearch(cssCache: {}, translate: {},
|
||||||
bannerExtensions = ('png', 'jpg', 'jpeg', 'gif', 'avif', 'webp')
|
bannerExtensions = ('png', 'jpg', 'jpeg', 'gif', 'avif', 'webp')
|
||||||
for ext in bannerExtensions:
|
for ext in bannerExtensions:
|
||||||
searchBannerFile = 'search_banner.' + ext
|
searchBannerFile = 'search_banner.' + ext
|
||||||
searchBannerFilename = usersPath + '/' + searchBannerFile
|
searchBannerFilename = \
|
||||||
|
baseDir + '/accounts/' + \
|
||||||
|
searchNickname + '@' + domain + '/' + searchBannerFile
|
||||||
themeSearchBannerFilename = \
|
themeSearchBannerFilename = \
|
||||||
baseDir + '/img/search_banner' + theme + '.' + ext
|
baseDir + '/img/search_banner' + theme + '.' + ext
|
||||||
if os.path.isfile(themeSearchBannerFilename):
|
if os.path.isfile(themeSearchBannerFilename):
|
||||||
copyfile(themeSearchBannerFilename, searchBannerFilename)
|
copyfile(themeSearchBannerFilename, searchBannerFilename)
|
||||||
break
|
break
|
||||||
if os.path.isfile(searchBannerFilename):
|
if os.path.isfile(searchBannerFilename):
|
||||||
|
usersPath = '/users/' + searchNickname
|
||||||
followStr += \
|
followStr += \
|
||||||
'<a href="/users/' + searchNickname + '" title="' + \
|
'<a href="' + usersPath + '/' + defaultTimeline + '" title="' + \
|
||||||
translate['Switch to profile view'] + '" alt="' + \
|
translate['Switch to timeline view'] + '" alt="' + \
|
||||||
translate['Switch to profile view'] + '">\n'
|
translate['Switch to timeline view'] + '">\n'
|
||||||
followStr += '<img loading="lazy" class="timeline-banner" src="' + \
|
followStr += '<img loading="lazy" class="timeline-banner" src="' + \
|
||||||
usersPath + '/' + searchBannerFile + '" /></a>\n'
|
usersPath + '/' + searchBannerFile + '" /></a>\n'
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue