1 # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
2 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
5 from .paths import VAR_DIR
7 # Absolute path to the directory that holds media.
8 # Example: "/home/media/media.lawrence.com/"
9 MEDIA_ROOT = path.join(VAR_DIR, 'media/')
10 STATIC_ROOT = path.join(VAR_DIR, 'static/')
11 SEARCH_INDEX = path.join(VAR_DIR, 'search_index/')
13 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
14 # trailing slash if there is a path component (optional in other cases).
15 # Examples: "http://media.lawrence.com", "http://example.com/media/"
17 STATIC_URL = '/static/'
19 IMAGE_DIR = 'book/pictures/'
21 # CSS and JavaScript file groups
26 # styles both for mobile and for big screen
28 'css/import/gelasio.css',
30 'css/jquery.countdown.css',
31 'jplayer/jplayer.blue.monday.css',
33 'sponsors/css/sponsors.css',
37 'css/ui-lightness/jquery-ui-1.8.16.custom.css',
44 'output_filename': 'css/compressed/main.css',
48 'css/import/gelasio.css',
49 'css/master.book.css',
51 'output_filename': 'css/compressed/book.css',
55 'css/import/gelasio.css',
56 'scss/book_text.scss',
59 'annoy/book_text.scss',
61 'css/master.picture.css',
63 'output_filename': 'css/compressed/book_text.css',
69 'output_filename': 'css/compressed/compressed/forum.css',
73 'css/import/gelasio.css',
74 'css/master.book.css',
75 'css/master.picture.css',
77 'output_filename': 'css/compressed/picture.css',
81 'jplayer/jplayer.blue.monday.css',
84 'output_filename': 'css/compressed/player.css',
87 'source_filenames': ('css/simple.css',),
88 'output_filename': 'css/compressed/simple.css',
91 'source_filenames': ('scss/widget.scss',),
92 'output_filename': 'css/compressed/widget.css',
98 'js/contrib/jquery.cycle2.min.js',
99 'js/contrib/jquery.jqmodal.js',
100 'js/contrib/jquery.form.js',
101 'js/contrib/jquery.paging.min.js',
102 'js/contrib/jquery.countdown.js', 'js/contrib/jquery.countdown-pl.js',
103 'js/contrib/jquery.countdown-de.js', 'js/contrib/jquery.countdown-uk.js',
104 'js/contrib/jquery.countdown-es.js', 'js/contrib/jquery.countdown-lt.js',
105 'js/contrib/jquery.countdown-ru.js', 'js/contrib/jquery.countdown-fr.js',
106 'js/contrib/jquery.shorten.js',
108 'js/contrib/jquery-ui-1.8.16.custom.min.js',
110 'js/contrib/tlite.min.js',
112 'jplayer/jquery.jplayer.min.js',
113 'jplayer/jplayer.playlist.min.js',
119 'pdcounter/pdcounter.js',
120 'sponsors/js/sponsors.js',
121 'player/openplayer.js',
123 'funding/funding.js',
128 'output_filename': 'js/base.min.js',
131 'source_filenames': [
132 'jplayer/jquery.jplayer.min.js',
133 'jplayer/jplayer.playlist.min.js',
136 'output_filename': 'js/player.min.js',
139 'source_filenames': [
140 'js/contrib/jquery.eventdelegation.js',
141 'js/contrib/jquery.scrollto.js',
142 'js/contrib/jquery.highlightfade.js',
143 'js/book_text/other.js',
146 'js/contrib/raphael-min.js',
147 'js/contrib/progressSpin.min.js',
150 'output_filename': 'js/book.min.js',
153 'source_filenames': [
154 'js/contrib/jquery.cycle2.min.js',
155 'js/contrib/jquery.form.js',
156 'js/contrib/jquery.jqmodal.js',
157 'js/book_text/info.js',
158 'js/book_text/menu.js',
159 'js/book_text/note.js',
160 'js/book_text/references.js',
161 'js/book_text/settings.js',
162 'js/book_text/toc.js',
165 'annoy/book_text.js',
167 'js/contrib/jquery.highlightfade.js',
168 'js/contrib/raphael-min.js',
169 'player/openplayer.js',
170 'js/contrib/progressSpin.min.js',
173 'output_filename': 'js/book_text.js',
176 'source_filenames': [
179 'output_filename': 'js/picture.min.js',
182 'source_filenames': ('js/contrib/ierange-m2.js',),
183 'output_filename': 'js/book_ie.min.js',
186 'source_filenames': (
187 'js/contrib/jquery.js',
188 'js/contrib/jquery-ui-1.8.16.custom.min.js',
192 'output_filename': 'js/widget.min.js',
195 'CSS_COMPRESSOR': None,
196 'JS_COMPRESSOR': 'pipeline.compressors.jsmin.JSMinCompressor',
198 'libsasscompiler.LibSassCompiler',
202 STATICFILES_STORAGE = 'fnpdjango.pipeline_storage.GzipPipelineCachedStorage'
203 #STATICFILES_STORAGE = 'pipeline.storage.PipelineCachedStorage'
205 # PIPELINE_PYSCSS_BINARY = '/usr/bin/env pyscss'
206 # PIPELINE_PYSCSS_ARGUMENTS = ''
209 STATICFILES_FINDERS = [
210 'django.contrib.staticfiles.finders.FileSystemFinder',
211 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
212 'pipeline.finders.CachedFileFinder',
213 'pipeline.finders.PipelineFinder',
217 from machina import MACHINA_MAIN_STATIC_DIR
219 MACHINA_MAIN_STATIC_DIR,