Add pz field
[wolnelektury.git] / src / wolnelektury / settings / static.py
1 # This file is part of Wolne Lektury, licensed under GNU Affero GPLv3 or later.
2 # Copyright © Fundacja Wolne Lektury. 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         'main': {
25             'source_filenames': [
26                 'contrib/jquery-ui-1.13.1.custom/jquery-ui.css',
27                 'css/jquery.countdown.css',
28
29                 '2022/styles/main.scss',
30                 '2022/more.scss',
31                 'chunks/edit.scss',
32
33                 'scss/text.scss',
34             ],
35             'output_filename': 'css/compressed/main.css',
36         },
37         'book_text': {
38             'source_filenames': [
39                 'css/import/gelasio.css',
40
41                 'scss/book_text.scss',
42                 'css/new.book.css',
43
44                 'annoy/banner.scss',  # ?
45                 'annoy/book_text.scss',  # ?
46                 '2022/styles/reader_player.scss',  # ?
47
48                 'css/master.picture.css',
49             ],
50             'output_filename': 'css/compressed/book_text.css',
51         },
52         'widget': {
53             'source_filenames': ('scss/widget.scss',),
54             'output_filename': 'css/compressed/widget.css',
55         },
56     },
57     'JAVASCRIPT': {
58         'main': {
59             'source_filenames': [
60                 '2022/scripts/vendor.js',
61                 'contrib/jquery-ui-1.13.1.custom/jquery-ui.js',
62
63                 'js/search.js',
64                 'js/header.js',
65                 'book/filter.js',
66                 'chunks/edit.js',
67                 '2022/scripts/modernizr.js',
68                 'js/main.js',
69
70                 'js/contrib/jquery.cycle2.min.js',
71                 'sponsors/js/sponsors.js',
72                 'annoy/banner.js',
73                 'js/book_text/info.js',
74                 'js/book_text/menu.js',
75                 'js/book_text/note.js',
76                 'js/book_text/references.js',
77                 'js/book_text/settings.js',
78                 'js/book_text/toc.js',
79                 'js/book_text/progress.js',
80
81                 'js/contrib/jquery.countdown.js', 'js/contrib/jquery.countdown-pl.js',
82                 'js/contrib/jquery.countdown-de.js', 'js/contrib/jquery.countdown-uk.js',
83                 'js/contrib/jquery.countdown-es.js', 'js/contrib/jquery.countdown-lt.js',
84                 'js/contrib/jquery.countdown-ru.js', 'js/contrib/jquery.countdown-fr.js',
85                 'pdcounter/pdcounter.js',
86
87             ],
88             'output_filename': 'js/compressed/main.min.js'
89         },
90         'player': {
91             'source_filenames': [
92                 'js/contrib/jplayer/jquery.jplayer.min.js',
93                 'js/contrib/jplayer/jplayer.playlist.min.js',
94                 'player/player.js',
95             ],
96             'output_filename': 'js/compressed/player.min.js',
97         },
98         'book_text': {
99             'source_filenames': [
100                 'js/contrib/jquery.form.js',
101                 'js/contrib/jquery.jqmodal.js',
102                 'js/book_text/info.js',
103                 'js/book_text/menu.js',
104                 'js/book_text/note.js',
105                 'js/book_text/references.js',
106                 'js/book_text/settings.js',
107                 'js/book_text/toc.js',
108                 'js/locale.js',
109                 'js/dialogs.js',
110                 'annoy/book_text.js',
111
112                 'js/contrib/jquery.highlightfade.js',
113                 'js/contrib/raphael-min.js',
114                 'js/contrib/progressSpin.min.js',
115                 'annoy/banner.js',
116             ],
117             'output_filename': 'js/book_text.js',
118         },
119         'widget': {
120             'source_filenames': (
121                 'js/contrib/jquery.js',
122                 'js/contrib/jquery-ui-1.8.16.custom.min.js',
123                 'js/search.js',
124                 'js/widget_run.js',
125             ),
126             'output_filename': 'js/widget.min.js',
127         },
128     },
129     'CSS_COMPRESSOR': None,
130     'JS_COMPRESSOR': 'pipeline.compressors.jsmin.JSMinCompressor',
131     'COMPILERS': (
132         'libsasscompiler.LibSassCompiler',
133     )
134 }
135
136 STATICFILES_STORAGE = 'fnpdjango.pipeline_storage.GzipPipelineManifestStorage'
137
138 # PIPELINE_PYSCSS_BINARY = '/usr/bin/env pyscss'
139 # PIPELINE_PYSCSS_ARGUMENTS = ''
140
141
142 STATICFILES_FINDERS = [
143     'django.contrib.staticfiles.finders.FileSystemFinder',
144     'django.contrib.staticfiles.finders.AppDirectoriesFinder',
145     'pipeline.finders.CachedFileFinder',
146     'pipeline.finders.PipelineFinder',
147 ]