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',
31 'output_filename': 'css/compressed/2022.css',
34 # styles both for mobile and for big screen
36 'css/import/gelasio.css',
38 'css/jquery.countdown.css',
39 'jplayer/jplayer.blue.monday.css',
41 'sponsors/css/sponsors.css',
45 'css/ui-lightness/jquery-ui-1.8.16.custom.css',
52 'output_filename': 'css/compressed/main.css',
56 'css/import/gelasio.css',
57 'css/master.book.css',
59 'output_filename': 'css/compressed/book.css',
63 'css/import/gelasio.css',
64 'scss/book_text.scss',
67 'annoy/book_text.scss',
69 'css/master.picture.css',
71 'output_filename': 'css/compressed/book_text.css',
77 'output_filename': 'css/compressed/compressed/forum.css',
81 'css/import/gelasio.css',
82 'css/master.book.css',
83 'css/master.picture.css',
85 'output_filename': 'css/compressed/picture.css',
89 'jplayer/jplayer.blue.monday.css',
92 'output_filename': 'css/compressed/player.css',
95 'source_filenames': ('css/simple.css',),
96 'output_filename': 'css/compressed/simple.css',
99 'source_filenames': ('scss/widget.scss',),
100 'output_filename': 'css/compressed/widget.css',
105 'source_filenames': (
106 'js/contrib/jquery.cycle2.min.js',
107 'js/contrib/jquery.jqmodal.js',
108 'js/contrib/jquery.form.js',
109 'js/contrib/jquery.paging.min.js',
110 'js/contrib/jquery.countdown.js', 'js/contrib/jquery.countdown-pl.js',
111 'js/contrib/jquery.countdown-de.js', 'js/contrib/jquery.countdown-uk.js',
112 'js/contrib/jquery.countdown-es.js', 'js/contrib/jquery.countdown-lt.js',
113 'js/contrib/jquery.countdown-ru.js', 'js/contrib/jquery.countdown-fr.js',
114 'js/contrib/jquery.shorten.js',
116 'js/contrib/jquery-ui-1.8.16.custom.min.js',
118 'js/contrib/tlite.min.js',
120 'jplayer/jquery.jplayer.min.js',
121 'jplayer/jplayer.playlist.min.js',
127 'pdcounter/pdcounter.js',
128 'sponsors/js/sponsors.js',
129 'player/openplayer.js',
131 'funding/funding.js',
136 'output_filename': 'js/base.min.js',
139 'source_filenames': [
140 'contrib/jquery-ui-1.13.1.custom/jquery-ui.js',
143 '2022/book/filter.js',
145 'output_filename': 'js/2022.min.js'
148 'source_filenames': [
149 'jplayer/jquery.jplayer.min.js',
150 'jplayer/jplayer.playlist.min.js',
153 'output_filename': 'js/player.min.js',
156 'source_filenames': [
157 'js/contrib/jplayer/jquery.jplayer.min.js',
158 'js/contrib/jplayer/jplayer.playlist.min.js',
159 'player/2022_player.js',
161 'output_filename': 'js/2022_player.min.js',
164 'source_filenames': [
165 'js/contrib/jquery.eventdelegation.js',
166 'js/contrib/jquery.scrollto.js',
167 'js/contrib/jquery.highlightfade.js',
168 'js/book_text/other.js',
171 'js/contrib/raphael-min.js',
172 'js/contrib/progressSpin.min.js',
175 'output_filename': 'js/book.min.js',
178 'source_filenames': [
179 'js/contrib/jquery.cycle2.min.js',
180 'js/contrib/jquery.form.js',
181 'js/contrib/jquery.jqmodal.js',
182 'js/book_text/info.js',
183 'js/book_text/menu.js',
184 'js/book_text/note.js',
185 'js/book_text/references.js',
186 'js/book_text/settings.js',
187 'js/book_text/toc.js',
190 'annoy/book_text.js',
192 'js/contrib/jquery.highlightfade.js',
193 'js/contrib/raphael-min.js',
194 'player/openplayer.js',
195 'js/contrib/progressSpin.min.js',
198 'output_filename': 'js/book_text.js',
201 'source_filenames': [
204 'output_filename': 'js/picture.min.js',
207 'source_filenames': ('js/contrib/ierange-m2.js',),
208 'output_filename': 'js/book_ie.min.js',
211 'source_filenames': (
212 'js/contrib/jquery.js',
213 'js/contrib/jquery-ui-1.8.16.custom.min.js',
217 'output_filename': 'js/widget.min.js',
220 'CSS_COMPRESSOR': None,
221 'JS_COMPRESSOR': 'pipeline.compressors.jsmin.JSMinCompressor',
223 'libsasscompiler.LibSassCompiler',
227 STATICFILES_STORAGE = 'fnpdjango.pipeline_storage.GzipPipelineCachedStorage'
228 #STATICFILES_STORAGE = 'pipeline.storage.PipelineCachedStorage'
230 # PIPELINE_PYSCSS_BINARY = '/usr/bin/env pyscss'
231 # PIPELINE_PYSCSS_ARGUMENTS = ''
234 STATICFILES_FINDERS = [
235 'django.contrib.staticfiles.finders.FileSystemFinder',
236 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
237 'pipeline.finders.CachedFileFinder',
238 'pipeline.finders.PipelineFinder',
242 from machina import MACHINA_MAIN_STATIC_DIR
244 MACHINA_MAIN_STATIC_DIR,