diff --git a/index.html b/index.html index 795e4fb..6aacd7e 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ - Vite + Vue + Segnapunti - Anto
diff --git a/public/segnap-192x192.png b/public/segnap-192x192.png index ccb825c..4483eba 100644 Binary files a/public/segnap-192x192.png and b/public/segnap-192x192.png differ diff --git a/public/segnap-512x512.png b/public/segnap-512x512.png index acd78c8..7ca3892 100644 Binary files a/public/segnap-512x512.png and b/public/segnap-512x512.png differ diff --git a/src/components/HomePage.vue b/src/components/HomePage.vue index 1199cb2..f81c113 100644 --- a/src/components/HomePage.vue +++ b/src/components/HomePage.vue @@ -5,6 +5,7 @@ export default { components: {}, data() { return { + visuForm: false, sp: { punt: { home: 0, guest: 0 }, set: { home: 0, guest: 0 }, @@ -15,13 +16,20 @@ export default { }, } }, - mounted () { + mounted() { if (this.isMobile()) { var noSleep = new NoSleep(); noSleep.enable(); + document.documentElement.requestFullscreen(); } }, methods: { + closeApp() { + if (confirm("Confermi di voler chiudere l'app ?")) { + var win = window.open("", "_self"); + win.close(); + } + }, fullScreen() { document.documentElement.requestFullscreen(); }, @@ -51,7 +59,9 @@ export default { this.sp.form[team].push(this.sp.form[team].shift()); }, decPunt(team) { - if (this.sp.punt[team] > 0) { + // decrementa il punteggio se รจ > 0 e non siamo in + // visualizza formazioni. + if (this.sp.punt[team] > 0 && !this.visuForm) { this.sp.punt[team]--; this.sp.form[team].unshift(this.sp.form[team].pop()); } @@ -62,15 +72,35 @@ export default { diff --git a/src/style.css b/src/style.css index 00ade15..0c72755 100644 --- a/src/style.css +++ b/src/style.css @@ -5,6 +5,7 @@ } body { + overscroll-behavior-y: contain; margin: 0; place-items: center; min-width: 320px; @@ -19,7 +20,7 @@ button { border-radius: 8px; border: 1px solid #fff; padding: 0.6em 1.2em; - font-size: 1em; + font-size: 0.8em; font-weight: 500; font-family: inherit; color: #fff; @@ -40,7 +41,6 @@ button:focus-visible { margin: 0 auto; text-align: center; } - .campo { user-select: none; width: 100%; @@ -59,16 +59,41 @@ button:focus-visible { text-align: right; } .bot { - float: left; - width: 50%; + position: fixed; + left: 0; + bottom: 0; + width: 100%; margin-top: 10px; + margin-bottom: 1px; + text-align: right; background-color: #000; } .col { + margin-left: auto; + margin-right: auto; + text-align: center; float: left; - font-size: 60vh; width: 50%; } +.punt { + font-size: 60vh; +} +.form { + font-size: 5vh; + border-top: #fff dashed 25px; + padding-top: 50px; + padding-bottom: 50px; +} +.formtit { + font-size: 5vh; + margin-top: 30px; + margin-bottom: 20px; +} +.formdiv { + font-size: 20vh; + float: left; + width: 32%; +} .home { background-color: #00f; } diff --git a/vite.config.js b/vite.config.js index ebadfd0..0dc0206 100644 --- a/vite.config.js +++ b/vite.config.js @@ -15,6 +15,7 @@ export default defineConfig({ description: "Segnapunti standalone.", background_color: "#eee", theme_color: '#ffffff', + display: "fullscreen", orientation: "landscape", icons: [ {