print layout...

master
Marcell Mars 3 years ago
parent 2affc2d2c5
commit 89d146d4ab

@ -5,9 +5,9 @@ module.exports = {
require('postcss-import')({
path: [themeDir]
}),
require('autoprefixer')({
grid: true
}),
require('postcss-reporter'),
/* require('autoprefixer')({
* grid: true
* }),
* require('postcss-reporter'), */
]
}

@ -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+2C80U+2CFF, U+0370U+03FF, U+102E0U+102FF;
}
@font-face {
font-family: "Antinoou";
font-style: italic;
src: url("../fonts/AntinoouItalic.ttf"),
url("../fonts/AntinoouItalic.ttf") format("truetype");
unicode-range: U+2C80U+2CFF, U+0370U+03FF, U+102E0U+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;
@ -131,6 +147,10 @@ body {
color: black;
}
#preview {
display: none;
}
sup,
sub {
vertical-align: baseline;
@ -735,63 +755,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;
}
}

@ -2,49 +2,49 @@
{{ $_ := newScratch }}
{{- range $k, $v := .Page.Site.Data.sandpointsnamegraph -}}
{{ $_.Add "triads" $k }}
{{ $_.Add "triads" $k }}
{{- end -}}
{{- if strings.HasPrefix .Destination "bib:" -}}
{{- $destination := (substr .Destination 4) -}}
{{- $c_prefix := .Page.Site.Params.sandpointsCatalogPrefix | default "/library/" -}}
{{- if index $.Page.Site.Data.books.catalog $destination -}}
{{- $b := index $.Page.Site.Data.books.catalog $destination -}}
{{- $bibhref := printf "%sBROWSE_LIBRARY.html#/book/%s" (safeURL ($c_prefix)) $destination }}
{{ $bibtitle := "" }}
{{ with $b.title }}
{{- $bibtitle = printf "%s" $b.title }}
{{ end }}
{{ .Page.Scratch.Add "bibs" (slice (slice $bibhref $bibtitle)) }}
{{- if not $text_link -}}
<span>{{- delimit $b.authors ", " " & " -}}{{- with $b.pubdate -}}, {{- substr . 0 4}}{{- end -}}.<a href="{{- $c_prefix | safeURL -}}BROWSE_LIBRARY.html#/book/{{- $destination -}}"{{- with $b.title}} title="{{- . -}}"{{- end -}} target="_blank"><span class="sup">bib</span>{{- $b.title -}}</a>. {{- with $b.publisher -}}{{- . -}}.{{- end -}}</span>
{{- else -}}
<span class="sup">bib</span><a href="{{- $c_prefix | safeURL -}}BROWSE_LIBRARY.html#/book/{{- $destination -}}"{{- with $b.title}} title="{{- . -}}"{{- end -}} target="_blank">{{- $text_link -}}</a>
{{- end -}}
{{- $destination := (substr .Destination 4) -}}
{{- $c_prefix := .Page.Site.Params.sandpointsCatalogPrefix | default "/library/" -}}
{{- if index $.Page.Site.Data.books.catalog $destination -}}
{{- $b := index $.Page.Site.Data.books.catalog $destination -}}
{{- $bibhref := printf "%sBROWSE_LIBRARY.html#/book/%s" (safeURL ($c_prefix)) $destination }}
{{ $bibtitle := "" }}
{{ with $b.title }}
{{- $bibtitle = printf "%s" $b.title }}
{{ end }}
{{ .Page.Scratch.Add "bibs" (slice (slice $bibhref $bibtitle)) }}
{{- if not $text_link -}}
<span>{{- delimit $b.authors ", " " & " -}}{{- with $b.pubdate -}}, {{- substr . 0 4}}{{- end -}}.<a href="{{- $c_prefix | safeURL -}}BROWSE_LIBRARY.html#/book/{{- $destination -}}"{{- with $b.title}} title="{{- . -}}"{{- end -}} target="_blank"><span class="sup">bib</span>{{- $b.title -}}</a>. {{- with $b.publisher -}}{{- . -}}.{{- end -}}</span>
{{- else -}}
<a href="{{- $c_prefix | safeURL -}}BROWSE_LIBRARY.html#/book/{{- $destination -}}"{{- with .Title}} title="{{- . -}}"{{- end -}}>{{- $text_link -}}⦚<span class="text-xs font-bold p-1 bg-AuChico text-CoconutCream">bib:{{- $destination -}} not found</span></a>
<span class="sup">bib</span><a href="{{- $c_prefix | safeURL -}}BROWSE_LIBRARY.html#/book/{{- $destination -}}"{{- with $b.title}} title="{{- . -}}"{{- end -}} target="_blank">{{- $text_link -}}</a>
{{- end -}}
{{- else -}}
<a href="{{- $c_prefix | safeURL -}}BROWSE_LIBRARY.html#/book/{{- $destination -}}"{{- with .Title}} title="{{- . -}}"{{- end -}}>{{- $text_link -}}⦚<span class="text-xs font-bold p-1 bg-AuChico text-CoconutCream">bib:{{- $destination -}} not found</span></a>
{{- end -}}
{{- else if in ($_.Get "triads") (index (split .Destination ":") 0) -}}
{{- if $.Page.Site.GetPage (printf "/%s" (replace .Destination ":" "/")) -}}
{{- $session := $.Page.Site.GetPage (printf "/%s" (replace .Destination ":" "/")) -}}
{{ .Page.Scratch.Add "links" (slice $session) }}
{{- if not $text_link -}}
<a href="{{- $session.RelPermalink -}}{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}"{{- with $session.Title}} title="{{- $session.Title -}}"{{- end -}}><span class="sup">{{- index (split .Destination ":") 0 -}}</span>{{- $session.Title -}}</a>
{{- else -}}
<a href="{{- $session.RelPermalink -}}{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}"{{- with .Title}} title="{{- . -}}"{{- end -}}><span class="sup">{{- index (split .Destination ":") 0 -}}</span>{{- $text_link -}}</a>
{{- end -}}
{{- if $.Page.Site.GetPage (printf "/%s" (replace .Destination ":" "/")) -}}
{{- $session := $.Page.Site.GetPage (printf "/%s" (replace .Destination ":" "/")) -}}
{{ .Page.Scratch.Add "links" (slice $session) }}
{{- if not $text_link -}}
<a href="{{- $session.RelPermalink -}}{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}"{{- with $session.Title}} title="{{- $session.Title -}}"{{- end -}}><span class="sup">{{- index (split .Destination ":") 0 -}}</span>{{- $session.Title -}}</a>
{{- else -}}
<a href="{{- .Destination -}}/{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}">{{- $text_link -}}⦚<span>{{- .Destination -}} not found</span></a>
<a href="{{- $session.RelPermalink -}}{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}"{{- with .Title}} title="{{- . -}}"{{- end -}}><span class="sup">{{- index (split .Destination ":") 0 -}}</span>{{- $text_link -}}</a>
{{- end -}}
{{- else -}}
<a href="{{- .Destination -}}/{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}">{{- $text_link -}}⦚<span>{{- .Destination -}} not found</span></a>
{{- end -}}
{{- else if strings.HasPrefix .Destination "audio:" -}}
{{- $a_destination := (substr .Destination 6) -}}
{{- if findRE "^.*static" $a_destination -}}
<span class="soundcite" data-url="{{- (replaceRE "^.*static" "" $a_destination ) | safeURL -}}">{{ .Text }}</span>
{{- else -}}
<span class="soundcite" data-url="{{- $a_destination | safeURL -}}">{{ .Text }}</span>
{{- end -}}
{{- $a_destination := (substr .Destination 6) -}}
{{- if findRE "^.*static" $a_destination -}}
<span class="soundcite" data-url="{{- (replaceRE "^.*static" "" $a_destination ) | safeURL -}}">{{ .Text }}</span>
{{- else -}}
<span class="soundcite" data-url="{{- $a_destination | safeURL -}}">{{ .Text }}</span>
{{- end -}}
{{- else if findRE "^.*static" .Destination -}}
<img src="{{- (replaceRE "^.*static" "" .Destination ) | safeURL -}}" alt="{{- .Text -}}" {{- with .Title}} title="{{- . -}}"{{- end -}} />
<img src="{{- (replaceRE "^.*static" "" .Destination ) | safeURL -}}" alt="{{- .Text -}}" {{- with .Title}} title="{{- . -}}"{{- end -}} />
{{- else -}}
<img src="{{- .Destination | safeURL -}}" alt="{{- .Text -}}" {{- with .Title}} title="{{- . -}}"{{- end -}} />
<img src="{{- .Destination | safeURL -}}" alt="{{- .Text -}}" {{- with .Title}} title="{{- . -}}"{{- end -}} />
{{- end -}}

@ -8,7 +8,9 @@
{{ $currentFile := (printf "/%s" .File) }}
{{ $scratch := $s.Get $currentFile }}
<div class="{{ $scratch.depth | default "crust" }}title"><span class="supt">{{ substr $currentDir 0 -1 }}</span>{{ .Title }}</div></div>
{{ $sandnamePlural := (slice) }}
<div class="{{ $scratch.depth | default "crust" }}title"><span class="supt">{{ substr $currentDir 0 -1 }}</span>{{ .Title }}</div>
<div class="grid">
<div class="leftcolumn">
@ -17,22 +19,36 @@
{{ end }}
</div>
<div class="rightcolumn">
{{- range $k, $v := .Page.Params.authors -}}
{{- with $.GetPage (printf "/author/%s" $v) -}}
{{- with not $k -}}
<div class="has hasauthors">
<div class="hassup">author{{ with $.Page.Params.authors }}{{ if gt (len .) 1 }}s{{ end }}{{ end }}</div>
<div class="afterhas">
{{ $closeDivs := false }}
{{ range $k, $v := $.Site.Data.sandpointsnamegraph }}
{{ $sandnamePlural = $sandnamePlural | append $v }}
{{ end }}
{{ $paramsKeys := (slice) }}
{{ range $k, $v := $currentNode.Params }}
{{ $paramsKeys = $paramsKeys | append $k }}
{{ end }}
{{ $mentions := intersect $paramsKeys $sandnamePlural }}
{{ range $mention := $mentions }}
{{ range $k, $m := index $currentNode.Params $mention }}
{{ $mentionLink := printf "/%s/%s" (substr $mention 0 -1) $m }}
{{- with $.GetPage $mentionLink -}}
{{- with not $k -}}
{{ $closeDivs = true }}
<div class="has hasauthors">
<div class="hassup">{{ with (index $currentNode.Params $mention) }}{{ if gt (len (index $currentNode.Params $mention)) 1 }}{{ $mention }}{{ else }}{{ substr $mention 0 -1 }}{{ end }}{{ end }}</div>
<div class="afterhas">
{{- end -}}
<div class="crust">
<a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a>
</div>
{{- end -}}
<div class="crust">
<a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a>
</div>
{{- end -}}
{{- end -}}
{{- with .Page.Params.authors -}}</div></div>{{- end -}}
{{ end }}
{{ end }}
{{- with $closeDivs -}}</div></div>{{ end }}
{{ if in .Page.Site.Params.sandpointsMentionedIn (substr $currentDir 0 -1) }}
<div class="has">
<div class="has hasmentionedin">
{{ with $scratch.backlinks }}
<div class="hassup">mentioned in</div>
{{ end }}
@ -46,7 +62,7 @@
{{ end }}
{{ if and (not (eq $scratch.depth "crust")) $scratch.has_children }}
<div class="has">
<div class="has hashas">
{{ with $scratch.has }}
<div class="hassup">has {{ $scratch.has }}</div>
{{ end }}
@ -60,7 +76,7 @@
{{ end }}
{{ if eq $scratch.depth "crust" }}
<div class="has">
<div class="has hasin">
<div class="hassup">in {{ index $scratch.in 1 }}</div>
<div class="afterhas">
{{ range $scratch.is_in }}
@ -74,8 +90,6 @@
</div>
{{ with .Page.Params.abstract }}<div class="journal"></div><div class="abstract"><span class="supt">abstract</span>{{ . | $.Page.RenderString | htmlUnescape | safeHTML }}</div>{{ end }}
{{ with .Page.Params.abstract }}<div class="abstract"><span class="supt">abstract</span>{{ . | $.Page.RenderString | htmlUnescape | safeHTML }}</div>{{ end }}
{{- $vld := false -}}{{- range $k, $v := .Page.Params.keywords -}}{{- if eq $k 0 -}}{{- $vld = true -}}<div
class="keywords"><span class="sup">keywords</span>{{- $v -}}{{- else -}},&nbsp;{{- $v -}}{{- end -}}{{- end -}}{{- with $vld -}}</div>{{- end -}}
{{ with .Page.Params.abstract }}</div>{{ end }}
{{- $vld := false -}}{{- range $k, $v := .Page.Params.keywords -}}{{- if eq $k 0 -}}{{- $vld = true -}}<div class="keywords"><span class="sup">keywords</span>{{- $v -}}{{- else -}},&nbsp;{{- $v -}}{{- end -}}{{- end -}}{{- with $vld -}}</div>{{- end -}}

File diff suppressed because one or more lines are too long

@ -1,15 +1,19 @@
{
"syllabus": "syllabi",
"curriculum": "curriculums",
"book": "books",
"journal": "journals",
"topic": "topics",
"part": "parts",
"issue": "issues",
"experiment": "experiments",
"session": "sessions",
"chapter": "chapters",
"article": "articles",
"annex": "annexes",
"author": "authors"
"syllabus": "syllabi",
"curriculum": "curriculums",
"notebook": "notebooks",
"book": "books",
"journal": "journals",
"topic": "topics",
"part": "parts",
"issue": "issues",
"tab": "tabs",
"experiment": "experiments",
"session": "sessions",
"chapter": "chapters",
"article": "articles",
"note": "notes",
"annex": "annexes",
"author": "authors",
"editor": "editors"
}

@ -1,2 +1,4 @@
<link href="/css/paged_interface.css" rel="stylesheet" type="text/css">
<link href="/css/print.css" rel="stylesheet" type="text/css">
<script src="/js/paged.polyfill.js"></script>
<script src="/js/repeatingHeader.js"></script>

@ -0,0 +1,88 @@
{{ $s := partialCached "scratch.html" . }}
{{ $currentNode := . }}
{{ $currentDir := "" }}
{{ with .File }}
{{ $currentDir = .Dir }}
{{ end }}
{{ $currentFile := (printf "/%s" .File) }}
{{ $scratch := $s.Get $currentFile }}
<div id="{{ .File.LogicalName }}" class="{{ $scratch.depth | default "crust" }}title"><span class="supt">{{ substr $currentDir 0 -1 }}</span>{{ .Title }}</div>
<div class="grid">
<div class="leftcolumn">
{{ if ne (trim .Page.TableOfContents "\n") "<nav id=\"TableOfContents\"></nav>" }}
{{ .Page.TableOfContents }}
{{ end }}
</div>
<div class="rightcolumn">
{{ $closeDivs := false }}
{{ $sandnamePlural := (slice) }}
{{ range $k, $v := $.Site.Data.sandpointsnamegraph }}
{{ $sandnamePlural = $sandnamePlural | append $v }}
{{ end }}
{{ $paramsKeys := (slice) }}
{{ range $k, $v := $currentNode.Params }}
{{ $paramsKeys = $paramsKeys | append $k }}
{{ end }}
{{ $mentions := intersect $paramsKeys $sandnamePlural }}
{{ range $mention := $mentions }}
{{ range $k, $m := index $currentNode.Params $mention }}
{{ $mentionLink := printf "/%s/%s" (substr $mention 0 -1) $m }}
{{- with $.GetPage $mentionLink -}}
{{ with not $k }}
{{ $closeDivs = true }}
<div class="has hasauthors">
<div class="hassup">{{ with (index $currentNode.Params $mention) }}{{ if gt (len (index $currentNode.Params $mention)) 1 }}{{ $mention }}{{ else }}{{ substr $mention 0 -1 }}{{ end }}{{ end }}</div>
<div class="afterhas">
{{ end }}
<div class="crust">
<a href="#{{ .File.LogicalName }}">{{ .Title }}</a>
</div>
{{ end }}
{{ end }}
{{ end }}
{{- with $closeDivs -}}</div></div>{{ end }}
{{ if and (not (eq $scratch.depth "crust")) $scratch.has_children }}
<div class="has hashas">
{{ with $scratch.has }}
<div class="hassup">has {{ $scratch.has }}</div>
{{ end }}
<div class="afterhas">
{{ range $scratch.has_children }}
{{ $authors := "" }}
{{ range $k, $authorLink := .Params.authors }}
{{ $authorPage := $.GetPage (printf "/author/%s" $authorLink) }}
{{ $prefix := ", " }}
{{ with not $k }}
{{ $prefix = "" }}
{{ end }}
{{ $authors = printf "%s%s" $prefix $authorPage.Title }}
{{ end }}
<div class="{{ $scratch.child_depth }} crustoc">
<a class="toc" href="#{{ .File.LogicalName }}"><span><span class="back">{{ .Title }} ({{ $authors }})</span></span></a>
</div>
{{ end }}
</div></div>
{{ end }}
{{ if eq $scratch.depth "crust" }}
<div class="has hasin">
<div class="hassup">in {{ index $scratch.in 1 }}</div>
<div class="afterhas">
{{ range $scratch.is_in }}
<div class="{{ substr $currentDir 0 -1 }}">
<a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a>
</div>
{{ end }}
</div></div>
{{ end }}
</div>
</div>
{{ with .Page.Params.abstract }}<div class="abstract"><span class="supt">abstract</span>{{ . | $.Page.RenderString | htmlUnescape | safeHTML }}</div>{{ end }}
{{- $vld := false -}}{{- range $k, $v := .Page.Params.keywords -}}{{- if eq $k 0 -}}{{- $vld = true -}}<div class="keywords"><span class="sup">keywords</span>{{- $v -}}{{- else -}},&nbsp;{{- $v -}}{{- end -}}{{- end -}}{{- with $vld -}}</div>{{- end -}}

@ -3,6 +3,14 @@
{{ $_ := newScratch }}
{{ $debug := (slice) }}
{{ $sandnameSingular := (slice) }}
{{ $sandnamePlural := (slice) }}
{{ range $k, $v := $.Site.Data.sandpointsnamegraph }}
{{ $sandnameSingular = $sandnameSingular | append $k }}
{{ $sandnamePlural = $sandnamePlural | append $v }}
{{ end }}
{{ $pPath := "" }}
{{ range $p := .Site.RegularPages }}
{{ $pPath = printf "/%s" $p.File }}
@ -23,16 +31,24 @@
{{ end }}
{{ end }}
{{ with $authors := $p.Params.authors }}
{{ range $author := $authors }}
{{ $authorLink := printf "/author/%s" $author }}
{{ with ($_.Get $authorLink) }}
{{ $_.SetInMap $authorLink "backlinks" (uniq ((index ($_.Get $authorLink) "backlinks") | append $p)) }}
{{ $paramsKeys := (slice) }}
{{ range $k, $v := $p.Params }}
{{ $paramsKeys = $paramsKeys | append $k }}
{{ end }}
{{ $mentions := intersect $paramsKeys $sandnamePlural }}
{{ range $mention := $mentions }}
{{ range $m := index $p.Params $mention }}
{{ $mentionLink := printf "/%s/%s" (substr $mention 0 -1) $m }}
{{ with ($_.Get $mentionLink) }}
{{ $p.Scratch.Add "links" (uniq (($p.Scratch.Get "links")| append ($.GetPage $mentionLink))) }}
{{ $_.SetInMap $mentionLink "backlinks" (uniq ((index ($_.Get $mentionLink) "backlinks") | append $p)) }}
{{ else }}
{{ $_.SetInMap $authorLink "backlinks" (slice $p) }}
{{ end }}
{{ end }}
{{ end }}
{{ $p.Scratch.Add "links" (uniq (($p.Scratch.Get "links")| append ($.GetPage $mentionLink))) }}
{{ $_.SetInMap $mentionLink "backlinks" (slice $p) }}
{{ end }}
{{ end }}
{{ end }}
{{ $gp := $.GetPage $pPath }}
{{ $gpPath := printf "/%s" $gp.File }}

@ -8,6 +8,8 @@
{{ $currentFile := (printf "/%s" .File) }}
{{ $scratch := $s.Get $currentFile }}
{{ $sandnamePlural := (slice) }}
<div class="{{ $scratch.depth | default "crust" }}title"><span class="supt">{{ substr $currentDir 0 -1 }}{{ substr .Title 0 1 }}</span>{{ substr .Title 1 }}</div></div>
<div class="grid">
@ -17,22 +19,36 @@
{{ end }}
</div>
<div class="rightcolumn">
{{- range $k, $v := .Page.Params.authors -}}
{{- with $.GetPage (printf "/author/%s" $v) -}}
{{- with not $k -}}
<div class="has hasauthors">
<div class="hassup">author{{ with $.Page.Params.authors }}{{ if gt (len .) 1 }}s{{ end }}{{ end }}</div>
<div class="afterhas">
{{ $closeDivs := false }}
{{ range $k, $v := $.Site.Data.sandpointsnamegraph }}
{{ $sandnamePlural = $sandnamePlural | append $v }}
{{ end }}
{{ $paramsKeys := (slice) }}
{{ range $k, $v := $currentNode.Params }}
{{ $paramsKeys = $paramsKeys | append $k }}
{{ end }}
{{ $mentions := intersect $paramsKeys $sandnamePlural }}
{{ range $mention := $mentions }}
{{ range $k, $m := index $currentNode.Params $mention }}
{{ $mentionLink := printf "/%s/%s" (substr $mention 0 -1) $m }}
{{- with $.GetPage $mentionLink -}}
{{- with not $k -}}
{{ $closeDivs = true }}
<div class="has hasauthors">
<div class="hassup">{{ with (index $currentNode.Params $mention) }}{{ if gt (len (index $currentNode.Params $mention)) 1 }}{{ $mention }}{{ else }}{{ substr $mention 0 -1 }}{{ end }}{{ end }}</div>
<div class="afterhas">
{{- end -}}
<div class="crust">
<a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a>
</div>
{{- end -}}
<div class="crust">
<a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a>
</div>
{{- end -}}
{{- end -}}
{{- with .Page.Params.authors -}}</div></div>{{- end -}}
{{ end }}
{{ end }}
{{- with $closeDivs -}}</div></div>{{ end }}
{{ if in .Page.Site.Params.sandpointsMentionedIn (substr $currentDir 0 -1) }}
<div class="has">
<div class="has hasmentionedin">
{{ with $scratch.backlinks }}
<div class="hassup">mentioned in</div>
{{ end }}
@ -46,7 +62,7 @@
{{ end }}
{{ if and (not (eq $scratch.depth "crust")) $scratch.has_children }}
<div class="has">
<div class="has hashas">
{{ with $scratch.has }}
<div class="hassup">has {{ $scratch.has }}</div>
{{ end }}
@ -60,7 +76,7 @@
{{ end }}
{{ if eq $scratch.depth "crust" }}
<div class="has">
<div class="has hasin">
<div class="hassup">in {{ index $scratch.in 1 }}</div>
<div class="afterhas">
{{ range $scratch.is_in }}
@ -74,8 +90,6 @@
</div>
{{ with .Page.Params.abstract }}<div class="journal"></div><div class="abstract"><span class="supt">abstract</span>{{ . | $.Page.RenderString | htmlUnescape | safeHTML }}</div>{{ end }}
{{ with .Page.Params.abstract }}<div class="abstract"><span class="supt">abstract</span>{{ . | $.Page.RenderString | htmlUnescape | safeHTML }}</div>{{ end }}
{{- $vld := false -}}{{- range $k, $v := .Page.Params.keywords -}}{{- if eq $k 0 -}}{{- $vld = true -}}<div
class="keywords"><span class="sup">keywords</span>{{- $v -}}{{- else -}},&nbsp;{{- $v -}}{{- end -}}{{- end -}}{{- with $vld -}}</div>{{- end -}}
{{ with .Page.Params.abstract }}</div>{{ end }}
{{- $vld := false -}}{{- range $k, $v := .Page.Params.keywords -}}{{- if eq $k 0 -}}{{- $vld = true -}}<div class="keywords"><span class="sup">keywords</span>{{- $v -}}{{- else -}},&nbsp;{{- $v -}}{{- end -}}{{- end -}}{{- with $vld -}}</div>{{- end -}}

@ -6,8 +6,6 @@
{{- partial "pagedjs.html" . -}}
</head>
<body>
<article>
{{- block "singlebody" . -}}{{- end -}}
</article>
</body>
</html>

@ -8,17 +8,50 @@
{{ $currentDir = .Dir }}
{{ end }}
<div class="print0">{{ partial "singlebody.html" $p }}</div>
<div class="content">{{ $p.Content }}
{{ range $printPage := $scratch.has_cildren }}
<div class="print1">{{ partial "singlebody.html" $printPage }}</div>
<div class="content">{{ $printPage.Content }}
{{ $printPageScratch := $s.Get (printf "/%s" $printPage.File) }}
{{ range $printPageKid := $printPageScratch.has_children }}
<div class="print2">{{ partial "singlebody.html" $printPageKid }}</div>
<div class="content">{{ $printPageKid.Content }}
{{ . }}
{{ end }}
</div>
<div class="print0">{{ partial "printsinglebody.html" $p }}</div>
<div class="content">{{ $p.Content }}</div>
{{ range $scratch.has_children }}
<div class="crustpage">
{{ $addS := len .Params.authors }}
{{ range $n, $authorFile := .Params.authors }}
{{ $author := $.GetPage (printf "/author/%s" $authorFile) }}
{{ if eq $n 0 }}
<div class="runningAuthors"><span class="sup">author{{ with (gt $addS 1) }}s{{ end }}</span><a href="#{{ $author.File.LogicalName }}">{{ $author.Title }}</a>
{{ else }}
, <a href="#{{ $author.File.LogicalName }}">{{ $author.Title }}</a>
{{ end }}
{{ end }}
{{ with .Params.authors }}</div>{{ end }}
{{ $tit := .Title }}
{{ if gt (len .Title) 54 }}
{{ $tit = printf "%s…" (substr .Title 0 50) }}
{{ end }}
<div class="runningTitle"><span class="sup">{{ index $scratch.crust 0 }}</span><a href="#{{ .File.LogicalName }}">{{ $tit }}</a></div>
{{ partial "printsinglebody.html" . }}
{{ .Content }}
{{ end }}
{{ range where $.Site.RegularPages "Section" "in" (slice "author" "editor") }}
<div class="authorpage">
<div class="runningTitle runningAuthors"><span class="sup">{{ index $scratch.mantle 0 }}</span><a href="#{{ $p.File.LogicalName }}">{{ $p.Title }}</a></div>
<div id="{{ .File.LogicalName }}" class="{{ $scratch.depth | default "crust" }}title"><span class="supt">{{ substr .File.Dir 0 -1 }}</span>{{ .Title }}</div>
{{ .Content }}
{{ if in .Page.Site.Params.sandpointsMentionedIn (substr .File.Dir 0 -1) }}
{{ $ss := $s.Get (printf "/%s" .File) }}
<div class="has hasmentionedin">
{{ with $ss }}
<div class="hassup">mentioned in</div>
{{ end }}
<div class="afterhas">
{{ range $ss.backlinks }}
<div class="{{ $ss.child_depth }}">
<a href="#{{ .File.LogicalName }}">{{ .Title }}</a>
</div>
{{ end }}
</div></div>
{{ end }}
{{ end }}
{{- end -}}

@ -5,102 +5,100 @@
<div id="toggleAllLinks" onclick="toggleAllLinks()">[toggle expand/collapse]</div>
<p></p>
{{ range $p := .Site.RegularPages }}
{{ with or ($p.Scratch.Get "urls") ($p.Scratch.Get "bibs") ($p.Scratch.Get "links") ($p.Scratch.Get "backlinks" )}}
<details><summary>{{ with $p.File }}<span class="sup">{{- substr .Dir 0 -1 -}}</span>{{ end }}<a href="{{ $p.RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ $p.Title }}</a></summary>
<details><summary>{{ with $p.File }}<span class="sup">{{- substr .Dir 0 -1 -}}</span>{{ end }}<a href="{{ $p.RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ $p.Title }}</a></summary>
{{ $pPath := printf "/%s" $p.File }}
{{ with $ss := $s.Get $pPath }}
{{ with $ss.backlinks }}
{{ range $i, $_ := $ss.backlinks }}
{{ if eq $i 0 }}
<details><summary>Mentioned in other Sandpoints pages ({{ len $ss.backlinks }}):</summary><ul>
{{ end }}
<li>{{ with $_.File }}<span class="sup">{{ substr .Dir 0 -1 }}</span>{{ end }}<a href="{{ $_.RelPermalink }}">{{ $_.Title }}</a></li>
{{ end }}
</ul></details>
{{ end }}
{{ end }}
{{ with ($p.Scratch.Get "links") }}
{{ range $i, $_ := ($p.Scratch.Get "links") }}
{{ $pPath := printf "/%s" $p.File }}
{{ with $ss := $s.Get $pPath }}
{{ with $ss.backlinks }}
{{ range $i, $_ := $ss.backlinks }}
{{ if eq $i 0 }}
<details><summary>Internal links to other Sandpoint pages ({{ len ($p.Scratch.Get "links") }}):</summary><ul>
<details><summary>Mentioned in other Sandpoints pages ({{ len $ss.backlinks }}):</summary><ul>
{{ end }}
<li>{{ with $_.File }}<span class="sup">{{ substr .Dir 0 -1 }}</span>{{ end }}<a href="{{ $_.RelPermalink }}">{{ $_.Title }}</a></li>
{{ end }}
</ul></details>
{{ end }}
{{ end }}
{{ $http_links := (slice) }}
{{ $library_links := (slice) }}
{{ $anchor_links := (slice) }}
{{ $other_links := (slice) }}
{{ with ($p.Scratch.Get "links") }}
{{ range $i, $_ := uniq ($p.Scratch.Get "links") }}
{{ if eq $i 0 }}
<details><summary>Internal links to other Sandpoint pages ({{ len (uniq ($p.Scratch.Get "links")) }}):</summary><ul>
{{ end }}
<li>{{ with $_.File }}<span class="sup">{{ substr .Dir 0 -1 }}</span>{{ end }}<a href="{{ $_.RelPermalink }}">{{ $_.Title }}</a></li>
{{ end }}
</ul></details>
{{ end }}
{{ with ($p.Scratch.Get "urls") }}
{{- $c_prefix := $p.Site.Params.sandpointsCatalogPrefix | default "/library/" -}}
{{ range $i, $_ := ($p.Scratch.Get "urls") }}
{{ if strings.HasPrefix $_ "http" }}
{{ $http_links = $http_links | append $_ }}
{{ else if strings.HasPrefix $_ $c_prefix }}
{{ $library_links = $library_links | append $_ }}
{{ else}}
{{ $other_links = $other_links | append $_ }}
{{ end }}
{{ $http_links := (slice) }}
{{ $library_links := (slice) }}
{{ $anchor_links := (slice) }}
{{ $other_links := (slice) }}
{{ with ($p.Scratch.Get "urls") }}
{{- $c_prefix := $p.Site.Params.sandpointsCatalogPrefix | default "/library/" -}}
{{ range $i, $_ := ($p.Scratch.Get "urls") }}
{{ if strings.HasPrefix $_ "http" }}
{{ $http_links = $http_links | append $_ }}
{{ else if strings.HasPrefix $_ $c_prefix }}
{{ $library_links = $library_links | append $_ }}
{{ else}}
{{ $other_links = $other_links | append $_ }}
{{ end }}
{{ end }}
{{ end }}
{{ with $http_links }}
{{ range $i, $_ := $http_links }}
{{ if eq $i 0 }}
<details><summary>Outgoing links to other pages on Internet ({{ len $http_links }}):</summary><ul>
{{ end }}
<li><span class="sup">www</span><a href="{{ $_ }}" target="_blank">{{ $_ }}</a></li>
{{ with $http_links }}
{{ range $i, $_ := $http_links }}
{{ if eq $i 0 }}
<details><summary>Outgoing links to other pages on Internet ({{ len $http_links }}):</summary><ul>
{{ end }}
</ul></details>
<li><span class="sup">www</span><a href="{{ $_ }}" target="_blank">{{ $_ }}</a></li>
{{ end }}
</ul></details>
{{ end }}
{{ with $library_links }}
{{ range $i, $_ := $library_links }}
{{ if eq $i 0 }}
<details><summary>Links to Sandpoint's library ({{ len $library_links }}):</summary><ul>
{{ end }}
<li><span class="sup">lib</span><a href="{{ $_ }}" target="_blank">{{ $_ }}</a></li>
{{ with $library_links }}
{{ range $i, $_ := $library_links }}
{{ if eq $i 0 }}
<details><summary>Links to Sandpoint's library ({{ len $library_links }}):</summary><ul>
{{ end }}
</ul></details>
<li><span class="sup">lib</span><a href="{{ $_ }}" target="_blank">{{ $_ }}</a></li>
{{ end }}
</ul></details>
{{ end }}
{{ with ($p.Scratch.Get "bibs") }}
{{ range $i, $_ := ($p.Scratch.Get "bibs") }}
{{ if eq $i 0 }}
<details><summary>Bibliographic references ({{ len ($p.Scratch.Get "bibs") }}):</summary><ul>
{{ end }}
<li><span class="sup">bib</span><a href="{{ index $_ 0 }}" target="_blank">{{ index $_ 1 }}</a></li>
{{ with ($p.Scratch.Get "bibs") }}
{{ range $i, $_ := ($p.Scratch.Get "bibs") }}
{{ if eq $i 0 }}
<details><summary>Bibliographic references ({{ len ($p.Scratch.Get "bibs") }}):</summary><ul>
{{ end }}
</ul></details>
<li><span class="sup">bib</span><a href="{{ index $_ 0 }}" target="_blank">{{ index $_ 1 }}</a></li>
{{ end }}
</ul></details>
{{ end }}
{{ with $other_links }}
{{ $formattingN := 0 }}
{{ $anchorN := 0 }}
{{ range $i, $_ := $other_links }}
{{ if eq $i 0 }}
<details><summary>Anchor, formatting and other links ({{ len $other_links }}):</summary><ul>
{{ end }}
{{ if strings.HasPrefix $_ "#" }}
{{ $anchorN = add $anchorN 1 }}
{{ else if strings.HasPrefix $_ "{"}}
{{ $formattingN = add $formattingN 1 }}
{{ else }}
<li><span class="sup">other</span><a href="{{ $_ }}" target="_blank">{{ $_ }}</a></li>
{{ end }}
{{ with $other_links }}
{{ $formattingN := 0 }}
{{ $anchorN := 0 }}
{{ range $i, $_ := $other_links }}
{{ if eq $i 0 }}
<details><summary>Anchor, formatting and other links ({{ len $other_links }}):</summary><ul>
{{ end }}
{{ if strings.HasPrefix $_ "#" }}
{{ $anchorN = add $anchorN 1 }}
{{ else if strings.HasPrefix $_ "{"}}
{{ $formattingN = add $formattingN 1 }}
{{ else }}
<li><span class="sup">other</span><a href="{{ $_ }}" target="_blank">{{ $_ }}</a></li>
{{ end }}
{{ with $formattingN }}<li>{{ $formattingN }} formatting links.</a></li>{{ end }}
{{ with $anchorN }}<li>{{ $anchorN }} anchor links.</a></li>{{ end }}
</ul></details>
{{ end }}
{{ with $formattingN }}<li>{{ $formattingN }} formatting links.</a></li>{{ end }}
{{ with $anchorN }}<li>{{ $anchorN }} anchor links.</a></li>{{ end }}
</ul></details>
{{ end }}
</details>
</details>
{{ end }}
{{ end }}
{{ end }}

@ -0,0 +1,231 @@
@page {
size: 156mm 234mm;
margin-bottom: 0.8in;
padding-bottom: 0.2in;
margin-top: 0.7in;
}
@page:left {
margin-right: 0.7in;
margin-left: 1in;
@bottom-left-corner {
content: counter(page);
font-size: 1rem;
vertical-align: text-top;
}
@bottom {
content: element(runningTitle);
position: relative;
}
}
@page:right {
margin-left: 0.7in;
margin-right: 1in;
@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;
}
.glosscontainer,
table,
table + p,
tr,
blockquote,
li {
break-inside: avoid;
}
.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;
}
.crustoc {
position: relative;
bottom: 0
}
.crustoc::after {
content: " . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . "" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . "" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . "" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ";
line-height: 0;
height: 1px;
position: absolute;
bottom: 10px;
z-index: -1;
}
a.toc {
display: grid;
grid-template-columns: 1fr auto;
align-items: flex-end;
}
a.toc span {
}
a.toc .back {
background: white;
}
a.toc::after {
text-align: right;
float: right;
content: target-counter(attr(href url), page, decimal-leading-zero);
background: white;
padding-left: 0.1rem;
}
}

@ -0,0 +1,58 @@
class RepeatingTableHeaders extends Paged.Handler {
constructor(chunker, polisher, caller) {
super(chunker, polisher, caller);
}
afterPageLayout(pageElement, page, breakToken, chunker) {
// Find all split table elements
let tables = pageElement.querySelectorAll("table[data-split-from]");
tables.forEach((table) => {
// There is an edge case where the previous page table
// has zero height (isn't visible).
// To avoid double header we will only add header if there is none.
let tableHeader = table.querySelector("thead");
if (tableHeader) {
return;
}
// Get the reference UUID of the node
let ref = table.dataset.ref;
// Find the node in the original source
let sourceTable = chunker.source.querySelector("[data-ref='" + ref + "']");
// Find if there is a header
let sourceHeader = sourceTable.querySelector("thead");
if (sourceHeader) {
console.log("Table header was cloned, because it is splitted.");
// Clone the header element
let clonedHeader = sourceHeader.cloneNode(true);
// Insert the header at the start of the split table
table.insertBefore(clonedHeader, table.firstChild);
}
});
// Find all tables
tables = pageElement.querySelectorAll("table");
// special case which might not fit for everyone
tables.forEach((table) => {
// if the table has no rows in body, hide it.
// This happens because my render engine creates empty tables.
let sourceBody = table.querySelector("tbody > tr");
if (!sourceBody) {
console.log("Table was hidden, because it has no rows in tbody.");
table.style.visibility = "hidden";
table.style.position = "absolute";
var lineSpacer = table.nextSibling;
if (lineSpacer) {
lineSpacer.style.visibility = "hidden";
lineSpacer.style.position = "absolute";
}
}
});
}
}
Paged.registerHandlers(RepeatingTableHeaders);

@ -1 +1 @@
# git.sandpoints.org/Drawwell/SandpointsTheme v0.0.0-20210105001316-eab38a9fcdf3
# git.sandpoints.org/Drawwell/SandpointsTheme v0.0.0-20210204230735-5d684c2faf6d

@ -69,6 +69,9 @@ disableKinds = ["RSS", "sitemap"]
[[module.imports.mounts]]
source = "customizations/Dotawo/static/css/site.min.css"
target = "static/css/site.min.css"
[[module.imports.mounts]]
source = "customizations/Dotawo/static/css/dyn.css"
target = "static/css/dyn.css"
[[module.imports.mounts]]
source = "customizations/Dotawo/layouts/partials/header.html"
target = "layouts/partials/header.html"

@ -0,0 +1,3 @@
---
title: "List of authors"
---

@ -0,0 +1,7 @@
---
title: Vincent W.J. van Gerven Oei
---
# Biography
Vincent W.J. van Gerven Oei is a publisher and philologist, specialized in Old Nubian. He is co-managing editor of *Dotawo: A Journal of Nubian Studies.*

@ -1,12 +1,9 @@
---
title: "Dotawo 7: Comparative Northern East Sudanic Linguistics"
authors: ["vincentwjvangervenoei.md"]
editors: ["vincentwjvangervenoei.md"]
has_articles: ["rilly.md", "norton.md", "jakobi.md", "starostin.md", "blench.md"]
---
![Dotawo 7 cover](../static/images/cover.jpg "Dotawo 7 cover")
# Preface by the Editor
## A New Platform

@ -0,0 +1,5 @@
---
title: "Issue 7 Print"
print: "issue/dotawo7.md"
draft: false
---
Loading…
Cancel
Save