Fixed results' styling

This commit is contained in:
Granahir2 2024-06-02 12:45:53 +02:00
parent d2b9ba9ae0
commit 5a3177825f
5 changed files with 44 additions and 4 deletions

1
.gitignore vendored
View file

@ -1,4 +1,3 @@
*.html
analyzer
results/
_build/

4
scripts/footer.html Normal file
View file

@ -0,0 +1,4 @@
</div>
</body>
<footer><a href="./index.html">go back to index</a></footer>
</html>

22
scripts/header.html Normal file
View file

@ -0,0 +1,22 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="../scripts/style.css">
<link href='https://fonts.googleapis.com/css?family=Inria Serif' rel='stylesheet'>
<link href='https://fonts.googleapis.com/css?family=Inria Sans' rel='stylesheet'>
<link href='https://fonts.googleapis.com/css?family=Ubuntu Mono' rel='stylesheet'>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.6.0/styles/default.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.6.0/highlight.min.js"></script>
<script>
// first, find all the div.code blocks
document.addEventListener('DOMContentLoaded', (event) => {
document.querySelectorAll("div.c").forEach(block => {
// then highlight each
hljs.highlightBlock(block);
});
});
</script>
<title>TITLE</title>
</head>
<body>

11
scripts/header_main.html Normal file
View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="../scripts/style.css">
<link href='https://fonts.googleapis.com/css?family=Inria Serif' rel='stylesheet'>
<link href='https://fonts.googleapis.com/css?family=Inria Sans' rel='stylesheet'>
<link href='https://fonts.googleapis.com/css?family=Ubuntu Mono' rel='stylesheet'>
<title>Tests overview</title>
</head>
<body>

View file

@ -47,9 +47,13 @@ create_file() {
file_html="${result_folder}/${filename}.html"
if [[ ! -e "$file_html" ]]
then
# cat "scripts/header.html" > $file_html
cat "scripts/header.html" > $file_html
sed -i "s@TITLE@${filename}@" $file_html
echo "<head>" >> $file_html
echo "<link rel=\"stylesheet\" href=\"../scripts/style.css\">" >> $file_html
echo "</head>" >> $file_html
echo "<h1>${filename}</h1>" >> $file_html
echo "<div class=\"c\">" >> $file_html
cat $file >> $file_html
echo "</div>" >> $file_html
@ -61,7 +65,7 @@ create_file() {
end_file() {
# After the analysis the cfg.dot should correspond to the current test
dot -Tsvg cfg.dot -o ${result_folder}/${filename}.svg
# cat "scripts/footer.html" >> $file_html
cat "scripts/footer.html" >> $file_html
}
get_nth_line() {
@ -252,7 +256,7 @@ print_end() {
}
mkdir ${result_folder}
# cat "scripts/header_main.html" > $index_html
cat "scripts/header_main.html" > $index_html
echo "<h1>Overview</h1>" >> $index_html
echo "<table>" >> $index_html
total=$(find $bench -iname "*.c" | wc -l)