Skip to content
This repository was archived by the owner on Sep 30, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
d2a595b
Merge branch 'master' of https://github.com/laprice/HackForACause int…
Feb 14, 2016
7b37a7e
add doctype
Feb 14, 2016
71fef31
Merge branch 'WebInterface' of https://github.com/gandalf3/HackForACause
Feb 14, 2016
b41b035
some basic structure for responsive sidebar
Feb 14, 2016
2d4f790
some quick hacks to pull in json data to index page via ajax
Feb 14, 2016
ee05c59
documentation
Feb 14, 2016
069a25d
basic location pins, some useful categories in sidebar
Feb 14, 2016
198eae1
add routing engine from https://github.com/perliedman/leaflet-routing…
Feb 14, 2016
a2039b4
working location markers
Feb 14, 2016
2e995b7
make mock data more colorful
Feb 15, 2016
1c59670
add list of locations
Feb 19, 2016
74a5662
start refactoring towards OOP based implementation
Feb 19, 2016
9b744cd
remove broken error message
Feb 19, 2016
a708523
move some code into a main() function
Feb 19, 2016
2f9314c
juggle around data to the places it's needed
Feb 19, 2016
3fc3be5
comment out downtown outline
Feb 19, 2016
93a5c39
avoid use of reserved word 'location' as class name
Feb 19, 2016
6c0b66d
giant OOPification refactorization \o/
Feb 19, 2016
5d267dd
remove dead code. rip.
Feb 19, 2016
1906b7b
make categories collapsible, animated
Feb 22, 2016
b893bd4
implement proper toggling of categories
Feb 23, 2016
80db017
stylistic improvments; every-other-entry list highlighting for small …
Feb 23, 2016
0139d59
add popups to markers. Note that images are expected to be in 'static…
Feb 23, 2016
efe25c9
avoid leaving leftover popups lying around
Feb 23, 2016
8607c24
change color of the community category in placeholder data to match s…
Feb 23, 2016
38a0cde
add name of location to popups
Feb 23, 2016
bb22134
make markers expand on hover, and fix unclickable bit below popups
Feb 23, 2016
8d28a6a
add transition for marker-hover effect and center marker when its coo…
Feb 23, 2016
234474e
ensure whole popup will fit on screen, even at frightfully small scre…
Feb 23, 2016
75e89a2
less disruptive way of panning to show location on menuitem hover
Mar 1, 2016
45e5f03
HACK: copy asset images into django static resources directory
Mar 10, 2016
d473fe8
lots of cleanup and tweaks. Added somewhat broken routing feature usi…
Mar 23, 2016
8aa86dd
Merge branch 'master' of https://github.com/TheEngineCompany/HackForA…
Mar 23, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
465 changes: 465 additions & 0 deletions wayfinding/dwtn/templates/dwtn/static_dump.json

Large diffs are not rendered by default.

11 changes: 10 additions & 1 deletion wayfinding/dwtn/templates/wayfinding/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<!DOCTYPE html5>
{% load staticfiles %}



<html>
<head>
<meta charset="utf-8">
Expand All @@ -7,9 +11,14 @@
<link rel="stylesheet" href="{% static 'css/base.css' %}"/>
<link rel="stylesheet" href="{% static 'css/leaflet.css' %}"/>
<script src="{% static 'js/leaflet.js' %}"></script>
<script src="{% static 'js/leaflet-routing-machine.min.js' %}"></script>
</head>
<body>
<div id="map"></div>
<div id="sidebar">
<ul id="categories">
</ul>
</div><!-- no whitespace
--><div id="map"></div>
<script src="{% static 'js/downtown.js' %}"></script>
</body>
</html>
31 changes: 18 additions & 13 deletions wayfinding/dwtn/views.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from django.shortcuts import render, get_object_or_404
from django.http import HttpResponse
import json
import sys

from .models import Category, Location

Expand All @@ -18,17 +19,21 @@ def location(request, location_name):
return render(request, 'dwtn/location.html', {'location':location})

def make_json(request):
cat_list = []
loc_list = []
root_dict = {}

for category in Category.objects.all():
cat_list.append({"id": category.pk, "name": category.category_name, "pin": category.pin, "color": category.color})
for location in Location.objects.all():
loc_list.append({"name": location.location_name, "lon": str(location.lon),
"lat": str(location.lat), "img": location.image, "details": location.details, "state": location.state, "catid": location.category_id})
root_dict["categories"] = cat_list
root_dict["locations"] = loc_list
data = json.dumps(root_dict, indent=2)

return HttpResponse(data, content_type='application/json')
if "runserver" not in sys.argv: # hackish way to test if we are on dev or production server
cat_list = []
loc_list = []
root_dict = {}

for category in Category.objects.all():
cat_list.append({"id": category.pk, "name": category.category_name, "pin": category.pin, "color": category.color})
for location in Location.objects.all():
loc_list.append({"name": location.location_name, "lon": str(location.lon),
"lat": str(location.lat), "img": location.image, "details": location.details, "state": location.state, "catid": location.category_id})
root_dict["categories"] = cat_list
root_dict["locations"] = loc_list
data = json.dumps(root_dict, indent=2)

return HttpResponse(data, content_type='application/json')
else: # if not on a production server, return static data for testing
return render(request, 'dwtn/static_dump.json', content_type='application/json')
Binary file not shown.
564 changes: 564 additions & 0 deletions wayfinding/static/assets/arialComplete.fnt

Large diffs are not rendered by default.

Binary file added wayfinding/static/assets/arialComplete.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added wayfinding/static/assets/cityLogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added wayfinding/static/assets/feeneyLogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added wayfinding/static/assets/kiosk_pin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added wayfinding/static/assets/locate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
204 changes: 204 additions & 0 deletions wayfinding/static/assets/locations/Eugene_liquor_licenses.csv

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added wayfinding/static/assets/locations/ambrosia.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added wayfinding/static/assets/locations/barre-3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added wayfinding/static/assets/locations/beerstein.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added wayfinding/static/assets/locations/belly.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added wayfinding/static/assets/locations/bon-mi.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added wayfinding/static/assets/locations/cooler.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions wayfinding/static/assets/locations/cosmetic.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
"1", "Analog Barbershop", "http://www.dailyemerald.com/wp-content/uploads/2012/10/121008.mca_.AnalogBarbershop.047.jpg"
"2", "Anderson's Barbershop", "http://s3-media2.fl.yelpcdn.com/bphoto/RXSGFe21_l8n2D3AwesetA/ls.jpg"
"3", "Barre 3", "http://s3-media4.fl.yelpcdn.com/bphoto/paZJ4Z5cwxOyESco4aIkdw/o.jpg"
"4", "Downtown Athletic Club", "https://reporting1blog.files.wordpress.com/2011/10/dsc_00341.jpg"
"5", "Imagine Salon", ""
"6", "London Hair", ""
"7", "Parlour Tattoo", "http://blogs.uoregon.edu/odietch2f14gateway/files/2012/09/1Establishing_oliviadietchIntheMoment-1wcahng.jpg"
"8", "Urban Waxx", "http://www.urbanwaxx.com/images/large_computer.jpg"
"9", "Man's World", "http://www.mansworldbestbarbers.com/sites/default/files/styles/large/public/201303/best-barbers.jpg?itok=S_n0TBoM"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added wayfinding/static/assets/locations/doc's-pad.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions wayfinding/static/assets/locations/entertainment.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"1", "Actor's Cabaret", "http://cdn2-b.examiner.com/sites/default/files/styles/image_content_width/hash/14/72/14723429199e5bea01e830c09c3c0cc7.jpg?itok=5X1Y0Q_w"
"2", "Bijou Metro Cinema", "https://blogs.uoregon.edu/bstanle7f15gateway/files/2012/09/StanleyBrett_InTheMoment1-1hx71ws-e1449276347408.jpg"
"3", "Hult Center", "https://upload.wikimedia.org/wikipedia/commons/0/00/HultCenterPerformingArts.jpg"
"4", "Mcdonald Theatre", "https://upload.wikimedia.org/wikipedia/commons/1/1f/McDonald_Theatre.jpg"
"5", "Oregon Contemporary Theatre", "http://bestofeugene.com/wp-content/uploads/2015/11/20151105best-theater-OCT-819x1024.jpg"
"6", "The Shedd Institute", "http://musictour.eu/data//uploads/media/halls/3670/3b470a882d5b4b94a8dacba42a980417.jpg"
"7", "W.O.W. Hall", "http://www.wowhall.org/sites/default/files/images/WOW1.jpg"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 44 additions & 0 deletions wayfinding/static/assets/locations/food.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
"1", "Ambrosia", https://www.secondhelpings.org/wp-content/uploads/2014/10/Ambrosia-inside.jpg"
"2", "Ax Billy Grill & Sports Bar", https://upload.wikimedia.org/wikipedia/commons/d/d4/Ax_Billy_Department_Store_-_Eugene_Oregon.jpg"
"3", "Bagel Sphere", "http://bagelsphere.com/yahoo_site_admin/assets/images/IMG_0451.335115636_std.JPG"
"4", "The Barn Light", "https://reporting1blog.files.wordpress.com/2014/06/barn-light.jpg"
"5", "Belly", "https://i.ytimg.com/vi/Gqegq9_89Cs/maxresdefault.jpg"
"6", "Bon Mi", "http://media-cdn.tripadvisor.com/media/photo-s/07/45/bd/92/bon-mi.jpg"
"7", "Cowfish Nightclub", "https://huekahjohn.files.wordpress.com/2011/02/cowfish-bar.jpg"
"8", "Cozmic Pizza", "https://upload.wikimedia.org/wikipedia/commons/a/a0/Cozmic_Pizza.jpg"
"9", "Crumb Together", ""
"10", "The Davis", "https://media-cdn.tripadvisor.com/media/photo-s/08/87/f1/12/davis-restaurant-bar.jpg"
"11", "Doc's Pad", "http://static.wixstatic.com/media/808536_e289dfd70086f0a1d5f7f24086711a28.jpg_srz_675_1129_85_22_0.50_1.20_0.00_jpg_srz"
"12", "First National Tab House", "http://www.firstnationaltaphouse.com/wp-content/uploads/2014/06/FNTH-405.jpg"
"13", "Full City Cafe", "http://static1.squarespace.com/static/55b7fe52e4b0e35848a5ab12/t/5653ad68e4b0e857d2e104a1/1448324457581/Banner-Mobile-Directions.jpg?format=2500w"
"14", "The Horsehead Bar", "http://www.horseheadbareugene.com/wp-content/uploads/2014/01/DSC_2603_4.jpg"
"15", "Jameson's Bar", "http://www.totalhappyhour.com/preview/500-450/content/files/mod.happyhour/6a7084412bd1412788de9076287934b0.jpg"
"16", "Killer Burger", "http://media1.fdncms.com/portmerc/imager/killer-burger-kills-it/u/zoom/5766834/food1-2-570.jpg"
"17", "Lotus Garden", "https://oregonartswriting.files.wordpress.com/2011/03/lotusgarden1.jpg"
"18", "Luckey's Club", "http://www.luckeysclub.com/wp-content/uploads/wow-slider-plugin/7/images/newhead.jpg"
"19", "Membrillo", "http://s3-media2.fl.yelpcdn.com/bphoto/1iUgd2ikPaxf8U7s3ly1qw/348s.jpg"
"20", "Mezza Luna Pizzeria", "https://d3lawkbdj6aabd.cloudfront.net/singleplatform/image/upload/0d257b8a6ca605321ee4b2fa080a0560c3da2ada.jpg"
"21", "Noisette Bakery", "http://s3-media2.fl.yelpcdn.com/bphoto/b5W_TgFwk8Yn3mVSzrvTyg/o.jpg"
"22", "Novella Cafe", "http://www.bagelsphere.com/yahoo_site_admin/assets/images/000_0220.155110337_std.JPG"
"23", "Noddle Bowl", "https://noodlebowleugene.files.wordpress.com/2011/08/together.jpg"
"24", "Off the Waffle", "http://media-cdn.tripadvisor.com/media/photo-s/05/95/ac/04/off-the-waffle-downtown.jpg"
"25", "Poppi's Anatolia", "https://bobbyandkristen.files.wordpress.com/2014/04/anatolia_inside.jpg"
"26", "Palace Bakery", "http://s3-media1.fl.yelpcdn.com/bphoto/tBPKXXoSaVhmb30k0yJLXg/o.jpg"
"27", "Park Street Cafe", "http://s3-media2.fl.yelpcdn.com/bphoto/F8VdK7_4l9FxfhIFDre7vQ/o.jpg"
"28", "Party Downtown", ""
"29", "Perugino", "http://www.dailyemerald.com/wp-content/uploads/2013/11/20131029.CK_.Top10AmbiancesODE._10.jpg"
"30", "Pita Pit", "http://static1.squarespace.com/static/53cf2dbbe4b07de11ec69a55/t/53d05c37e4b056db8c5e319c/1406164036448/Pita+Leeds_16+Feb+2014_008.jpg?format=2500w"
"31", "Pyrenees Wine Lounge", "http://www.experienceeugene.com/sites/default/files/styles/node-detail/public/field/image/pyrenees-vineyard-cellars.jpg?itok=2e4YUK2J"
"32", "Red Wagon Creamery", "https://originalpnwlife.files.wordpress.com/2015/05/img_1216.jpg"
"33", "Rogue Public House", "http://newschoolbeer.com/wp-content/uploads/2014/12/140212.mca_.ODE_.Rogue_.Brewery.5-980x653.jpg"
"34", "Sidelines Grill & Sports Bar", "http://www.dailyemerald.com/wp-content/uploads/2014/04/2014.04.23.AS_.Sidelines0021c-980x653.jpg"
"35", "Sizzle Pie", "https://s-media-cache-ak0.pinimg.com/originals/92/d4/35/92d435f52b65a1754610f615241332b7.jpg"
"36", "Starbucks", "http://s3-media3.fl.yelpcdn.com/bphoto/cXW4mZG6gphTyyJuiLkvbQ/o.jpg"
"37", "Starlight Lounge", "https://huekahjohn.files.wordpress.com/2010/10/2010-10-15-23-02-28.jpg"
"38", "Sushi Ya", "http://jasontoddcooper.com/site/wp-content/uploads/2012/09/sushiya_12.jpg"
"39", "Sweet Basil Thai", "https://media-cdn.tripadvisor.com/media/photo-s/07/47/ca/b7/sweet-basil-thai-cuisine.jpg"
"40", "Theo's Coffee House", "http://s3-media2.fl.yelpcdn.com/bphoto/hAJW3Tlf7oAj0ELThKcEkg/o.jpg"
"41", "Toadstool Cupcakes", "http://s3-media2.fl.yelpcdn.com/bphoto/6e6CprriCES-2oWHPFXFDQ/o.jpg"
"42", "Togo's", "http://restaurantnews.com/wp-content/uploads/2013/01/Togos-Brings-Its-Seriously-Stacked-Sandwiches-To-First-Restaurant-In-Eugene.jpg"
"43", "Townshend's Teahouse", "http://www.townshendstea.com/images/eugene_about.jpg"
"44", "Voodoo Doughnut", "https://upload.wikimedia.org/wikipedia/commons/2/27/Captain_My_Captain,_Voodoo_Doughnut.jpg"
Binary file added wayfinding/static/assets/locations/footwise.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added wayfinding/static/assets/locations/kitsch-22.jpg
Binary file added wayfinding/static/assets/locations/mecca.jpg
Binary file added wayfinding/static/assets/locations/membrillo.jpg
Binary file added wayfinding/static/assets/locations/moss.jpg
Binary file added wayfinding/static/assets/locations/obar.jpg
Binary file added wayfinding/static/assets/locations/overpark.jpg
Binary file added wayfinding/static/assets/locations/perugino.jpg
Binary file added wayfinding/static/assets/locations/pita-pit.jpg
26 changes: 26 additions & 0 deletions wayfinding/static/assets/locations/retail.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
"1", "Antique Clock Shop", ""
"2", "Buy 2", ""
"3", "Clone Ball Antiques", ""
"4", "Footwise", "http://www.footwise.com/wp/wp-content/uploads/2014/10/pdx_store_facadeb031.jpg"
"5", "Goldworks Jewelry", "https://www.eugeneagogo.com/media/uploads/eventmedia/First-Friday-Artwalk-At-Goldworks-Jewelry-Studio/broken-egg-pts-mod-1_2.jpg"
"6", "Harelquin Beads & Jewelry", "https://www.eugeneagogo.com/media/uploads/venuemedia/Harlequin-Beads-And-Jewelry/Harlequin_Beads_Jewelry_Store.jpg"
"7", "Heritage Dry Goods", "http://cdn.shopify.com/s/files/1/0232/4597/t/7/assets/slide-image-4.jpg?5423310929719156239"
"8", "Hutch's Bicycle", "https://i.ytimg.com/vi/uyCeemR-FSw/maxresdefault.jpg"
"9", "J. Michaels Books", "https://usedbookstores.files.wordpress.com/2010/11/img_8198.jpg"
"10", "Kitsch 22", "http://s3-media3.fl.yelpcdn.com/bphoto/__XDU5Ig7X_5ZRmRWhWf8A/o.jpg"
"11", "Kiva Grocery", "https://kivagrocery.files.wordpress.com/2014/10/mg_4735.jpg"
"12", "Lazar's Bazar", "https://upload.wikimedia.org/wikipedia/commons/2/25/Lazar's_Bazar_%28Eugene,_Oregon%29.jpg"
"13", "L Bass Cosmetics & Skincare", "http://s3-media3.fl.yelpcdn.com/bphoto/vNBMkB36twhmYqsywebQzg/o.jpg"
"14", "Oregon Art Supply", "https://www.eugeneagogo.com/media/uploads/venuemedia/Oregon-Art-Supply/Stationery%20image%20II.jpg"
"15", "Out On A Limb Gallery", "https://i.ytimg.com/vi/XmPi4WIIoi0/maxresdefault.jpg"
"16", "Oveissi * Co.", "http://static1.squarespace.com/static/50c934d4e4b0b58a9c48b108/t/50dcb62be4b0a05702a72b22/1356644064930/126_01_Oveissi_best_noflag.jpg"
"17", "Passionflower", "http://media-cdn.tripadvisor.com/media/photo-s/03/72/7f/c5/passionflower-design.jpg"
"18", "Pewter Rabbit", "http://3.bp.blogspot.com/-CkWGNd9JO2w/TkvS2ldzuJI/AAAAAAAAU2E/YxObjT1xekE/s1600/DSCN9324.JPG"
"19", "Schrager & Clarke Gallery", "https://www.eugeneagogo.com/media/cropuploads/dennis_galloway_image_of_karin-crop-720x320+0+0.jpg"
"20", "Shoe-a-holic", "http://shoeaholiceugene.com/wordp/wp-content/uploads/2015/11/shoe.jpg"
"21", "Thunderbird Market", ""
"22", "Titan Bookstore", "http://pivotarchitecture.com/images/portfolio-images/large/titan-store_1_lg.jpg"
"23", "Urban Lumber", "https://i.vimeocdn.com/video/475773637.jpg?mw=1920&mh=1080&q=70"
"24", "Vistra Framing", "https://www.eugeneagogo.com/media/uploads/venuemedia/Vistra-Framing-And-Gallery/panorama2-cropequalizehdr100dpi_1.jpg"
"25", "White Lotus Gallery", "http://3.bp.blogspot.com/-tAeeCExjgbg/TekFib9yYYI/AAAAAAAAHgE/Pr7mz0xAxq8/s1600/WL-736870.jpg"
"26", "Willamette Street Market", ""
Binary file added wayfinding/static/assets/locations/shadowfox.jpg
Binary file added wayfinding/static/assets/locations/starbucks.jpg
Binary file added wayfinding/static/assets/locations/sushi-ya.jpg
Binary file added wayfinding/static/assets/locations/the-davis.jpg
Binary file added wayfinding/static/assets/locations/togo's.jpg
Binary file added wayfinding/static/assets/locations/urban-waxx.jpg
Loading