Giter VIP home page Giter VIP logo

django-html5boilerplate's People

Contributors

lettertwo avatar matthewwithanm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

django-html5boilerplate's Issues

BeautifulSoup module name changed!

in BeautifulSoup==4.0b module name got changed to bs4

so at line 5 in html5boilerplate_tags.py
from BeautifulSoup import BeautifulSoup is giving 'No module named BeautifulSoup'

install_requires = ['BeautifulSoup>=3.2.0'], # TODO: Relax this requirement a bit. I'm sure it works with a much earlier version.

Add templatetag support for Modernizr.load

The HTML5BP google analytics snippet is already using Modernier.load:

Modernizr.load({
load: ('https:' == location.protocol ? '//ssl' : '//www') + '.google-analytics.com/ga.js'
});

We could do the same with other js loads via a templatetag.
An example of what we might generate (based on the example from the modernizr docs):

{% loadjsif "Modernizr.geolocation" %}
    <script src="{{ STATIC_URL }}main/js/libs/geo.js" type="text/javascript" charset="utf-8"></script>
{% elseloadjs %}
    <script src="{{ STATIC_URL }}main/js/libs/geo-polyfill.js" type="text/javascript" charset="utf-8"></script>
{% endloadjsif %}

That might generate something like:

Modernizr.load({
  test: Modernizr.geolocation,
  yep : '/static/main/js/libs/geo.js',
  nope: '/static/main/js/libs/geo-polyfill.js'
});

...or something like that. I wonder if Modernizr.load could also be useful to the loadjsuntil templatetag via syntax something like this:

Modernizr.load([
{
  load: "//ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/jquery-ui.js",
  complete: function() {
    if (!jQuery.ui) {
      Modernizr.load('/static/main/js/libs/jquery-ui.min.js');
    }
  }
}]

I'm not sure if the <script> tags still make sense in this scenario, but I think it would read pretty clearly in a template. Thoughts?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.