Skip to content

Commit a812474

Browse files
committed
Add logo and fix print.css
In this commit, a new file `logo.svg` is added, which contains the SVG code for the logo of the project. Additionally, changes are made in the `print.css` file to adjust the font size variable `--size` and fix various styling issues related to the display of the logo and project information.
1 parent bce2170 commit a812474

File tree

4 files changed

+141
-32
lines changed

4 files changed

+141
-32
lines changed

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ screen:= /app/screen.css
77
print := /app/print.css
88
chapters := /app/chapters.sql
99
render := /app/render.sed
10+
url := https://github.com/placek/pocket-nt
1011

1112
all: screen print
1213

@@ -20,8 +21,11 @@ $(left)-$(right).xml: info-$(left).xml info-$(right).xml cross_references.SQLite
2021
mv "$(left).SQLite3" left.db; mv "$(right).SQLite3" right.db; \
2122
{ echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; \
2223
echo "<nt>"; \
24+
echo "<name>$(name)</name>"; \
25+
echo "<logo></logo>"; \
2326
echo "<info>"; \
24-
echo "<name>$(name)</name>$$(cat 'info-$(left).xml' 'info-$(right).xml')"; \
27+
echo "$$(cat 'info-$(left).xml' 'info-$(right).xml')"; \
28+
echo "<description>$(url)</description>"; \
2529
echo "</info>"; \
2630
cat $(chapters) | sqlite3 | sed -rf $(render); \
2731
echo "</nt>"; \

logo.svg

Lines changed: 93 additions & 0 deletions
Loading

print.css

Lines changed: 35 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,54 @@
1-
:root { --size: 2vh; }
1+
:root { --size: 2.1vh; }
22

33
@font-face { font-family: greek; src: url(fonts/newathu.ttf); }
44
@font-face { font-family: mono; src: url(fonts/mono.ttf); }
55
@font-face { font-family: f1; src: url(fonts/freeserif.ttf); }
66
@font-face { font-family: f2; src: url(fonts/freesans.ttf); }
77

8-
@page { margin: 1.6em .8em .8em .8em; marks: crop cross; bleed: 5mm; -prince-trim: 5mm; }
8+
@page { margin: 7vh 5vh 5vh 5vh; marks: crop cross; bleed: 5mm; -prince-trim: 5mm; }
9+
@page title { @bottom-center { content: element(info); font-family: mono; font-weight: 600; font-size: var(--size); } }
910
@page book:left { @top-left { content: string(book); font-family: mono; font-weight: 600; font-size: var(--size); } }
10-
@page book:right { @top-right { content: string(chapter); font-family: mono; font-weight: 600; font-size: var(--size); } }
11-
@page book:blank { @top-left { content: ""; } @top-right { content: ""; } }
11+
@page book:right { @top-right-corner { content: string(chapter); font-family: mono; font-weight: 600; font-size: var(--size); } }
12+
@page book:blank { @top-left { content: ""; } @top-right-corner { content: ""; } }
1213

1314
* { margin: 0; padding: 0; }
14-
body { font-size: var(--size); text-align: justify; font-family: greek, mono, f1, f2; line-height: 1.2; font-variant-ligatures: historical-ligatures; }
15+
nt { font-size: var(--size); text-align: justify; font-family: greek, mono, f1, f2; line-height: 1.2; font-variant-ligatures: historical-ligatures; }
1516

16-
info { display: flex; width: 100%; justify-content: space-between; }
17-
info name { font-family: mono; font-weight: 600; font-size: 6vh; margin: 46vh 0; padding: 0; text-align: center; display: block; }
17+
name { font-family: mono; font-weight: 600; font-size: 6vh; margin: 32vh 0; padding: 0; text-align: center; display: block; }
18+
logo { width: 35vh; height: 35vh; margin: 0 auto; display: block; background: url(logo.svg) no-repeat center center; background-size: contain; }
19+
info { position: running(info); page: title; }
20+
info description { font-family: mono; display: inline-block; }
1821

19-
book { string-set: book attr(data-book); display: block; break-before: left; page: book; -prince-bookmark-level: 1; -prince-bookmark-label: attr(data-book); }
22+
book { string-set: book attr(name); display: block; break-before: left; page: book; -prince-bookmark-level: 1; -prince-bookmark-label: attr(name); }
2023

21-
column { display: block; padding: 0 .5em; hyphens: auto; }
24+
column, left, right { display: block; padding: 0 .5em; hyphens: auto; min-width: 45%; }
2225

23-
chapter { string-set: chapter attr(data-chapter); display: flex; -prince-bookmark-level: 2; -prince-bookmark-label: attr(data-chapter); }
24-
chapter:before { content: attr(data-chapter); font-family: mono; font-weight: 600; }
25-
chapter[data-chapter="1"]:before { display: none; }
26-
chapter[data-chapter="1"] verse[data-verse="1"] { padding-top: 1em; }
27-
chapter[data-chapter="1"] verse[data-verse="1"]::first-letter { font-size: 2.2em; float: left; line-height: 0.5em; }
26+
chapter { display: flex; }
27+
chapter[number="1"] verse[number="1"] { padding-top: 1em; }
2828

29+
number { string-set: chapter content(); -prince-bookmark-level: 2; -prince-bookmark-label: string(chapter); font-family: mono; font-weight: 600; -prince-float: outside; -prince-margin-outside: -1em; break-after: avoid; }
30+
chapter[number="1"] number { display: none; }
31+
32+
book chapter:first-of-type verse[number="1"] { display: block; }
33+
book chapter:first-of-type verse[number="1"]::first-letter { font-size: 2.2em; float: left; line-height: 0.5em; }
34+
book chapter:first-of-type verse[number="1"]:before { display: none; }
2935
verse { display: inline; }
30-
verse[data-verse="1"] { display: inline-block; }
31-
verse[data-verse="1"]:before { display: none; }
32-
verse:before { content: attr(data-verse); font-family: mono; font-weight: 600; font-size: .6em; margin: 0 .5em; vertical-align: super; }
36+
verse:before { content: attr(number); font-family: mono; font-weight: 600; font-size: .6em; margin: 0 .5em; vertical-align: super; }
3337

3438
reference { font-family: mono; font-size: .6em; margin: 0 .5em; vertical-align: baseline; display: inline; }
3539

36-
reference[data-rate="1"],
37-
reference[data-rate="2"],
38-
reference[data-rate="3"],
39-
reference[data-rate="4"],
40-
reference[data-rate="5"],
41-
reference[data-rate="6"],
42-
reference[data-rate="7"],
43-
reference[data-rate="8"],
44-
reference[data-rate="9"]
40+
reference[rate="1"],
41+
reference[rate="2"],
42+
reference[rate="3"],
43+
reference[rate="4"],
44+
reference[rate="5"],
45+
reference[rate="6"],
46+
reference[rate="7"],
47+
reference[rate="8"],
48+
reference[rate="9"],
49+
reference[rate="10"],
50+
reference[rate="11"],
51+
reference[rate="12"],
52+
reference[rate="13"],
53+
reference[rate="14"]
4554
{ display: none; }

screen.css

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
1-
:root { --size: 2.1vh; }
1+
:root { --size: 2.3vh; }
22

33
@font-face { font-family: greek; src: url(fonts/newathu.ttf); }
44
@font-face { font-family: mono; src: url(fonts/mono.ttf); }
55
@font-face { font-family: f1; src: url(fonts/freeserif.ttf); }
66
@font-face { font-family: f2; src: url(fonts/freesans.ttf); }
77

88
@page { margin: 7vh 5vh 5vh 5vh; }
9+
@page title { @bottom-center { content: element(info); font-family: mono; font-weight: 600; font-size: var(--size); } }
910
@page book:left { @top-left { content: string(book); font-family: mono; font-weight: 600; font-size: var(--size); } }
1011
@page book:right { @top-right-corner { content: string(chapter); font-family: mono; font-weight: 600; font-size: var(--size); } }
11-
@page book:blank { @top-left { content: ""; } @top-right { content: ""; } }
12+
@page book:blank { @top-left { content: ""; } @top-right-corner { content: ""; } }
1213

1314
* { margin: 0; padding: 0; }
1415
nt { font-size: var(--size); text-align: justify; font-family: greek, mono, f1, f2; line-height: 1.2; font-variant-ligatures: historical-ligatures; }
1516

16-
info { width: 100%; justify-content: space-between; }
17-
info name { font-family: mono; font-weight: 600; font-size: 6vh; margin: 47vh 0; padding: 0; text-align: center; display: block; }
17+
name { font-family: mono; font-weight: 600; font-size: 6vh; margin: 32vh 0; padding: 0; text-align: center; display: block; }
18+
logo { width: 35vh; height: 35vh; margin: 0 auto; display: block; background: url(logo.svg) no-repeat center center; background-size: contain; }
19+
info { position: running(info); page: title; }
20+
info description { font-family: mono; display: inline-block; }
1821

1922
book { string-set: book attr(name); display: block; break-before: left; page: book; -prince-bookmark-level: 1; -prince-bookmark-label: attr(name); }
2023

@@ -30,7 +33,7 @@ book chapter:first-of-type verse[number="1"] { display: block; }
3033
book chapter:first-of-type verse[number="1"]::first-letter { font-size: 2.2em; float: left; line-height: 0.5em; }
3134
book chapter:first-of-type verse[number="1"]:before { display: none; }
3235
verse { display: inline; }
33-
verse:before { content: attr(number); font-family: mono; font-weight: 600; font-size: .6em; margin: 0 .5em; vertical-align: super; }
36+
verse:before { content: attr(number); font-family: mono; font-weight: 600; font-size: .5em; margin: 0 .5em; vertical-align: super; }
3437

3538
reference { font-family: mono; font-size: .6em; margin: 0 .5em; vertical-align: baseline; display: inline; }
3639

0 commit comments

Comments
 (0)