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 # CSS and JavaScript file groups
25 # styles both for mobile and for big screen
27 'css/jquery.countdown.css',
28 'jplayer/jplayer.blue.monday.css',
30 'sponsors/css/sponsors.css',
32 'uni_form/uni-form.css',
33 'uni_form/default.uni-form.css',
35 'css/ui-lightness/jquery-ui-1.8.16.custom.css',
39 'output_filename': 'css/compressed/main.css',
43 'css/master.book.css',
45 'output_filename': 'css/compressed/book.css',
49 'scss/book_text.scss',
52 'css/master.picture.css',
54 'output_filename': 'css/compressed/book_text.css',
58 'css/master.book.css',
59 'css/master.picture.css',
61 'output_filename': 'css/compressed/picture.css',
65 'jplayer/jplayer.blue.monday.css',
68 'output_filename': 'css/compressed/player.css',
71 'source_filenames': ('css/simple.css',),
72 'output_filename': 'css/compressed/simple.css',
75 'source_filenames': ('scss/widget.scss',),
76 'output_filename': 'css/compressed/widget.css',
82 'js/contrib/jquery.cycle.min.js',
83 'js/contrib/jquery.jqmodal.js',
84 'js/contrib/jquery.form.js',
85 'js/contrib/jquery.paging.min.js',
86 'js/contrib/jquery.countdown.js', 'js/contrib/jquery.countdown-pl.js',
87 'js/contrib/jquery.countdown-de.js', 'js/contrib/jquery.countdown-uk.js',
88 'js/contrib/jquery.countdown-es.js', 'js/contrib/jquery.countdown-lt.js',
89 'js/contrib/jquery.countdown-ru.js', 'js/contrib/jquery.countdown-fr.js',
91 'js/contrib/jquery-ui-1.8.16.custom.min.js',
93 'jplayer/jquery.jplayer.min.js',
94 'jplayer/jplayer.playlist.min.js',
100 'pdcounter/pdcounter.js',
101 'sponsors/js/sponsors.js',
102 'player/openplayer.js',
104 'funding/funding.js',
106 'uni_form/uni-form.js',
108 'output_filename': 'js/base.min.js',
111 'source_filenames': [
112 'jplayer/jquery.jplayer.min.js',
113 'jplayer/jplayer.playlist.min.js',
116 'output_filename': 'js/player.min.js',
119 'source_filenames': [
120 'js/contrib/jquery.eventdelegation.js',
121 'js/contrib/jquery.scrollto.js',
122 'js/contrib/jquery.highlightfade.js',
123 'js/book_text/other.js',
126 'js/contrib/raphael-min.js',
127 'js/contrib/progressSpin.min.js',
130 'output_filename': 'js/book.min.js',
133 'source_filenames': [
134 'js/contrib/jquery.form.js',
135 'js/contrib/jquery.jqmodal.js',
140 'js/contrib/jquery.highlightfade.js',
141 'js/contrib/raphael-min.js',
142 'player/openplayer.js',
143 'js/contrib/progressSpin.min.js',
146 'output_filename': 'js/book_text.js',
149 'source_filenames': ('js/contrib/ierange-m2.js',),
150 'output_filename': 'js/book_ie.min.js',
153 'source_filenames': (
154 'js/contrib/jquery.js',
155 'js/contrib/jquery-ui-1.8.16.custom.min.js',
159 'output_filename': 'js/widget.min.js',
162 'CSS_COMPRESSOR': None,
163 'JS_COMPRESSOR': 'pipeline.compressors.jsmin.JSMinCompressor',
165 'pipeline.compilers.sass.SASSCompiler',
166 # We could probably use PySCSS instead,
167 # but they have some serious problems, like:
168 # https://github.com/Kronuz/pyScss/issues/166 (empty list syntax)
169 # https://github.com/Kronuz/pyScss/issues/258 (bad @media order)
170 # 'pyscss_compiler.PySCSSCompiler',
174 STATICFILES_STORAGE = 'fnpdjango.utils.pipeline_storage.GzipPipelineCachedStorage'
176 # PIPELINE_PYSCSS_BINARY = '/usr/bin/env pyscss'
177 # PIPELINE_PYSCSS_ARGUMENTS = ''
180 STATICFILES_FINDERS = [
181 'django.contrib.staticfiles.finders.FileSystemFinder',
182 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
183 'pipeline.finders.PipelineFinder',