Skip to content

Commit

Permalink
divinding css into common and specific parts
Browse files Browse the repository at this point in the history
  • Loading branch information
Leonardo Santagada committed Oct 22, 2013
1 parent 9b3f0b0 commit 0b03c89
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 5 deletions.
1 change: 1 addition & 0 deletions core/templates/admin/_base.html
Expand Up @@ -9,6 +9,7 @@
{% load static %}
{% load compressed %}

{% compressed_css 'common' %}
{% compressed_css 'admin' %}
{% compressed_js 'all' %}

Expand Down
3 changes: 2 additions & 1 deletion core/templates/base.html
Expand Up @@ -8,7 +8,8 @@

<title>{% block title %}Timtec{% endblock %}</title>

{% compressed_css 'all' %}
{% compressed_css 'common' %}
{% compressed_css 'public' %}
{% compressed_js 'all' %}
{% endblock %}
</head>
Expand Down
35 changes: 31 additions & 4 deletions timtec/settings.py
Expand Up @@ -115,21 +115,31 @@
)

PIPELINE_CSS = {
'all': {
'common': {
'source_filenames': (
'fonts/questrial/stylesheet.css',
'fonts/font-awesome/stylesheet.css',
'js/vendor/codemirror/lib/codemirror.css',
'js/vendor/codemirror/addon/hint/show-hint.css',
'js/vendor/codemirror/theme/monokai.css',
'css/codemirrorconf.css',
),
'output_filename': 'css/common.css',
'extra_context': {
'media': 'screen,projection,print',
},
},
'public': {
'source_filenames': (
'css/main.less',
),
'output_filename': 'css/all.css',
'output_filename': 'css/public.css',
'extra_context': {
'media': 'screen,projection,print',
},
},
'admin': {
'source_filenames': (
'fonts/questrial/stylesheet.css',
'fonts/font-awesome/stylesheet.css',
'css/main-admin.less',
),
'output_filename': 'css/admin.css',
Expand All @@ -148,6 +158,23 @@
'js/vendor/angular-*.js',
'js/*.js',
'js/vendor/pagedown/*.js',

# codemirror stuff
'js/vendor/codemirror/lib/codemirror.js',
'js/vendor/codemirror/addon/fold/xml-fold.js',
'js/vendor/codemirror/addon/hint/show-hint.js',
'js/vendor/codemirror/addon/hint/xml-hint.js',
'js/vendor/codemirror/addon/hint/html-hint.js',
'js/vendor/codemirror/addon/hint/css-hint.js',
'js/vendor/codemirror/addon/hint/javascript-hint.js',
'js/vendor/codemirror/addon/edit/matchbrackets.js',
'js/vendor/codemirror/addon/edit/closebrackets.js',
'js/vendor/codemirror/addon/edit/matchtags.js',
'js/vendor/codemirror/mode/xml/xml.js',
'js/vendor/codemirror/mode/css/css.js',
'js/vendor/codemirror/mode/javascript/javascript.js',
'js/vendor/codemirror/mode/htmlmixed/htmlmixed.js',
'js/codemirrorconf.js',
),
'output_filename': 'js/all.js',
}
Expand Down

0 comments on commit 0b03c89

Please sign in to comment.