mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-01 15:09:14 +00:00
Use django compressor to compress css
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -19,6 +19,7 @@ pylintrc
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
*.mo
|
*.mo
|
||||||
media/assets
|
media/assets
|
||||||
|
media/CACHE
|
||||||
media/avatars/*
|
media/avatars/*
|
||||||
!media/avatars/default-non-register.jpg
|
!media/avatars/default-non-register.jpg
|
||||||
!media/avatars/default.png
|
!media/avatars/default.png
|
||||||
|
@@ -4,3 +4,4 @@ six
|
|||||||
Pillow>=2.6.1,<3.0.0
|
Pillow>=2.6.1,<3.0.0
|
||||||
Django>=1.5.8,<1.6
|
Django>=1.5.8,<1.6
|
||||||
Djblets==0.6.14
|
Djblets==0.6.14
|
||||||
|
django-compressor==1.4
|
||||||
|
@@ -5,9 +5,6 @@
|
|||||||
{% block sub_title %}{{group.group_name}} - {% endblock %}
|
{% block sub_title %}{{group.group_name}} - {% endblock %}
|
||||||
|
|
||||||
{% block extra_style %}
|
{% block extra_style %}
|
||||||
<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/select2-3.5.2.css" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/magnific-popup.css" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/backbone.css" />
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block main_panel %}
|
{% block main_panel %}
|
||||||
|
@@ -90,6 +90,7 @@ STATICFILES_FINDERS = (
|
|||||||
'django.contrib.staticfiles.finders.FileSystemFinder',
|
'django.contrib.staticfiles.finders.FileSystemFinder',
|
||||||
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
|
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
|
||||||
# 'django.contrib.staticfiles.finders.DefaultStorageFinder',
|
# 'django.contrib.staticfiles.finders.DefaultStorageFinder',
|
||||||
|
'compressor.finders.CompressorFinder',
|
||||||
)
|
)
|
||||||
|
|
||||||
# Make this unique, and don't share it with anybody.
|
# Make this unique, and don't share it with anybody.
|
||||||
@@ -183,6 +184,7 @@ INSTALLED_APPS = (
|
|||||||
|
|
||||||
'registration',
|
'registration',
|
||||||
'captcha',
|
'captcha',
|
||||||
|
'compressor',
|
||||||
|
|
||||||
'seahub.api2',
|
'seahub.api2',
|
||||||
'seahub.avatar',
|
'seahub.avatar',
|
||||||
@@ -409,6 +411,12 @@ SHARE_ACCESS_PASSWD_TIMEOUT = 60 * 60
|
|||||||
|
|
||||||
SEAFILE_VERSION = '4.1.2'
|
SEAFILE_VERSION = '4.1.2'
|
||||||
|
|
||||||
|
# Compress static files(css, js)
|
||||||
|
COMPRESS_URL = MEDIA_URL
|
||||||
|
COMPRESS_ROOT = MEDIA_ROOT
|
||||||
|
COMPRESS_DEBUG_TOGGLE = 'nocompress'
|
||||||
|
COMPRESS_CSS_HASHING_METHOD = 'content'
|
||||||
|
|
||||||
###################
|
###################
|
||||||
# Image Thumbnail #
|
# Image Thumbnail #
|
||||||
###################
|
###################
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{% load seahub_tags avatar_tags group_avatar_tags i18n %}
|
{% load staticfiles i18n %}
|
||||||
{% load url from future %}
|
{% load compress %}
|
||||||
|
{% load seahub_tags avatar_tags group_avatar_tags %}
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head>
|
<head>
|
||||||
@@ -11,7 +11,14 @@
|
|||||||
<!--[if IE]>
|
<!--[if IE]>
|
||||||
<link rel="shortcut icon" href="{{ MEDIA_URL }}img/favicon.png?t=1398068110"/>
|
<link rel="shortcut icon" href="{{ MEDIA_URL }}img/favicon.png?t=1398068110"/>
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
|
|
||||||
|
{% compress css %}
|
||||||
<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/seahub.css?t=1398068110" />
|
<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/seahub.css?t=1398068110" />
|
||||||
|
<link rel="stylesheet" type="text/css" href="{% static "css/select2-3.5.2.css" %}"/>
|
||||||
|
<link rel="stylesheet" type="text/css" href="{% static "css/magnific-popup.css" %}" />
|
||||||
|
<link rel="stylesheet" type="text/css" href="{% static "css/backbone.css" %}"/>
|
||||||
|
{% endcompress %}
|
||||||
|
|
||||||
{% block extra_style %}{% endblock %}
|
{% block extra_style %}{% endblock %}
|
||||||
{% if branding_css != '' %}<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}{{ branding_css }}" />{% endif %}
|
{% if branding_css != '' %}<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}{{ branding_css }}" />{% endif %}
|
||||||
</head>
|
</head>
|
||||||
|
@@ -5,9 +5,6 @@
|
|||||||
{% block sub_title %}{% trans "Libraries" %} - {% endblock %}
|
{% block sub_title %}{% trans "Libraries" %} - {% endblock %}
|
||||||
|
|
||||||
{% block extra_style %}
|
{% block extra_style %}
|
||||||
<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/select2-3.5.2.css" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/magnific-popup.css" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/backbone.css" />
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
{% if need_guide %}
|
{% if need_guide %}
|
||||||
#guide-for-new {
|
#guide-for-new {
|
||||||
|
@@ -6,9 +6,6 @@
|
|||||||
{% block sub_title %}{% trans "Organization" %} - {% endblock %}
|
{% block sub_title %}{% trans "Organization" %} - {% endblock %}
|
||||||
|
|
||||||
{% block extra_style %}
|
{% block extra_style %}
|
||||||
<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/select2-3.5.2.css" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/magnific-popup.css" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/backbone.css" />
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block left_panel %}
|
{% block left_panel %}
|
||||||
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 613 B After Width: | Height: | Size: 613 B |
Before Width: | Height: | Size: 845 B After Width: | Height: | Size: 845 B |
Reference in New Issue
Block a user