From a812474b6a2e2d191bf75e4df3c586e8d1c222ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Placzy=C5=84ski?= Date: Mon, 6 May 2024 14:46:36 +0200 Subject: [PATCH] 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. --- Makefile | 6 +++- logo.svg | 93 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ print.css | 61 ++++++++++++++++++++--------------- screen.css | 13 +++++--- 4 files changed, 141 insertions(+), 32 deletions(-) create mode 100644 logo.svg diff --git a/Makefile b/Makefile index c7b5bbc..5a26db9 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,7 @@ screen:= /app/screen.css print := /app/print.css chapters := /app/chapters.sql render := /app/render.sed +url := https://github.com/placek/pocket-nt all: screen print @@ -20,8 +21,11 @@ $(left)-$(right).xml: info-$(left).xml info-$(right).xml cross_references.SQLite mv "$(left).SQLite3" left.db; mv "$(right).SQLite3" right.db; \ { echo ""; \ echo ""; \ + echo "$(name)"; \ + echo ""; \ echo ""; \ - echo "$(name)$$(cat 'info-$(left).xml' 'info-$(right).xml')"; \ + echo "$$(cat 'info-$(left).xml' 'info-$(right).xml')"; \ + echo "$(url)"; \ echo ""; \ cat $(chapters) | sqlite3 | sed -rf $(render); \ echo ""; \ diff --git a/logo.svg b/logo.svg new file mode 100644 index 0000000..4500f1b --- /dev/null +++ b/logo.svg @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + diff --git a/print.css b/print.css index b244aa0..2cf4db6 100644 --- a/print.css +++ b/print.css @@ -1,45 +1,54 @@ -:root { --size: 2vh; } +:root { --size: 2.1vh; } @font-face { font-family: greek; src: url(fonts/newathu.ttf); } @font-face { font-family: mono; src: url(fonts/mono.ttf); } @font-face { font-family: f1; src: url(fonts/freeserif.ttf); } @font-face { font-family: f2; src: url(fonts/freesans.ttf); } -@page { margin: 1.6em .8em .8em .8em; marks: crop cross; bleed: 5mm; -prince-trim: 5mm; } +@page { margin: 7vh 5vh 5vh 5vh; marks: crop cross; bleed: 5mm; -prince-trim: 5mm; } +@page title { @bottom-center { content: element(info); font-family: mono; font-weight: 600; font-size: var(--size); } } @page book:left { @top-left { content: string(book); font-family: mono; font-weight: 600; font-size: var(--size); } } -@page book:right { @top-right { content: string(chapter); font-family: mono; font-weight: 600; font-size: var(--size); } } -@page book:blank { @top-left { content: ""; } @top-right { content: ""; } } +@page book:right { @top-right-corner { content: string(chapter); font-family: mono; font-weight: 600; font-size: var(--size); } } +@page book:blank { @top-left { content: ""; } @top-right-corner { content: ""; } } * { margin: 0; padding: 0; } -body { font-size: var(--size); text-align: justify; font-family: greek, mono, f1, f2; line-height: 1.2; font-variant-ligatures: historical-ligatures; } +nt { font-size: var(--size); text-align: justify; font-family: greek, mono, f1, f2; line-height: 1.2; font-variant-ligatures: historical-ligatures; } -info { display: flex; width: 100%; justify-content: space-between; } -info name { font-family: mono; font-weight: 600; font-size: 6vh; margin: 46vh 0; padding: 0; text-align: center; display: block; } +name { font-family: mono; font-weight: 600; font-size: 6vh; margin: 32vh 0; padding: 0; text-align: center; display: block; } +logo { width: 35vh; height: 35vh; margin: 0 auto; display: block; background: url(logo.svg) no-repeat center center; background-size: contain; } +info { position: running(info); page: title; } +info description { font-family: mono; display: inline-block; } -book { string-set: book attr(data-book); display: block; break-before: left; page: book; -prince-bookmark-level: 1; -prince-bookmark-label: attr(data-book); } +book { string-set: book attr(name); display: block; break-before: left; page: book; -prince-bookmark-level: 1; -prince-bookmark-label: attr(name); } -column { display: block; padding: 0 .5em; hyphens: auto; } +column, left, right { display: block; padding: 0 .5em; hyphens: auto; min-width: 45%; } -chapter { string-set: chapter attr(data-chapter); display: flex; -prince-bookmark-level: 2; -prince-bookmark-label: attr(data-chapter); } -chapter:before { content: attr(data-chapter); font-family: mono; font-weight: 600; } -chapter[data-chapter="1"]:before { display: none; } -chapter[data-chapter="1"] verse[data-verse="1"] { padding-top: 1em; } -chapter[data-chapter="1"] verse[data-verse="1"]::first-letter { font-size: 2.2em; float: left; line-height: 0.5em; } +chapter { display: flex; } +chapter[number="1"] verse[number="1"] { padding-top: 1em; } +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; } +chapter[number="1"] number { display: none; } + +book chapter:first-of-type verse[number="1"] { display: block; } +book chapter:first-of-type verse[number="1"]::first-letter { font-size: 2.2em; float: left; line-height: 0.5em; } +book chapter:first-of-type verse[number="1"]:before { display: none; } verse { display: inline; } -verse[data-verse="1"] { display: inline-block; } -verse[data-verse="1"]:before { display: none; } -verse:before { content: attr(data-verse); font-family: mono; font-weight: 600; font-size: .6em; margin: 0 .5em; vertical-align: super; } +verse:before { content: attr(number); font-family: mono; font-weight: 600; font-size: .6em; margin: 0 .5em; vertical-align: super; } reference { font-family: mono; font-size: .6em; margin: 0 .5em; vertical-align: baseline; display: inline; } -reference[data-rate="1"], -reference[data-rate="2"], -reference[data-rate="3"], -reference[data-rate="4"], -reference[data-rate="5"], -reference[data-rate="6"], -reference[data-rate="7"], -reference[data-rate="8"], -reference[data-rate="9"] +reference[rate="1"], +reference[rate="2"], +reference[rate="3"], +reference[rate="4"], +reference[rate="5"], +reference[rate="6"], +reference[rate="7"], +reference[rate="8"], +reference[rate="9"], +reference[rate="10"], +reference[rate="11"], +reference[rate="12"], +reference[rate="13"], +reference[rate="14"] { display: none; } diff --git a/screen.css b/screen.css index 224bc53..e6290ee 100644 --- a/screen.css +++ b/screen.css @@ -1,4 +1,4 @@ -:root { --size: 2.1vh; } +:root { --size: 2.3vh; } @font-face { font-family: greek; src: url(fonts/newathu.ttf); } @font-face { font-family: mono; src: url(fonts/mono.ttf); } @@ -6,15 +6,18 @@ @font-face { font-family: f2; src: url(fonts/freesans.ttf); } @page { margin: 7vh 5vh 5vh 5vh; } +@page title { @bottom-center { content: element(info); font-family: mono; font-weight: 600; font-size: var(--size); } } @page book:left { @top-left { content: string(book); font-family: mono; font-weight: 600; font-size: var(--size); } } @page book:right { @top-right-corner { content: string(chapter); font-family: mono; font-weight: 600; font-size: var(--size); } } -@page book:blank { @top-left { content: ""; } @top-right { content: ""; } } +@page book:blank { @top-left { content: ""; } @top-right-corner { content: ""; } } * { margin: 0; padding: 0; } nt { font-size: var(--size); text-align: justify; font-family: greek, mono, f1, f2; line-height: 1.2; font-variant-ligatures: historical-ligatures; } -info { width: 100%; justify-content: space-between; } -info name { font-family: mono; font-weight: 600; font-size: 6vh; margin: 47vh 0; padding: 0; text-align: center; display: block; } +name { font-family: mono; font-weight: 600; font-size: 6vh; margin: 32vh 0; padding: 0; text-align: center; display: block; } +logo { width: 35vh; height: 35vh; margin: 0 auto; display: block; background: url(logo.svg) no-repeat center center; background-size: contain; } +info { position: running(info); page: title; } +info description { font-family: mono; display: inline-block; } book { string-set: book attr(name); display: block; break-before: left; page: book; -prince-bookmark-level: 1; -prince-bookmark-label: attr(name); } @@ -30,7 +33,7 @@ book chapter:first-of-type verse[number="1"] { display: block; } book chapter:first-of-type verse[number="1"]::first-letter { font-size: 2.2em; float: left; line-height: 0.5em; } book chapter:first-of-type verse[number="1"]:before { display: none; } verse { display: inline; } -verse:before { content: attr(number); font-family: mono; font-weight: 600; font-size: .6em; margin: 0 .5em; vertical-align: super; } +verse:before { content: attr(number); font-family: mono; font-weight: 600; font-size: .5em; margin: 0 .5em; vertical-align: super; } reference { font-family: mono; font-size: .6em; margin: 0 .5em; vertical-align: baseline; display: inline; }