diff --git a/config.py b/config.py index b02d6bb08d072e6a17ed69f8dd112a1a681f7792..39ce767d473024b69127810c9acf48988ae53658 100644 --- a/config.py +++ b/config.py @@ -43,6 +43,7 @@ class Config(object): # Map display parameters MAP_ERROR_TILE_URL = 'http://tiles.antsar-static.com/generic/tile-blank-black.png' MAP_TILE_URL = 'http://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}.png' + MAP_DATA_ATTRIBUTION = '<a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors and <a href="http://cartodb.com/attributions">CartoDB</a>' MAP_TILE_SUBDOMAINS = ['a', 'b', 'c'] MAP_TILESET = 'rutgers-black' MAP_LAT_PADDING = 0.03 diff --git a/templates/about.html b/templates/about.html new file mode 100644 index 0000000000000000000000000000000000000000..add748a655774d142fab1ecb4418ef9b0aa3e22d --- /dev/null +++ b/templates/about.html @@ -0,0 +1,31 @@ +<h2>About PyBusMap</h2> +<p> + This map displays real-time vehicle locations and arrival predictions + for public transit systems which are tracked by NextBus. +</p> +<p> + Built by <a href="https://ant.sr">Anton Sarukhanov</a>. Open source + and MIT licensed. + <a href="https://git.xhost.io/anton/pybusmap">Fork it</a>. +</p> +<p> + <a href="http://leafletjs.com" + title="A JS library for interactive maps">Leaflet</a> + - A JavaScript library for interactive maps. +</p> +<p> + Map Data © {{ config['MAP_DATA_ATTRIBUTION']|safe }}. +</p> +<p> + Transit Data © {{ agency.title }} and/or NextBus. +</p> +<p> + Data sourced from the <a href="http://nextbus.com">Nextbus</a> API. +</p> +<p> + NextBus™ is a trademark of NextBus Inc. +</p> +<p class="legalese"> + Not guaranteed to be correct. + Refer to your travel agency for official schedules and/or predictions. +</p> diff --git a/templates/map.html b/templates/map.html index e808ae4cd4ac60fa5f920d3a68a14dd7655f66a2..f3c95ee8e43fff02c4db5abc8a9700cf44240bd3 100644 --- a/templates/map.html +++ b/templates/map.html @@ -14,55 +14,11 @@ <div id="map" class="{% if embed %}embed{% endif %}"></div> <div class="dialog" id="about"> <div class="close" id="close-about"><a href="javascript:void(0);">×</a></div> - <h2>About PyBusMap</h2> - <p> - This map displays real-time vehicle locations and arrival predictions - for public transit systems which are tracked by NextBus. - </p> - <p> - Built by <a href="https://ant.sr">Anton Sarukhanov</a>. Open source - and MIT licensed. - <a href="https://git.xhost.io/anton/pybusmap">Fork it</a>. - </p> - <p> - <a href="http://leafletjs.com" - title="A JS library for interactive maps">Leaflet</a> - - A JavaScript library for interactive maps. - </p> - <p> - Map Data © {{ config['MAP_DATA_ATTRIBUTION']|safe }}. - </p> - <p> - Transit Data © {{ agency.title }} and/or NextBus. - </p> - <p> - Data sourced from the <a href="http://nextbus.com">Nextbus</a> API. - </p> - <p> - NextBus™ is a trademark of NextBus Inc. - </p> + {% include "about.html" %} </div> <div class="dialog" id="welcome"> <div class="close" id="close-welcome"><a href="javascript:void(0);">×</a></div> - <h2>Welcome to PyBusMap</h2> - <p> - Hi! This is PyBusMap. It's a map of buses tracked by NextBus. It has - predictions for bus arrival times, and real-time vehicle locations. - </p> - <p> - To see upcoming buses for a stop, click the stop flag <img height="20px" src="static/img/stop27x60.png" alt="stop-icon">. - </p> - <p> - To see upcoming stops for a bus, click the bus <img height="20px" src="static/img/bus.png" alt="bus-icon">. - </p> - <h1> - <a href="javascript:void(0);" onclick="$('#welcome').hide();">Let's Go!</a> - </h1> - <p class="legalese"> - Nothing displayed here is guaranteed to be correct. The creator of this - map takes no responsibility for you catching a bus, missing a bus, or - interacting with a bus in any other way. - </p> + {% include "welcome.html" %} </div> <div id="msg"> <span id="msg-zoomForVehicles">Zoom in to see vehicles.</span> diff --git a/templates/welcome.html b/templates/welcome.html new file mode 100644 index 0000000000000000000000000000000000000000..4740d157ce30019a9836bb25a85552f4e4db0126 --- /dev/null +++ b/templates/welcome.html @@ -0,0 +1,18 @@ +<h2>Welcome to PyBusMap</h2> +<p> + Hi! This is PyBusMap. It's a map of buses tracked by NextBus. It has + predictions for bus arrival times, and real-time vehicle locations. +</p> +<p> + To see upcoming buses for a stop, click the stop flag <img height="20px" src="static/img/stop27x60.png" alt="stop-icon">. +</p> +<p> + To see upcoming stops for a bus, click the bus <img height="20px" src="static/img/bus.png" alt="bus-icon">. +</p> +<h1> + <a href="javascript:void(0);" onclick="$('#welcome').hide();">Let's Go!</a> +</h1> +<p class="legalese"> + Not guaranteed to be correct. + Refer to your travel agency for official schedules and/or predictions. +</p>