aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAriel Costas Guerrero <94913521+arielcostas@users.noreply.github.com>2025-03-03 23:41:33 +0100
committerAriel Costas Guerrero <94913521+arielcostas@users.noreply.github.com>2025-03-03 23:41:33 +0100
commitbe5d866cb9b03816754acd57589deecda04628ba (patch)
tree3e67382327181e40a0d201315fbc050322a26c21
parent647e69e9c3afb317885fbc04e609e9b3b945941a (diff)
Improve manifest with screenshots and shit
-rw-r--r--index.html4
-rw-r--r--public/favicon.icobin2462 -> 16958 bytes
-rw-r--r--public/logo-192.jpgbin19712 -> 0 bytes
-rw-r--r--public/logo-256.jpgbin0 -> 7492 bytes
-rw-r--r--public/logo-256.pngbin0 -> 37843 bytes
-rw-r--r--public/logo-512.jpgbin19712 -> 16746 bytes
-rw-r--r--public/manifest.webmanifest78
-rw-r--r--public/screenshots/estimates-narrow.pngbin0 -> 219332 bytes
-rw-r--r--public/screenshots/estimates-wide.jpegbin0 -> 53529 bytes
-rw-r--r--public/screenshots/map-narrow.pngbin0 -> 2295265 bytes
-rw-r--r--public/screenshots/map-wide.jpegbin0 -> 336231 bytes
-rw-r--r--public/screenshots/stoplist-narrow.pngbin0 -> 297920 bytes
-rw-r--r--public/screenshots/stoplist-wide.jpegbin0 -> 102303 bytes
-rw-r--r--src/pages/About.tsx19
14 files changed, 73 insertions, 28 deletions
diff --git a/index.html b/index.html
index c5fc4d7..96b0f22 100644
--- a/index.html
+++ b/index.html
@@ -7,10 +7,10 @@
<title>UrbanoVigo Web</title>
- <link rel="icon" href="/favicon.ico" />
<link rel="icon" type="image/jpg" href="/logo-512.jpg" />
+ <link rel="icon" href="/favicon.ico" sizes="64x64" />
<link rel="apple-touch-icon" href="/logo-512.jpg" sizes="512x512" />
- <meta name="theme-color" content="#000000" />
+ <meta name="theme-color" content="#007bff" />
<link rel="manifest" href="/manifest.webmanifest" />
diff --git a/public/favicon.ico b/public/favicon.ico
index 441e669..b81c323 100644
--- a/public/favicon.ico
+++ b/public/favicon.ico
Binary files differ
diff --git a/public/logo-192.jpg b/public/logo-192.jpg
deleted file mode 100644
index c8a783a..0000000
--- a/public/logo-192.jpg
+++ /dev/null
Binary files differ
diff --git a/public/logo-256.jpg b/public/logo-256.jpg
new file mode 100644
index 0000000..c823056
--- /dev/null
+++ b/public/logo-256.jpg
Binary files differ
diff --git a/public/logo-256.png b/public/logo-256.png
new file mode 100644
index 0000000..a1d6c25
--- /dev/null
+++ b/public/logo-256.png
Binary files differ
diff --git a/public/logo-512.jpg b/public/logo-512.jpg
index c8a783a..cf45e80 100644
--- a/public/logo-512.jpg
+++ b/public/logo-512.jpg
Binary files 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
--- /dev/null
+++ b/public/screenshots/estimates-narrow.png
Binary files differ
diff --git a/public/screenshots/estimates-wide.jpeg b/public/screenshots/estimates-wide.jpeg
new file mode 100644
index 0000000..e81f094
--- /dev/null
+++ b/public/screenshots/estimates-wide.jpeg
Binary files differ
diff --git a/public/screenshots/map-narrow.png b/public/screenshots/map-narrow.png
new file mode 100644
index 0000000..14199c4
--- /dev/null
+++ b/public/screenshots/map-narrow.png
Binary files differ
diff --git a/public/screenshots/map-wide.jpeg b/public/screenshots/map-wide.jpeg
new file mode 100644
index 0000000..6d3ca64
--- /dev/null
+++ b/public/screenshots/map-wide.jpeg
Binary files differ
diff --git a/public/screenshots/stoplist-narrow.png b/public/screenshots/stoplist-narrow.png
new file mode 100644
index 0000000..c1d9f25
--- /dev/null
+++ b/public/screenshots/stoplist-narrow.png
Binary files differ
diff --git a/public/screenshots/stoplist-wide.jpeg b/public/screenshots/stoplist-wide.jpeg
new file mode 100644
index 0000000..264e1a7
--- /dev/null
+++ b/public/screenshots/stoplist-wide.jpeg
Binary files 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 (
<div className="about-page">