Text layout changes.
[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
80                 'js/contrib/jquery.countdown.js', 'js/contrib/jquery.countdown-pl.js',
81                 'js/contrib/jquery.countdown-de.js', 'js/contrib/jquery.countdown-uk.js',
82                 'js/contrib/jquery.countdown-es.js', 'js/contrib/jquery.countdown-lt.js',
83                 'js/contrib/jquery.countdown-ru.js', 'js/contrib/jquery.countdown-fr.js',
84                 'pdcounter/pdcounter.js',
85
86             ],
87             'output_filename': 'js/compressed/main.min.js'
88         },
89         'player': {
90             'source_filenames': [
91                 'js/contrib/jplayer/jquery.jplayer.min.js',
92                 'js/contrib/jplayer/jplayer.playlist.min.js',
93                 'player/player.js',
94             ],
95             'output_filename': 'js/compressed/player.min.js',
96         },
97         'book_text': {
98             'source_filenames': [
99                 'js/contrib/jquery.form.js',
100                 'js/contrib/jquery.jqmodal.js',
101                 'js/book_text/info.js',
102                 'js/book_text/menu.js',
103                 'js/book_text/note.js',
104                 'js/book_text/references.js',
105                 'js/book_text/settings.js',
106                 'js/book_text/toc.js',
107                 'js/locale.js',
108                 'js/dialogs.js',
109                 'annoy/book_text.js',
110
111                 'js/contrib/jquery.highlightfade.js',
112                 'js/contrib/raphael-min.js',
113                 'js/contrib/progressSpin.min.js',
114                 'annoy/banner.js',
115             ],
116             'output_filename': 'js/book_text.js',
117         },
118         'widget': {
119             'source_filenames': (
120                 'js/contrib/jquery.js',
121                 'js/contrib/jquery-ui-1.8.16.custom.min.js',
122                 'js/search.js',
123                 'js/widget_run.js',
124             ),
125             'output_filename': 'js/widget.min.js',
126         },
127     },
128     'CSS_COMPRESSOR': None,
129     'JS_COMPRESSOR': 'pipeline.compressors.jsmin.JSMinCompressor',
130     'COMPILERS': (
131         'libsasscompiler.LibSassCompiler',
132     )
133 }
134
135 STATICFILES_STORAGE = 'fnpdjango.pipeline_storage.GzipPipelineManifestStorage'
136
137 # PIPELINE_PYSCSS_BINARY = '/usr/bin/env pyscss'
138 # PIPELINE_PYSCSS_ARGUMENTS = ''
139
140
141 STATICFILES_FINDERS = [
142     'django.contrib.staticfiles.finders.FileSystemFinder',
143     'django.contrib.staticfiles.finders.AppDirectoriesFinder',
144     'pipeline.finders.CachedFileFinder',
145     'pipeline.finders.PipelineFinder',
146 ]