mirror of https://gitlab.com/bashrc2/epicyon
Set html page title
parent
1f7d9633b2
commit
bcfba50553
17
blog.py
17
blog.py
|
@ -14,6 +14,7 @@ from webapp_utils import htmlHeaderWithExternalStyle
|
|||
from webapp_utils import htmlFooter
|
||||
from webapp_utils import getPostAttachmentsAsHtml
|
||||
from webapp_media import addEmbeddedElements
|
||||
from utils import getConfigParam
|
||||
from utils import getFullDomain
|
||||
from utils import getMediaFormats
|
||||
from utils import getNicknameFromActor
|
||||
|
@ -386,7 +387,9 @@ def htmlBlogPost(authorized: bool,
|
|||
cssFilename = baseDir + '/epicyon-blog.css'
|
||||
if os.path.isfile(baseDir + '/blog.css'):
|
||||
cssFilename = baseDir + '/blog.css'
|
||||
blogStr = htmlHeaderWithExternalStyle(cssFilename)
|
||||
instanceTitle = \
|
||||
getConfigParam(baseDir, 'instanceTitle')
|
||||
blogStr = htmlHeaderWithExternalStyle(cssFilename, instanceTitle)
|
||||
_htmlBlogRemoveCwButton(blogStr, translate)
|
||||
|
||||
blogStr += _htmlBlogPostContent(authorized, baseDir,
|
||||
|
@ -433,7 +436,9 @@ def htmlBlogPage(authorized: bool, session,
|
|||
cssFilename = baseDir + '/epicyon-profile.css'
|
||||
if os.path.isfile(baseDir + '/epicyon.css'):
|
||||
cssFilename = baseDir + '/epicyon.css'
|
||||
blogStr = htmlHeaderWithExternalStyle(cssFilename)
|
||||
instanceTitle = \
|
||||
getConfigParam(baseDir, 'instanceTitle')
|
||||
blogStr = htmlHeaderWithExternalStyle(cssFilename, instanceTitle)
|
||||
_htmlBlogRemoveCwButton(blogStr, translate)
|
||||
|
||||
blogsIndex = baseDir + '/accounts/' + \
|
||||
|
@ -653,7 +658,9 @@ def htmlBlogView(authorized: bool,
|
|||
cssFilename = baseDir + '/epicyon-profile.css'
|
||||
if os.path.isfile(baseDir + '/epicyon.css'):
|
||||
cssFilename = baseDir + '/epicyon.css'
|
||||
blogStr = htmlHeaderWithExternalStyle(cssFilename)
|
||||
instanceTitle = \
|
||||
getConfigParam(baseDir, 'instanceTitle')
|
||||
blogStr = htmlHeaderWithExternalStyle(cssFilename, instanceTitle)
|
||||
|
||||
if _noOfBlogAccounts(baseDir) <= 1:
|
||||
nickname = _singleBlogAccountNickname(baseDir)
|
||||
|
@ -755,7 +762,9 @@ def htmlEditBlog(mediaInstance: bool, translate: {},
|
|||
dateAndLocation += '<input type="text" name="location">'
|
||||
dateAndLocation += '</div>'
|
||||
|
||||
editBlogForm = htmlHeaderWithExternalStyle(cssFilename)
|
||||
instanceTitle = \
|
||||
getConfigParam(baseDir, 'instanceTitle')
|
||||
editBlogForm = htmlHeaderWithExternalStyle(cssFilename, instanceTitle)
|
||||
|
||||
editBlogForm += \
|
||||
'<form enctype="multipart/form-data" method="POST" ' + \
|
||||
|
|
|
@ -37,7 +37,9 @@ def htmlAbout(cssCache: {}, baseDir: str, httpPrefix: str,
|
|||
if os.path.isfile(baseDir + '/epicyon.css'):
|
||||
cssFilename = baseDir + '/epicyon.css'
|
||||
|
||||
aboutForm = htmlHeaderWithExternalStyle(cssFilename)
|
||||
instanceTitle = \
|
||||
getConfigParam(baseDir, 'instanceTitle')
|
||||
aboutForm = htmlHeaderWithExternalStyle(cssFilename, instanceTitle)
|
||||
aboutForm += '<div class="container">' + aboutText + '</div>'
|
||||
if onionDomain:
|
||||
aboutForm += \
|
||||
|
|
|
@ -10,6 +10,7 @@ import os
|
|||
from datetime import datetime
|
||||
from datetime import date
|
||||
from shutil import copyfile
|
||||
from utils import getConfigParam
|
||||
from utils import getNicknameFromActor
|
||||
from utils import getDomainFromActor
|
||||
from utils import locatePost
|
||||
|
@ -52,7 +53,9 @@ def htmlCalendarDeleteConfirm(cssCache: {}, translate: {}, baseDir: str,
|
|||
if os.path.isfile(baseDir + '/epicyon.css'):
|
||||
cssFilename = baseDir + '/epicyon.css'
|
||||
|
||||
deletePostStr = htmlHeaderWithExternalStyle(cssFilename)
|
||||
instanceTitle = \
|
||||
getConfigParam(baseDir, 'instanceTitle')
|
||||
deletePostStr = htmlHeaderWithExternalStyle(cssFilename, instanceTitle)
|
||||
deletePostStr += \
|
||||
'<center><h1>' + postTime + ' ' + str(year) + '/' + \
|
||||
str(monthNumber) + \
|
||||
|
@ -109,7 +112,9 @@ def _htmlCalendarDay(cssCache: {}, translate: {},
|
|||
if '/users/' in actor:
|
||||
calActor = '/users/' + actor.split('/users/')[1]
|
||||
|
||||
calendarStr = htmlHeaderWithExternalStyle(cssFilename)
|
||||
instanceTitle = \
|
||||
getConfigParam(baseDir, 'instanceTitle')
|
||||
calendarStr = htmlHeaderWithExternalStyle(cssFilename, instanceTitle)
|
||||
calendarStr += '<main><table class="calendar">\n'
|
||||
calendarStr += '<caption class="calendar__banner--month">\n'
|
||||
calendarStr += \
|
||||
|
@ -290,7 +295,9 @@ def htmlCalendar(cssCache: {}, translate: {},
|
|||
if '/users/' in actor:
|
||||
calActor = '/users/' + actor.split('/users/')[1]
|
||||
|
||||
calendarStr = htmlHeaderWithExternalStyle(cssFilename)
|
||||
instanceTitle = \
|
||||
getConfigParam(baseDir, 'instanceTitle')
|
||||
calendarStr = htmlHeaderWithExternalStyle(cssFilename, instanceTitle)
|
||||
calendarStr += '<main><table class="calendar">\n'
|
||||
calendarStr += '<caption class="calendar__banner--month">\n'
|
||||
calendarStr += \
|
||||
|
|
|
@ -260,7 +260,9 @@ def htmlLinksMobile(cssCache: {}, baseDir: str,
|
|||
if ':' in domain:
|
||||
domain = domain.split(':')[0]
|
||||
|
||||
htmlStr = htmlHeaderWithExternalStyle(cssFilename)
|
||||
instanceTitle = \
|
||||
getConfigParam(baseDir, 'instanceTitle')
|
||||
htmlStr = htmlHeaderWithExternalStyle(cssFilename, instanceTitle)
|
||||
bannerFile, bannerFilename = \
|
||||
getBannerFile(baseDir, nickname, domain, theme)
|
||||
htmlStr += \
|
||||
|
@ -321,7 +323,9 @@ def htmlEditLinks(cssCache: {}, translate: {}, baseDir: str, path: str,
|
|||
bannerFile, bannerFilename = \
|
||||
getBannerFile(baseDir, nickname, domain, theme)
|
||||
|
||||
editLinksForm = htmlHeaderWithExternalStyle(cssFilename)
|
||||
instanceTitle = \
|
||||
getConfigParam(baseDir, 'instanceTitle')
|
||||
editLinksForm = htmlHeaderWithExternalStyle(cssFilename, instanceTitle)
|
||||
|
||||
# top banner
|
||||
editLinksForm += \
|
||||
|
|
|
@ -15,6 +15,7 @@ from utils import loadJson
|
|||
from utils import votesOnNewswireItem
|
||||
from utils import getNicknameFromActor
|
||||
from utils import isEditor
|
||||
from utils import getConfigParam
|
||||
from posts import isModerator
|
||||
from webapp_utils import getRightImageFile
|
||||
from webapp_utils import htmlHeaderWithExternalStyle
|
||||
|
@ -342,7 +343,9 @@ def htmlCitations(baseDir: str, nickname: str, domain: str,
|
|||
if os.path.isfile(baseDir + '/epicyon.css'):
|
||||
cssFilename = baseDir + '/epicyon.css'
|
||||
|
||||
htmlStr = htmlHeaderWithExternalStyle(cssFilename)
|
||||
instanceTitle = \
|
||||
getConfigParam(baseDir, 'instanceTitle')
|
||||
htmlStr = htmlHeaderWithExternalStyle(cssFilename, instanceTitle)
|
||||
|
||||
# top banner
|
||||
bannerFile, bannerFilename = \
|
||||
|
@ -452,7 +455,9 @@ def htmlNewswireMobile(cssCache: {}, baseDir: str, nickname: str,
|
|||
|
||||
showPublishButton = editor
|
||||
|
||||
htmlStr = htmlHeaderWithExternalStyle(cssFilename)
|
||||
instanceTitle = \
|
||||
getConfigParam(baseDir, 'instanceTitle')
|
||||
htmlStr = htmlHeaderWithExternalStyle(cssFilename, instanceTitle)
|
||||
|
||||
bannerFile, bannerFilename = \
|
||||
getBannerFile(baseDir, nickname, domain, theme)
|
||||
|
@ -515,7 +520,9 @@ def htmlEditNewswire(cssCache: {}, translate: {}, baseDir: str, path: str,
|
|||
bannerFile, bannerFilename = \
|
||||
getBannerFile(baseDir, nickname, domain, theme)
|
||||
|
||||
editNewswireForm = htmlHeaderWithExternalStyle(cssFilename)
|
||||
instanceTitle = \
|
||||
getConfigParam(baseDir, 'instanceTitle')
|
||||
editNewswireForm = htmlHeaderWithExternalStyle(cssFilename, instanceTitle)
|
||||
|
||||
# top banner
|
||||
editNewswireForm += \
|
||||
|
@ -631,7 +638,9 @@ def htmlEditNewsPost(cssCache: {}, translate: {}, baseDir: str, path: str,
|
|||
if os.path.isfile(baseDir + '/links.css'):
|
||||
cssFilename = baseDir + '/links.css'
|
||||
|
||||
editNewsPostForm = htmlHeaderWithExternalStyle(cssFilename)
|
||||
instanceTitle = \
|
||||
getConfigParam(baseDir, 'instanceTitle')
|
||||
editNewsPostForm = htmlHeaderWithExternalStyle(cssFilename, instanceTitle)
|
||||
editNewsPostForm += \
|
||||
'<form enctype="multipart/form-data" method="POST" ' + \
|
||||
'accept-charset="UTF-8" action="' + path + '/newseditdata">\n'
|
||||
|
|
|
@ -13,6 +13,7 @@ from utils import getNicknameFromActor
|
|||
from utils import getDomainFromActor
|
||||
from utils import locatePost
|
||||
from utils import loadJson
|
||||
from utils import getConfigParam
|
||||
from webapp_utils import getAltPath
|
||||
from webapp_utils import htmlHeaderWithExternalStyle
|
||||
from webapp_utils import htmlFooter
|
||||
|
@ -57,7 +58,9 @@ def htmlConfirmDelete(cssCache: {},
|
|||
if os.path.isfile(baseDir + '/epicyon.css'):
|
||||
cssFilename = baseDir + '/epicyon.css'
|
||||
|
||||
deletePostStr = htmlHeaderWithExternalStyle(cssFilename)
|
||||
instanceTitle = \
|
||||
getConfigParam(baseDir, 'instanceTitle')
|
||||
deletePostStr = htmlHeaderWithExternalStyle(cssFilename, instanceTitle)
|
||||
deletePostStr += \
|
||||
individualPostAsHtml(True, recentPostsCache, maxRecentPosts,
|
||||
translate, pageNumber,
|
||||
|
@ -130,7 +133,9 @@ def htmlConfirmRemoveSharedItem(cssCache: {}, translate: {}, baseDir: str,
|
|||
if os.path.isfile(baseDir + '/follow.css'):
|
||||
cssFilename = baseDir + '/follow.css'
|
||||
|
||||
sharesStr = htmlHeaderWithExternalStyle(cssFilename)
|
||||
instanceTitle = \
|
||||
getConfigParam(baseDir, 'instanceTitle')
|
||||
sharesStr = htmlHeaderWithExternalStyle(cssFilename, instanceTitle)
|
||||
sharesStr += '<div class="follow">\n'
|
||||
sharesStr += ' <div class="followAvatar">\n'
|
||||
sharesStr += ' <center>\n'
|
||||
|
@ -177,7 +182,9 @@ def htmlConfirmFollow(cssCache: {}, translate: {}, baseDir: str,
|
|||
if os.path.isfile(baseDir + '/follow.css'):
|
||||
cssFilename = baseDir + '/follow.css'
|
||||
|
||||
followStr = htmlHeaderWithExternalStyle(cssFilename)
|
||||
instanceTitle = \
|
||||
getConfigParam(baseDir, 'instanceTitle')
|
||||
followStr = htmlHeaderWithExternalStyle(cssFilename, instanceTitle)
|
||||
followStr += '<div class="follow">\n'
|
||||
followStr += ' <div class="followAvatar">\n'
|
||||
followStr += ' <center>\n'
|
||||
|
@ -221,7 +228,9 @@ def htmlConfirmUnfollow(cssCache: {}, translate: {}, baseDir: str,
|
|||
if os.path.isfile(baseDir + '/follow.css'):
|
||||
cssFilename = baseDir + '/follow.css'
|
||||
|
||||
followStr = htmlHeaderWithExternalStyle(cssFilename)
|
||||
instanceTitle = \
|
||||
getConfigParam(baseDir, 'instanceTitle')
|
||||
followStr = htmlHeaderWithExternalStyle(cssFilename, instanceTitle)
|
||||
followStr += '<div class="follow">\n'
|
||||
followStr += ' <div class="followAvatar">\n'
|
||||
followStr += ' <center>\n'
|
||||
|
@ -266,7 +275,9 @@ def htmlConfirmUnblock(cssCache: {}, translate: {}, baseDir: str,
|
|||
if os.path.isfile(baseDir + '/follow.css'):
|
||||
cssFilename = baseDir + '/follow.css'
|
||||
|
||||
blockStr = htmlHeaderWithExternalStyle(cssFilename)
|
||||
instanceTitle = \
|
||||
getConfigParam(baseDir, 'instanceTitle')
|
||||
blockStr = htmlHeaderWithExternalStyle(cssFilename, instanceTitle)
|
||||
blockStr += '<div class="block">\n'
|
||||
blockStr += ' <div class="blockAvatar">\n'
|
||||
blockStr += ' <center>\n'
|
||||
|
|
|
@ -12,6 +12,7 @@ from utils import getNicknameFromActor
|
|||
from utils import getDomainFromActor
|
||||
from utils import getImageFormats
|
||||
from utils import getMediaFormats
|
||||
from utils import getConfigParam
|
||||
from webapp_utils import getBannerFile
|
||||
from webapp_utils import htmlHeaderWithExternalStyle
|
||||
from webapp_utils import htmlFooter
|
||||
|
@ -555,7 +556,9 @@ def htmlNewPost(cssCache: {}, mediaInstance: bool, translate: {},
|
|||
dateAndLocation += '<input type="text" name="category">\n'
|
||||
dateAndLocation += '</div>\n'
|
||||
|
||||
newPostForm = htmlHeaderWithExternalStyle(cssFilename)
|
||||
instanceTitle = \
|
||||
getConfigParam(baseDir, 'instanceTitle')
|
||||
newPostForm = htmlHeaderWithExternalStyle(cssFilename, instanceTitle)
|
||||
|
||||
newPostForm += \
|
||||
'<header>\n' + \
|
||||
|
|
|
@ -9,6 +9,7 @@ __status__ = "Production"
|
|||
import os
|
||||
from utils import isSystemAccount
|
||||
from utils import getDomainFromActor
|
||||
from utils import getConfigParam
|
||||
from person import personBoxJson
|
||||
from webapp_utils import htmlHeaderWithExternalStyle
|
||||
from webapp_utils import htmlFooter
|
||||
|
@ -170,7 +171,9 @@ def htmlFrontScreen(rssIconAtTop: bool,
|
|||
profileFooterStr += ' </tbody>\n'
|
||||
profileFooterStr += '</table>\n'
|
||||
|
||||
instanceTitle = \
|
||||
getConfigParam(baseDir, 'instanceTitle')
|
||||
profileStr = \
|
||||
htmlHeaderWithExternalStyle(cssFilename) + \
|
||||
htmlHeaderWithExternalStyle(cssFilename, instanceTitle) + \
|
||||
profileStr + profileFooterStr + htmlFooter()
|
||||
return profileStr
|
||||
|
|
|
@ -10,6 +10,7 @@ import os
|
|||
from shutil import copyfile
|
||||
from datetime import datetime
|
||||
from utils import getNicknameFromActor
|
||||
from utils import getConfigParam
|
||||
from categories import getHashtagCategories
|
||||
from categories import getHashtagCategory
|
||||
from webapp_utils import getSearchBannerFile
|
||||
|
@ -246,7 +247,9 @@ def htmlSearchHashtagCategory(cssCache: {}, translate: {},
|
|||
if os.path.isfile(baseDir + '/search.css'):
|
||||
cssFilename = baseDir + '/search.css'
|
||||
|
||||
htmlStr = htmlHeaderWithExternalStyle(cssFilename)
|
||||
instanceTitle = \
|
||||
getConfigParam(baseDir, 'instanceTitle')
|
||||
htmlStr = htmlHeaderWithExternalStyle(cssFilename, instanceTitle)
|
||||
|
||||
# show a banner above the search box
|
||||
searchBannerFile, searchBannerFilename = \
|
||||
|
|
|
@ -129,7 +129,9 @@ def htmlLogin(cssCache: {}, translate: {},
|
|||
if not autocomplete:
|
||||
autocompleteStr = 'autocomplete="off" value=""'
|
||||
|
||||
loginForm = htmlHeaderWithExternalStyle(cssFilename)
|
||||
instanceTitle = \
|
||||
getConfigParam(baseDir, 'instanceTitle')
|
||||
loginForm = htmlHeaderWithExternalStyle(cssFilename, instanceTitle)
|
||||
loginForm += '<br>\n'
|
||||
loginForm += '<form method="POST" action="/login">\n'
|
||||
loginForm += ' <div class="imgcontainer">\n'
|
||||
|
|
|
@ -12,6 +12,7 @@ from utils import isEditor
|
|||
from utils import loadJson
|
||||
from utils import getNicknameFromActor
|
||||
from utils import getDomainFromActor
|
||||
from utils import getConfigParam
|
||||
from posts import downloadFollowCollection
|
||||
from posts import getPublicPostInfo
|
||||
from posts import isModerator
|
||||
|
@ -74,7 +75,9 @@ def htmlAccountInfo(cssCache: {}, translate: {},
|
|||
if os.path.isfile(baseDir + '/epicyon.css'):
|
||||
cssFilename = baseDir + '/epicyon.css'
|
||||
|
||||
infoForm = htmlHeaderWithExternalStyle(cssFilename)
|
||||
instanceTitle = \
|
||||
getConfigParam(baseDir, 'instanceTitle')
|
||||
infoForm = htmlHeaderWithExternalStyle(cssFilename, instanceTitle)
|
||||
|
||||
searchNickname = getNicknameFromActor(searchHandle)
|
||||
searchDomain, searchPort = getDomainFromActor(searchHandle)
|
||||
|
@ -248,7 +251,9 @@ def htmlModerationInfo(cssCache: {}, translate: {},
|
|||
if os.path.isfile(baseDir + '/epicyon.css'):
|
||||
cssFilename = baseDir + '/epicyon.css'
|
||||
|
||||
infoForm = htmlHeaderWithExternalStyle(cssFilename)
|
||||
instanceTitle = \
|
||||
getConfigParam(baseDir, 'instanceTitle')
|
||||
infoForm = htmlHeaderWithExternalStyle(cssFilename, instanceTitle)
|
||||
|
||||
infoForm += \
|
||||
'<center><h1><a href="/users/' + nickname + '/moderation">' + \
|
||||
|
|
|
@ -109,7 +109,9 @@ def htmlPersonOptions(defaultTimeline: str,
|
|||
'"><button class="button" name="submitDonate">' + \
|
||||
translate['Donate'] + '</button></a>\n'
|
||||
|
||||
optionsStr = htmlHeaderWithExternalStyle(cssFilename)
|
||||
instanceTitle = \
|
||||
getConfigParam(baseDir, 'instanceTitle')
|
||||
optionsStr = htmlHeaderWithExternalStyle(cssFilename, instanceTitle)
|
||||
optionsStr += '<br><br>\n'
|
||||
optionsStr += '<div class="options">\n'
|
||||
optionsStr += ' <div class="optionsAvatar">\n'
|
||||
|
|
|
@ -22,6 +22,7 @@ from posts import getPersonBox
|
|||
from posts import isDM
|
||||
from posts import downloadAnnounce
|
||||
from posts import populateRepliesJson
|
||||
from utils import getConfigParam
|
||||
from utils import getFullDomain
|
||||
from utils import isEditor
|
||||
from utils import locatePost
|
||||
|
@ -1705,7 +1706,10 @@ def htmlIndividualPost(cssCache: {},
|
|||
if os.path.isfile(baseDir + '/epicyon.css'):
|
||||
cssFilename = baseDir + '/epicyon.css'
|
||||
|
||||
return htmlHeaderWithExternalStyle(cssFilename) + postStr + htmlFooter()
|
||||
instanceTitle = \
|
||||
getConfigParam(baseDir, 'instanceTitle')
|
||||
return htmlHeaderWithExternalStyle(cssFilename, instanceTitle) + \
|
||||
postStr + htmlFooter()
|
||||
|
||||
|
||||
def htmlPostReplies(cssCache: {},
|
||||
|
@ -1740,4 +1744,7 @@ def htmlPostReplies(cssCache: {},
|
|||
if os.path.isfile(baseDir + '/epicyon.css'):
|
||||
cssFilename = baseDir + '/epicyon.css'
|
||||
|
||||
return htmlHeaderWithExternalStyle(cssFilename) + repliesStr + htmlFooter()
|
||||
instanceTitle = \
|
||||
getConfigParam(baseDir, 'instanceTitle')
|
||||
return htmlHeaderWithExternalStyle(cssFilename, instanceTitle) + \
|
||||
repliesStr + htmlFooter()
|
||||
|
|
|
@ -288,7 +288,10 @@ def htmlProfileAfterSearch(cssCache: {},
|
|||
if i >= 20:
|
||||
break
|
||||
|
||||
return htmlHeaderWithExternalStyle(cssFilename) + profileStr + htmlFooter()
|
||||
instanceTitle = \
|
||||
getConfigParam(baseDir, 'instanceTitle')
|
||||
return htmlHeaderWithExternalStyle(cssFilename, instanceTitle) + \
|
||||
profileStr + htmlFooter()
|
||||
|
||||
|
||||
def _getProfileHeader(baseDir: str, nickname: str, domain: str,
|
||||
|
@ -680,8 +683,10 @@ def htmlProfile(rssIconAtTop: bool,
|
|||
nickname, domainFull,
|
||||
extraJson) + licenseStr
|
||||
|
||||
instanceTitle = \
|
||||
getConfigParam(baseDir, 'instanceTitle')
|
||||
profileStr = \
|
||||
htmlHeaderWithExternalStyle(cssFilename) + \
|
||||
htmlHeaderWithExternalStyle(cssFilename, instanceTitle) + \
|
||||
profileStr + htmlFooter()
|
||||
return profileStr
|
||||
|
||||
|
@ -1196,7 +1201,9 @@ def htmlEditProfile(cssCache: {}, translate: {}, baseDir: str, path: str,
|
|||
'style="height:200px">' + peertubeInstancesStr + \
|
||||
'</textarea>\n'
|
||||
|
||||
editProfileForm = htmlHeaderWithExternalStyle(cssFilename)
|
||||
instanceTitle = \
|
||||
getConfigParam(baseDir, 'instanceTitle')
|
||||
editProfileForm = htmlHeaderWithExternalStyle(cssFilename, instanceTitle)
|
||||
|
||||
# top banner
|
||||
editProfileForm += \
|
||||
|
|
|
@ -10,6 +10,7 @@ import os
|
|||
from shutil import copyfile
|
||||
import urllib.parse
|
||||
from datetime import datetime
|
||||
from utils import getConfigParam
|
||||
from utils import getFullDomain
|
||||
from utils import isEditor
|
||||
from utils import loadJson
|
||||
|
@ -50,7 +51,9 @@ def htmlSearchEmoji(cssCache: {}, translate: {},
|
|||
emojiLookupFilename = baseDir + '/emoji/emoji.json'
|
||||
|
||||
# create header
|
||||
emojiForm = htmlHeaderWithExternalStyle(cssFilename)
|
||||
instanceTitle = \
|
||||
getConfigParam(baseDir, 'instanceTitle')
|
||||
emojiForm = htmlHeaderWithExternalStyle(cssFilename, instanceTitle)
|
||||
emojiForm += '<center><h1>' + \
|
||||
translate['Emoji Search'] + \
|
||||
'</h1></center>'
|
||||
|
@ -110,8 +113,10 @@ def htmlSearchSharedItems(cssCache: {}, translate: {},
|
|||
if os.path.isfile(baseDir + '/epicyon.css'):
|
||||
cssFilename = baseDir + '/epicyon.css'
|
||||
|
||||
instanceTitle = \
|
||||
getConfigParam(baseDir, 'instanceTitle')
|
||||
sharedItemsForm = \
|
||||
htmlHeaderWithExternalStyle(cssFilename)
|
||||
htmlHeaderWithExternalStyle(cssFilename, instanceTitle)
|
||||
sharedItemsForm += \
|
||||
'<center><h1>' + \
|
||||
'<a href="' + actor + '/search">' + \
|
||||
|
@ -285,7 +290,9 @@ def htmlSearchEmojiTextEntry(cssCache: {}, translate: {},
|
|||
if os.path.isfile(baseDir + '/follow.css'):
|
||||
cssFilename = baseDir + '/follow.css'
|
||||
|
||||
emojiStr = htmlHeaderWithExternalStyle(cssFilename)
|
||||
instanceTitle = \
|
||||
getConfigParam(baseDir, 'instanceTitle')
|
||||
emojiStr = htmlHeaderWithExternalStyle(cssFilename, instanceTitle)
|
||||
emojiStr += '<div class="follow">\n'
|
||||
emojiStr += ' <div class="followAvatar">\n'
|
||||
emojiStr += ' <center>\n'
|
||||
|
@ -325,7 +332,9 @@ def htmlSearch(cssCache: {}, translate: {},
|
|||
if os.path.isfile(baseDir + '/search.css'):
|
||||
cssFilename = baseDir + '/search.css'
|
||||
|
||||
followStr = htmlHeaderWithExternalStyle(cssFilename)
|
||||
instanceTitle = \
|
||||
getConfigParam(baseDir, 'instanceTitle')
|
||||
followStr = htmlHeaderWithExternalStyle(cssFilename, instanceTitle)
|
||||
|
||||
# show a banner above the search box
|
||||
searchBannerFile, searchBannerFilename = \
|
||||
|
@ -459,7 +468,9 @@ def htmlSkillsSearch(actor: str,
|
|||
if os.path.isfile(baseDir + '/epicyon.css'):
|
||||
cssFilename = baseDir + '/epicyon.css'
|
||||
|
||||
skillSearchForm = htmlHeaderWithExternalStyle(cssFilename)
|
||||
instanceTitle = \
|
||||
getConfigParam(baseDir, 'instanceTitle')
|
||||
skillSearchForm = htmlHeaderWithExternalStyle(cssFilename, instanceTitle)
|
||||
skillSearchForm += \
|
||||
'<center><h1><a href = "' + actor + '/search">' + \
|
||||
translate['Skills search'] + ': ' + \
|
||||
|
@ -525,8 +536,10 @@ def htmlHistorySearch(cssCache: {}, translate: {}, baseDir: str,
|
|||
if os.path.isfile(baseDir + '/epicyon.css'):
|
||||
cssFilename = baseDir + '/epicyon.css'
|
||||
|
||||
instanceTitle = \
|
||||
getConfigParam(baseDir, 'instanceTitle')
|
||||
historySearchForm = \
|
||||
htmlHeaderWithExternalStyle(cssFilename)
|
||||
htmlHeaderWithExternalStyle(cssFilename, instanceTitle)
|
||||
|
||||
# add the page title
|
||||
domainFull = getFullDomain(domain, port)
|
||||
|
@ -650,8 +663,10 @@ def htmlHashtagSearch(cssCache: {},
|
|||
endIndex = noOfLines - 1
|
||||
|
||||
# add the page title
|
||||
instanceTitle = \
|
||||
getConfigParam(baseDir, 'instanceTitle')
|
||||
hashtagSearchForm = \
|
||||
htmlHeaderWithExternalStyle(cssFilename)
|
||||
htmlHeaderWithExternalStyle(cssFilename, instanceTitle)
|
||||
if nickname:
|
||||
hashtagSearchForm += '<center>\n' + \
|
||||
'<h1><a href="/users/' + nickname + '/search">#' + \
|
||||
|
|
|
@ -7,6 +7,7 @@ __email__ = "bob@freedombone.net"
|
|||
__status__ = "Production"
|
||||
|
||||
import os
|
||||
from utils import getConfigParam
|
||||
from webapp_utils import htmlHeaderWithExternalStyle
|
||||
from webapp_utils import htmlFooter
|
||||
|
||||
|
@ -19,7 +20,9 @@ def htmlSuspended(cssCache: {}, baseDir: str) -> str:
|
|||
if os.path.isfile(baseDir + '/suspended.css'):
|
||||
cssFilename = baseDir + '/suspended.css'
|
||||
|
||||
suspendedForm = htmlHeaderWithExternalStyle(cssFilename)
|
||||
instanceTitle = \
|
||||
getConfigParam(baseDir, 'instanceTitle')
|
||||
suspendedForm = htmlHeaderWithExternalStyle(cssFilename, instanceTitle)
|
||||
suspendedForm += '<div><center>\n'
|
||||
suspendedForm += ' <p class="screentitle">Account Suspended</p>\n'
|
||||
suspendedForm += ' <p>See <a href="/terms">Terms of Service</a></p>\n'
|
||||
|
|
|
@ -8,6 +8,7 @@ __status__ = "Production"
|
|||
|
||||
import os
|
||||
import time
|
||||
from utils import getConfigParam
|
||||
from utils import getFullDomain
|
||||
from utils import isEditor
|
||||
from utils import removeIdEnding
|
||||
|
@ -255,7 +256,9 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
|||
eventsButton + '"><span>' + translate['Events'] + \
|
||||
'</span></button></a>'
|
||||
|
||||
tlStr = htmlHeaderWithExternalStyle(cssFilename)
|
||||
instanceTitle = \
|
||||
getConfigParam(baseDir, 'instanceTitle')
|
||||
tlStr = htmlHeaderWithExternalStyle(cssFilename, instanceTitle)
|
||||
|
||||
_logTimelineTiming(enableTimingLog, timelineStartTime, boxName, '4')
|
||||
|
||||
|
|
|
@ -37,7 +37,9 @@ def htmlTermsOfService(cssCache: {}, baseDir: str,
|
|||
if os.path.isfile(baseDir + '/epicyon.css'):
|
||||
cssFilename = baseDir + '/epicyon.css'
|
||||
|
||||
TOSForm = htmlHeaderWithExternalStyle(cssFilename)
|
||||
instanceTitle = \
|
||||
getConfigParam(baseDir, 'instanceTitle')
|
||||
TOSForm = htmlHeaderWithExternalStyle(cssFilename, instanceTitle)
|
||||
TOSForm += '<div class="container">' + TOSText + '</div>\n'
|
||||
if adminNickname:
|
||||
adminActor = httpPrefix + '://' + domainFull + \
|
||||
|
|
|
@ -42,7 +42,10 @@ def htmlFollowingList(cssCache: {}, baseDir: str,
|
|||
if os.path.isfile(baseDir + '/epicyon.css'):
|
||||
cssFilename = baseDir + '/epicyon.css'
|
||||
|
||||
followingListHtml = htmlHeaderWithExternalStyle(cssFilename)
|
||||
instanceTitle = \
|
||||
getConfigParam(baseDir, 'instanceTitle')
|
||||
followingListHtml = htmlHeaderWithExternalStyle(cssFilename,
|
||||
instanceTitle)
|
||||
for followingAddress in followingList:
|
||||
if followingAddress:
|
||||
followingListHtml += \
|
||||
|
@ -61,7 +64,10 @@ def htmlHashtagBlocked(cssCache: {}, baseDir: str, translate: {}) -> str:
|
|||
if os.path.isfile(baseDir + '/suspended.css'):
|
||||
cssFilename = baseDir + '/suspended.css'
|
||||
|
||||
blockedHashtagForm = htmlHeaderWithExternalStyle(cssFilename)
|
||||
instanceTitle = \
|
||||
getConfigParam(baseDir, 'instanceTitle')
|
||||
blockedHashtagForm = htmlHeaderWithExternalStyle(cssFilename,
|
||||
instanceTitle)
|
||||
blockedHashtagForm += '<div><center>\n'
|
||||
blockedHashtagForm += \
|
||||
' <p class="screentitle">' + \
|
||||
|
@ -521,7 +527,8 @@ def getRightImageFile(baseDir: str,
|
|||
nickname, domain, theme)
|
||||
|
||||
|
||||
def htmlHeaderWithExternalStyle(cssFilename: str, lang='en') -> str:
|
||||
def htmlHeaderWithExternalStyle(cssFilename: str, instanceTitle: str,
|
||||
lang='en') -> str:
|
||||
htmlStr = '<!DOCTYPE html>\n'
|
||||
htmlStr += '<html lang="' + lang + '">\n'
|
||||
htmlStr += ' <head>\n'
|
||||
|
@ -530,7 +537,7 @@ def htmlHeaderWithExternalStyle(cssFilename: str, lang='en') -> str:
|
|||
htmlStr += ' <link rel="stylesheet" href="' + cssFile + '">\n'
|
||||
htmlStr += ' <link rel="manifest" href="/manifest.json">\n'
|
||||
htmlStr += ' <meta name="theme-color" content="grey">\n'
|
||||
htmlStr += ' <title>Epicyon</title>\n'
|
||||
htmlStr += ' <title>' + instanceTitle + '</title>\n'
|
||||
htmlStr += ' </head>\n'
|
||||
htmlStr += ' <body>\n'
|
||||
return htmlStr
|
||||
|
|
Loading…
Reference in New Issue