Module: Sinatra::Twitter::Bootstrap::AssetsHelper
- Defined in:
- lib/sinatra/twitter-bootstrap.rb
Instance Method Summary collapse
Instance Method Details
#bootstrap_assets ⇒ Object
66 67 68 |
# File 'lib/sinatra/twitter-bootstrap.rb', line 66 def bootstrap_assets bootstrap_css + bootstrap_js end |
#bootstrap_css ⇒ Object
48 49 50 51 52 53 54 |
# File 'lib/sinatra/twitter-bootstrap.rb', line 48 def bootstrap_css output = '<meta name="viewport" content="width=device-width, initial-scale=1.0">' Assets::ASSETS[:css].each do |file, _| output += '<link rel="stylesheet" media="screen, projection" type="text/css" href="%s">' % url('/css/%s' % file) end output end |
#bootstrap_js ⇒ Object
56 57 58 59 60 61 62 63 64 |
# File 'lib/sinatra/twitter-bootstrap.rb', line 56 def bootstrap_js output = '' Assets::ASSETS[:js].each do |file, _| output += '<!--[if lt IE 9]>' if file == 'html5.js' output += '<script type="text/javascript" src="%s"></script>' % url('/js/%s' % file) output += '<![endif]-->' if file == 'html5.js' end output end |