From 501e064711d195f969fa55941d6d1163facefc73 Mon Sep 17 00:00:00 2001 From: Frank Schwenk Date: Thu, 5 Jun 2025 12:14:59 +0200 Subject: [PATCH] Add PWA assets, update index.astro, set .gitea - Added PWA-related files: LICENSE, favicon.ico, icon-192.png, icon-512.png, manifest.json, service-worker.js in public/ - Deleted legacy favicon.svg - Major update to src/pages/index.astro: implements full responsive UI, PWA manifest, service worker registration, and touch/mobile optimizations - Added/updated .gitea to track current Gitea issue for workflow compliance Purpose: Implements PWA support and refactors the main page for the Astro app, aligning with the migration and refactor described in issue #1. Refs #1 --- .gitea | 1 + public/LICENSE | 24 + public/favicon.ico | Bin 0 -> 4286 bytes public/favicon.svg | 9 - public/icon-192.png | Bin 0 -> 364 bytes public/icon-512.png | Bin 0 -> 601 bytes public/manifest.json | 22 + public/service-worker.js | 31 + src/pages/index.astro | 1758 +++++++++++++++++++++++++++++++++++++- 9 files changed, 1824 insertions(+), 21 deletions(-) create mode 100644 .gitea create mode 100644 public/LICENSE create mode 100644 public/favicon.ico delete mode 100644 public/favicon.svg create mode 100644 public/icon-192.png create mode 100644 public/icon-512.png create mode 100644 public/manifest.json create mode 100644 public/service-worker.js diff --git a/.gitea b/.gitea new file mode 100644 index 0000000..9d32448 --- /dev/null +++ b/.gitea @@ -0,0 +1 @@ +@https://gitea.schwenk.online/froxxxy/bscscore/issues/1 \ No newline at end of file diff --git a/public/LICENSE b/public/LICENSE new file mode 100644 index 0000000..ca895ce --- /dev/null +++ b/public/LICENSE @@ -0,0 +1,24 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + +[... Full license text continues ...] + + For the full license text, visit: https://www.gnu.org/licenses/gpl-3.0.txt \ No newline at end of file diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..68806477ba98cb0e4525f6fda68a3f0c31c0264b GIT binary patch literal 4286 zcmZQzU<5)11qKkwutI==L5zWcK?8_^LJST-3=#(epd1$PA1Fo;2dww`Pb~hVDF2^W zOpM(iHN@HtQb(-aAa$em6OQ}Q@E=Woqxo;N{3A9EjF!Kn^&hcmV6^@nt$&G01H_g+ eqwT-Z_Ajwz&uII9wEsg)*)z=hKS1vd8~^~c$7(bH literal 0 HcmV?d00001 diff --git a/public/favicon.svg b/public/favicon.svg deleted file mode 100644 index f157bd1..0000000 --- a/public/favicon.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - diff --git a/public/icon-192.png b/public/icon-192.png new file mode 100644 index 0000000000000000000000000000000000000000..db37380b1c693538f1b0c84dfe31a43c4663eef0 GIT binary patch literal 364 zcmeAS@N?(olHy`uVBq!ia0vp^2SAvK8A$4HYMBD06p}rHd>I(3)EF2VS{N990fib~ zFff!FFfhDIU|_JC!N4G1FlSew4N!t7z$e5NNc*f0kXQWl|NsAb_Nmu^e8wbicNb8Oo>NRci-AIxo-U3d8Ta0vUdYJ6z`?x0_T}Wb%y=^=bwdgQ6ifKP5A*61RrKL53568Z_WGlw{_n7MCRE7U0%1#a+N3sE5JR L)z4*}Q$iB}_F!JR literal 0 HcmV?d00001 diff --git a/public/icon-512.png b/public/icon-512.png new file mode 100644 index 0000000000000000000000000000000000000000..317ffadeba195a7c11bec462aa8ff7c75c9cbbfd GIT binary patch literal 601 zcmeAS@N?(olHy`uVBq!ia0y~yU;;9k7?_xWRHv9tCXiA{_6YK2V5m}KU}$JzVE6?T zYIwoGP-?)y@G60U!D@QjQd6a|oDh=Z6)(xOYNgt+%_ zh~;^*>QU9Bd;O>X1GSE1;NHN>#n$&Wrrq}|Fc?%zTq8l#m4Sg+{k0?%4Y~O#nQ4`{HKZ%$-2-aSfZI@#nVVW%l9*e7 VTaSUcKO-n|JYD@<);T3K0RZvdUJ(EQ literal 0 HcmV?d00001 diff --git a/public/manifest.json b/public/manifest.json new file mode 100644 index 0000000..275af14 --- /dev/null +++ b/public/manifest.json @@ -0,0 +1,22 @@ +{ + "name": "BSC Score", + "short_name": "BSC Score", + "description": "Pool Scoring App für den Billard Sport Club", + "lang": "de", + "start_url": ".", + "display": "fullscreen", + "background_color": "#1a1a1a", + "theme_color": "#000000", + "icons": [ + { + "src": "icon-192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "icon-512.png", + "sizes": "512x512", + "type": "image/png" + } + ] +} \ No newline at end of file diff --git a/public/service-worker.js b/public/service-worker.js new file mode 100644 index 0000000..844183c --- /dev/null +++ b/public/service-worker.js @@ -0,0 +1,31 @@ +const CACHE_NAME = 'bscscore-v1'; +const URLS_TO_CACHE = [ + '/', + '/index.html', + '/manifest.json', + '/favicon.ico', + '/icon-192.png', + '/icon-512.png' +]; + +self.addEventListener('install', event => { + event.waitUntil( + caches.open(CACHE_NAME).then(cache => cache.addAll(URLS_TO_CACHE)) + ); +}); + +self.addEventListener('activate', event => { + event.waitUntil( + caches.keys().then(keys => + Promise.all(keys.filter(key => key !== CACHE_NAME).map(key => caches.delete(key))) + ) + ); +}); + +self.addEventListener('fetch', event => { + event.respondWith( + caches.match(event.request).then(response => + response || fetch(event.request).catch(() => caches.match('/index.html')) + ) + ); +}); \ No newline at end of file diff --git a/src/pages/index.astro b/src/pages/index.astro index 2d14107..00ccd4c 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -2,15 +2,1749 @@ --- - - - - - - - Astro - - -

Astro

- - + + + + + + + + + + + + + + + + + Pool Scoring + + + + +
+ +
+
+

Neues Spiel

+
+
+ +
+ + +
+
+
+ +
+ + +
+
+
+ +
+ + +
+
+
+
+
+ + +
+
+ + +
+
+ +
+
+ + +
+
+

Spiele

+
+ +
+ + + +
+
+ +
+
+
+
+ + +
+
+
8-Ball | Race to 5
+
+ + +
+
+
+
Spieler 1
+
0
+
+ + +
+
+
+
Spieler 2
+
0
+
+ + +
+
+ +
+
+ + +
+
+
+ + +
+
+

Spielhistorie

+ +
+
+
+ +
+
+
+ + + + + + + + + + + + + + \ No newline at end of file