def less_css(bundle): """ Similar to jingo_minify's css helper, but uses rel="stylesheet/less" instead of rel="stylesheet". """ urls = get_css_urls(bundle) link_tag = '<link rel="stylesheet/less" media="screen,projection,tv" href="{0}" />' return Markup('\n'.join([link_tag.format(url) for url in urls]))
def less_css(bundle): """ Similar to jingo_minify's css helper, but uses rel="stylesheet/less" instead of rel="stylesheet" when TEMPLATE_DEBUG is True. If TEMPLATE_DEBUG is False, this passes the call on to the css helper. """ if not settings.TEMPLATE_DEBUG: return css(bundle) urls = get_css_urls(bundle) link_tag = '<link rel="stylesheet/less" media="screen,projection,tv" href="{0}" />' return Markup('\n'.join([link_tag.format(url) for url in urls]))
def css_url_array(bundle, debug=None): """ Return a JS array of the URLS for a minified and bundled CSS file. Similar to js_url_array, the array will have one item in production, and potentially many items in development. For example, in production 'mdn' returns something like: ["https://developer.cdn.mozilla.net/static/js/main-min.js?build=97c12a9"] In development, 'mdn' returns something like: [ "/static/css/font-awesome.css?build=1443558726", "/static/css/main.css?build=1443563109" ] """ return asset_url_array(get_css_urls(bundle, debug))