Skip to content

Commit

Permalink
Enhances the styling of the items table (#306)
Browse files Browse the repository at this point in the history
  • Loading branch information
sagarbaver authored Sep 28, 2022
1 parent c5fb6ec commit 54b1fad
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions views/scan.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,16 @@
top: 0;
width: 100%;
}
.items-table th:first-child,
.items-table td:first-child {
position: sticky;
left: 0;
}
.items-table td:first-child {
background-color: white;
}
</style>
</head>
<body class="container-fluid">
Expand Down Expand Up @@ -383,7 +393,7 @@
}
function renderItems(data) {
$('#actions-row').append(data.uniqueKeys.map(key => '<td>' + key + '</td>'))
$('#actions-row').append(data.uniqueKeys.map(key => '<th scope="col">' + key + '</th>'))
if (data.Items.length) {
$('#items-container').append(data.Items.map(item => {
Expand Down Expand Up @@ -497,11 +507,11 @@

<div class="table-container d-none">
<div class="scroll-indicator"></div>
<div class="table-wrapper">
<table class="table items-table">
<thead>
<div class="table-wrapper table-responsive">
<table class="table items-table table-hover">
<thead class="thead-light">
<tr id="actions-row">
<td>Actions</td>
<th scope="col">Actions</th>
</tr>
</thead>
<tbody id="items-container">
Expand Down

0 comments on commit 54b1fad

Please sign in to comment.