From be5d866cb9b03816754acd57589deecda04628ba Mon Sep 17 00:00:00 2001 From: Ariel Costas Guerrero <94913521+arielcostas@users.noreply.github.com> Date: Mon, 3 Mar 2025 23:41:33 +0100 Subject: Improve manifest with screenshots and shit --- index.html | 4 +- public/favicon.ico | Bin 2462 -> 16958 bytes public/logo-192.jpg | Bin 19712 -> 0 bytes public/logo-256.jpg | Bin 0 -> 7492 bytes public/logo-256.png | Bin 0 -> 37843 bytes public/logo-512.jpg | Bin 19712 -> 16746 bytes public/manifest.webmanifest | 78 ++++++++++++++++++++++++++++---- public/screenshots/estimates-narrow.png | Bin 0 -> 219332 bytes public/screenshots/estimates-wide.jpeg | Bin 0 -> 53529 bytes public/screenshots/map-narrow.png | Bin 0 -> 2295265 bytes public/screenshots/map-wide.jpeg | Bin 0 -> 336231 bytes public/screenshots/stoplist-narrow.png | Bin 0 -> 297920 bytes public/screenshots/stoplist-wide.jpeg | Bin 0 -> 102303 bytes src/pages/About.tsx | 19 +------- 14 files changed, 73 insertions(+), 28 deletions(-) delete mode 100644 public/logo-192.jpg create mode 100644 public/logo-256.jpg create mode 100644 public/logo-256.png create mode 100644 public/screenshots/estimates-narrow.png create mode 100644 public/screenshots/estimates-wide.jpeg create mode 100644 public/screenshots/map-narrow.png create mode 100644 public/screenshots/map-wide.jpeg create mode 100644 public/screenshots/stoplist-narrow.png create mode 100644 public/screenshots/stoplist-wide.jpeg diff --git a/index.html b/index.html index c5fc4d7..96b0f22 100644 --- a/index.html +++ b/index.html @@ -7,10 +7,10 @@ UrbanoVigo Web - + - + diff --git a/public/favicon.ico b/public/favicon.ico index 441e669..b81c323 100644 Binary files a/public/favicon.ico and b/public/favicon.ico differ diff --git a/public/logo-192.jpg b/public/logo-192.jpg deleted file mode 100644 index c8a783a..0000000 Binary files a/public/logo-192.jpg and /dev/null differ diff --git a/public/logo-256.jpg b/public/logo-256.jpg new file mode 100644 index 0000000..c823056 Binary files /dev/null and b/public/logo-256.jpg differ diff --git a/public/logo-256.png b/public/logo-256.png new file mode 100644 index 0000000..a1d6c25 Binary files /dev/null and b/public/logo-256.png differ diff --git a/public/logo-512.jpg b/public/logo-512.jpg index c8a783a..cf45e80 100644 Binary files a/public/logo-512.jpg and b/public/logo-512.jpg differ diff --git a/public/manifest.webmanifest b/public/manifest.webmanifest index 8712dfb..30abe1a 100644 --- a/public/manifest.webmanifest +++ b/public/manifest.webmanifest @@ -1,24 +1,84 @@ { - "name": "Urbano Vigo", + "$schema": "https://raw.githubusercontent.com/SchemaStore/schemastore/refs/heads/master/src/schemas/json/web-manifest.json", + "id": "https://busurbano.costas.dev", + "name": "UrbanoVigo Web", + "description": "Aplicación web para encontrar paradas y tiempos de llegada de los autobuses urbanos de Vigo, España.", "short_name": "UrbanoVigo", "start_url": "/", "display": "standalone", + "orientation": "portrait-primary", + "lang": "es", "background_color": "#ffffff", - "theme_color": "#000000", + "theme_color": "#007bff", "icons": [ + { + "src": "/logo-512.jpg", + "sizes": "512x512", + "type": "image/jpg", + "purpose": "any maskable" + }, + { + "src": "/logo-256.jpg", + "sizes": "256x256", + "type": "image/jpg", + "purpose": "any maskable" + }, + { + "src": "/logo-256.png", + "sizes": "256x256", + "type": "image/png", + "purpose": "any maskable" + }, { "src": "/favicon.ico", - "type": "image/icon" + "sizes": "64x64", + "type": "image/x-icon", + "purpose": "any maskable" + } + ], + "screenshots": [ + { + "src": "/screenshots/stoplist-narrow.png", + "sizes": "1440x2960", + "type": "image/png", + "form_factor": "narrow", + "label": "Lista de paradas" }, { - "src": "/logo-512.jpg", - "sizes": "512x512", - "type": "image/jpg" + "src": "/screenshots/map-narrow.png", + "sizes": "1440x2960", + "type": "image/png", + "form_factor": "narrow", + "label": "Mapa de paradas" + }, + { + "src": "/screenshots/estimates-narrow.png", + "sizes": "1440x2960", + "type": "image/png", + "form_factor": "narrow", + "label": "Estimaciones de llegada a parada" + }, + + { + "src": "/screenshots/stoplist-wide.jpeg", + "sizes": "1788x891", + "type": "image/jpeg", + "form_factor": "wide", + "label": "Lista de paradas" + }, + { + "src": "/screenshots/map-wide.jpeg", + "sizes": "1788x891", + "type": "image/jpeg", + "form_factor": "wide", + "label": "Mapa de paradas" }, { - "src": "/logo-192.jpg", - "sizes": "192x192", - "type": "image/jpg" + "src": "/screenshots/estimates-wide.jpeg", + "sizes": "1788x891", + "type": "image/jpeg", + "form_factor": "wide", + "label": "Estimaciones de llegada a parada" } ] } \ No newline at end of file diff --git a/public/screenshots/estimates-narrow.png b/public/screenshots/estimates-narrow.png new file mode 100644 index 0000000..0337442 Binary files /dev/null and b/public/screenshots/estimates-narrow.png differ diff --git a/public/screenshots/estimates-wide.jpeg b/public/screenshots/estimates-wide.jpeg new file mode 100644 index 0000000..e81f094 Binary files /dev/null and b/public/screenshots/estimates-wide.jpeg differ diff --git a/public/screenshots/map-narrow.png b/public/screenshots/map-narrow.png new file mode 100644 index 0000000..14199c4 Binary files /dev/null and b/public/screenshots/map-narrow.png differ diff --git a/public/screenshots/map-wide.jpeg b/public/screenshots/map-wide.jpeg new file mode 100644 index 0000000..6d3ca64 Binary files /dev/null and b/public/screenshots/map-wide.jpeg differ diff --git a/public/screenshots/stoplist-narrow.png b/public/screenshots/stoplist-narrow.png new file mode 100644 index 0000000..c1d9f25 Binary files /dev/null and b/public/screenshots/stoplist-narrow.png differ diff --git a/public/screenshots/stoplist-wide.jpeg b/public/screenshots/stoplist-wide.jpeg new file mode 100644 index 0000000..264e1a7 Binary files /dev/null and b/public/screenshots/stoplist-wide.jpeg differ diff --git a/src/pages/About.tsx b/src/pages/About.tsx index d286fb1..f7faec7 100644 --- a/src/pages/About.tsx +++ b/src/pages/About.tsx @@ -1,24 +1,9 @@ import { Moon, Sun } from "lucide-react"; import { useEffect, useState } from "react"; +import { useTheme } from "../ThemeContext"; export function About() { - const [theme, setTheme] = useState<'light' | 'dark'>(() => { - const savedTheme = localStorage.getItem('theme'); - if (savedTheme) { - return savedTheme as 'light' | 'dark'; - } - const prefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches; - return prefersDark ? 'dark' : 'light'; - }); - - useEffect(() => { - document.documentElement.setAttribute('data-theme', theme); - localStorage.setItem('theme', theme); - }, [theme]); - - const toggleTheme = () => { - setTheme((prevTheme) => (prevTheme === 'light' ? 'dark' : 'light')); - }; + const {theme, toggleTheme} = useTheme(); return (
-- cgit v1.3