From eb641592754f85a070827aaab2c8058513498a2a Mon Sep 17 00:00:00 2001 From: LionTion Date: Sun, 20 Sep 2026 21:46:48 +0200 Subject: [PATCH] designsss --- src/app/globals.css | 22 ++++++++- src/components/MapView.tsx | 27 ++++++++--- src/components/screens/Tour.tsx | 71 ++++++++++++---------------- src/css/MapView.module.css | 81 +++++++++++++++++++++++++++---- src/css/Tour.module.css | 84 ++++++++++++++++++++++++++++++++- 5 files changed, 225 insertions(+), 60 deletions(-) diff --git a/src/app/globals.css b/src/app/globals.css index 419c601..640a21f 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -97,4 +97,24 @@ a { flex-direction: column; align-items: center; justify-content: center; -} \ No newline at end of file +} + +.maplibregl-user-location-dot::before { + display: none !important; +} + +.maplibregl-user-location-dot::after { + display: none !important; +} + +.maplibregl-user-location-dot { + background-image: url('/icons/person.svg') !important; + background-size: contain !important; + background-repeat: no-repeat !important; + background-position: center !important; + background-color: transparent !important; + box-shadow: none !important; + border: none !important; + width: 42px !important; + height: 42px !important; +} diff --git a/src/components/MapView.tsx b/src/components/MapView.tsx index 917c200..a664f93 100644 --- a/src/components/MapView.tsx +++ b/src/components/MapView.tsx @@ -1,6 +1,6 @@ 'use client'; -import React, { useEffect, useRef, useState, useCallback } from 'react'; +import React, { useEffect, useRef, useState, useCallback, createElement } from 'react'; import * as maplibregl from 'maplibre-gl'; import 'maplibre-gl/dist/maplibre-gl.css'; import styles from '@/css/MapView.module.css'; @@ -73,7 +73,7 @@ export default function MapView({ source: 'osm-tiles', minzoom: 0, maxzoom: 19, - }, + } ], }; @@ -86,14 +86,21 @@ export default function MapView({ map.addControl(new maplibregl.NavigationControl({ visualizePitch: true }), 'bottom-right'); + const el = document.createElement("img"); + el.src = "/icons/person.svg"; + el.alt = "You"; + el.width = 42; + el.className = styles["sword"]; + const geolocate = new maplibregl.GeolocateControl({ positionOptions: { enableHighAccuracy: true, }, trackUserLocation: true, showUserLocation: true, - showAccuracyCircle: true, + showAccuracyCircle: false, }); + geolocate._dotElement = el; map.addControl(geolocate, 'bottom-right'); map.addControl(new maplibregl.ScaleControl({ unit: 'metric' }), 'bottom-left'); @@ -135,15 +142,21 @@ export default function MapView({ markers.forEach((markerData) => { if (!currentMarkers.has(markerData.id)) { - const popup = new maplibregl.Popup({ offset: 25, className: styles["marker"] }).setHTML( + /*const popup = new maplibregl.Popup({ offset: 25, className: styles["marker"] }).setHTML( `${markerData.title}${ markerData.description ? `

${markerData.description}

` : '' }` - ); + );*/ - const newMarker = new maplibregl.Marker({ color: '#e11d48', }) + const el = document.createElement("img"); + el.src = "/icons/Schwert-gps.svg"; + el.alt = "GPS Point"; + el.width = 80; + el.className = styles["sword"]; + + const newMarker = new maplibregl.Marker({ element: el, anchor: "bottom" }) .setLngLat([markerData.lng, markerData.lat]) - .setPopup(popup) + //.setPopup(popup) .addTo(map); newMarker.getElement().addEventListener('click', () => { diff --git a/src/components/screens/Tour.tsx b/src/components/screens/Tour.tsx index 66b10fa..6471a7c 100644 --- a/src/components/screens/Tour.tsx +++ b/src/components/screens/Tour.tsx @@ -27,53 +27,42 @@ export default function Tour() { const [ test, setTest ] = useState(false); useEffect(() => { - let timerId: string | number | NodeJS.Timeout | undefined; + let timerId: string | number | NodeJS.Timeout | undefined; - const requestPosition = () => { - timerId = setTimeout(() => { - navigator.geolocation.getCurrentPosition( - (position) => { - setMarkers([{ - id: "riddle_one", - title: "Erstes Rätsel", - description: "Test Punkt verschoben vom Standort", - lng: position.coords.longitude + 0.002, - lat: position.coords.latitude, - }]); - }, - (error) => { - requestPosition(); - } - ); - }, 500); - }; + const requestPosition = () => { + timerId = setTimeout(() => { + navigator.geolocation.getCurrentPosition( + (position) => { + setMarkers([{ + id: "riddle_one", + title: "Erstes Rätsel", + description: "Test Punkt verschoben vom Standort", + lng: position.coords.longitude + 0.002, + lat: position.coords.latitude, + }]); + }, + (error) => { + requestPosition(); + } + ); + }, 500); + }; - requestPosition(); + requestPosition(); - return () => clearTimeout(timerId); -}, []); + return () => clearTimeout(timerId); + }, []); - return ( + return (
-

{"Ruf: " + points}

-

{"Players: " + playersStr}

-

- { - - setTourCode(""); - setCompletedRiddles(""); - setPlayers(""); - setPoints(""); - setStep("0"); - }} holdDuration={500}> - Zurücksetzen - - { - - }} holdDuration={500}> - Test - +
+
+
+ Your content goes here +
+
+
diff --git a/src/css/MapView.module.css b/src/css/MapView.module.css index 6d33963..032f385 100644 --- a/src/css/MapView.module.css +++ b/src/css/MapView.module.css @@ -4,14 +4,67 @@ height: 100%; min-height: 400px; overflow: hidden; + canvas { + filter: sepia(.45) saturate(.8) hue-rotate(-8deg) brightness(0.8) contrast(1.2); + } } .mapContainer { + position: relative; width: 100%; height: 100%; min-height: 500px; } +/*.mapContainer::after { + content: ""; + position: absolute; + inset: 0; + pointer-events: none; + z-index: 5; + mix-blend-mode: multiply; + opacity: 0.5; + + background: + radial-gradient(circle at 12% 35%, rgba(60, 40, 15, 0.12) 0, rgba(60, 40, 15, 0) 40%), + radial-gradient(circle at 85% 15%, rgba(90, 60, 20, 0.15) 0, rgba(90, 60, 20, 0) 35%), + radial-gradient(circle at 45% 75%, rgba(70, 45, 10, 0.14) 0, rgba(70, 45, 10, 0) 45%), + radial-gradient(circle at 70% 90%, rgba(50, 30, 10, 0.1) 0, rgba(50, 30, 10, 0) 30%), + + repeating-linear-gradient( + 133deg, + rgba(80, 50, 20, 0.03) 0px, + rgba(80, 50, 20, 0.03) 2px, + transparent 2px, + transparent 27px + ), + repeating-linear-gradient( + -23deg, + rgba(50, 30, 10, 0.02) 0px, + rgba(50, 30, 10, 0.02) 1px, + transparent 1px, + transparent 41px + ), + + radial-gradient(ellipse at 50% 50%, rgba(200, 170, 120, 0.1) 0%, rgba(120, 85, 45, 0.25) 100%); + + background-size: 100% 100%; +}*/ + +/* Vignette / aged darkening toward the corners */ +.mapContainer::before { + content: ""; + position: absolute; + inset: 0; + pointer-events: none; + z-index: 4; + background: + radial-gradient(ellipse at center, transparent 55%, rgba(90, 60, 25, 0.28) 100%), + radial-gradient(ellipse at 50% 20%, rgba(0,0,0,0.06) 0, transparent 60%), + radial-gradient(ellipse at 85% 90%, rgba(20, 10, 0, 0.12) 0, transparent 55%); + mix-blend-mode: multiply; +} + .controlOverlay { position: absolute; top: 12px; @@ -20,18 +73,19 @@ display: flex; flex-direction: column; gap: 8px; - background: rgba(18, 18, 18, 0.85); + /* Aged-paper / wax-seal style panel */ + background: rgba(238, 222, 196, 0.9); backdrop-filter: blur(8px); padding: 10px 14px; border-radius: 8px; - border: 1px solid rgba(255, 255, 255, 0.12); - color: #fff; + border: 1px solid rgba(140, 102, 50, 0.35); + color: #4a371c; font-family: var(--font-geist-sans), sans-serif; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); } .precacheButton { - background: #2563eb; + background: rgba(160, 110, 55, 0.95); color: white; border: none; padding: 8px 12px; @@ -43,7 +97,7 @@ } .precacheButton:hover:not(:disabled) { - background: #1d4ed8; + background: rgba(120, 80, 40, 1); } .precacheButton:disabled { @@ -61,21 +115,30 @@ .progressBar { width: 100%; height: 6px; - background: rgba(255, 255, 255, 0.2); + background: rgba(140, 102, 50, 0.3); border-radius: 3px; overflow: hidden; } .progressFill { height: 100%; - background: #10b981; + background: #a06f37; transition: width 0.2s ease; } .marker { - color: black; + color: #4a2f14; button { - color: black; + color: #4a2f14; } +} + +/* maplibre dark-theme-ish control icons re-themed to parchment palette */ +.mapWrapper svg { + fill: #4a2f14 !important; +} + +.sword { + filter: drop-shadow(0px 0px 6px #0009); } \ No newline at end of file diff --git a/src/css/Tour.module.css b/src/css/Tour.module.css index 25386cc..be456a4 100644 --- a/src/css/Tour.module.css +++ b/src/css/Tour.module.css @@ -5,10 +5,73 @@ width: 100%; overflow: hidden; } - .top-bar { + position: absolute; + top: 0; + left: 0; + flex-shrink: 0; + width: 100%; + height: 120px; + z-index: 2; + background-color: transparent; + + --corner-radius: 20px; + --border-width: 2px; +} + +.top-bar::before { + content: ""; + position: absolute; + inset: 0; + background-color: var(--dark-brown, #3d2b1f); + z-index: -2; + + --r: var(--corner-radius); + + -webkit-mask: + linear-gradient(black, black) top center / 100% calc(100% - var(--r) + 1px) no-repeat, + linear-gradient(black, black) top center / calc(100% - 2 * var(--r) + 1px) 100% no-repeat, + radial-gradient(circle at 0 100%, transparent var(--r), black calc(var(--r) + 0.5px)) bottom left / var(--r) var(--r) no-repeat, + radial-gradient(circle at 100% 100%, transparent var(--r), black calc(var(--r) + 0.5px)) bottom right / var(--r) var(--r) no-repeat; + + mask: + linear-gradient(black, black) top center / 100% calc(100% - var(--r) + 1px) no-repeat, + linear-gradient(black, black) top center / calc(100% - 2 * var(--r) + 1px) 100% no-repeat, + radial-gradient(circle at 0 100%, transparent var(--r), black calc(var(--r) + 0.5px)) bottom left / var(--r) var(--r) no-repeat, + radial-gradient(circle at 100% 100%, transparent var(--r), black calc(var(--r) + 0.5px)) bottom right / var(--r) var(--r) no-repeat; +} + +.top-bar::after { + content: ""; + position: absolute; + inset: 0; + background-color: transparent; + background-image: url('/bg/Hintergrund_ohne_Verzierung.webp'); + background-size: cover; + background-position: top center; + box-shadow: inset 0px -15px 32px 0px #0000004d; + z-index: -1; + + --b: var(--border-width); + --r-inner: calc(var(--corner-radius) + var(--b)); + + -webkit-mask: + linear-gradient(black, black) top center / 100% calc(100% - var(--r-inner) + 1px) no-repeat, + linear-gradient(black, black) top center / calc(100% - 2 * var(--r-inner) + 1px) calc(100% - var(--b)) no-repeat, + radial-gradient(circle at 0 100%, transparent var(--r-inner), black calc(var(--r-inner) + 0.5px)) bottom left / var(--r-inner) var(--r-inner) no-repeat, + radial-gradient(circle at 100% 100%, transparent var(--r-inner), black calc(var(--r-inner) + 0.5px)) bottom right / var(--r-inner) var(--r-inner) no-repeat; + + mask: + linear-gradient(black, black) top center / 100% calc(100% - var(--r-inner) + 1px) no-repeat, + linear-gradient(black, black) top center / calc(100% - 2 * var(--r-inner) + 1px) calc(100% - var(--b)) no-repeat, + radial-gradient(circle at 0 100%, transparent var(--r-inner), black calc(var(--r-inner) + 0.5px)) bottom left / var(--r-inner) var(--r-inner) no-repeat, + radial-gradient(circle at 100% 100%, transparent var(--r-inner), black calc(var(--r-inner) + 0.5px)) bottom right / var(--r-inner) var(--r-inner) no-repeat; +} + +.top-bar-content { padding: 8px; - flex-shrink: 0; + position: relative; + z-index: 1; } .main-content { @@ -20,8 +83,10 @@ } .map { + z-index: 1; width: 100%; height: 100%; + position: relative; } .riddle-overlay { @@ -44,4 +109,19 @@ padding: 1rem; background-color: #000000AA; z-index: 10; +} + +.points-outer-box { + position: relative; + width: 300px; + height: 200px; + background-color: #3498db; + color: #fff; + + -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 200'%3E%3Cpath d='M 20 0 Q 0 0 0 20 L 0 180 Q 0 200 20 200 L 300 200 Q 320 200 320 180 L 320 200 Z'/%3E%3C/svg%3E"); +} + +.points-inner-box { + padding: 30px; + color: #fff; } \ No newline at end of file