Some experiments with the language: html, epub, covers.
[librarian.git] / librarian / formats / cover / partners / __init__.py
1 # -*- coding: utf-8 -*-
2 #
3 # This file is part of Librarian, licensed under GNU Affero GPLv3 or later.
4 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
5 #
6 from librarian.utils import get_resource
7 from .. import Cover
8
9
10 class VirtualoCover(Cover):
11     format_name = u"Virtualo cover image"
12
13     width = 600
14     height = 730
15     author_top = 73
16     title_top = 73
17     logo_bottom = 25
18     logo_width = 250
19
20
21 class PrestigioCover(Cover):
22     format_name = u"Prestigio cover image"
23
24     width = 580
25     height = 783
26     background_img = get_resource('res/cover-prestigio.png')
27
28     author_top = 446
29     author_margin_left = 118
30     author_margin_right = 62
31     author_lineskip = 60
32     author_color = '#fff'
33     author_shadow = '#000'
34     author_font_ttf = get_resource('fonts/JunicodeWL-Italic.ttf')
35     author_font_size = 50
36
37     title_top = 0
38     title_margin_left = 118
39     title_margin_right = 62
40     title_lineskip = 60
41     title_color = '#fff'
42     title_shadow = '#000'
43     title_font_ttf = get_resource('fonts/JunicodeWL-Italic.ttf')
44     title_font_size = 50
45
46     def pretty_title(self):
47         return u"„%s”" % self.title
48
49
50 class BookotekaCover(Cover):
51     format_name = u"Bookoteka cover image"
52
53     width = 2140
54     height = 2733
55     background_img = get_resource('res/cover-bookoteka.png')
56
57     author_top = 480
58     author_margin_left = 307
59     author_margin_right = 233
60     author_lineskip = 156
61     author_color = '#d9d919'
62     author_font_ttf = get_resource('fonts/JunicodeWL-Regular.ttf')
63     author_font_size = 130
64
65     title_top = 400
66     title_margin_left = 307
67     title_margin_right = 233
68     title_lineskip = 168
69     title_color = '#d9d919'
70     title_font_ttf = get_resource('fonts/JunicodeWL-Regular.ttf')
71     title_font_size = 140
72
73     format = 'PNG'
74
75
76 class GandalfCover(Cover):
77     format_name = u"Gandalf cover image"
78
79     width = 600
80     height = 730
81     background_img = get_resource('res/cover-gandalf.png')
82     author_font_ttf = get_resource('fonts/JunicodeWL-Regular.ttf')
83     author_font_size = 30
84     title_font_ttf = get_resource('fonts/JunicodeWL-Regular.ttf')
85     title_font_size = 40
86     logo_bottom = 25
87     logo_width = 250
88     format = 'PNG'