Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial Markup for Home and About Pages #30

Merged
merged 4 commits into from Aug 29, 2014

Conversation

paulstefanort
Copy link
Contributor

(Deals with #27.)

These changes provide initial HTML for two of the pages.

Home Page

  • Added a basic Google Map centered on Tulsa.
  • Added request for user location.
  • Added redirect after finding user location. (/#latitude=...&longitude=...)

About Page

  • Added basic markup.
  • Added button linking user back to home page for location lookup.

Questions

  • I changed the body_js block in base.jinja2 to force the scripts referenced in the base template to be included on every page. Not sure whether that is considered an anti-pattern when working with Django. Thoughts on improvement welcome.
  • I also added an about route to urls.py. It seems to work properly, but please comment if I missed something.

@jwhitlock
Copy link
Member

@jdungan can you review and merge when ready?

It's too narrow at desktop resolutions:

Too tight at desktop

A full width column like .col-md-10 .col-md-offset-1 might work.

My pattern for blocks like this is:

{% block body_js -%}
    <!-- Scripts that everyone gets -->
    <script src="{{ static('vendor/jquery/jquery-1.11.1.min.js') }}"></script>
    <script src="{{ static('vendor/bootstrap-3.2.0-dist/js/bootstrap.min.js') }}"></script>
    {% body_extra_js %}{% endblock %}
{%- endblock body_js %}

This way, a template that includes the base template can:

  • Replace all the JS by overriding body_js
  • Just add some JS by overriding body_extra_js

Your route for the about page is exactly right.

@jdungan
Copy link
Member

jdungan commented Aug 28, 2014

I would but my postgis install still is inop. I plan to be at the fablab around 10am tomorrow. First order of business is to fix my environ (any volunteers to help?). Then I can review.

John

On Aug 28, 2014, at 8:19 AM, John Whitlock notifications@github.com wrote:

@jdungan can you review and merge when ready?

It's too narrow at desktop resolutions:

A full width column like .col-md-10 .col-md-offset-1 might work.

My pattern for blocks like this is:

{% block body_js -%}

<script src="{{ static('vendor/jquery/jquery-1.11.1.min.js') }}"></script>
<script src="{{ static('vendor/bootstrap-3.2.0-dist/js/bootstrap.min.js') }}"></script>
{% body_extra_js %}{% endblock %}
{%- endblock body_js %}
This way, a template that includes the base template can:

Replace all the JS by overriding body_js
Just add some JS by overriding body_extra_js
Your route for the about page is exactly right.


Reply to this email directly or view it on GitHub.

@jwhitlock
Copy link
Member

@jdungan since I'm the guy that messed it up, of course I'll help out. See you at 10 AM.

@paulstefanort
Copy link
Contributor Author

@jwhitlock Thanks for the feedback! I see that I forgot to add the CSS classes for desktop browsers when I ported my original static HTML to Django templates. I had been using .col-md-6 and .col-md-offset-3.

jdungan added a commit that referenced this pull request Aug 29, 2014
Initial Markup for Home and About Pages
@jdungan jdungan merged commit ca357b0 into codefortulsa:master Aug 29, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants