Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

Commit

Permalink
Revert "Added Flask-Minify (#94)"
Browse files Browse the repository at this point in the history
This reverts commit 2b9cd6e.
  • Loading branch information
ttomasz authored Mar 20, 2022
1 parent 2b9cd6e commit 2fbc19c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
3 changes: 1 addition & 2 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import json
import flask
import ruamel.yaml
from flask_minify import Minify

languages = ("pl", "uk", "en")

Expand All @@ -12,7 +11,7 @@
)

App = flask.Flask(__name__)
Minify(app=App, html=True, js=True, cssless=True)


@App.route('/')
def get_index():
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@ Shapely==1.8.1.post1
urllib3==1.26.8
Flask==2.0.1
Frozen-Flask==0.18
Flask-Minify==0.37
10 changes: 4 additions & 6 deletions templates/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ const geocoder_api = {
};
},
};

const map = new maplibregl.Map({
container: 'map', // container id
center: loadCenter(), // starting position [lng, lat]
Expand Down Expand Up @@ -405,13 +405,11 @@ function renderOpeningHours(properties, lang) {
}

function renderBasicPopup(lonlat, properties) {
const renderGeoUri = !/^((?!chrome|android).)*safari/i.test(navigator.userAgent);
const osmUrl = `https://www.openstreetmap.org/directions?from=&to=${lonlat[1]}%2C${lonlat[0]}#map=14/${lonlat[1]}/${lonlat[0]}`;
const gmapsUrl = `https://www.google.com/maps/dir/?api=1&destination=${lonlat[1]}%2C${lonlat[0]}`;
const renderGeoUri = !/^((?!chrome|android).)*safari/i.test(navigator.userAgent)
let popupHTML = `
${renderName(properties, LANG)}
${renderPopupRouteLink(`OpenStreetMap {{ strings.navigation[lang] }}`, osmUrl)}
${renderPopupRouteLink(`Google Maps {{ strings.navigation[lang] }}`, gmapsUrl)}
${renderPopupRouteLink(`OpenStreetMap {{ strings.navigation[lang] }}`, `https://www.openstreetmap.org/directions?from=&to=${lonlat[1]}%2C${lonlat[0]}#map=14/${lonlat[1]}/${lonlat[0]}`)}
${renderPopupRouteLink(`Google Maps {{ strings.navigation[lang] }}`, `https://www.google.com/maps/dir/?api=1&destination=${lonlat[1]}%2C${lonlat[0]}`)}
${renderGeoUri ? renderPopupRouteLink('GeoURI', `geo:${lonlat[1]},${lonlat[0]}`, true) : ''}
${renderPhoneNumber(properties)}
${renderDescription(properties, LANG)}
Expand Down

0 comments on commit 2fbc19c

Please sign in to comment.