1 # -*- coding: utf-8 -*-
2 # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
3 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
6 from .paths import VAR_DIR
8 # Absolute path to the directory that holds media.
9 # Example: "/home/media/media.lawrence.com/"
10 MEDIA_ROOT = path.join(VAR_DIR, 'media/')
11 STATIC_ROOT = path.join(VAR_DIR, 'static/')
12 SEARCH_INDEX = path.join(VAR_DIR, 'search_index/')
14 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
15 # trailing slash if there is a path component (optional in other cases).
16 # Examples: "http://media.lawrence.com", "http://example.com/media/"
18 STATIC_URL = '/static/'
20 IMAGE_DIR = 'book/pictures/'
22 # CSS and JavaScript file groups
27 # styles both for mobile and for big screen
29 'css/jquery.countdown.css',
30 'jplayer/jplayer.blue.monday.css',
32 'sponsors/css/sponsors.css',
36 'uni_form/uni-form.css',
37 'uni_form/default.uni-form.css',
39 'css/ui-lightness/jquery-ui-1.8.16.custom.css',
45 'output_filename': 'css/compressed/main.css',
49 'css/master.book.css',
51 'output_filename': 'css/compressed/book.css',
55 'scss/book_text.scss',
58 'css/master.picture.css',
60 'output_filename': 'css/compressed/book_text.css',
64 'css/master.book.css',
65 'css/master.picture.css',
67 'output_filename': 'css/compressed/picture.css',
71 'jplayer/jplayer.blue.monday.css',
74 'output_filename': 'css/compressed/player.css',
77 'source_filenames': ('css/simple.css',),
78 'output_filename': 'css/compressed/simple.css',
81 'source_filenames': ('scss/widget.scss',),
82 'output_filename': 'css/compressed/widget.css',
88 'js/contrib/jquery.cycle.min.js',
89 'js/contrib/jquery.jqmodal.js',
90 'js/contrib/jquery.form.js',
91 'js/contrib/jquery.paging.min.js',
92 'js/contrib/jquery.countdown.js', 'js/contrib/jquery.countdown-pl.js',
93 'js/contrib/jquery.countdown-de.js', 'js/contrib/jquery.countdown-uk.js',
94 'js/contrib/jquery.countdown-es.js', 'js/contrib/jquery.countdown-lt.js',
95 'js/contrib/jquery.countdown-ru.js', 'js/contrib/jquery.countdown-fr.js',
97 'js/contrib/jquery-ui-1.8.16.custom.min.js',
99 'js/contrib/tlite.min.js',
101 'jplayer/jquery.jplayer.min.js',
102 'jplayer/jplayer.playlist.min.js',
108 'pdcounter/pdcounter.js',
109 'sponsors/js/sponsors.js',
110 'player/openplayer.js',
112 'funding/funding.js',
114 'uni_form/uni-form.js',
118 'output_filename': 'js/base.min.js',
121 'source_filenames': [
122 'jplayer/jquery.jplayer.min.js',
123 'jplayer/jplayer.playlist.min.js',
126 'output_filename': 'js/player.min.js',
129 'source_filenames': [
130 'js/contrib/jquery.eventdelegation.js',
131 'js/contrib/jquery.scrollto.js',
132 'js/contrib/jquery.highlightfade.js',
133 'js/book_text/other.js',
136 'js/contrib/raphael-min.js',
137 'js/contrib/progressSpin.min.js',
140 'output_filename': 'js/book.min.js',
143 'source_filenames': [
144 'js/contrib/jquery.form.js',
145 'js/contrib/jquery.jqmodal.js',
146 'js/book_text/info.js',
147 'js/book_text/menu.js',
148 'js/book_text/note.js',
149 'js/book_text/settings.js',
150 'js/book_text/toc.js',
154 'js/contrib/jquery.highlightfade.js',
155 'js/contrib/raphael-min.js',
156 'player/openplayer.js',
157 'js/contrib/progressSpin.min.js',
160 'output_filename': 'js/book_text.js',
163 'source_filenames': ('js/contrib/ierange-m2.js',),
164 'output_filename': 'js/book_ie.min.js',
167 'source_filenames': (
168 'js/contrib/jquery.js',
169 'js/contrib/jquery-ui-1.8.16.custom.min.js',
173 'output_filename': 'js/widget.min.js',
176 'CSS_COMPRESSOR': None,
177 'JS_COMPRESSOR': 'pipeline.compressors.jsmin.JSMinCompressor',
179 'pipeline.compilers.sass.SASSCompiler',
180 # We could probably use PySCSS instead,
181 # but they have some serious problems, like:
182 # https://github.com/Kronuz/pyScss/issues/166 (empty list syntax)
183 # https://github.com/Kronuz/pyScss/issues/258 (bad @media order)
184 # 'pyscss_compiler.PySCSSCompiler',
188 STATICFILES_STORAGE = 'fnpdjango.utils.pipeline_storage.GzipPipelineCachedStorage'
190 # PIPELINE_PYSCSS_BINARY = '/usr/bin/env pyscss'
191 # PIPELINE_PYSCSS_ARGUMENTS = ''
194 STATICFILES_FINDERS = [
195 'django.contrib.staticfiles.finders.FileSystemFinder',
196 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
197 'pipeline.finders.PipelineFinder',