report.css, lf_report.py , lf_check.py : formatting updates to have

report anchored left

Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
This commit is contained in:
Chuck SmileyRekiere
2021-07-23 18:09:38 -06:00
parent 29cf163a88
commit d79a3c1829
3 changed files with 49 additions and 2 deletions

View File

@@ -187,6 +187,20 @@ li {
max-width: 1000px;
max-height: 205px;
}
#BannerLeft {
background-image:url("banner.png");
background-repeat:no-repeat;
padding: 0;
margin: 1em;
min-width: 1000px;
min-height: 205px;
width: 1000px;
height: 205px;
max-width: 1000px;
max-height: 205px;
}
#BannerLogo {
text-align: right;
padding: 25px;

View File

@@ -329,6 +329,39 @@ class lf_report():
)
self.html += self.banner_html
def build_banner_left(self):
# NOTE: {{ }} are the ESCAPED curly braces
self.banner_html = """<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='UTF-8'>
<meta name='viewport' content='width=device-width, initial-scale=1' />
<style>
body {{ margin: 0; padding: 0; }}
</style>
<link rel='stylesheet' href='report.css' />
<link rel='stylesheet' href='custom.css' />
<title>{title}</title>
</head>
<body>
<div id='BannerBack'>
<div id='BannerLeft'>
<br/>
<img id='BannerLogo' align='right' src="CandelaLogo2-90dpi-200x90-trans.png" border='0'/>
<div class='HeaderStyle'>
<br>
<h1 class='TitleFontPrint' style='color:darkgreen;'> {title} </h1>
<h3 class='TitleFontPrint' style='color:darkgreen;'>{date}</h3>
</div>
</div>
</div>
""".format(
title=self.title,
date=self.date,
)
self.html += self.banner_html
def build_table_title(self):
self.table_title_html = """
<!-- Table Title-->

View File

@@ -1140,7 +1140,7 @@ Example :
# generate output reports
report.set_title("LF Check: lf_check.py")
report.build_banner()
report.build_banner_left()
report.start_content_div2()
report.set_table_title("LF Check Test Results")
report.build_table_title()
@@ -1149,7 +1149,7 @@ Example :
html_results = check.get_html_results()
report.set_custom_html(html_results)
report.build_custom()
report.build_footer_no_png()
report.build_footer()
html_report = report.write_html_with_timestamp()
print("html report: {}".format(html_report))
try: