!publish! internal pdf links
This commit is contained in:
parent
2e54465ed4
commit
788d2c86b2
11 changed files with 360 additions and 328 deletions
|
@ -317,10 +317,6 @@ ol li {
|
||||||
list-style-type: decimal;
|
list-style-type: decimal;
|
||||||
}
|
}
|
||||||
|
|
||||||
img {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.supt {
|
.supt {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
flex-wrap: nowrap;
|
flex-wrap: nowrap;
|
||||||
|
|
|
@ -29,12 +29,12 @@
|
||||||
{{- $session := $.Page.Site.GetPage (printf "/%s" (replace .Destination ":" "/")) -}}
|
{{- $session := $.Page.Site.GetPage (printf "/%s" (replace .Destination ":" "/")) -}}
|
||||||
{{ .Page.Scratch.Add "links" (slice $session) }}
|
{{ .Page.Scratch.Add "links" (slice $session) }}
|
||||||
{{- if not $text_link -}}
|
{{- 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>
|
<a printhref="#ph-{{- $session.File.UniqueID -}}" 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 -}}
|
{{- 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>
|
<a printhref="#ph-{{- $session.File.UniqueID -}}" 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 -}}
|
{{- end -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
<a href="{{- .Destination -}}/{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}">{{- $text_link -}}⦚<span>{{- .Destination -}} not found</span></a>
|
<a printhref="#ph-{{- $session.File.UniqueID -}}" href="{{- .Destination -}}/{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}">{{- $text_link -}}⦚<span>{{- .Destination -}} not found</span></a>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- else if strings.HasPrefix .Destination "audio:" -}}
|
{{- else if strings.HasPrefix .Destination "audio:" -}}
|
||||||
{{- $a_destination := (substr .Destination 6) -}}
|
{{- $a_destination := (substr .Destination 6) -}}
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -29,12 +29,12 @@
|
||||||
{{- $session := $.Page.Site.GetPage (printf "/%s" (replace .Destination ":" "/")) -}}
|
{{- $session := $.Page.Site.GetPage (printf "/%s" (replace .Destination ":" "/")) -}}
|
||||||
{{ .Page.Scratch.Add "links" (slice $session) }}
|
{{ .Page.Scratch.Add "links" (slice $session) }}
|
||||||
{{- if not $text_link -}}
|
{{- 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>
|
<a printhref="#ph-{{- $session.File.UniqueID -}}" 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 -}}
|
{{- 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>
|
<a printhref="#ph-{{- $session.File.UniqueID -}}" 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 -}}
|
{{- end -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
<a href="{{- .Destination -}}/{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}">{{- $text_link -}}⦚<span>{{- .Destination -}} not found</span></a>
|
<a printhref="#ph-{{- $session.File.UniqueID -}}" href="{{- .Destination -}}/{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}">{{- $text_link -}}⦚<span>{{- .Destination -}} not found</span></a>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- else if strings.HasPrefix .Destination "audio:" -}}
|
{{- else if strings.HasPrefix .Destination "audio:" -}}
|
||||||
{{- $a_destination := (substr .Destination 6) -}}
|
{{- $a_destination := (substr .Destination 6) -}}
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
{{ $currentFile := (printf "/%s" .File) }}
|
{{ $currentFile := (printf "/%s" .File) }}
|
||||||
{{ $scratch := $s.Get $currentFile }}
|
{{ $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 id="ph-{{ .File.UniqueID }}" class="{{ $scratch.depth | default "crust" }}title"><span class="supt">{{ substr $currentDir 0 -1 }}⁄</span>{{ .Title }}</div>
|
||||||
|
|
||||||
<div class="grid">
|
<div class="grid">
|
||||||
<div class="leftcolumn">
|
<div class="leftcolumn">
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
<div class="afterhas">
|
<div class="afterhas">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<div class="crust">
|
<div class="crust">
|
||||||
<a href="#{{ .File.LogicalName }}">{{ .Title }}</a>
|
<a href="#ph-{{ .File.UniqueID }}">{{ .Title }}</a>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -62,7 +62,7 @@
|
||||||
{{ $authors = printf "%s%s" $prefix $authorPage.Title }}
|
{{ $authors = printf "%s%s" $prefix $authorPage.Title }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<div class="{{ $scratch.child_depth }} crustoc">
|
<div class="{{ $scratch.child_depth }} crustoc">
|
||||||
<a class="toc" href="#{{ .File.LogicalName }}"><span><span class="back">{{ .Title }} ({{ $authors }})</span></span></a>
|
<a class="toc" href="#ph-{{ .File.UniqueID }}"><span><span class="back">{{ .Title }} {{with $authors}}({{ $authors }}){{ end }}</span></span></a>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div></div>
|
</div></div>
|
||||||
|
|
|
@ -74,13 +74,16 @@
|
||||||
|
|
||||||
{{ range $scratch.has_children }}
|
{{ range $scratch.has_children }}
|
||||||
<div class="crustpage">
|
<div class="crustpage">
|
||||||
{{ $addS := len .Params.authors }}
|
{{ $addS := 0 }}
|
||||||
|
{{ with .Params.authors }}
|
||||||
|
{{ $addS = len . }}
|
||||||
|
{{ end }}
|
||||||
{{ range $n, $authorFile := .Params.authors }}
|
{{ range $n, $authorFile := .Params.authors }}
|
||||||
{{ $author := $.GetPage (printf "/author/%s" $authorFile) }}
|
{{ $author := $.GetPage (printf "/author/%s" $authorFile) }}
|
||||||
{{ if eq $n 0 }}
|
{{ 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>
|
<div class="runningAuthors"><span class="sup">author{{ with (gt $addS 1) }}s{{ end }}⁄</span><a href="#ph-{{ $author.File.UniqueID }}">{{ $author.Title }}</a>
|
||||||
{{ else }}
|
{{ else }}
|
||||||
, <a href="#{{ $author.File.LogicalName }}">{{ $author.Title }}</a>
|
, <a href="#ph-{{ $author.File.UniqueID }}">{{ $author.Title }}</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ with .Params.authors }}</div>{{ end }}
|
{{ with .Params.authors }}</div>{{ end }}
|
||||||
|
@ -89,17 +92,44 @@
|
||||||
{{ if gt (len .Title) 54 }}
|
{{ if gt (len .Title) 54 }}
|
||||||
{{ $tit = printf "%s…" (substr .Title 0 50) }}
|
{{ $tit = printf "%s…" (substr .Title 0 50) }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<div class="runningTitle"><span class="sup">{{ index $scratch.crust 0 }}⁄</span><a href="#{{ .File.LogicalName }}">{{ $tit }}</a></div>
|
<div class="runningTitle"><span class="sup">{{ index $scratch.crust 0 }}⁄</span><a href="#ph-{{ .File.UniqueID }}">{{ $tit }}</a></div>
|
||||||
|
{{ partial "printsinglebody.html" . }}
|
||||||
|
{{ .Content }}
|
||||||
|
{{ $cssOutput = printf "%s\n%s" $cssOutput (replace $cssTemplate "_rplc_" .File.UniqueID) }}
|
||||||
|
{{ $cssHashes = printf "%s css-%s-h2" $cssHashes .File.UniqueID }}
|
||||||
|
{{ $kid := $s.Get (printf "/%s" .File) }}
|
||||||
|
{{ range $kid.has_children }}
|
||||||
|
<div class="crustpage">
|
||||||
|
{{ $addS := 0 }}
|
||||||
|
{{ with .Params.authors }}
|
||||||
|
{{ $addS = len . }}
|
||||||
|
{{ end }}
|
||||||
|
{{ 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="#ph-{{ $author.File.UniqueID }}">{{ $author.Title }}</a>
|
||||||
|
{{ else }}
|
||||||
|
, <a href="#ph-{{ $author.File.UniqueID }}">{{ $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="#ph-{{ .File.UniqueID }}">{{ $tit }}</a></div>
|
||||||
{{ partial "printsinglebody.html" . }}
|
{{ partial "printsinglebody.html" . }}
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
{{ $cssOutput = printf "%s\n%s" $cssOutput (replace $cssTemplate "_rplc_" .File.UniqueID) }}
|
{{ $cssOutput = printf "%s\n%s" $cssOutput (replace $cssTemplate "_rplc_" .File.UniqueID) }}
|
||||||
{{ $cssHashes = printf "%s css-%s-h2" $cssHashes .File.UniqueID }}
|
{{ $cssHashes = printf "%s css-%s-h2" $cssHashes .File.UniqueID }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{ range where $.Site.RegularPages "Section" "in" (slice "author" "editor") }}
|
{{ range where $.Site.RegularPages "Section" "in" (slice "author" "editor") }}
|
||||||
<div class="authorpage">
|
<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 class="runningTitle runningAuthors"><span class="sup">{{ index $scratch.mantle 0 }}⁄</span><a href="#ph-{{ $p.File.UniqueID }}">{{ $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>
|
<div id="ph-{{ .File.UniqueID }}" class="{{ $scratch.depth | default "crust" }}title"><span class="supt">{{ substr .File.Dir 0 -1 }}⁄</span>{{ .Title }}</div>
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
|
|
||||||
{{ if in .Page.Site.Params.sandpointsMentionedIn (substr .File.Dir 0 -1) }}
|
{{ if in .Page.Site.Params.sandpointsMentionedIn (substr .File.Dir 0 -1) }}
|
||||||
|
@ -111,7 +141,7 @@
|
||||||
<div class="afterhas">
|
<div class="afterhas">
|
||||||
{{ range $ss.backlinks }}
|
{{ range $ss.backlinks }}
|
||||||
<div class="{{ $ss.child_depth }}">
|
<div class="{{ $ss.child_depth }}">
|
||||||
<a href="#{{ .File.LogicalName }}">{{ .Title }}</a>
|
<a href="#ph-{{ .File.UniqueID }}">{{ .Title }}</a>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div></div>
|
</div></div>
|
||||||
|
|
|
@ -188,10 +188,7 @@
|
||||||
width: auto;
|
width: auto;
|
||||||
break-after: avoid;
|
break-after: avoid;
|
||||||
margin-bottom: 0.5rem;
|
margin-bottom: 0.5rem;
|
||||||
}
|
margin-left: 1rem;
|
||||||
|
|
||||||
img + strong del {
|
|
||||||
margin-left: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.crustoc {
|
.crustoc {
|
||||||
|
|
|
@ -29,6 +29,10 @@ class Sandpoints extends Paged.Handler {
|
||||||
beforeParsed(content) {
|
beforeParsed(content) {
|
||||||
var d = {};
|
var d = {};
|
||||||
content.querySelectorAll('*').forEach((n, i)=> {
|
content.querySelectorAll('*').forEach((n, i)=> {
|
||||||
|
if (n.hasAttribute("printhref")) {
|
||||||
|
n.setAttribute("href", n.getAttribute("printhref"))
|
||||||
|
}
|
||||||
|
|
||||||
if (n.classList.length > 0 ) {
|
if (n.classList.length > 0 ) {
|
||||||
n.classList.forEach((c, i)=>{
|
n.classList.forEach((c, i)=>{
|
||||||
if (c.startsWith("css-")) {
|
if (c.startsWith("css-")) {
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
# git.sandpoints.org/Drawwell/SandpointsTheme v0.0.0-20210206114614-2c21080f414b
|
# git.sandpoints.org/Drawwell/SandpointsTheme v0.0.0-20210209215842-6037aac2d81d
|
||||||
|
|
5
content/print/dotawoAll.md
Normal file
5
content/print/dotawoAll.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
title: "Whole Dotawo web site"
|
||||||
|
print: "journal/index.md"
|
||||||
|
draft: false
|
||||||
|
---
|
Loading…
Add table
Reference in a new issue