More work on new HTML reader.
[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         'output_filename': 'css/compressed/book_text.css',
49     },
50     'player': {
51         'source_filenames': [
52             'jplayer/jplayer.blue.monday.css', 
53             'player/player.css', 
54         ],
55         'output_filename': 'css/compressed/player.css',
56     },
57     'simple': {
58         'source_filenames': ('css/simple.css',),
59         'output_filename': 'css/compressed/simple.css',
60     },
61 }
62
63 PIPELINE_JS = {
64     'base': {
65         'source_filenames': (
66             'js/jquery.cycle.min.js',
67             'js/jquery.jqmodal.js',
68             'js/jquery.form.js',
69             'js/jquery.countdown.js', 'js/jquery.countdown-pl.js',
70             'js/jquery.countdown-de.js', 'js/jquery.countdown-uk.js',
71             'js/jquery.countdown-es.js', 'js/jquery.countdown-lt.js',
72             'js/jquery.countdown-ru.js', 'js/jquery.countdown-fr.js',
73
74             'js/jquery-ui-1.8.16.custom.min.js',
75
76             'js/locale.js',
77             'js/dialogs.js',
78             'js/base.js',
79             'pdcounter/pdcounter.js',
80             'sponsors/js/sponsors.js',
81             'player/openplayer.js',
82             'js/search.js',
83             'funding/funding.js',
84             
85             'uni_form/uni-form.js',
86             ),
87         'output_filename': 'js/base.min.js',
88     },
89     'player': {
90         'source_filenames': [
91             'jplayer/jquery.jplayer.min.js', 
92             'jplayer/jplayer.playlist.min.js', 
93             'player/player.js', 
94         ],
95         'output_filename': 'js/player.min.js',
96     },
97     'book': {
98         'source_filenames': [
99             'js/jquery.eventdelegation.js',
100             'js/jquery.scrollto.js',
101             'js/jquery.highlightfade.js',
102             'js/book_text/other.js',
103             'js/book.js',
104             'player/openplayer.js',
105         ],
106         'output_filename': 'js/book.min.js',
107     },
108     'book_text': {
109         'source_filenames': [
110             'js/jquery.form.js',
111             'js/jquery.jqmodal.js',
112             'js/book_text/*.js',
113             'js/locale.js',
114             'js/dialogs.js',
115         ],
116         'output_filename': 'js/book_text.js',
117     },
118     'book_ie': {
119         'source_filenames': ('js/ierange-m2.js',),
120         'output_filename': 'js/book_ie.min.js',
121     }
122
123 }
124
125 STATICFILES_STORAGE = 'pipeline.storage.PipelineCachedStorage'
126 PIPELINE_CSS_COMPRESSOR = None
127 PIPELINE_JS_COMPRESSOR = None
128
129 PIPELINE_COMPILERS = (
130     'pipeline.compilers.sass.SASSCompiler',
131     # We could probably use PySCSS instead,
132     # but they have some serious problems, like:
133     # https://github.com/Kronuz/pyScss/issues/166 (empty list syntax)
134     # https://github.com/Kronuz/pyScss/issues/258 (bad @media order)
135     #'pyscss_compiler.PySCSSCompiler',
136 )
137 #PIPELINE_PYSCSS_BINARY = '/usr/bin/env pyscss'
138 #PIPELINE_PYSCSS_ARGUMENTS = ''