Map update.
[wolnelektury.git] / src / wolnelektury / settings / static.py
1 # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
2 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
3 #
4 from os import path
5 from .paths import VAR_DIR
6
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
12 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
13 # trailing slash if there is a path component (optional in other cases).
14 # Examples: "http://media.lawrence.com", "http://example.com/media/"
15 MEDIA_URL = '/media/'
16 STATIC_URL = '/static/'
17
18 IMAGE_DIR = 'book/pictures/'
19
20 # CSS and JavaScript file groups
21
22 PIPELINE = {
23     'STYLESHEETS': {
24         '2022': {
25             'source_filenames': [
26                 'contrib/jquery-ui-1.13.1.custom/jquery-ui.css',
27                 'contrib/leaflet-1.9.4/leaflet.css',
28                 'contrib/leaflet.markercluster-1.4.1/MarkerCluster.css',
29                 'contrib/leaflet.markercluster-1.4.1/MarkerCluster.Default.css',
30                 'css/jquery.countdown.css',
31
32                 '2022/styles/main.scss',
33                 '2022/more.scss',
34                 'chunks/edit.scss',
35             ],
36             'output_filename': 'css/compressed/2022.css',
37         },
38         'main': {
39             # styles both for mobile and for big screen
40             'source_filenames': [
41                 'css/import/gelasio.css',
42
43                 'css/jquery.countdown.css',
44                 'jplayer/jplayer.blue.monday.css',
45
46                 'sponsors/css/sponsors.css',
47
48                 'annoy/banner.scss',
49
50                 'css/ui-lightness/jquery-ui-1.8.16.custom.css',
51
52                 'css/tlite.css',
53
54                 'scss/main.scss',
55                 'club/club.scss',
56             ],
57             'output_filename': 'css/compressed/main.css',
58         },
59         'book': {
60             'source_filenames': [
61                 'css/import/gelasio.css',
62                 'css/master.book.css',
63             ],
64             'output_filename': 'css/compressed/book.css',
65         },
66         'book_text': {
67             'source_filenames': [
68                 'css/import/gelasio.css',
69                 'scss/book_text.scss',
70                 'css/new.book.css',
71                 'annoy/banner.scss',
72                 'annoy/book_text.scss',
73                 '2022/styles/reader_player.scss',
74
75                 'css/master.picture.css',
76             ],
77             'output_filename': 'css/compressed/book_text.css',
78         },
79         'forum': {
80             'source_filenames': [
81                 'scss/forum.scss',
82             ],
83             'output_filename': 'css/compressed/compressed/forum.css',
84         },
85         'picture': {
86             'source_filenames': [
87                 'css/import/gelasio.css',
88                 'css/master.book.css',
89                 'css/master.picture.css',
90             ],
91             'output_filename': 'css/compressed/picture.css',
92         },
93         'player': {
94             'source_filenames': [
95                 'jplayer/jplayer.blue.monday.css',
96                 'player/player.css',
97             ],
98             'output_filename': 'css/compressed/player.css',
99         },
100         'simple': {
101             'source_filenames': ('css/simple.css',),
102             'output_filename': 'css/compressed/simple.css',
103         },
104         'widget': {
105             'source_filenames': ('scss/widget.scss',),
106             'output_filename': 'css/compressed/widget.css',
107         },
108     },
109     'JAVASCRIPT': {
110         'base': {
111             'source_filenames': (
112                 'js/contrib/jquery.cycle2.min.js',
113                 'js/contrib/jquery.jqmodal.js',
114                 'js/contrib/jquery.form.js',
115                 'js/contrib/jquery.paging.min.js',
116                 'js/contrib/jquery.countdown.js', 'js/contrib/jquery.countdown-pl.js',
117                 'js/contrib/jquery.countdown-de.js', 'js/contrib/jquery.countdown-uk.js',
118                 'js/contrib/jquery.countdown-es.js', 'js/contrib/jquery.countdown-lt.js',
119                 'js/contrib/jquery.countdown-ru.js', 'js/contrib/jquery.countdown-fr.js',
120                 'js/contrib/jquery.shorten.js',
121
122                 'js/contrib/jquery-ui-1.8.16.custom.min.js',
123
124                 'js/contrib/tlite.min.js',
125
126                 'jplayer/jquery.jplayer.min.js',
127                 'jplayer/jplayer.playlist.min.js',
128                 'player/player.js',
129
130                 'js/locale.js',
131                 'js/dialogs.js',
132                 'js/base.js',
133                 'pdcounter/pdcounter.js',
134                 'sponsors/js/sponsors.js',
135                 'player/openplayer.js',
136                 'js/search.js',
137                 'funding/funding.js',
138                 'club/form.js',
139
140                 'annoy/banner.js',
141                 ),
142             'output_filename': 'js/base.min.js',
143         },
144         '2022': {
145             'source_filenames': [
146                 '2022/scripts/vendor.js',
147                 'contrib/jquery-ui-1.13.1.custom/jquery-ui.js',
148                 'contrib/leaflet-1.9.4/leaflet.js',
149                 'contrib/leaflet.markercluster-1.4.1/leaflet.markercluster.js',
150
151                 'js/search.js',
152                 'js/2022.js',
153                 '2022/book/filter.js',
154                 'chunks/edit.js',
155                 '2022/scripts/modernizr.js',
156                 '2021/scripts/main.js',
157
158                 'js/contrib/jquery.cycle2.min.js',
159                 'sponsors/js/sponsors.js',
160
161                 'js/contrib/jquery.countdown.js', 'js/contrib/jquery.countdown-pl.js',
162                 'js/contrib/jquery.countdown-de.js', 'js/contrib/jquery.countdown-uk.js',
163                 'js/contrib/jquery.countdown-es.js', 'js/contrib/jquery.countdown-lt.js',
164                 'js/contrib/jquery.countdown-ru.js', 'js/contrib/jquery.countdown-fr.js',
165                 'pdcounter/pdcounter.js',
166
167             ],
168             'output_filename': 'js/2022.min.js'
169         },
170         'player': {
171             'source_filenames': [
172                 'jplayer/jquery.jplayer.min.js',
173                 'jplayer/jplayer.playlist.min.js',
174                 'player/player.js',
175             ],
176             'output_filename': 'js/player.min.js',
177         },
178         '2022_player': {
179             'source_filenames': [
180                 'js/contrib/jplayer/jquery.jplayer.min.js',
181                 'js/contrib/jplayer/jplayer.playlist.min.js',
182                 'player/2022_player.js',
183             ],
184             'output_filename': 'js/2022_player.min.js',
185         },
186         'book': {
187             'source_filenames': [
188                 'js/contrib/jquery.eventdelegation.js',
189                 'js/contrib/jquery.scrollto.js',
190                 'js/contrib/jquery.highlightfade.js',
191                 'js/book_text/other.js',
192                 'js/book.js',
193
194                 'js/contrib/raphael-min.js',
195                 'js/contrib/progressSpin.min.js',
196                 'js/picture.js',
197             ],
198             'output_filename': 'js/book.min.js',
199         },
200         'book_text': {
201             'source_filenames': [
202                 'js/contrib/jquery.cycle2.min.js',
203                 'js/contrib/jquery.form.js',
204                 'js/contrib/jquery.jqmodal.js',
205                 'js/book_text/info.js',
206                 'js/book_text/menu.js',
207                 'js/book_text/note.js',
208                 'js/book_text/references.js',
209                 'js/book_text/settings.js',
210                 'js/book_text/toc.js',
211                 'js/locale.js',
212                 'js/dialogs.js',
213                 'annoy/book_text.js',
214
215                 'js/contrib/jquery.highlightfade.js',
216                 'js/contrib/raphael-min.js',
217                 'player/openplayer.js',
218                 'js/contrib/progressSpin.min.js',
219                 'annoy/banner.js',
220             ],
221             'output_filename': 'js/book_text.js',
222         },
223         'picture': {
224             'source_filenames': [
225                 'js/picture.js',
226             ],
227             'output_filename': 'js/picture.min.js',
228         },
229         'book_ie': {
230             'source_filenames': ('js/contrib/ierange-m2.js',),
231             'output_filename': 'js/book_ie.min.js',
232         },
233         'widget': {
234             'source_filenames': (
235                 'js/contrib/jquery.js',
236                 'js/contrib/jquery-ui-1.8.16.custom.min.js',
237                 'js/search.js',
238                 'js/widget_run.js',
239             ),
240             'output_filename': 'js/widget.min.js',
241         },
242     },
243     'CSS_COMPRESSOR': None,
244     'JS_COMPRESSOR': 'pipeline.compressors.jsmin.JSMinCompressor',
245     'COMPILERS': (
246         'libsasscompiler.LibSassCompiler',
247     )
248 }
249
250 STATICFILES_STORAGE = 'fnpdjango.pipeline_storage.GzipPipelineManifestStorage'
251
252 # PIPELINE_PYSCSS_BINARY = '/usr/bin/env pyscss'
253 # PIPELINE_PYSCSS_ARGUMENTS = ''
254
255
256 STATICFILES_FINDERS = [
257     'django.contrib.staticfiles.finders.FileSystemFinder',
258     'django.contrib.staticfiles.finders.AppDirectoriesFinder',
259     'pipeline.finders.CachedFileFinder',
260     'pipeline.finders.PipelineFinder',
261 ]