pis #2

Merged
fred.boniface merged 76 commits from pis into main 2023-05-06 21:53:45 +01:00
3 changed files with 28 additions and 5 deletions
Showing only changes of commit 2bf95e8134 - Show all commits

View File

@ -29,13 +29,13 @@ async function insertData(json) {
const div = document.getElementById('result-box') const div = document.getElementById('result-box')
let tableData = `<table id="result-table"> let tableData = `<table id="result-table">
<tr> <tr>
<th class="code">Code</th> <th>Code</th>
<th class="stops">Stations</th> <th>Stations</th>
</tr>` </tr>`
let results = 0 let results = 0
for(var i = 0; i < json.length; i++) { // Hopefully can style output with CSS for(var i = 0; i < json.length; i++) { // Hopefully can style output with CSS
tableData += `<tr><td class="code">${json[i]['code']}</td> tableData += `<tr><td class="pis-code">${json[i]['code']}</td>
<td class="stops">${json[i]['stops']}</td></tr>` <td class="station">${json[i]['stops']}</td></tr>`
results++ results++
} }
tableData += "</table>" tableData += "</table>"

View File

@ -5,3 +5,23 @@
#result-box { #result-box {
display: none; display: none;
} }
#result-table {
margin: auto;
width: 85%;
max-width: 700px;
text-align: center;
}
#reset {
margin-top: 25px;
}
.pis-code {
font-weight:bold;
}
.station {
text-transform:uppercase;
overflow-wrap:anywhere
}

5
sw.js
View File

@ -1,6 +1,6 @@
/* Service Worker */ /* Service Worker */
const appVersion = "2.0.0-dev" const appVersion = "1.2.4-dev-pis"
const cacheName = `owlboard-${appVersion}`; const cacheName = `owlboard-${appVersion}`;
const cacheIDs = [cacheName]; const cacheIDs = [cacheName];
const cacheFiles = [ const cacheFiles = [
@ -13,6 +13,7 @@ const cacheFiles = [
"/issue.html", "/issue.html",
"/find-code.html", "/find-code.html",
"/settings.html", "/settings.html",
"/pis.html",
"/manifest.json", "/manifest.json",
"/styles/fonts/firamono/firamono-500.woff2", "/styles/fonts/firamono/firamono-500.woff2",
"/styles/fonts/firamono/firamono-regular.woff2", "/styles/fonts/firamono/firamono-regular.woff2",
@ -24,6 +25,7 @@ const cacheFiles = [
"/styles/issue.css", "/styles/issue.css",
"/styles/main.css", "/styles/main.css",
"/styles/settings.css", "/styles/settings.css",
"/styles/pis.css",
"/js/find-code.js", "/js/find-code.js",
"/js/index.js", "/js/index.js",
"/js/issue.js", "/js/issue.js",
@ -32,6 +34,7 @@ const cacheFiles = [
"/js/auth.js", "/js/auth.js",
"/js/settings.js", "/js/settings.js",
"/js/simple-board.js", "/js/simple-board.js",
"/js/pis.js",
"/images/icon.svg", "/images/icon.svg",
"/images/logo/wide_logo.svg", "/images/logo/wide_logo.svg",
"/images/logo/mono-logo.svg", "/images/logo/mono-logo.svg",