Switched from LESS to SASS

This commit is contained in:
Raphael Michel
2016-03-31 19:50:30 +02:00
parent 213d44d71a
commit fdff5e7a98
178 changed files with 5619 additions and 14631 deletions

View File

@@ -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" %}">

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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)

View File

@@ -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 %}

View File

@@ -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>

View File

@@ -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>

View File

@@ -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