Permalink
Browse files

Fixed sample website bug with LessCSS include.

  • Loading branch information...
1 parent 642acce commit 8dc3d9428978fb91987e55902d61711df8bf4f5c @ludovicchabant committed Feb 29, 2012
Showing with 6 additions and 6 deletions.
  1. +2 −2 website/_content/templates/default.html
  2. +4 −4 website/_content/templates/macros_less.html
@@ -11,8 +11,8 @@
<meta name="template-engine" content="Twig" />
{% include('blueprint.html') %}
{{ google.webfonts('Lobster') }}
- {{ less.stylesheet(baker, site.root ~ 'css/default') }}
- {{ less.less_js(baker, site.root) }}
+ {{ less.stylesheet(baker, server, site.root ~ 'css/default') }}
+ {{ less.less_js(baker, server, site.root) }}
</head>
<body>
<div id="container" class="container">
@@ -1,13 +1,13 @@
-{% macro stylesheet(baker, path, media) %}
-{% if baker.is_baking %}
+{% macro stylesheet(baker, server, path, media) %}
+{% if baker.is_baking or server.is_hosting %}
<link rel="stylesheet" href="{{ path }}.css" type="text/css" media="{{ media|default('all') }}" />
{% else %}
<link rel="stylesheet/less" href="{{ path }}.less" type="text/css" media="{{ media|default('all') }}" />
{% endif %}
{% endmacro %}
-{% macro less_js(baker, site_root) %}
-{% if not baker.is_baking %}
+{% macro less_js(baker, server, site_root) %}
+{% if not baker.is_baking and not server.is_hosting %}
<script src="{{ site_root }}js/less-1.0.41.min.js" type="text/javascript"></script>
{% endif %}
{% endmacro %}

0 comments on commit 8dc3d94

Please sign in to comment.