diff --git a/customizations/Dotawo/assets/css/site.css b/customizations/Dotawo/assets/css/site.css index 7330f2d..f5221c8 100644 --- a/customizations/Dotawo/assets/css/site.css +++ b/customizations/Dotawo/assets/css/site.css @@ -117,12 +117,28 @@ th:not([align]) { /* Legacy iOS */ } +@font-face { + font-family: "Antinoou"; + font-style: normal; + src: url("../fonts/Antinoou.ttf"), + url("../fonts/Antinoou.ttf") format("truetype"); + unicode-range: U+2C80–U+2CFF, U+0370–U+03FF, U+102E0–U+102FF; +} + +@font-face { + font-family: "Antinoou"; + font-style: italic; + src: url("../fonts/AntinoouItalic.ttf"), + url("../fonts/AntinoouItalic.ttf") format("truetype"); + unicode-range: U+2C80–U+2CFF, U+0370–U+03FF, U+102E0–U+102FF; +} + html { line-height: 1.5; } body { - font-family: "Gentium Plus", serif; + font-family: "Gentium Plus", "Antinoou", serif; max-width: 1024px; font-size: 1.4rem; padding-left: 3rem; @@ -735,63 +751,3 @@ details { display: none; } } - -@media print { - @page { - size: 156mm 234mm; - marks: crop cross; - } - - h2 { - break-before: page; - } - - html { - font-size: 0.9rem; - box-sizing: border-box; - margin: 0 auto; - padding: 0; - } - - .grid { - display: inline; - } - - .coretitle { - margin-top: 3rem; - margin-bottom: 2rem; - font-size: 2.2rem; - } - - .leftcolumn { - display: none; - } - - .has, - .afterhas { - font-size: 1.1rem; - } - - .mantle, - .crust { - margin-bottom: 0.2em; - } - - .content { - padding: 0px; - margin: 0 auto; - margin-top: 4rem; - } - - .hpar { - display: none; - } - - .mantletitle { - font-size: 1.7rem; - } - - .sessiongrid { - display: none; - } -} diff --git a/customizations/Dotawo/layouts/partials/printsinglebody.html b/customizations/Dotawo/layouts/partials/printsinglebody.html new file mode 100644 index 0000000..48bd8b9 --- /dev/null +++ b/customizations/Dotawo/layouts/partials/printsinglebody.html @@ -0,0 +1,89 @@ +{{ $s := partialCached "scratch.html" . }} + +{{ $currentNode := . }} +{{ $currentDir := "" }} +{{ with .File }} + {{ $currentDir = .Dir }} +{{ end }} +{{ $currentFile := (printf "/%s" .File) }} +{{ $scratch := $s.Get $currentFile }} + +
{{ substr $currentDir 0 -1 }}⁄{{ .Title }}
+ +
+
+ {{ if ne (trim .Page.TableOfContents "\n") "" }} + {{ .Page.TableOfContents }} + {{ end }} +
+
+ + {{- range $k, $v := .Page.Params.editors -}} + {{- with $.GetPage (printf "/editor/%s" $v) -}} + {{- with not $k -}} +
+
editor{{ with $.Page.Params.editors }}{{ if gt (len .) 1 }}s{{ end }}{{ end }}⁄
+
+ {{- end -}} + + {{- end -}} + {{- end -}} + {{- with .Page.Params.editors -}}
{{- end -}} + + {{- range $k, $v := .Page.Params.authors -}} + {{- with $.GetPage (printf "/author/%s" $v) -}} + {{- with not $k -}} +
+
author{{ with $.Page.Params.authors }}{{ if gt (len .) 1 }}s{{ end }}{{ end }}⁄
+
+ {{- end -}} + + {{- end -}} + {{- end -}} + {{- with .Page.Params.authors -}}
{{- end -}} + + {{ if and (not (eq $scratch.depth "crust")) $scratch.has_children }} +
+ {{ with $scratch.has }} +
has {{ $scratch.has }}⁄
+ {{ end }} +
+ {{ range $scratch.has_children }} + {{ $authors := "" }} + {{ range $n, $authorFile := .Params.authors }} + {{ $author := $.GetPage (printf "/author/%s" $authorFile) }} + {{ if eq $n 0 }} + {{ $authors = printf "%s%s" $authors $author.Title }} + {{ else }} + {{ $authors = printf "%s, %s" $authors $author.Title }} + {{ end }} + {{ end }} + + {{ end }} +
+ {{ end }} + + {{ if eq $scratch.depth "crust" }} +
+
in {{ index $scratch.in 1 }}⁄
+
+ {{ range $scratch.is_in }} + + {{ end }} +
+ {{ end }} +
+
+ + +{{ with .Page.Params.abstract }}
abstract⁄{{ . | $.Page.RenderString | htmlUnescape | safeHTML }}
{{ end }} + +{{- $vld := false -}}{{- range $k, $v := .Page.Params.keywords -}}{{- if eq $k 0 -}}{{- $vld = true -}}
keywords⁄{{- $v -}}{{- else -}}, {{- $v -}}{{- end -}}{{- end -}}{{- with $vld -}}
{{- end -}} diff --git a/customizations/Dotawo/static/fonts/Antinoou.ttf b/customizations/Dotawo/static/fonts/Antinoou.ttf new file mode 100644 index 0000000..8dc0409 Binary files /dev/null and b/customizations/Dotawo/static/fonts/Antinoou.ttf differ diff --git a/customizations/Dotawo/static/fonts/AntinoouItalic.ttf b/customizations/Dotawo/static/fonts/AntinoouItalic.ttf new file mode 100644 index 0000000..5d32dc6 Binary files /dev/null and b/customizations/Dotawo/static/fonts/AntinoouItalic.ttf differ diff --git a/layouts/partials/pagedjs.html b/layouts/partials/pagedjs.html index 2c1f980..1336d1d 100644 --- a/layouts/partials/pagedjs.html +++ b/layouts/partials/pagedjs.html @@ -1,2 +1,3 @@ + diff --git a/layouts/print/baseof.html b/layouts/print/baseof.html index f27eaaa..c92c161 100644 --- a/layouts/print/baseof.html +++ b/layouts/print/baseof.html @@ -6,8 +6,6 @@ {{- partial "pagedjs.html" . -}} -
{{- block "singlebody" . -}}{{- end -}} -
diff --git a/layouts/print/single.html b/layouts/print/single.html index 614dad4..f6d0acf 100644 --- a/layouts/print/single.html +++ b/layouts/print/single.html @@ -8,17 +8,50 @@ {{ $currentDir = .Dir }} {{ end }} -
{{ partial "singlebody.html" $p }}
-
{{ $p.Content }} - {{ range $printPage := $scratch.has_cildren }} -
{{ partial "singlebody.html" $printPage }}
-
{{ $printPage.Content }} - {{ $printPageScratch := $s.Get (printf "/%s" $printPage.File) }} - {{ range $printPageKid := $printPageScratch.has_children }} -
{{ partial "singlebody.html" $printPageKid }}
-
{{ $printPageKid.Content }} - {{ . }} - {{ end }} -
+
{{ partial "printsinglebody.html" $p }}
+
{{ $p.Content }}
+ + {{ range $scratch.has_children }} +
+ {{ $addS := len .Params.authors }} + {{ range $n, $authorFile := .Params.authors }} + {{ $author := $.GetPage (printf "/author/%s" $authorFile) }} + {{ if eq $n 0 }} +
author{{ with (gt $addS 1) }}s{{ end }}⁄{{ $author.Title }} + {{ else }} + , {{ $author.Title }} + {{ end }} {{ end }} + {{ with .Params.authors }}
{{ end }} + + {{ $tit := .Title }} + {{ if gt (len .Title) 54 }} + {{ $tit = printf "%s…" (substr .Title 0 50) }} + {{ end }} +
{{ index $scratch.crust 0 }}⁄{{ $tit }}
+ {{ partial "printsinglebody.html" . }} + {{ .Content }} + {{ end }} + + {{ range where $.Site.RegularPages "Section" "in" (slice "author" "editor") }} +
+
{{ index $scratch.mantle 0 }}⁄{{ $p.Title }}
+
{{ substr .File.Dir 0 -1 }}⁄{{ .Title }}
+ {{ .Content }} + + {{ if in .Page.Site.Params.sandpointsMentionedIn (substr .File.Dir 0 -1) }} + {{ $ss := $s.Get (printf "/%s" .File) }} +
+ {{ with $ss }} +
mentioned in⁄
+ {{ end }} +
+ {{ range $ss.backlinks }} + + {{ end }} +
+ {{ end }} + {{ end }} {{- end -}} diff --git a/static/css/print.css b/static/css/print.css new file mode 100644 index 0000000..63d1cf3 --- /dev/null +++ b/static/css/print.css @@ -0,0 +1,205 @@ +@page { + size: 156mm 234mm; + margin-bottom: 58px; + padding-bottom: 20px; + margin-top: 40px; +} + +@page:left { + margin-right: 40px; + margin-left: 64px; + @bottom-left-corner { + content: counter(page); + font-size: 1rem; + vertical-align: text-top; + } + + @bottom { + content: element(runningTitle); + position: relative; + } +} + +@page:right { + margin-left: 40px; + margin-right: 64px; + @bottom-right-corner { + content: counter(page); + font-size: 1rem; + vertical-align: text-top; + } + + @bottom { + content: element(runningAuthors); + position: relative; + } +} + +@page crustpage :first { + @bottom-right-corner { + content: none; + } + @bottom { + content: none; + } +} + +@media print { + html { + font-size: 0.8em; + box-sizing: border-box; + margin: 0; + padding: 0; + } + body { + font-size: 1rem; + padding: 0; + margin: 0; + } + + .grid { + display: inline; + } + + .coretitle { + margin-top: 3rem; + margin-bottom: 2rem; + font-size: 2.2rem; + } + + .leftcolumn { + display: none; + } + + .has, + .afterhas { + font-size: 1.1rem; + } + + .mantle, + .crust { + margin-bottom: 0.2em; + } + + .content { + padding: 0px; + margin: 0 auto; + margin-top: 4rem; + } + + .hpar { + display: none; + } + + .mantletitle { + font-size: 1.7rem; + } + + .sessiongrid { + display: none; + } + + #bibliography { + break-before: page; + } + + .footnotes ol { + margin-top: 3rem; + padding-left: 0.9rem; + } + + .footnotes hr { + border: none; + border-top: 0px; + text-align: left; + margin-top: 2rem; + margin-bottom: -2rem; + } + + .footnotes hr::after { + content: "Endnotes"; + font-size: 1.2rem; + font-weight: bold; + } + + .runningTitle { + position: running(runningTitle); + } + + .runningAuthors { + position: running(runningAuthors); + } + + .hasauthors .afterhas { + font-size: 1.5rem; + } + + .crustpage { + break-before: page; + page: crustpage; + } + + .hasin { + display: none; + } + + .abstract { + margin-left: 0; + margin-right: 0; + max-width: inherit; + } + + .keywords { + margin-left: 0; + margin-right: 0; + max-width: inherit; + padding-left: 0; + padding-right: 0; + font-size: 0.9rem; + } + + h2:before, + h3:before, + h4:before, + h5:before { + content: none; + } + + h2, h3, h4, h5, hr { + break-after: avoid; + } + + table { + font-size: 1rem; + } + + .glosscontainer, + table, + table + p, + blockquote, + li { + break-inside: avoid; + } + + .toc::after { + text-align: right; + float: right; + content: target-counter(attr(href url), page, decimal-leading-zero); + } + + .authorpage { + break-before: page; + } + + img { + display: block; + max-height: 150mm; + width: auto; + break-after: avoid; + margin-bottom: 0.5rem; + } + + img + strong del { + margin-left: 0; + } +}