Add webassets support for CSS

Change base template to add support for minified CSS files.
This commit is contained in:
Mauricio de Abreu Antunes 2015-11-28 21:29:35 -02:00
parent dac5b37565
commit a784b48b81

View file

@ -3,13 +3,16 @@
<head> <head>
<link href='//fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700,400italic' rel='stylesheet' type='text/css'> <link href='//fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700,400italic' rel='stylesheet' type='text/css'>
{% if USE_LESS %} {% if USE_LESS %}
<link rel="stylesheet/less" type="text/css" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/style.less"> {% assets filters="less,cssmin", output="css/main.css", "css/pygments.min.css", "css/font-awesome.min.css", "css/style.less" %}
<link rel="stylesheet" type="text/css" href="{{ SITEURL }}/{{ ASSET_URL }}">
<script src="//cdnjs.cloudflare.com/ajax/libs/less.js/2.5.1/less.min.js" type="text/javascript"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/less.js/2.5.1/less.min.js" type="text/javascript"></script>
{% endassets %}
{% else %} {% else %}
<link rel="stylesheet" type="text/css" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/style.min.css"> {% assets filters="cssmin", output="css/main.min.css", "css/pygments.min.css", "css/font-awesome.min.css", "css/style.min.css" %}
<link rel="stylesheet" type="text/css" href="{{ SITEURL }}/{{ ASSET_URL }}">
{% endassets %}
{% endif %} {% endif %}
<link rel="stylesheet" type="text/css" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/pygments.min.css">
<link rel="stylesheet" type="text/css" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/font-awesome.min.css">
{% if CUSTOM_CSS %} {% if CUSTOM_CSS %}
<link href="{{ SITEURL }}/{{ CUSTOM_CSS }}" rel="stylesheet"> <link href="{{ SITEURL }}/{{ CUSTOM_CSS }}" rel="stylesheet">
{% endif %} {% endif %}