@@ -133,18 +133,38 @@ <h1>Unterstütze bitcircus101</h1>
133133 display: none;
134134 "
135135 >
136- < iframe
137- width =" 425 "
138- height =" 350 "
139- src =" https://www.openstreetmap.org/export/embed.html?bbox=7.057943344116212%2C50.72276418262858%2C7.12090015411377%2C50.75828718705439&layer=mapnik&marker=50.74052905321277%2C7.08942174911499 "
140- style =" border: 1px solid black "
141- > </ iframe
142- > < br /> < small
143- > < a
144- href =" https://www.openstreetmap.org/?mlat=50.74053&mlon=7.08942#map=15/50.74053/7.08942 "
145- > Größere Karte öffnen </ a
146- > </ small
136+ < button
137+ id =" show-map-btn "
138+ style = "
139+ padding: 10px 20px;
140+ background: #4285f4;
141+ color: #fff;
142+ border: none;
143+ border-radius: 5px;
144+ cursor: pointer;
145+ font-size: 1rem;
146+ "
147147 >
148+ Auf Karte anzeigen
149+ </ button >
150+ < div
151+ id ="osm-map-container "
152+ style ="display: none; margin-top: 20px "
153+ >
154+ < iframe
155+ id ="osm-map "
156+ width ="425 "
157+ height ="350 "
158+ src =""
159+ style ="border: 1px solid black "
160+ > </ iframe
161+ > < br /> < small
162+ > < a
163+ href ="https://www.openstreetmap.org/?mlat=50.74053&mlon=7.08942#map=15/50.74053/7.08942 "
164+ > Größere Karte öffnen</ a
165+ > </ small
166+ >
167+ </ div >
148168 </ div >
149169 < div class ="back-link ">
150170 < a href ="index.html "> ← Zurück zur Startseite</ a >
@@ -215,6 +235,40 @@ <h1>Unterstütze bitcircus101</h1>
215235 "payment-method-text" ,
216236 ) ;
217237 if ( paymentMethodText ) paymentMethodText . style . display = "none" ;
238+
239+ // OSM Map functionality
240+ var showMapBtn = document . getElementById ( "show-map-btn" ) ;
241+ var mapContainer = document . getElementById ( "osm-map-container" ) ;
242+ var osmMap = document . getElementById ( "osm-map" ) ;
243+
244+ if ( showMapBtn && mapContainer && osmMap ) {
245+ showMapBtn . addEventListener ( "click" , function ( ) {
246+ // Load map only on first click
247+ if ( ! osmMap . src ) {
248+ osmMap . src =
249+ "https://www.openstreetmap.org/export/embed.html?bbox=7.057943344116212%2C50.72276418262858%2C7.12090015411377%2C50.75828718705439&layer=mapnik&marker=50.74052905321277%2C7.08942174911499" ;
250+ }
251+
252+ // Show/hide map
253+ var isVisible = mapContainer . style . display !== "none" ;
254+ mapContainer . style . display = isVisible
255+ ? "none"
256+ : "block" ;
257+ showMapBtn . textContent = isVisible
258+ ? "Auf Karte anzeigen"
259+ : "Karte verstecken" ;
260+
261+ // Scroll to map when showing
262+ if ( ! isVisible ) {
263+ setTimeout ( function ( ) {
264+ mapContainer . scrollIntoView ( {
265+ behavior : "smooth" ,
266+ block : "center" ,
267+ } ) ;
268+ } , 100 ) ;
269+ }
270+ } ) ;
271+ }
218272 } ) ;
219273
220274 // Show donation content only after explicit consent, always show banner first
0 commit comments