Skip to content

Commit a923f51

Browse files
authored
Merge pull request #49 from wseis/main
add lrv table
2 parents 3d9ecbb + 9b2d3a5 commit a923f51

File tree

2 files changed

+39
-4
lines changed

2 files changed

+39
-4
lines changed

tools/qmratool/static/qmratool/css/styles.css

+11
Original file line numberDiff line numberDiff line change
@@ -171,3 +171,14 @@ footer {
171171
border-color: #8081F1;
172172

173173
}
174+
175+
/* Custom CSS for table cell content centering */
176+
.table th, .table td {
177+
text-align: center; /* Center align table cell content */
178+
vertical-align: middle; /* Center vertically */
179+
}
180+
/* Custom background color for the table header */
181+
.custom-header {
182+
background-color: transparent !important; /* Green background, change as needed */
183+
color: black; /* White text color */
184+
}

tools/qmratool/static/qmratool/option.js

+28-4
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,34 @@ document.addEventListener('DOMContentLoaded', function() {
7878
return `<strong>${titleCaseDataName}</strong><br>${data.description}<br>Events per year [N]: <strong>${data.events_per_year}</strong><br>Volume per event [L]: <strong>${data.volume_per_event}</strong>`;
7979
} else if (fieldName === 'treatment') {
8080
return `<strong>${titleCaseDataName}</strong><br>${data.description}<br>
81-
Virus removal: <strong>${data.virus_min}-${data.virus_max}</strong><br>
82-
Bacteria removal:: <strong>${data.bacteria_min}-${data.bacteria_max}</strong> <br>
83-
Protozoa removal:: <strong>${data.protozoa_min}-${data.protozoa_max}</strong>`;
84-
81+
<table class="table table-bordered mt-3">
82+
<thead class="custom-header">
83+
<tr>
84+
<th>Pathogen Group</th>
85+
<th>Minimum LRV</th>
86+
<th>Maximum LRV</th>
87+
</tr>
88+
</thead>
89+
<tbody>
90+
<tr>
91+
<td>Viruses</td>
92+
<td>${data.virus_min}</td>
93+
<td>${data.virus_max}</td>
94+
</tr>
95+
<tr>
96+
<td>Bacteria</td>
97+
<td>${data.bacteria_min}</td>
98+
<td>${data.bacteria_max}</td>
99+
</tr>
100+
<tr>
101+
<td>Protozoa</td>
102+
<td>${data.protozoa_min}</td>
103+
<td>${data.protozoa_min}</td>
104+
</tr>
105+
106+
</tbody>
107+
</table>`
108+
85109
}
86110
else {
87111
return `<strong>${titleCaseDataName}</strong><br>${data.description}`;

0 commit comments

Comments
 (0)