wmlunits: Include the build timestamp in the main panel (closes #5)

This commit is contained in:
Ignacio R. Morelle 2017-08-14 03:03:17 -03:00
parent 9099cb484b
commit 1fe8ed3a13
2 changed files with 11 additions and 7 deletions

View file

@ -112,8 +112,6 @@ WESMERE_HEADER = '''\
WESMERE_FOOTER = '''\
</div> <!-- end content -->
<div class="centerbox"><div id="lastmod">%(generation_note)s</div></div>
</div> <!-- end main -->
<div id="footer-sep"></div>
@ -145,11 +143,13 @@ def website_header(title='', path='../../', classes=[]):
"cssver": WESMERE_CSS_VERSION,
"classes": ' '.join(['wmlunits'] + classes)}
def website_footer(timestamp=''):
"""Returns the website footer, including the current timestamp."""
if not timestamp:
timestamp = "Last updated on " + time.ctime() + "."
return WESMERE_FOOTER % { "generation_note": timestamp }
def website_footer():
"""Returns the website footer."""
return WESMERE_FOOTER
def build_timestamp():
"""Returns an element containing the current date and time."""
return '<div id="lastmod">Last updated on %s.</div>' % time.ctime()
all_written_html_files = []
@ -934,6 +934,7 @@ class HTMLOutput:
self.write_units()
self.output.write(HTML_CLEAR_FLOATS)
self.output.write(build_timestamp())
self.output.write('</div>')
self.output.write(website_footer())
@ -1292,6 +1293,7 @@ class HTMLOutput:
write('</div>') # columns parent
self.output.write(HTML_CLEAR_FLOATS)
self.output.write(build_timestamp())
write('</div>') # main
self.output.write(website_footer())

View file

@ -50,6 +50,7 @@ def write_addon_overview(folder, addon):
w('</div> <!-- overview -->')
w(html_output.build_timestamp())
w(html_output.website_footer())
@ -172,6 +173,7 @@ def main(folder):
w('</div> <!-- overview -->')
w(html_output.build_timestamp())
w(html_output.website_footer())
if __name__ == "__main__":