From 65064a7d2c20de400a1a3659193b55c34cf2c6a4 Mon Sep 17 00:00:00 2001 From: DastInDark <2350416+hitenkoku@users.noreply.github.com> Date: Wed, 28 Sep 2022 09:07:18 +0900 Subject: [PATCH 1/4] to adjust css, Result area is added in section tag #712 --- src/options/htmlreport.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/options/htmlreport.rs b/src/options/htmlreport.rs index 372a7b36..30143c2f 100644 --- a/src/options/htmlreport.rs +++ b/src/options/htmlreport.rs @@ -93,6 +93,8 @@ pub fn create_html_file(input_html: String, path_str: String) { } let mut html_writer = BufWriter::new(File::create(path).unwrap()); + let result_contents = format!("
{}
", input_html); + let html_data = format!( "{}", html! { @@ -105,7 +107,7 @@ pub fn create_html_file(input_html: String, path_str: String) { } body { img(id="logo", src = "./logo.png"); - : Raw(input_html.clone().as_str()); + : Raw(result_contents.as_str()); } } From 95ed0840ef48cc22956064b4127932064b7b1f01 Mon Sep 17 00:00:00 2001 From: DastInDark <2350416+hitenkoku@users.noreply.github.com> Date: Wed, 28 Sep 2022 09:09:13 +0900 Subject: [PATCH 2/4] added logo centerilng css example --- hayabusa_report.css | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hayabusa_report.css b/hayabusa_report.css index e6b930c9..23f42df8 100644 --- a/hayabusa_report.css +++ b/hayabusa_report.css @@ -1,4 +1,11 @@ h2 { background-color: blue; color: white; +} + +img#logo { + width: 50%; + display: block; + margin-left: auto; + margin-right: auto; } \ No newline at end of file From 0d0d8724bc6cc4eef858b5d14b908628ee57b8a5 Mon Sep 17 00:00:00 2001 From: DastInDark <2350416+hitenkoku@users.noreply.github.com> Date: Wed, 28 Sep 2022 09:09:40 +0900 Subject: [PATCH 3/4] logo size changed in html report --- hayabusa_report.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hayabusa_report.css b/hayabusa_report.css index 23f42df8..8133f2b0 100644 --- a/hayabusa_report.css +++ b/hayabusa_report.css @@ -4,7 +4,7 @@ h2 { } img#logo { - width: 50%; + width: 25%; display: block; margin-left: auto; margin-right: auto; From 0fccc6a2c30bb662a3125aef395f3c52cee90952 Mon Sep 17 00:00:00 2001 From: DastInDark <2350416+hitenkoku@users.noreply.github.com> Date: Wed, 28 Sep 2022 09:15:57 +0900 Subject: [PATCH 4/4] added logo img tag to inside section tag --- src/options/htmlreport.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/options/htmlreport.rs b/src/options/htmlreport.rs index 30143c2f..03a2972f 100644 --- a/src/options/htmlreport.rs +++ b/src/options/htmlreport.rs @@ -93,7 +93,6 @@ pub fn create_html_file(input_html: String, path_str: String) { } let mut html_writer = BufWriter::new(File::create(path).unwrap()); - let result_contents = format!("
{}
", input_html); let html_data = format!( "{}", @@ -106,8 +105,10 @@ pub fn create_html_file(input_html: String, path_str: String) { link(rel="icon", type="image/png", href="./favicon.png"); } body { - img(id="logo", src = "./logo.png"); - : Raw(result_contents.as_str()); + section { + img(id="logo", src = "./logo.png"); + : Raw(input_html.as_str()); + } } }