GoPhillyGo v2 Prototype #530
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is the prototype of GoPhillyGo v2.
Installation and use
Run
npm install
in the project directory to install required packages.Run
grunt
to watch for file changes and automatically open your browser to localhost:3000.Responsive
The entire app should be responsive to different screen sizes via css media queries.
Information architecture
Much of the app lives in
app/index.html
. That's where the home view and map view live. Switch between them by changingbody.body-home
tobody.body-map
.The prototype contains most of the components statically within
app/index.html
and toggles their visibility depending on the state of the app. Replace this approach with whatever rendering mojo you see fit (Angular, I assume).Map view
CSS flexbox is used for arranging the map and sidebar into 2-columns (desktop) or 1-column (mobile).
When in map view, there should always be exactly 5 or 6 top-level sibling elements, in order:
.the-map
.app-header
.directions-form-element
.sidebar-banner
iff (1) options are set, or (2) biking directions are shown and indego banner hasn't been displayed for this user (or client) before@import
thesidebar-main
mixin..app-footer
The
sidebar-main
mixin ensures the cumulative height of all these elements except the map is 100vh, forcing the map to wrap into the second column. Note, for this to work correctly, whenever.sidebar-banner
is shown, ensure<body>
has the.body-has-sidebar-banner
class.Feel free to change how all this works if you have a better way, though let me know so I can sanity check and/or learn.
Info pages
All other pages (
app/learn.html
,app/learn-detail.html
,app/explore-detail.html
,app/about.html
) depend onbody.body-info
.Prototype-only files
app/extras.html
contains various components missing from the prototype but that will need to be in the app. If anything is missing and isn't trivial to make, let me know and I'll make it for you.app/sass/pages/_PROTOTYPE.scss
contains minimal styles to makeapp/extras.html
work.app/js/prototype.js
makes the prototype work, mostly via toggling classnames on<body>
or other elements.You can remove all these files from the production app, although you'll probably need to retain or adapt the last function in
prototype.js
. It's a hack that makes the latest blog post card on the home page work (it has a<button>
nested inside an<a>
).