Parse CSV files into HTML tables

This commit is contained in:
Thomas Miceli
2023-03-19 03:18:56 +01:00
parent 11b3eed250
commit 858ee3e70a
5 changed files with 108 additions and 13 deletions

2
public/main.js vendored
View File

@ -18,7 +18,7 @@ document.addEventListener('DOMContentLoaded', () => {
let rev = document.querySelector('.revision-text')
if (rev) {
let fullRev = rev.innerHTML
let smallRev = fullRev.substring(0, 8)
let smallRev = fullRev.substring(0, 7)
rev.innerHTML = smallRev
rev.onmouseover = () => {

20
public/style.css vendored
View File

@ -110,4 +110,24 @@ pre {
.line-num {
@apply cursor-pointer text-slate-400 hover:text-white;
}
table.csv-table {
@apply w-full whitespace-pre text-xs;
}
table.csv-table thead {
text-align: left;
}
table.csv-table thead tr {
@apply bg-slate-800;
}
table.csv-table thead tr th {
@apply border py-2 px-1 border-slate-700;
}
table.csv-table tbody td {
@apply border py-1.5 px-1 border-slate-800;
}