Translated source names.
[wolnelektury.git] / wolnelektury / settings / static.py
1 from os import path
2 from .paths import PROJECT_DIR
3
4 # Absolute path to the directory that holds media.
5 # Example: "/home/media/media.lawrence.com/"
6 MEDIA_ROOT = path.join(PROJECT_DIR, '../media/')
7 STATIC_ROOT = path.join(PROJECT_DIR, '../static/')
8 SEARCH_INDEX = path.join(PROJECT_DIR, '../search_index/')
9
10 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
11 # trailing slash if there is a path component (optional in other cases).
12 # Examples: "http://media.lawrence.com", "http://example.com/media/"
13 MEDIA_URL = '/media/'
14 STATIC_URL = '/static/'
15
16 # CSS and JavaScript file groups
17
18
19 PIPELINE_CSS = {
20     'main': {
21         # styles both for mobile and for big screen
22         'source_filenames': [
23             'css/jquery.countdown.css', 
24
25             'sponsors/css/sponsors.css',
26             'css/social/shelf_tags.css',
27
28             'uni_form/uni-form.css',
29             'uni_form/default.uni-form.css',
30
31             'css/ui-lightness/jquery-ui-1.8.16.custom.css',
32
33             'scss/main.scss',
34         ],
35         'output_filename': 'css/compressed/main.css',
36     },
37     'book': {
38         'source_filenames': [
39             'css/master.book.css',
40         ],
41         'output_filename': 'css/compressed/book.css',
42     },
43     'book_text': {
44         'source_filenames': [
45             'scss/book_text.scss',
46             'css/new.book.css',
47
48             'css/master.picture.css',
49         ],
50         'output_filename': 'css/compressed/book_text.css',
51     },
52     'picture': {
53         'source_filenames': [
54             'css/master.book.css',
55             'css/master.picture.css',
56         ],
57         'output_filename': 'css/compressed/picture.css',
58     },
59     'player': {
60         'source_filenames': [
61             'jplayer/jplayer.blue.monday.css', 
62             'player/player.css', 
63         ],
64         'output_filename': 'css/compressed/player.css',
65     },
66     'simple': {
67         'source_filenames': ('css/simple.css',),
68         'output_filename': 'css/compressed/simple.css',
69     },
70 }
71
72 PIPELINE_JS = {
73     'base': {
74         'source_filenames': (
75             'js/contrib/jquery.cycle.min.js',
76             'js/contrib/jquery.jqmodal.js',
77             'js/contrib/jquery.form.js',
78             'js/contrib/jquery.countdown.js', 'js/contrib/jquery.countdown-pl.js',
79             'js/contrib/jquery.countdown-de.js', 'js/contrib/jquery.countdown-uk.js',
80             'js/contrib/jquery.countdown-es.js', 'js/contrib/jquery.countdown-lt.js',
81             'js/contrib/jquery.countdown-ru.js', 'js/contrib/jquery.countdown-fr.js',
82
83             'js/contrib/jquery-ui-1.8.16.custom.min.js',
84
85             'js/locale.js',
86             'js/dialogs.js',
87             'js/base.js',
88             'pdcounter/pdcounter.js',
89             'sponsors/js/sponsors.js',
90             'player/openplayer.js',
91             'js/search.js',
92             'funding/funding.js',
93             
94             'uni_form/uni-form.js',
95             ),
96         'output_filename': 'js/base.min.js',
97     },
98     'player': {
99         'source_filenames': [
100             'jplayer/jquery.jplayer.min.js', 
101             'jplayer/jplayer.playlist.min.js', 
102             'player/player.js', 
103         ],
104         'output_filename': 'js/player.min.js',
105     },
106     'book': {
107         'source_filenames': [
108             'js/contrib/jquery.eventdelegation.js',
109             'js/contrib/jquery.scrollto.js',
110             'js/contrib/jquery.highlightfade.js',
111             'js/book_text/other.js',
112             'js/book.js',
113
114             'js/contrib/raphael-min.js',
115             'js/contrib/progressSpin.min.js',
116             'js/picture.js',
117         ],
118         'output_filename': 'js/book.min.js',
119     },
120     'book_text': {
121         'source_filenames': [
122             'js/contrib/jquery.form.js',
123             'js/contrib/jquery.jqmodal.js',
124             'js/book_text/*.js',
125             'js/locale.js',
126             'js/dialogs.js',
127
128             'js/contrib/jquery.highlightfade.js',
129             'js/contrib/raphael-min.js',
130             'player/openplayer.js',
131             'js/contrib/progressSpin.min.js',
132             'js/picture.js',
133         ],
134         'output_filename': 'js/book_text.js',
135     },
136     'book_ie': {
137         'source_filenames': ('js/contrib/ierange-m2.js',),
138         'output_filename': 'js/book_ie.min.js',
139     }
140
141 }
142
143 STATICFILES_STORAGE = 'fnpdjango.utils.pipeline_storage.GzipPipelineCachedStorage'
144 PIPELINE_CSS_COMPRESSOR = None
145 PIPELINE_JS_COMPRESSOR = None
146
147 PIPELINE_COMPILERS = (
148     'pipeline.compilers.sass.SASSCompiler',
149     # We could probably use PySCSS instead,
150     # but they have some serious problems, like:
151     # https://github.com/Kronuz/pyScss/issues/166 (empty list syntax)
152     # https://github.com/Kronuz/pyScss/issues/258 (bad @media order)
153     #'pyscss_compiler.PySCSSCompiler',
154 )
155 #PIPELINE_PYSCSS_BINARY = '/usr/bin/env pyscss'
156 #PIPELINE_PYSCSS_ARGUMENTS = ''