Skip to content

Commit

Permalink
Update some display elements
Browse files Browse the repository at this point in the history
- Give page title in navbar class "navbar-text" and add padding
- Change classes of columns for left and right boxes to ensure correct sizing on mobile (closes #18)
- Change active indicator from "True" / "False" to check mark / cross mark
- Add row and column to datasets table (note that this does not solve #1)
  • Loading branch information
jeanpaulrsoucy committed Dec 21, 2022
1 parent abf7941 commit cf3a3ba
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 12 deletions.
28 changes: 17 additions & 11 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@
<!-- header -->
<header class="navbar navbar-light">
<div class="container-fluid">
<a class="navbar-brand" href="#">
<img src="favicon.png" alt="" width="30" height="30" class="d-inline-block align-text-top">
Canadian COVID-19 Data Archive: Data Explorer
<a class="navbar-brand px-2" href="#">
<p class="navbar-text">
<img src="favicon.png" alt="" width="30" height="30" class="d-inline-block align-text-top">
Canadian COVID-19 Data Archive: Data Explorer
</p>
</a>
</div>
</header>
Expand All @@ -40,15 +42,15 @@
</div>
</div>
<div class="row">
<div class="col">
<div class="col-sm-6">
<div class="card text-dark bg-light mb-3">
<div class="card-body">
<div id="tree"></div>
<p><span id="update-time"></span></p>
</div>
</div>
</div>
<div class="col">
<div class="col-sm-6">
<div id="table-container" class="card text-dark bg-light mb-3 hidden">
<div class="card-body">
<div id="files-error" class="hidden">
Expand All @@ -65,12 +67,16 @@
</div>
<!-- datasets table -->
<div class="container-fluid">
<div class="card text-dark bg-light mb-3">
<div class="card-body">
<h4 id="title-datasets" >Search list of datasets</h4>
<p>Click the green button to see more details about each dataset.</p>
<div id="container-datasets">
<table id="table-datasets" class="display"></table>
<div class="row">
<div class="col">
<div class="card text-dark bg-light mb-3">
<div class="card-body">
<h4 id="title-datasets" >Search list of datasets</h4>
<p>Click the green button to see more details about each dataset.</p>
<div id="container-datasets">
<table id="table-datasets" class="display"></table>
</div>
</div>
</div>
</div>
</div>
Expand Down
7 changes: 6 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,11 @@ async function buildTableDatasets(json_datasets, uuid_selected) {
// extract data from JSON
const datasets = Object.keys(json_datasets).map(key => json_datasets[key]);

// convert active True / False to check mark / cross mark
datasets.forEach(function(d) {
d['active'] = d['active'] == 'True' ? '\u2705' : '\u274c'
});

// create single group variable from meta_group_1 and meta_group_2
datasets.forEach(function(d) {
if (typeof(d['metadata']['meta_group_2']) == "undefined") {
Expand Down Expand Up @@ -355,7 +360,7 @@ async function buildTableDatasets(json_datasets, uuid_selected) {
targets: 3,
},
{
title: "Active?",
title: "Active",
width: "10%",
targets: 4,
className: "dt-center",
Expand Down

0 comments on commit cf3a3ba

Please sign in to comment.