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',
144 'output_filename': 'js/2022.min.js'
147 'source_filenames': [
148 'jplayer/jquery.jplayer.min.js',
149 'jplayer/jplayer.playlist.min.js',
152 'output_filename': 'js/player.min.js',
155 'source_filenames': [
156 'js/contrib/jplayer/jquery.jplayer.min.js',
157 'js/contrib/jplayer/jplayer.playlist.min.js',
158 'player/2022_player.js',
160 'output_filename': 'js/2022_player.min.js',
163 'source_filenames': [
164 'js/contrib/jquery.eventdelegation.js',
165 'js/contrib/jquery.scrollto.js',
166 'js/contrib/jquery.highlightfade.js',
167 'js/book_text/other.js',
170 'js/contrib/raphael-min.js',
171 'js/contrib/progressSpin.min.js',
174 'output_filename': 'js/book.min.js',
177 'source_filenames': [
178 'js/contrib/jquery.cycle2.min.js',
179 'js/contrib/jquery.form.js',
180 'js/contrib/jquery.jqmodal.js',
181 'js/book_text/info.js',
182 'js/book_text/menu.js',
183 'js/book_text/note.js',
184 'js/book_text/references.js',
185 'js/book_text/settings.js',
186 'js/book_text/toc.js',
189 'annoy/book_text.js',
191 'js/contrib/jquery.highlightfade.js',
192 'js/contrib/raphael-min.js',
193 'player/openplayer.js',
194 'js/contrib/progressSpin.min.js',
197 'output_filename': 'js/book_text.js',
200 'source_filenames': [
203 'output_filename': 'js/picture.min.js',
206 'source_filenames': ('js/contrib/ierange-m2.js',),
207 'output_filename': 'js/book_ie.min.js',
210 'source_filenames': (
211 'js/contrib/jquery.js',
212 'js/contrib/jquery-ui-1.8.16.custom.min.js',
216 'output_filename': 'js/widget.min.js',
219 'CSS_COMPRESSOR': None,
220 'JS_COMPRESSOR': 'pipeline.compressors.jsmin.JSMinCompressor',
222 'libsasscompiler.LibSassCompiler',
226 STATICFILES_STORAGE = 'fnpdjango.pipeline_storage.GzipPipelineCachedStorage'
227 #STATICFILES_STORAGE = 'pipeline.storage.PipelineCachedStorage'
229 # PIPELINE_PYSCSS_BINARY = '/usr/bin/env pyscss'
230 # PIPELINE_PYSCSS_ARGUMENTS = ''
233 STATICFILES_FINDERS = [
234 'django.contrib.staticfiles.finders.FileSystemFinder',
235 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
236 'pipeline.finders.CachedFileFinder',
237 'pipeline.finders.PipelineFinder',
241 from machina import MACHINA_MAIN_STATIC_DIR
243 MACHINA_MAIN_STATIC_DIR,