Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Implemented use_cdn + use_bundles
- Loading branch information
|
@@ -68,12 +68,14 @@ lang="${lang}"> |
|
|
<%def name="late_load_js()"> |
|
|
%if use_bundles: |
|
|
%if use_cdn: |
|
|
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> |
|
|
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script> |
|
|
% for url in cdn_js_urls: |
|
|
<script src="${url}"></script> |
|
|
% endfor |
|
|
%endif |
|
|
<script src="/assets/js/all.js"></script> |
|
|
%else: |
|
|
%if use_cdn: |
|
|
FOO |
|
|
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> |
|
|
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script> |
|
|
%else: |
|
@@ -94,12 +96,14 @@ lang="${lang}"> |
|
|
<%def name="html_stylesheets()"> |
|
|
%if use_bundles: |
|
|
%if use_cdn: |
|
|
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet"> |
|
|
% for url in cdn_css_urls: |
|
|
<link href="${url}" rel="stylesheet"> |
|
|
% endfor |
|
|
%endif |
|
|
<link href="/assets/css/all.css" rel="stylesheet" type="text/css"> |
|
|
%else: |
|
|
%if use_cdn: |
|
|
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet"> |
|
|
- <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet"> |
|
|
%else: |
|
|
<link href="/assets/css/bootstrap.min.css" rel="stylesheet" type="text/css"> |
|
|
%endif |
|
|
|
@@ -132,6 +132,8 @@ def build_bundle(output, inputs): |
|
|
t_files.append(i) |
|
|
|
|
|
_files = t_files |
|
|
self.site.GLOBAL_CONTEXT['cdn_js_urls'] = self.cdn_js_urls |
|
|
self.site.GLOBAL_CONTEXT['cdn_css_urls'] = self.cdn_css_urls |
|
|
|
|
|
output_path = os.path.join(kw['output_folder'], name) |
|
|
dname = os.path.dirname(name) |
|
|