From 1e1af4728bcced7af03a093f73ec9f3a4b79a9d9 Mon Sep 17 00:00:00 2001 From: Amerlander Date: Wed, 14 Jun 2023 19:03:01 +0200 Subject: [PATCH] update data logging files --- resources/logfs/build.js | 2 +- resources/logfs/dl.css | 10 +++++----- resources/logfs/dl.js | 12 ++++++------ resources/logfs/header.html | 4 ++-- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/resources/logfs/build.js b/resources/logfs/build.js index db8bdb33..cb16aaf2 100644 --- a/resources/logfs/build.js +++ b/resources/logfs/build.js @@ -50,7 +50,7 @@ if (process.argv[2] === "test") { .readdirSync(".") .filter((f) => /^sample-.+\.txt$/.test(f)); // Enable local testing of included CSS/JS. Do it after byte count. - result = result.replace(/https:\/\/microbit.org\/dl\/\d\//g, "./"); + result = result.replace(/https:\/\/go.calliope.cc\/assets\/dl\/\d\//g, "./"); for (const trailerName of trailers) { const trailer = fs.readFileSync(trailerName); const htmlName = trailerName.replace(/\.txt$/, ".html"); diff --git a/resources/logfs/dl.css b/resources/logfs/dl.css index fa3c0123..d598654a 100644 --- a/resources/logfs/dl.css +++ b/resources/logfs/dl.css @@ -3,10 +3,10 @@ * This content is managed in https://github.com/lancaster-university/codal-microbit-v2/ */ body { - font-family: "Helvetica Now", Helvetica, Arial, sans-serif; + font-family: "Roboto", "Helvetica Now", Helvetica, Arial, sans-serif; } a { - color: rgba(108, 75, 193, 1); + color: rgba(66, 201, 201, 1); } button { display: block; @@ -19,14 +19,14 @@ button { padding: 0 16px; /* Secondary buttons */ - color: #000; - border: 2px solid #000; + color: rgba(66, 201, 201, 1); + border: 2px solid rgba(66, 201, 201, 1); background: #fff; } /* Primary button */ button:first-of-type { border: none; - background: #000; + background: rgba(66, 201, 201, 1); color: #fff; } tr:nth-child(even) { diff --git a/resources/logfs/dl.js b/resources/logfs/dl.js index f1d63464..4c2e6b1f 100644 --- a/resources/logfs/dl.js +++ b/resources/logfs/dl.js @@ -26,11 +26,11 @@ function UserGraphError(message) { const overrides = { update: alert.bind( null, - "To see the latest data that changed after you opened this file, you must unplug your micro:bit and plug it back in." + "To see the latest data that changed after you opened this file, you must unplug your calliope mini and plug it back in." ), clear: alert.bind( null, - "The log is cleared when you reflash your micro:bit. Your program can include code or blocks to clear the log when you choose." + "The log is cleared when you reflash your calliope mini. Your program can include code or blocks to clear the log when you choose." ), copy: function () { base.copy(); @@ -57,7 +57,7 @@ function UserGraphError(message) { wrapper ); header.outerHTML = - '
'; + '
'; let info = document.createElement("p"); info.id = "info"; @@ -95,7 +95,7 @@ function UserGraphError(message) { resetGraph: function () { document.querySelector("#info").innerHTML = - "This is the data on your micro:bit. To analyse it and create your own graphs, transfer it to your computer. You can copy and paste your data, or download it as a CSV file which you can import into a spreadsheet or graphing tool. Learn more about micro:bit data logging."; + "This is the data on your calliope mini. To analyse it and create your own graphs, transfer it to your computer. You can copy and paste your data, or download it as a CSV file which you can import into a spreadsheet or graphing tool. Learn more about calliope mini data logging."; let graphButton = document.querySelector("#graphButton"); graphButton.innerText = "Visual preview"; @@ -168,7 +168,7 @@ function UserGraphError(message) { } const colors = [ - // micro:bit brand colors + // calliope mini brand colors "rgb(0, 200, 0)", "rgb(62, 182, 253)", "rgb(205, 3, 101)", @@ -252,7 +252,7 @@ function UserGraphError(message) { // We fade it in along with the graph. info.style.opacity = 0; info.innerHTML = - "This is a visual preview of the data on your micro:bit. To analyse it in more detail or create your own graphs, transfer it to your computer. You can copy and paste your data, or download it as a CSV file which you can import into a spreadsheet or graphing tool. Learn more about micro:bit data logging."; + "This is a visual preview of the data on your calliope mini. To analyse it in more detail or create your own graphs, transfer it to your computer. You can copy and paste your data, or download it as a CSV file which you can import into a spreadsheet or graphing tool. Learn more about calliope mini data logging."; Plotly.newPlot( graphContainer, diff --git a/resources/logfs/header.html b/resources/logfs/header.html index f724cdec..39dc3905 100644 --- a/resources/logfs/header.html +++ b/resources/logfs/header.html @@ -30,7 +30,7 @@ display: none; } - + - + micro:bit data log