forked from orson/bachemap
fixed pin deleter, started fixing popup font
This commit is contained in:
parent
1b5df190ff
commit
96a866d58a
6
app.py
6
app.py
@ -174,8 +174,10 @@ def create_app():
|
||||
@app.route("/remove_pin/<pin_id>")
|
||||
@login_required
|
||||
def remove_pin(pin_id):
|
||||
actual_pin = mongo.db.pins.find_one({"_id": pin_id})
|
||||
added_by = actual_pin.added_by
|
||||
actual_pin = mongo.db.pins.find_one({"_id": ObjectId(pin_id)})
|
||||
print(actual_pin)
|
||||
added_by = actual_pin.get("added_by")
|
||||
print(added_by)
|
||||
if not current_user.is_admin or current_user.id != added_by:
|
||||
return redirect(url_for('index'))
|
||||
else:
|
||||
|
||||
@ -111,7 +111,7 @@ nav {
|
||||
|
||||
nav {
|
||||
padding: 12px; /* Increased padding for easier interaction */
|
||||
font-size: 1.3rem; /* Increased font size for readability */
|
||||
font-size: 1.2rem; /* Increased font size for readability */
|
||||
}
|
||||
|
||||
i.fa, i.far, i.fas {
|
||||
@ -127,7 +127,7 @@ nav {
|
||||
}
|
||||
|
||||
input[type="text"], input[type="password"], input[type="email"], textarea {
|
||||
font-size: 1.1rem; /* Ensure input text is readable */
|
||||
font-size: 1.4rem; /* Ensure input text is readable */
|
||||
padding: 12px; /* Comfortable padding for touch input */
|
||||
border-radius: 5px; /* Slight rounding for aesthetic consistency */
|
||||
}
|
||||
@ -144,8 +144,13 @@ nav {
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
div.leaflet-popup-content {
|
||||
div.leaflet-pane div.leaflet-popup div.leaflet-popup-content-wrapper div.leaflet-popup-content {
|
||||
width: 90%;
|
||||
font-size: 2rem !important;
|
||||
}
|
||||
|
||||
div.leaflet-popup-content {
|
||||
background-color: red;
|
||||
}
|
||||
|
||||
div.pinner-modal {
|
||||
@ -157,23 +162,23 @@ nav {
|
||||
|
||||
nav {
|
||||
padding: 20px; /* Larger padding for tappable navigation */
|
||||
font-size: 1.5rem; /* Increased font size for readability */
|
||||
font-size: 1.4rem !important; /* Increased font size for readability */
|
||||
}
|
||||
|
||||
.fa, .far, .fas {
|
||||
font-size: 2.2rem; /* Larger icons for touch interactions */
|
||||
font-size: 2.2rem !important; /* Larger icons for touch interactions */
|
||||
margin-left: -10px;
|
||||
margin-top: -10px;
|
||||
}
|
||||
|
||||
button {
|
||||
padding: 18px 30px; /* Large buttons for touch interaction */
|
||||
font-size: 1.4rem; /* Increased font size for readability */
|
||||
font-size: 1.6rem !important; /* Increased font size for readability */
|
||||
border-radius: 10px; /* Rounded corners for modern design */
|
||||
}
|
||||
|
||||
input[type="text"], input[type="password"], input[type="email"], textarea {
|
||||
font-size: 1.2rem; /* Larger input text for readability */
|
||||
font-size: 1.6rem !important; /* Larger input text for readability */
|
||||
padding: 15px; /* More padding for ease of input */
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
@ -75,4 +75,17 @@
|
||||
pinner_button_top.addEventListener('click', toggleSlide);
|
||||
observer.observe(document.body, { childList: true, subtree: true });
|
||||
</script>
|
||||
<script>
|
||||
// Wait until the entire page is fully loaded
|
||||
window.addEventListener('load', function() {
|
||||
const link = document.querySelector("link[rel='stylesheet'][href='{{ url_for('static', filename='styles.css') }}']");
|
||||
if (link) {
|
||||
const newLink = link.cloneNode();
|
||||
link.remove();
|
||||
document.head.appendChild(newLink);
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</html>
|
||||
|
||||
@ -37,6 +37,10 @@
|
||||
<td>Tipo de mejora urbana</td>
|
||||
<td>{{ pin.typeofpin }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Eliminar pin</td>
|
||||
<td><a href="/remove_pin/{{pin._id}}"><button type="submit" formmethod="get">Eliminar</button></a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
@ -31,7 +31,11 @@
|
||||
{% endfor %}
|
||||
|
||||
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© OpenStreetMap contributors'
|
||||
attribution: '© OpenStreetMap contributors',
|
||||
detectRetina: true,
|
||||
tileSize: 256,
|
||||
maxZoom: 19,
|
||||
maxNativeZoom: 18,
|
||||
}).addTo(map);
|
||||
|
||||
|
||||
@ -44,7 +48,7 @@
|
||||
// Add a circle around the user's location
|
||||
user_radial = L.circle(e.latlng, radius).addTo(map);
|
||||
// Center the map on the user's location
|
||||
map.setView(e.latlng, 16); // Adjust zoom level as needed
|
||||
map.setView(e.latlng, 18); // Adjust zoom level as needed
|
||||
}
|
||||
|
||||
// Error handling for geolocation
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html data-theme="light" lang="en" style="background-color: rgb(205, 243, 148); color: black;">
|
||||
<html data-theme="light" lang="es" style="background-color: rgb(205, 243, 148); color: black;">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Interactive Map</title>
|
||||
@ -9,7 +9,7 @@
|
||||
|
||||
</head>
|
||||
<body style="background-color: rgb(205, 243, 148); color: black;overflow-y: scroll;">
|
||||
<nav style="z-index: 500; height: 7vh;">
|
||||
<nav style="z-index: 500; height: 7vh; position:relative">
|
||||
<ul>
|
||||
<a href="/"><li><h2>El Bachemapa</h2></li></a>
|
||||
</ul>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user