From 62539a838da936e528622c0f1dccddcb2322e7a4 Mon Sep 17 00:00:00 2001 From: Michael Bond Date: Tue, 17 Dec 2024 18:19:44 -0500 Subject: [PATCH] Final bit of tweaks --- .../Components/Layout/MainLayout.razor.css | 12 +++--- .../Components/MarkingsContainer.razor.css | 2 +- Pkmds.Web/wwwroot/css/app.css | 39 +++++++++---------- Pkmds.Web/wwwroot/js/fileSave.js | 4 +- Pkmds.Web/wwwroot/service-worker.published.js | 6 +-- 5 files changed, 30 insertions(+), 33 deletions(-) diff --git a/Pkmds.Web/Components/Layout/MainLayout.razor.css b/Pkmds.Web/Components/Layout/MainLayout.razor.css index df8c10ff..0d26cfc2 100644 --- a/Pkmds.Web/Components/Layout/MainLayout.razor.css +++ b/Pkmds.Web/Components/Layout/MainLayout.razor.css @@ -10,9 +10,9 @@ z-index: 1000; } - #blazor-error-ui .dismiss { - cursor: pointer; - position: absolute; - right: 0.75rem; - top: 0.5rem; - } +#blazor-error-ui .dismiss { + cursor: pointer; + position: absolute; + right: 0.75rem; + top: 0.5rem; +} diff --git a/Pkmds.Web/Components/MarkingsContainer.razor.css b/Pkmds.Web/Components/MarkingsContainer.razor.css index 296950fa..472e192f 100644 --- a/Pkmds.Web/Components/MarkingsContainer.razor.css +++ b/Pkmds.Web/Components/MarkingsContainer.razor.css @@ -10,5 +10,5 @@ .gen-3 { grid-template-columns: repeat(4, 1fr); - grid-gap: 0px; + grid-gap: 0; } diff --git a/Pkmds.Web/wwwroot/css/app.css b/Pkmds.Web/wwwroot/css/app.css index 4f785507..fc20f362 100644 --- a/Pkmds.Web/wwwroot/css/app.css +++ b/Pkmds.Web/wwwroot/css/app.css @@ -1,8 +1,5 @@ body, html { - padding-bottom: env(safe-area-inset-bottom, 16px); - padding-top: env(safe-area-inset-top); - padding-left: env(safe-area-inset-left, 8px); - padding-right: env(safe-area-inset-right); + padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom, 16px) env(safe-area-inset-left, 8px); box-sizing: border-box; } @@ -12,12 +9,12 @@ body, html { box-sizing: border-box; } -pkm-sprite { +.pkm-sprite { object-fit: contain; align-self: center; } -item-sprite { +.item-sprite { object-fit: contain; align-self: center; } @@ -74,19 +71,19 @@ item-sprite { margin: 20vh auto 1rem auto; } - .loading-progress circle { - fill: none; - stroke: #e0e0e0; - stroke-width: 0.6rem; - transform-origin: 50% 50%; - transform: rotate(-90deg); - } +.loading-progress circle { + fill: none; + stroke: #e0e0e0; + stroke-width: 0.6rem; + transform-origin: 50% 50%; + transform: rotate(-90deg); +} - .loading-progress circle:last-child { - stroke: #1b6ec2; - stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%; - transition: stroke-dasharray 0.05s ease-in-out; - } +.loading-progress circle:last-child { + stroke: #1b6ec2; + stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%; + transition: stroke-dasharray 0.05s ease-in-out; +} .loading-progress-text { position: absolute; @@ -95,6 +92,6 @@ item-sprite { inset: calc(20vh + 3.25rem) 0 auto 0.2rem; } - .loading-progress-text:after { - content: var(--blazor-load-percentage-text, "Loading"); - } +.loading-progress-text:after { + content: var(--blazor-load-percentage-text, "Loading"); +} diff --git a/Pkmds.Web/wwwroot/js/fileSave.js b/Pkmds.Web/wwwroot/js/fileSave.js index d106bef8..2f852ede 100644 --- a/Pkmds.Web/wwwroot/js/fileSave.js +++ b/Pkmds.Web/wwwroot/js/fileSave.js @@ -4,13 +4,13 @@ suggestedName: fileName, types: [{ description: description, - accept: { 'application/octet-stream': [extension] } + accept: {'application/octet-stream': [extension]} }] }; const handle = await window.showSaveFilePicker(opts); const writable = await handle.createWritable(); - await writable.write(new Blob([new Uint8Array(byteArray)], { type: "application/octet-stream" })); + await writable.write(new Blob([new Uint8Array(byteArray)], {type: "application/octet-stream"})); await writable.close(); } catch (ex) { console.error(ex); diff --git a/Pkmds.Web/wwwroot/service-worker.published.js b/Pkmds.Web/wwwroot/service-worker.published.js index db328429..a8c294a4 100644 --- a/Pkmds.Web/wwwroot/service-worker.published.js +++ b/Pkmds.Web/wwwroot/service-worker.published.js @@ -17,8 +17,8 @@ const cacheNamePrefix = 'offline-cache-'; const CACHE_VERSION = '%%CACHE_VERSION%%' const cacheName = `${cacheNamePrefix}${self.assetsManifest.version}${CACHE_VERSION}`; -const offlineAssetsInclude = [ /\.dll$/, /\.pdb$/, /\.wasm/, /\.html/, /\.js$/, /\.json$/, /\.css$/, /\.woff$/, /\.png$/, /\.jpe?g$/, /\.gif$/, /\.ico$/, /\.blat$/, /\.dat$/ ]; -const offlineAssetsExclude = [ /^service-worker\.js$/ ]; +const offlineAssetsInclude = [/\.dll$/, /\.pdb$/, /\.wasm/, /\.html/, /\.js$/, /\.json$/, /\.css$/, /\.woff$/, /\.png$/, /\.jpe?g$/, /\.gif$/, /\.ico$/, /\.blat$/, /\.dat$/]; +const offlineAssetsExclude = [/^service-worker\.js$/]; // Replace with your base path if you are hosting on a subfolder. Ensure there is a trailing '/'. const base = "/"; @@ -32,7 +32,7 @@ async function onInstall(event) { const assetsRequests = self.assetsManifest.assets .filter(asset => offlineAssetsInclude.some(pattern => pattern.test(asset.url))) .filter(asset => !offlineAssetsExclude.some(pattern => pattern.test(asset.url))) - .map(asset => new Request(asset.url, { integrity: asset.hash, cache: 'no-cache' })); + .map(asset => new Request(asset.url, {integrity: asset.hash, cache: 'no-cache'})); await caches.open(cacheName).then(cache => cache.addAll(assetsRequests)); }