footer: some fixes (licurl) + better tab HTML code
This commit is contained in:
parent
a2b9f94a52
commit
58adeed186
|
@ -67,6 +67,7 @@ domain_values = \
|
||||||
'domain_www_url',
|
'domain_www_url',
|
||||||
'domain_wip_url',
|
'domain_wip_url',
|
||||||
'domain_title',
|
'domain_title',
|
||||||
|
'domain_date',
|
||||||
'domain_about',
|
'domain_about',
|
||||||
'domain_lang',
|
'domain_lang',
|
||||||
'domain_mail',
|
'domain_mail',
|
||||||
|
@ -74,6 +75,8 @@ domain_values = \
|
||||||
'domain_logo',
|
'domain_logo',
|
||||||
'domain_license',
|
'domain_license',
|
||||||
'domain_licurl',
|
'domain_licurl',
|
||||||
|
'domain_legalurl',
|
||||||
|
'domain_termsurl',
|
||||||
'domain_css',
|
'domain_css',
|
||||||
'domain_sep',
|
'domain_sep',
|
||||||
'domain_relme',
|
'domain_relme',
|
||||||
|
|
|
@ -31,6 +31,7 @@ import logs, db, tyto, html
|
||||||
domain_footer_about = \
|
domain_footer_about = \
|
||||||
'Un petit essai'
|
'Un petit essai'
|
||||||
|
|
||||||
|
|
||||||
#==========================#
|
#==========================#
|
||||||
# Manage Argument 'domain' #
|
# Manage Argument 'domain' #
|
||||||
# target: 3rd argument #
|
# target: 3rd argument #
|
||||||
|
@ -52,7 +53,6 @@ def manage_domain(target):
|
||||||
# When an active and complete domain is needed #
|
# When an active and complete domain is needed #
|
||||||
#----------------------------------------------#
|
#----------------------------------------------#
|
||||||
def domain_needed():
|
def domain_needed():
|
||||||
# Check if can process
|
|
||||||
if not db.domain_exists \
|
if not db.domain_exists \
|
||||||
or db.incomplete_domain \
|
or db.incomplete_domain \
|
||||||
or not db.domain_active:
|
or not db.domain_active:
|
||||||
|
@ -854,16 +854,15 @@ def create_footer(option):
|
||||||
if not res in ['y', 'Y']: return
|
if not res in ['y', 'Y']: return
|
||||||
|
|
||||||
# Default footer contents
|
# Default footer contents
|
||||||
Tytosrc = '(<a href="%s" '%tyto.Tytogit + \
|
Tytosrc = '(\n%s<a href="%s"\n'%(6 * ' ', tyto.Tytogit) + \
|
||||||
'title="%s" '%tyto.trans[4][tyto.n] + \
|
'%stitle="%s"\n'%(9 * ' ', tyto.trans[4][tyto.n]) + \
|
||||||
'id="footer_item_link">%s</a>)'%tyto.trans[3][tyto.n]
|
'%sid="footer_item_link">%s</a>)'%(9 * ' ', tyto.trans[3][tyto.n])
|
||||||
tyto_show = \
|
tyto_show = \
|
||||||
'<a href="%s"'%tyto.Tytoweb + \
|
'\n%s<a href="%s"\n'%(6 * ' ', tyto.Tytoweb) + \
|
||||||
'title="%s"'%tyto.trans[5][tyto.n] + \
|
'%stitle="%s"\n'%(9 * ' ', tyto.trans[5][tyto.n]) + \
|
||||||
'class="footer_item_link">%s</a> %s'%(tyto.Tyto, Tytosrc)
|
'%sclass="footer_item_link">%s</a> %s'%(9 * ' ', tyto.Tyto, Tytosrc)
|
||||||
|
|
||||||
# Show copyright date from creation to now year
|
# Show copyright date from creation to now year
|
||||||
print(db.domain_date, datetime.now().year)
|
|
||||||
if int(db.domain_date) == int(datetime.now().year):
|
if int(db.domain_date) == int(datetime.now().year):
|
||||||
footer_date = db.domain_date
|
footer_date = db.domain_date
|
||||||
else:
|
else:
|
||||||
|
@ -871,29 +870,32 @@ def create_footer(option):
|
||||||
|
|
||||||
# Simple link to home
|
# Simple link to home
|
||||||
domain_home = \
|
domain_home = \
|
||||||
'<a href="/" ' + \
|
'\n%s<a href="/"\n'%(6 * ' ') + \
|
||||||
'title="%s" '%(tyto.trans[1][tyto.n]) + \
|
'%stitle="%s"\n'%(9 * ' ',tyto.trans[1][tyto.n]) + \
|
||||||
'id="footer_title_link">%s</a>'%db.domain_title
|
'%sid="footer_title_link">%s</a>'%(9 * ' ', db.domain_title)
|
||||||
|
|
||||||
# Show domain_HTML_about (if not empty), else domain_about
|
# Show domain_HTML_about (if not empty), else domain_about
|
||||||
if domain_footer_about: db.domain_about = domain_footer_about
|
if domain_footer_about: db.domain_about = domain_footer_about
|
||||||
|
|
||||||
|
# License URL
|
||||||
|
if not db.domain_licurl: db.domain_licurl = '/'
|
||||||
|
|
||||||
# Links for laws (Terms and legals)
|
# Links for laws (Terms and legals)
|
||||||
if db.domain_legalurl:
|
if db.domain_legalurl:
|
||||||
legal_link = \
|
legal_link = \
|
||||||
'<a href="%s" '%db.domain_termsurl + \
|
'<a href="%s"\n'%db.domain_termsurl + \
|
||||||
'title="%s %s" '%(tyto.trans[16][tyto.n], db.domain_title) + \
|
'%stitle="%s %s"\n'%(11 * ' ', tyto.trans[16][tyto.n], db.domain_title) + \
|
||||||
'class="footer_item_link">%s</a>'%tyto.trans[16][tyto.n]
|
'%sclass="footer_item_link">%s</a>'%(11 * ' ', tyto.trans[16][tyto.n])
|
||||||
|
|
||||||
if db.domain_termsurl:
|
if db.domain_termsurl:
|
||||||
terms_link = \
|
terms_link = \
|
||||||
'<a href="%s" '%db.domain_legalurl + \
|
'<a href="%s"\n'%db.domain_legalurl + \
|
||||||
'title="%s %s" '%(tyto.trans[17][tyto.n], db.domain_title) + \
|
'%stitle="%s %s"\n'%(11 * ' ', tyto.trans[17][tyto.n], db.domain_title) + \
|
||||||
'class="footer_item_link">%s</a>'%tyto.trans[15][tyto.n]
|
'%sclass="footer_item_link">%s</a>'%(11 * ' ', tyto.trans[15][tyto.n])
|
||||||
|
|
||||||
footer_law = ''
|
footer_law = ''
|
||||||
if db.domain_termsurl and db.domain_legalurl:
|
if db.domain_termsurl and db.domain_legalurl:
|
||||||
footer_law = '%s - %s'%(legal_link, terms_link)
|
footer_law = '%s - \n%s%s'%(legal_link, 8 * ' ', terms_link)
|
||||||
elif db.domain_termsurl:
|
elif db.domain_termsurl:
|
||||||
footer_law = terms_link
|
footer_law = terms_link
|
||||||
elif db.domain_legalurl:
|
elif db.domain_legalurl:
|
||||||
|
@ -919,9 +921,10 @@ def create_footer(option):
|
||||||
'-->\n' + \
|
'-->\n' + \
|
||||||
'<footer id="footer_page">\n' + \
|
'<footer id="footer_page">\n' + \
|
||||||
' <div id="footer_infos">\n' + \
|
' <div id="footer_infos">\n' + \
|
||||||
' <h1 id="footer_site_title">%s %s</h1>\n'%(
|
' <h1 id="footer_site_title">%s %s\n'%(
|
||||||
tyto.trans[11][tyto.n], domain_home
|
tyto.trans[11][tyto.n], domain_home
|
||||||
) + \
|
) + \
|
||||||
|
' </h1>\n' + \
|
||||||
' <p id="footer_site_about">%s</p>\n'%(db.domain_about) + \
|
' <p id="footer_site_about">%s</p>\n'%(db.domain_about) + \
|
||||||
' </div>\n' + \
|
' </div>\n' + \
|
||||||
'\n' + \
|
'\n' + \
|
||||||
|
|
Loading…
Reference in New Issue