mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-31 06:34:40 +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
|
||||
*.mo
|
||||
media/assets
|
||||
media/CACHE
|
||||
media/avatars/*
|
||||
!media/avatars/default-non-register.jpg
|
||||
!media/avatars/default.png
|
||||
|
@@ -4,3 +4,4 @@ six
|
||||
Pillow>=2.6.1,<3.0.0
|
||||
Django>=1.5.8,<1.6
|
||||
Djblets==0.6.14
|
||||
django-compressor==1.4
|
||||
|
@@ -5,9 +5,6 @@
|
||||
{% block sub_title %}{{group.group_name}} - {% endblock %}
|
||||
|
||||
{% 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 %}
|
||||
|
||||
{% block main_panel %}
|
||||
|
@@ -90,6 +90,7 @@ STATICFILES_FINDERS = (
|
||||
'django.contrib.staticfiles.finders.FileSystemFinder',
|
||||
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
|
||||
# 'django.contrib.staticfiles.finders.DefaultStorageFinder',
|
||||
'compressor.finders.CompressorFinder',
|
||||
)
|
||||
|
||||
# Make this unique, and don't share it with anybody.
|
||||
@@ -183,6 +184,7 @@ INSTALLED_APPS = (
|
||||
|
||||
'registration',
|
||||
'captcha',
|
||||
'compressor',
|
||||
|
||||
'seahub.api2',
|
||||
'seahub.avatar',
|
||||
@@ -409,6 +411,12 @@ SHARE_ACCESS_PASSWD_TIMEOUT = 60 * 60
|
||||
|
||||
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 #
|
||||
###################
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{% load seahub_tags avatar_tags group_avatar_tags i18n %}
|
||||
{% load url from future %}
|
||||
|
||||
{% load staticfiles i18n %}
|
||||
{% load compress %}
|
||||
{% load seahub_tags avatar_tags group_avatar_tags %}
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
@@ -11,7 +11,14 @@
|
||||
<!--[if IE]>
|
||||
<link rel="shortcut icon" href="{{ MEDIA_URL }}img/favicon.png?t=1398068110"/>
|
||||
<![endif]-->
|
||||
|
||||
{% compress css %}
|
||||
<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 %}
|
||||
{% if branding_css != '' %}<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}{{ branding_css }}" />{% endif %}
|
||||
</head>
|
||||
|
@@ -5,9 +5,6 @@
|
||||
{% block sub_title %}{% trans "Libraries" %} - {% endblock %}
|
||||
|
||||
{% 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">
|
||||
{% if need_guide %}
|
||||
#guide-for-new {
|
||||
|
@@ -6,9 +6,6 @@
|
||||
{% block sub_title %}{% trans "Organization" %} - {% endblock %}
|
||||
|
||||
{% 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 %}
|
||||
|
||||
{% 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