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 '2022/styles/main.scss',
30 'output_filename': 'css/compressed/2022.css',
33 # styles both for mobile and for big screen
35 'css/import/gelasio.css',
37 'css/jquery.countdown.css',
38 'jplayer/jplayer.blue.monday.css',
40 'sponsors/css/sponsors.css',
44 'css/ui-lightness/jquery-ui-1.8.16.custom.css',
51 'output_filename': 'css/compressed/main.css',
55 'css/import/gelasio.css',
56 'css/master.book.css',
58 'output_filename': 'css/compressed/book.css',
62 'css/import/gelasio.css',
63 'scss/book_text.scss',
66 'annoy/book_text.scss',
68 'css/master.picture.css',
70 'output_filename': 'css/compressed/book_text.css',
76 'output_filename': 'css/compressed/compressed/forum.css',
80 'css/import/gelasio.css',
81 'css/master.book.css',
82 'css/master.picture.css',
84 'output_filename': 'css/compressed/picture.css',
88 'jplayer/jplayer.blue.monday.css',
91 'output_filename': 'css/compressed/player.css',
94 'source_filenames': ('css/simple.css',),
95 'output_filename': 'css/compressed/simple.css',
98 'source_filenames': ('scss/widget.scss',),
99 'output_filename': 'css/compressed/widget.css',
104 'source_filenames': (
105 'js/contrib/jquery.cycle2.min.js',
106 'js/contrib/jquery.jqmodal.js',
107 'js/contrib/jquery.form.js',
108 'js/contrib/jquery.paging.min.js',
109 'js/contrib/jquery.countdown.js', 'js/contrib/jquery.countdown-pl.js',
110 'js/contrib/jquery.countdown-de.js', 'js/contrib/jquery.countdown-uk.js',
111 'js/contrib/jquery.countdown-es.js', 'js/contrib/jquery.countdown-lt.js',
112 'js/contrib/jquery.countdown-ru.js', 'js/contrib/jquery.countdown-fr.js',
113 'js/contrib/jquery.shorten.js',
115 'js/contrib/jquery-ui-1.8.16.custom.min.js',
117 'js/contrib/tlite.min.js',
119 'jplayer/jquery.jplayer.min.js',
120 'jplayer/jplayer.playlist.min.js',
126 'pdcounter/pdcounter.js',
127 'sponsors/js/sponsors.js',
128 'player/openplayer.js',
130 'funding/funding.js',
135 'output_filename': 'js/base.min.js',
138 'source_filenames': [
139 'jplayer/jquery.jplayer.min.js',
140 'jplayer/jplayer.playlist.min.js',
143 'output_filename': 'js/player.min.js',
146 'source_filenames': [
147 'jplayer/jquery.jplayer.min.js',
148 'jplayer/jplayer.playlist.min.js',
149 'player/2022_player.js',
151 'output_filename': 'js/2022_player.min.js',
154 'source_filenames': [
155 'js/contrib/jquery.eventdelegation.js',
156 'js/contrib/jquery.scrollto.js',
157 'js/contrib/jquery.highlightfade.js',
158 'js/book_text/other.js',
161 'js/contrib/raphael-min.js',
162 'js/contrib/progressSpin.min.js',
165 'output_filename': 'js/book.min.js',
168 'source_filenames': [
169 'js/contrib/jquery.cycle2.min.js',
170 'js/contrib/jquery.form.js',
171 'js/contrib/jquery.jqmodal.js',
172 'js/book_text/info.js',
173 'js/book_text/menu.js',
174 'js/book_text/note.js',
175 'js/book_text/references.js',
176 'js/book_text/settings.js',
177 'js/book_text/toc.js',
180 'annoy/book_text.js',
182 'js/contrib/jquery.highlightfade.js',
183 'js/contrib/raphael-min.js',
184 'player/openplayer.js',
185 'js/contrib/progressSpin.min.js',
188 'output_filename': 'js/book_text.js',
191 'source_filenames': [
194 'output_filename': 'js/picture.min.js',
197 'source_filenames': ('js/contrib/ierange-m2.js',),
198 'output_filename': 'js/book_ie.min.js',
201 'source_filenames': (
202 'js/contrib/jquery.js',
203 'js/contrib/jquery-ui-1.8.16.custom.min.js',
207 'output_filename': 'js/widget.min.js',
210 'CSS_COMPRESSOR': None,
211 'JS_COMPRESSOR': 'pipeline.compressors.jsmin.JSMinCompressor',
213 'libsasscompiler.LibSassCompiler',
217 STATICFILES_STORAGE = 'fnpdjango.pipeline_storage.GzipPipelineCachedStorage'
218 #STATICFILES_STORAGE = 'pipeline.storage.PipelineCachedStorage'
220 # PIPELINE_PYSCSS_BINARY = '/usr/bin/env pyscss'
221 # PIPELINE_PYSCSS_ARGUMENTS = ''
224 STATICFILES_FINDERS = [
225 'django.contrib.staticfiles.finders.FileSystemFinder',
226 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
227 'pipeline.finders.CachedFileFinder',
228 'pipeline.finders.PipelineFinder',
232 from machina import MACHINA_MAIN_STATIC_DIR
234 MACHINA_MAIN_STATIC_DIR,