forked from CGM_Public/pretix_original
Switched from LESS to SASS
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<title>{% block title %}{% endblock %}</title>
|
||||
{% compress css %}
|
||||
<link rel="stylesheet" type="text/less" href="{% static "pretixbase/less/error.less" %}" />
|
||||
<link rel="stylesheet" type="text/x-scss" href="{% static "pretixbase/scss/error.scss" %}" />
|
||||
{% endcompress %}
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="icon" href="{% static "pretixbase/img/favicon.ico" %}">
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<title>{{ settings.PRETIX_INSTANCE_NAME }}</title>
|
||||
{% compress css %}
|
||||
<link rel="stylesheet" type="text/less" href="{% static "pretixbase/less/cachedfiles.less" %}" />
|
||||
<link rel="stylesheet" type="text/x-scss" href="{% static "pretixbase/scss/cachedfiles.scss" %}" />
|
||||
{% endcompress %}
|
||||
{% compress js %}
|
||||
<script type="text/javascript" src="{% static "jquery/js/jquery-2.1.1.min.js" %}"></script>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<title>{{ settings.PRETIX_INSTANCE_NAME }}</title>
|
||||
{% compress css %}
|
||||
<link rel="stylesheet" type="text/less" href="{% static "pretixcontrol/less/auth.less" %}"/>
|
||||
<link rel="stylesheet" type="text/x-scss" href="{% static "pretixcontrol/scss/auth.scss" %}"/>
|
||||
{% endcompress %}
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
</head>
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
<title>{% block title %}{% endblock %}{% if url_name != "index" %} :: {% endif %}
|
||||
{{ settings.PRETIX_INSTANCE_NAME }}</title>
|
||||
{% compress css %}
|
||||
<link rel="stylesheet" type="text/less" href="{% static "pretixcontrol/less/main.less" %}" />
|
||||
<link rel="stylesheet" type="text/x-scss" href="{% static "pretixcontrol/scss/main.scss" %}" />
|
||||
{% endcompress %}
|
||||
{% compress js %}
|
||||
<script type="text/javascript" src="{% static "jquery/js/jquery-2.1.1.min.js" %}"></script>
|
||||
<script type="text/javascript" src="{% static "js/jquery.formset.js" %}"></script>
|
||||
<script type="text/javascript" src="{% static "bootstrap/dist/js/bootstrap.js" %}"></script>
|
||||
<script type="text/javascript" src="{% static "bootstrap/js/bootstrap.js" %}"></script>
|
||||
<script type="text/javascript" src="{% static "pretixcontrol/js/metisMenu.min.js" %}"></script>
|
||||
<script type="text/javascript" src="{% static "pretixcontrol/js/sb-admin-2.js" %}"></script>
|
||||
<script type="text/javascript" src="{% static "pretixcontrol/js/ui/main.js" %}"></script>
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
from compressor.filters.base import CompilerFilter
|
||||
from compressor.filters.css_default import CssAbsoluteFilter
|
||||
|
||||
from pretix.settings import STATIC_ROOT, STATICFILES_DIRS
|
||||
|
||||
|
||||
class LessFilter(CompilerFilter):
|
||||
def __init__(self, content, attrs, **kwargs):
|
||||
cmd = 'lessc --include-path=%s {infile} {outfile}' % ":".join(STATICFILES_DIRS + [STATIC_ROOT])
|
||||
super(LessFilter, self).__init__(content, command=cmd, **kwargs)
|
||||
|
||||
def input(self, **kwargs):
|
||||
content = super(LessFilter, self).input(**kwargs)
|
||||
kwargs.setdefault('filename', self.filename)
|
||||
return CssAbsoluteFilter(content).input(**kwargs)
|
||||
@@ -7,12 +7,12 @@
|
||||
<title>{% block thetitle %}{% endblock %}</title>
|
||||
{% compress css %}
|
||||
<link rel="stylesheet" type="text/css" href="{% static "lightbox/css/lightbox.css" %}" />
|
||||
<link rel="stylesheet" type="text/less" href="{% static "pretixpresale/less/main.less" %}" />
|
||||
<link rel="stylesheet" type="text/x-scss" href="{% static "pretixpresale/scss/main.scss" %}" />
|
||||
{% endcompress %}
|
||||
{% compress js %}
|
||||
<script type="text/javascript" src="{% static "jquery/js/jquery-2.1.1.min.js" %}"></script>
|
||||
<script type="text/javascript" src="{% static "js/jquery.formset.js" %}"></script>
|
||||
<script type="text/javascript" src="{% static "bootstrap/dist/js/bootstrap.js" %}"></script>
|
||||
<script type="text/javascript" src="{% static "bootstrap/js/bootstrap.js" %}"></script>
|
||||
<script type="text/javascript" src="{% static "pretixpresale/js/ui/main.js" %}"></script>
|
||||
<script type="text/javascript" src="{% static "pretixpresale/js/ui/asynctask.js" %}"></script>
|
||||
{% endcompress %}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<title>{{ settings.PRETIX_INSTANCE_NAME }}</title>
|
||||
{% compress css %}
|
||||
<link rel="stylesheet" type="text/less" href="{% static "pretixpresale/less/index.less" %}"/>
|
||||
<link rel="stylesheet" type="text/x-scss" href="{% static "pretixpresale/scss/index.scss" %}"/>
|
||||
{% endcompress %}
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
</head>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<title>{{ settings.PRETIX_INSTANCE_NAME }}</title>
|
||||
{% compress css %}
|
||||
<link rel="stylesheet" type="text/less" href="{% static "pretixpresale/less/waiting.less" %}"/>
|
||||
<link rel="stylesheet" type="text/x-scss" href="{% static "pretixpresale/scss/waiting.scss" %}"/>
|
||||
{% endcompress %}
|
||||
{% compress js %}
|
||||
<script type="text/javascript" src="{% static "jquery/js/jquery-2.1.1.min.js" %}"></script>
|
||||
|
||||
@@ -276,7 +276,7 @@ STATICFILES_DIRS = [
|
||||
# STATICFILES_DIRS.insert(0, os.path.join(DATA_DIR, 'static'))
|
||||
|
||||
COMPRESS_PRECOMPILERS = (
|
||||
('text/less', 'pretix.helpers.lessabsolutefilter.LessFilter'),
|
||||
('text/x-scss', 'django_libsass.SassCompiler'),
|
||||
)
|
||||
|
||||
COMPRESS_ENABLED = COMPRESS_OFFLINE = not debug_fallback
|
||||
|
||||
Reference in New Issue
Block a user