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