Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    js.html5boilerplate 1.0

    Download button

    No screenshots available
    Downloads: 127  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Fanstatic Developers | More programs
    BSD License / FREE
    July 10th, 2011, 05:04 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    js.html5boilerplate description

    Fanstatic packaging of html5boilerplate

    js.html5boilerplate is a Python library packages html5boilerplate for Fanstatic.

    This requires integration between your web framework and fanstatic, and making sure that the original resources (shipped in the resources directory in js.html5boilerplate) are published to some URL.

    How to use?

      > > > from fanstatic import NeededResources
      > > > needed = NeededResources(bottom=True)


    You can import the various files from js.html5boilerplate and need() them in your page:

     > > > from js.html5boilerplate import style, pngfix
     > > > needed.need(style)
     > > > needed.need(pngfix)

     > > > html = '''
    ... < !doctype html >
    ... < html >
    ... < head >
    ... < /head >
    ... < body >
    ... my content
    ... < /body >
    ... < /html >'''
     > > > print needed.render_topbottom_into_html(html)
    < BLANKLINE >
    < !doctype html >
    < html >
     < head >
     < link rel="stylesheet" type="text/css" href="/fanstatic/html5boilerplate/css/style.css" / >
    < BLANKLINE >
     < /head >
     < body >
     my content
     < !--[if lt IE 7 ] >
     < script src="/fanstatic/html5boilerplate/js/dd_belatedpng.js" >< /script >
     < script >DD_belatedPNG.fix("img, .png_bg");
     < ![endif]-- >< /body >
    < /html >


    If you need the boilerplate group, jquery and modernizr are also included:

     > > > from js.html5boilerplate import boilerplate
     > > > needed = NeededResources(resources=[boilerplate], bottom=True)
     > > > print needed.render_topbottom_into_html(html)
    < BLANKLINE >
    < !doctype html >
    < html >
     < head >
     < link rel="stylesheet" type="text/css" href="/fanstatic/html5boilerplate/css/style.css" / >
    < script type="text/javascript" src="/fanstatic/jquery/jquery.js" >< /script >
    < script type="text/javascript" src="/fanstatic/modernizr/modernizr.js" >< /script >
    < BLANKLINE >
     < /head >
     < body >
     my content
     < !--[if lt IE 7 ] >
     < script src="/fanstatic/html5boilerplate/js/dd_belatedpng.js" >< /script >
     < script >DD_belatedPNG.fix("img, .png_bg");
     < ![endif]-- >< /body >
    < /html >



    Product's homepage

    Requirements:

    · Python
    · Fanstatic

      


    TAGS:

    Fanstatic html5boilerplate | Fanstatic packaging | Fanstatic | html5boilerplate | packaging

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM