From ff25581e9923622b6959bdb20c54c249f31ec3b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Monta=C3=B1ana?= Date: Thu, 1 Jun 2023 11:40:41 +0200 Subject: [PATCH] Separate folders --- benchmark/scripts/app/static/css/main.css | 30 ++++++++++ .../partials => static/js}/excelFiles.js | 0 .../scripts/app/templates/base_bootstrap.html | 57 ++++--------------- .../scripts/app/templates/base_bulma.html | 43 ++++---------- benchmark/scripts/app/templates/datasets.html | 2 +- .../app/templates/{partials => js}/report.js | 0 .../app/templates/{partials => js}/select.js | 0 benchmark/scripts/app/templates/report.html | 37 ++++++------ benchmark/scripts/app/templates/select.html | 22 +++---- 9 files changed, 83 insertions(+), 108 deletions(-) create mode 100644 benchmark/scripts/app/static/css/main.css rename benchmark/scripts/app/{templates/partials => static/js}/excelFiles.js (100%) rename benchmark/scripts/app/templates/{partials => js}/report.js (100%) rename benchmark/scripts/app/templates/{partials => js}/select.js (100%) diff --git a/benchmark/scripts/app/static/css/main.css b/benchmark/scripts/app/static/css/main.css new file mode 100644 index 0000000..4d68c79 --- /dev/null +++ b/benchmark/scripts/app/static/css/main.css @@ -0,0 +1,30 @@ +.alternate-font { + font-family: Arial; +} + +tbody { + font-family: Courier; +} + +.tag { + cursor: pointer; +} + +.ajaxLoading { + cursor: progress !important; +} + +#file-table tbody tr.selected td { + background-color: #0dcaf0; + color: white; +} + +#report-table tbody tr.selected td { + background-color: #0dcaf0; + color: white; +} + +.btn-small { + padding: 0.25rem 0.5rem; + font-size: 0.75rem; +} \ No newline at end of file diff --git a/benchmark/scripts/app/templates/partials/excelFiles.js b/benchmark/scripts/app/static/js/excelFiles.js similarity index 100% rename from benchmark/scripts/app/templates/partials/excelFiles.js rename to benchmark/scripts/app/static/js/excelFiles.js diff --git a/benchmark/scripts/app/templates/base_bootstrap.html b/benchmark/scripts/app/templates/base_bootstrap.html index fc61da9..f81e603 100644 --- a/benchmark/scripts/app/templates/base_bootstrap.html +++ b/benchmark/scripts/app/templates/base_bootstrap.html @@ -2,54 +2,19 @@ {{ title }} - - - - - - - - + + + + + - {% block content %} {% endblock %} + {% block content %} + + {% endblock %} - {% block jscript %} {% endblock %} + {% block jscript %} + + {% endblock %} diff --git a/benchmark/scripts/app/templates/base_bulma.html b/benchmark/scripts/app/templates/base_bulma.html index cc27f4f..876a23d 100644 --- a/benchmark/scripts/app/templates/base_bulma.html +++ b/benchmark/scripts/app/templates/base_bulma.html @@ -2,41 +2,18 @@ {{ title }} - - - - - + + + + - {% block content %} {% endblock %} + {% block content %} + + {% endblock %} - {% block jscript %} {% endblock %} + {% block jscript %} + + {% endblock %} diff --git a/benchmark/scripts/app/templates/datasets.html b/benchmark/scripts/app/templates/datasets.html index c11c1ae..a48a163 100644 --- a/benchmark/scripts/app/templates/datasets.html +++ b/benchmark/scripts/app/templates/datasets.html @@ -43,7 +43,7 @@ {% endblock %} {% block jscript %} +{% endmacro %} +{% set title = 'Report Viewer' %} +{% extends 'base_' ~ framework ~ '.html' %} +{% block content %} + {% if framework == 'bootstrap' %} + {% set center = 'text-center' %} + {% set right = 'text-end' %} + {% set button = 'btn btn-primary' %} + {% include 'partials/table_report_bootstrap.html' %} {% else %} - {% set center = "has-text-centered" %} - {% set right = "has-text-right" %} - {% set button = "button is-primary" %} - {% include "partials/table_report_bulma.html" %} + {% set center = 'has-text-centered' %} + {% set right = 'has-text-right' %} + {% set button = 'button is-primary' %} + {% include 'partials/table_report_bulma.html' %} {% endif %} {% endblock %} {% block jscript %} - {% if framework == "bootstrap" %} - {% set selected = "selected" %} + {% if framework == 'bootstrap' %} + {% set selected = 'selected' %} {% else %} - {% set selected = "is-selected" %} + {% set selected = 'is-selected' %} {% endif %} + {{ javascript("js/excelFiles.js") }} {% endblock %} diff --git a/benchmark/scripts/app/templates/select.html b/benchmark/scripts/app/templates/select.html index 2fcd44c..fccb625 100644 --- a/benchmark/scripts/app/templates/select.html +++ b/benchmark/scripts/app/templates/select.html @@ -1,20 +1,20 @@ -{% set title = "Benchmark Results" %} -{% extends "base_" ~ framework ~ ".html" %} -{% import "partials/cfg_select_" ~ framework ~ ".jinja" as select %} +{% macro javascript(file) %} + +{% endmacro %} +{% set title = 'Benchmark Results' %} +{% extends 'base_' ~ framework ~ '.html' %} +{% import 'partials/cfg_select_' ~ framework ~ '.jinja' as select %} {% block content %} - {% include "partials/table_select_design.html" %} + {% include 'partials/table_select_design.html' %} {% endblock %} {% block jscript %} - {% if framework == "bootstrap" %} - + {% if framework == 'bootstrap' %} + {% endif %} + {{ javascript('/js/excelFiles.js') }} {% endblock %} - - \ No newline at end of file