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',
43 'output_filename': 'css/compressed/main.css',
47 'css/import/gelasio.css',
48 'css/master.book.css',
50 'output_filename': 'css/compressed/book.css',
54 'css/import/gelasio.css',
55 'scss/book_text.scss',
58 'annoy/book_text.scss',
60 'css/master.picture.css',
62 'output_filename': 'css/compressed/book_text.css',
68 'output_filename': 'css/compressed/compressed/forum.css',
72 'css/import/gelasio.css',
73 'css/master.book.css',
74 'css/master.picture.css',
76 'output_filename': 'css/compressed/picture.css',
80 'jplayer/jplayer.blue.monday.css',
83 'output_filename': 'css/compressed/player.css',
86 'source_filenames': ('css/simple.css',),
87 'output_filename': 'css/compressed/simple.css',
90 'source_filenames': ('scss/widget.scss',),
91 'output_filename': 'css/compressed/widget.css',
97 'js/contrib/jquery.cycle2.min.js',
98 'js/contrib/jquery.jqmodal.js',
99 'js/contrib/jquery.form.js',
100 'js/contrib/jquery.paging.min.js',
101 'js/contrib/jquery.countdown.js', 'js/contrib/jquery.countdown-pl.js',
102 'js/contrib/jquery.countdown-de.js', 'js/contrib/jquery.countdown-uk.js',
103 'js/contrib/jquery.countdown-es.js', 'js/contrib/jquery.countdown-lt.js',
104 'js/contrib/jquery.countdown-ru.js', 'js/contrib/jquery.countdown-fr.js',
105 'js/contrib/jquery.shorten.js',
107 'js/contrib/jquery-ui-1.8.16.custom.min.js',
109 'js/contrib/tlite.min.js',
111 'jplayer/jquery.jplayer.min.js',
112 'jplayer/jplayer.playlist.min.js',
118 'pdcounter/pdcounter.js',
119 'sponsors/js/sponsors.js',
120 'player/openplayer.js',
122 'funding/funding.js',
127 'output_filename': 'js/base.min.js',
130 'source_filenames': [
131 'jplayer/jquery.jplayer.min.js',
132 'jplayer/jplayer.playlist.min.js',
135 'output_filename': 'js/player.min.js',
138 'source_filenames': [
139 'js/contrib/jquery.eventdelegation.js',
140 'js/contrib/jquery.scrollto.js',
141 'js/contrib/jquery.highlightfade.js',
142 'js/book_text/other.js',
145 'js/contrib/raphael-min.js',
146 'js/contrib/progressSpin.min.js',
149 'output_filename': 'js/book.min.js',
152 'source_filenames': [
153 'js/contrib/jquery.cycle2.min.js',
154 'js/contrib/jquery.form.js',
155 'js/contrib/jquery.jqmodal.js',
156 'js/book_text/info.js',
157 'js/book_text/menu.js',
158 'js/book_text/note.js',
159 'js/book_text/references.js',
160 'js/book_text/settings.js',
161 'js/book_text/toc.js',
164 'annoy/book_text.js',
166 'js/contrib/jquery.highlightfade.js',
167 'js/contrib/raphael-min.js',
168 'player/openplayer.js',
169 'js/contrib/progressSpin.min.js',
172 'output_filename': 'js/book_text.js',
175 'source_filenames': [
178 'output_filename': 'js/picture.min.js',
181 'source_filenames': ('js/contrib/ierange-m2.js',),
182 'output_filename': 'js/book_ie.min.js',
185 'source_filenames': (
186 'js/contrib/jquery.js',
187 'js/contrib/jquery-ui-1.8.16.custom.min.js',
191 'output_filename': 'js/widget.min.js',
194 'CSS_COMPRESSOR': None,
195 'JS_COMPRESSOR': 'pipeline.compressors.jsmin.JSMinCompressor',
197 'libsasscompiler.LibSassCompiler',
201 STATICFILES_STORAGE = 'fnpdjango.pipeline_storage.GzipPipelineCachedStorage'
202 #STATICFILES_STORAGE = 'pipeline.storage.PipelineCachedStorage'
204 # PIPELINE_PYSCSS_BINARY = '/usr/bin/env pyscss'
205 # PIPELINE_PYSCSS_ARGUMENTS = ''
208 STATICFILES_FINDERS = [
209 'django.contrib.staticfiles.finders.FileSystemFinder',
210 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
211 'pipeline.finders.CachedFileFinder',
212 'pipeline.finders.PipelineFinder',
216 from machina import MACHINA_MAIN_STATIC_DIR
218 MACHINA_MAIN_STATIC_DIR,