forked from indymedia/epicyon
Experimental use of external css on search screen
parent
6ff34fbdb8
commit
b987fae6e7
|
@ -24,7 +24,7 @@ from feeds import rss2TagFooter
|
||||||
from webapp_utils import getAltPath
|
from webapp_utils import getAltPath
|
||||||
from webapp_utils import getIconsDir
|
from webapp_utils import getIconsDir
|
||||||
from webapp_utils import getImageFile
|
from webapp_utils import getImageFile
|
||||||
from webapp_utils import htmlHeader
|
from webapp_utils import htmlHeaderWithExternalStyle
|
||||||
from webapp_utils import htmlFooter
|
from webapp_utils import htmlFooter
|
||||||
from webapp_utils import getSearchBannerFile
|
from webapp_utils import getSearchBannerFile
|
||||||
from webapp_utils import htmlPostSeparator
|
from webapp_utils import htmlPostSeparator
|
||||||
|
@ -50,13 +50,10 @@ def htmlSearchEmoji(cssCache: {}, translate: {},
|
||||||
|
|
||||||
emojiCSS = getCSS(baseDir, cssFilename, cssCache)
|
emojiCSS = getCSS(baseDir, cssFilename, cssCache)
|
||||||
if emojiCSS:
|
if emojiCSS:
|
||||||
if httpPrefix != 'https':
|
|
||||||
emojiCSS = emojiCSS.replace('https://',
|
|
||||||
httpPrefix + '://')
|
|
||||||
emojiLookupFilename = baseDir + '/emoji/emoji.json'
|
emojiLookupFilename = baseDir + '/emoji/emoji.json'
|
||||||
|
|
||||||
# create header
|
# create header
|
||||||
emojiForm = htmlHeader(cssFilename, emojiCSS)
|
emojiForm = htmlHeaderWithExternalStyle(cssFilename, emojiCSS)
|
||||||
emojiForm += '<center><h1>' + \
|
emojiForm += '<center><h1>' + \
|
||||||
translate['Emoji Search'] + \
|
translate['Emoji Search'] + \
|
||||||
'</h1></center>'
|
'</h1></center>'
|
||||||
|
@ -119,11 +116,8 @@ def htmlSearchSharedItems(cssCache: {}, translate: {},
|
||||||
|
|
||||||
sharedItemsCSS = getCSS(baseDir, cssFilename, cssCache)
|
sharedItemsCSS = getCSS(baseDir, cssFilename, cssCache)
|
||||||
if sharedItemsCSS:
|
if sharedItemsCSS:
|
||||||
if httpPrefix != 'https':
|
sharedItemsForm = \
|
||||||
sharedItemsCSS = \
|
htmlHeaderWithExternalStyle(cssFilename, sharedItemsCSS)
|
||||||
sharedItemsCSS.replace('https://',
|
|
||||||
httpPrefix + '://')
|
|
||||||
sharedItemsForm = htmlHeader(cssFilename, sharedItemsCSS)
|
|
||||||
sharedItemsForm += \
|
sharedItemsForm += \
|
||||||
'<center><h1>' + translate['Shared Items Search'] + \
|
'<center><h1>' + translate['Shared Items Search'] + \
|
||||||
'</h1></center>'
|
'</h1></center>'
|
||||||
|
@ -296,7 +290,7 @@ def htmlSearchEmojiTextEntry(cssCache: {}, translate: {},
|
||||||
|
|
||||||
profileStyle = getCSS(baseDir, cssFilename, cssCache)
|
profileStyle = getCSS(baseDir, cssFilename, cssCache)
|
||||||
|
|
||||||
emojiStr = htmlHeader(cssFilename, profileStyle)
|
emojiStr = htmlHeaderWithExternalStyle(cssFilename, profileStyle)
|
||||||
emojiStr += '<div class="follow">\n'
|
emojiStr += '<div class="follow">\n'
|
||||||
emojiStr += ' <div class="followAvatar">\n'
|
emojiStr += ' <div class="followAvatar">\n'
|
||||||
emojiStr += ' <center>\n'
|
emojiStr += ' <center>\n'
|
||||||
|
@ -338,14 +332,7 @@ def htmlSearch(cssCache: {}, translate: {},
|
||||||
|
|
||||||
profileStyle = getCSS(baseDir, cssFilename, cssCache)
|
profileStyle = getCSS(baseDir, cssFilename, cssCache)
|
||||||
|
|
||||||
if not os.path.isfile(baseDir + '/accounts/' +
|
followStr = htmlHeaderWithExternalStyle(cssFilename, profileStyle)
|
||||||
'follow-background.jpg'):
|
|
||||||
profileStyle = \
|
|
||||||
profileStyle.replace('background-image: ' +
|
|
||||||
'url("follow-background.jpg");',
|
|
||||||
'background-image: none;')
|
|
||||||
|
|
||||||
followStr = htmlHeader(cssFilename, profileStyle)
|
|
||||||
|
|
||||||
# show a banner above the search box
|
# show a banner above the search box
|
||||||
searchBannerFile, searchBannerFilename = \
|
searchBannerFile, searchBannerFilename = \
|
||||||
|
@ -520,11 +507,6 @@ def htmlHashtagSearch(cssCache: {},
|
||||||
cssFilename = baseDir + '/epicyon.css'
|
cssFilename = baseDir + '/epicyon.css'
|
||||||
|
|
||||||
hashtagSearchCSS = getCSS(baseDir, cssFilename, cssCache)
|
hashtagSearchCSS = getCSS(baseDir, cssFilename, cssCache)
|
||||||
if hashtagSearchCSS:
|
|
||||||
if httpPrefix != 'https':
|
|
||||||
hashtagSearchCSS = \
|
|
||||||
hashtagSearchCSS.replace('https://',
|
|
||||||
httpPrefix + '://')
|
|
||||||
|
|
||||||
# ensure that the page number is in bounds
|
# ensure that the page number is in bounds
|
||||||
if not pageNumber:
|
if not pageNumber:
|
||||||
|
@ -540,7 +522,8 @@ def htmlHashtagSearch(cssCache: {},
|
||||||
endIndex = noOfLines - 1
|
endIndex = noOfLines - 1
|
||||||
|
|
||||||
# add the page title
|
# add the page title
|
||||||
hashtagSearchForm = htmlHeader(cssFilename, hashtagSearchCSS)
|
hashtagSearchForm = \
|
||||||
|
htmlHeaderWithExternalStyle(cssFilename, hashtagSearchCSS)
|
||||||
if nickname:
|
if nickname:
|
||||||
hashtagSearchForm += '<center>\n' + \
|
hashtagSearchForm += '<center>\n' + \
|
||||||
'<h1><a href="/users/' + nickname + '/search">#' + \
|
'<h1><a href="/users/' + nickname + '/search">#' + \
|
||||||
|
@ -831,12 +814,8 @@ def htmlSkillsSearch(cssCache: {}, translate: {}, baseDir: str,
|
||||||
cssFilename = baseDir + '/epicyon.css'
|
cssFilename = baseDir + '/epicyon.css'
|
||||||
|
|
||||||
skillSearchCSS = getCSS(baseDir, cssFilename, cssCache)
|
skillSearchCSS = getCSS(baseDir, cssFilename, cssCache)
|
||||||
if skillSearchCSS:
|
|
||||||
if httpPrefix != 'https':
|
skillSearchForm = htmlHeaderWithExternalStyle(cssFilename, skillSearchCSS)
|
||||||
skillSearchCSS = \
|
|
||||||
skillSearchCSS.replace('https://',
|
|
||||||
httpPrefix + '://')
|
|
||||||
skillSearchForm = htmlHeader(cssFilename, skillSearchCSS)
|
|
||||||
skillSearchForm += \
|
skillSearchForm += \
|
||||||
'<center><h1>' + translate['Skills search'] + ': ' + \
|
'<center><h1>' + translate['Skills search'] + ': ' + \
|
||||||
skillsearch + '</h1></center>'
|
skillsearch + '</h1></center>'
|
||||||
|
@ -900,12 +879,8 @@ def htmlHistorySearch(cssCache: {}, translate: {}, baseDir: str,
|
||||||
cssFilename = baseDir + '/epicyon.css'
|
cssFilename = baseDir + '/epicyon.css'
|
||||||
|
|
||||||
historySearchCSS = getCSS(baseDir, cssFilename, cssCache)
|
historySearchCSS = getCSS(baseDir, cssFilename, cssCache)
|
||||||
if historySearchCSS:
|
historySearchForm = \
|
||||||
if httpPrefix != 'https':
|
htmlHeaderWithExternalStyle(cssFilename, historySearchCSS)
|
||||||
historySearchCSS = \
|
|
||||||
historySearchCSS.replace('https://',
|
|
||||||
httpPrefix + '://')
|
|
||||||
historySearchForm = htmlHeader(cssFilename, historySearchCSS)
|
|
||||||
|
|
||||||
# add the page title
|
# add the page title
|
||||||
historySearchForm += \
|
historySearchForm += \
|
||||||
|
|
Loading…
Reference in New Issue