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
27 'contrib/jquery-ui-1.13.1.custom/jquery-ui.css',
28 '2022/styles/main.scss',
32 'output_filename': 'css/compressed/2022.css',
35 # styles both for mobile and for big screen
37 'css/import/gelasio.css',
39 'css/jquery.countdown.css',
40 'jplayer/jplayer.blue.monday.css',
42 'sponsors/css/sponsors.css',
46 'css/ui-lightness/jquery-ui-1.8.16.custom.css',
53 'output_filename': 'css/compressed/main.css',
57 'css/import/gelasio.css',
58 'css/master.book.css',
60 'output_filename': 'css/compressed/book.css',
64 'css/import/gelasio.css',
65 'scss/book_text.scss',
68 'annoy/book_text.scss',
70 'css/master.picture.css',
72 'output_filename': 'css/compressed/book_text.css',
78 'output_filename': 'css/compressed/compressed/forum.css',
82 'css/import/gelasio.css',
83 'css/master.book.css',
84 'css/master.picture.css',
86 'output_filename': 'css/compressed/picture.css',
90 'jplayer/jplayer.blue.monday.css',
93 'output_filename': 'css/compressed/player.css',
96 'source_filenames': ('css/simple.css',),
97 'output_filename': 'css/compressed/simple.css',
100 'source_filenames': ('scss/widget.scss',),
101 'output_filename': 'css/compressed/widget.css',
106 'source_filenames': (
107 'js/contrib/jquery.cycle2.min.js',
108 'js/contrib/jquery.jqmodal.js',
109 'js/contrib/jquery.form.js',
110 'js/contrib/jquery.paging.min.js',
111 'js/contrib/jquery.countdown.js', 'js/contrib/jquery.countdown-pl.js',
112 'js/contrib/jquery.countdown-de.js', 'js/contrib/jquery.countdown-uk.js',
113 'js/contrib/jquery.countdown-es.js', 'js/contrib/jquery.countdown-lt.js',
114 'js/contrib/jquery.countdown-ru.js', 'js/contrib/jquery.countdown-fr.js',
115 'js/contrib/jquery.shorten.js',
117 'js/contrib/jquery-ui-1.8.16.custom.min.js',
119 'js/contrib/tlite.min.js',
121 'jplayer/jquery.jplayer.min.js',
122 'jplayer/jplayer.playlist.min.js',
128 'pdcounter/pdcounter.js',
129 'sponsors/js/sponsors.js',
130 'player/openplayer.js',
132 'funding/funding.js',
137 'output_filename': 'js/base.min.js',
140 'source_filenames': [
141 'contrib/jquery-ui-1.13.1.custom/jquery-ui.js',
144 '2022/book/filter.js',
147 'output_filename': 'js/2022.min.js'
150 'source_filenames': [
151 'jplayer/jquery.jplayer.min.js',
152 'jplayer/jplayer.playlist.min.js',
155 'output_filename': 'js/player.min.js',
158 'source_filenames': [
159 'js/contrib/jplayer/jquery.jplayer.min.js',
160 'js/contrib/jplayer/jplayer.playlist.min.js',
161 'player/2022_player.js',
163 'output_filename': 'js/2022_player.min.js',
166 'source_filenames': [
167 'js/contrib/jquery.eventdelegation.js',
168 'js/contrib/jquery.scrollto.js',
169 'js/contrib/jquery.highlightfade.js',
170 'js/book_text/other.js',
173 'js/contrib/raphael-min.js',
174 'js/contrib/progressSpin.min.js',
177 'output_filename': 'js/book.min.js',
180 'source_filenames': [
181 'js/contrib/jquery.cycle2.min.js',
182 'js/contrib/jquery.form.js',
183 'js/contrib/jquery.jqmodal.js',
184 'js/book_text/info.js',
185 'js/book_text/menu.js',
186 'js/book_text/note.js',
187 'js/book_text/references.js',
188 'js/book_text/settings.js',
189 'js/book_text/toc.js',
192 'annoy/book_text.js',
194 'js/contrib/jquery.highlightfade.js',
195 'js/contrib/raphael-min.js',
196 'player/openplayer.js',
197 'js/contrib/progressSpin.min.js',
200 'output_filename': 'js/book_text.js',
203 'source_filenames': [
206 'output_filename': 'js/picture.min.js',
209 'source_filenames': ('js/contrib/ierange-m2.js',),
210 'output_filename': 'js/book_ie.min.js',
213 'source_filenames': (
214 'js/contrib/jquery.js',
215 'js/contrib/jquery-ui-1.8.16.custom.min.js',
219 'output_filename': 'js/widget.min.js',
222 'CSS_COMPRESSOR': None,
223 'JS_COMPRESSOR': 'pipeline.compressors.jsmin.JSMinCompressor',
225 'libsasscompiler.LibSassCompiler',
229 STATICFILES_STORAGE = 'fnpdjango.pipeline_storage.GzipPipelineCachedStorage'
230 #STATICFILES_STORAGE = 'pipeline.storage.PipelineCachedStorage'
232 # PIPELINE_PYSCSS_BINARY = '/usr/bin/env pyscss'
233 # PIPELINE_PYSCSS_ARGUMENTS = ''
236 STATICFILES_FINDERS = [
237 'django.contrib.staticfiles.finders.FileSystemFinder',
238 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
239 'pipeline.finders.CachedFileFinder',
240 'pipeline.finders.PipelineFinder',
244 from machina import MACHINA_MAIN_STATIC_DIR
246 MACHINA_MAIN_STATIC_DIR,