diff --git a/customizations/Dotawo/assets/css/site.css b/customizations/Dotawo/assets/css/site.css index b4c1812..52ccedf 100644 --- a/customizations/Dotawo/assets/css/site.css +++ b/customizations/Dotawo/assets/css/site.css @@ -317,10 +317,6 @@ ol li { list-style-type: decimal; } -img { - width: 100%; -} - .supt { display: inline-flex; flex-wrap: nowrap; diff --git a/customizations/Dotawo/layouts/_default/_markup/render-image.html b/customizations/Dotawo/layouts/_default/_markup/render-image.html index bf81236..6e23020 100644 --- a/customizations/Dotawo/layouts/_default/_markup/render-image.html +++ b/customizations/Dotawo/layouts/_default/_markup/render-image.html @@ -29,12 +29,12 @@ {{- $session := $.Page.Site.GetPage (printf "/%s" (replace .Destination ":" "/")) -}} {{ .Page.Scratch.Add "links" (slice $session) }} {{- if not $text_link -}} - {{- index (split .Destination ":") 0 -}}⁄{{- $session.Title -}} + {{- index (split .Destination ":") 0 -}}⁄{{- $session.Title -}} {{- else -}} - {{- index (split .Destination ":") 0 -}}⁄{{- $text_link -}} + {{- index (split .Destination ":") 0 -}}⁄{{- $text_link -}} {{- end -}} {{- else -}} - {{- $text_link -}}⦚{{- .Destination -}} not found + {{- $text_link -}}⦚{{- .Destination -}} not found {{- end -}} {{- else if strings.HasPrefix .Destination "audio:" -}} {{- $a_destination := (substr .Destination 6) -}} diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html index 96ebc30..37f740c 100644 --- a/layouts/_default/_markup/render-image.html +++ b/layouts/_default/_markup/render-image.html @@ -29,12 +29,12 @@ {{- $session := $.Page.Site.GetPage (printf "/%s" (replace .Destination ":" "/")) -}} {{ .Page.Scratch.Add "links" (slice $session) }} {{- if not $text_link -}} - {{- index (split .Destination ":") 0 -}}⁄{{- $session.Title -}} + {{- index (split .Destination ":") 0 -}}⁄{{- $session.Title -}} {{- else -}} - {{- index (split .Destination ":") 0 -}}⁄{{- $text_link -}} + {{- index (split .Destination ":") 0 -}}⁄{{- $text_link -}} {{- end -}} {{- else -}} - {{- $text_link -}}⦚{{- .Destination -}} not found + {{- $text_link -}}⦚{{- .Destination -}} not found {{- end -}} {{- else if strings.HasPrefix .Destination "audio:" -}} {{- $a_destination := (substr .Destination 6) -}} diff --git a/layouts/partials/printsinglebody.html b/layouts/partials/printsinglebody.html index 007034a..977f14b 100644 --- a/layouts/partials/printsinglebody.html +++ b/layouts/partials/printsinglebody.html @@ -8,7 +8,7 @@ {{ $currentFile := (printf "/%s" .File) }} {{ $scratch := $s.Get $currentFile }} -
{{ substr $currentDir 0 -1 }}⁄{{ .Title }}
+
{{ substr $currentDir 0 -1 }}⁄{{ .Title }}
@@ -38,7 +38,7 @@
{{ end }} {{ end }} {{ end }} @@ -62,7 +62,7 @@ {{ $authors = printf "%s%s" $prefix $authorPage.Title }} {{ end }} {{ end }}
diff --git a/layouts/print/single.html b/layouts/print/single.html index 1468638..eaeac2b 100644 --- a/layouts/print/single.html +++ b/layouts/print/single.html @@ -81,9 +81,9 @@ {{ range $n, $authorFile := .Params.authors }} {{ $author := $.GetPage (printf "/author/%s" $authorFile) }} {{ if eq $n 0 }} -
author{{ with (gt $addS 1) }}s{{ end }}⁄{{ $author.Title }} +
author{{ with (gt $addS 1) }}s{{ end }}⁄{{ $author.Title }} {{ else }} - , {{ $author.Title }} + , {{ $author.Title }} {{ end }} {{ end }} {{ with .Params.authors }}
{{ end }} @@ -92,7 +92,7 @@ {{ if gt (len .Title) 54 }} {{ $tit = printf "%s…" (substr .Title 0 50) }} {{ end }} -
{{ index $scratch.crust 0 }}⁄{{ $tit }}
+
{{ index $scratch.crust 0 }}⁄{{ $tit }}
{{ partial "printsinglebody.html" . }} {{ .Content }} {{ $cssOutput = printf "%s\n%s" $cssOutput (replace $cssTemplate "_rplc_" .File.UniqueID) }} @@ -107,9 +107,9 @@ {{ range $n, $authorFile := .Params.authors }} {{ $author := $.GetPage (printf "/author/%s" $authorFile) }} {{ if eq $n 0 }} -
author{{ with (gt $addS 1) }}s{{ end }}⁄{{ $author.Title }} +
author{{ with (gt $addS 1) }}s{{ end }}⁄{{ $author.Title }} {{ else }} - , {{ $author.Title }} + , {{ $author.Title }} {{ end }} {{ end }} {{ with .Params.authors }}
{{ end }} @@ -118,7 +118,7 @@ {{ if gt (len .Title) 54 }} {{ $tit = printf "%s…" (substr .Title 0 50) }} {{ end }} -
{{ index $scratch.crust 0 }}⁄{{ $tit }}
+
{{ index $scratch.crust 0 }}⁄{{ $tit }}
{{ partial "printsinglebody.html" . }} {{ .Content }} {{ $cssOutput = printf "%s\n%s" $cssOutput (replace $cssTemplate "_rplc_" .File.UniqueID) }} @@ -128,8 +128,8 @@ {{ range where $.Site.RegularPages "Section" "in" (slice "author" "editor") }}
-
{{ index $scratch.mantle 0 }}⁄{{ $p.Title }}
-
{{ substr .File.Dir 0 -1 }}⁄{{ .Title }}
+
{{ index $scratch.mantle 0 }}⁄{{ $p.Title }}
+
{{ substr .File.Dir 0 -1 }}⁄{{ .Title }}
{{ .Content }} {{ if in .Page.Site.Params.sandpointsMentionedIn (substr .File.Dir 0 -1) }} @@ -141,7 +141,7 @@
{{ range $ss.backlinks }} {{ end }}
diff --git a/static/css/print.css b/static/css/print.css index 2abfe41..b969d4c 100644 --- a/static/css/print.css +++ b/static/css/print.css @@ -188,10 +188,7 @@ width: auto; break-after: avoid; margin-bottom: 0.5rem; - } - - img + strong del { - margin-left: 0; + margin-left: 1rem; } .crustoc { diff --git a/static/js/pagedjsCustomizations.js b/static/js/pagedjsCustomizations.js index 0871eef..e494029 100644 --- a/static/js/pagedjsCustomizations.js +++ b/static/js/pagedjsCustomizations.js @@ -29,6 +29,10 @@ class Sandpoints extends Paged.Handler { beforeParsed(content) { var d = {}; content.querySelectorAll('*').forEach((n, i)=> { + if (n.hasAttribute("printhref")) { + n.setAttribute("href", n.getAttribute("printhref")) + } + if (n.classList.length > 0 ) { n.classList.forEach((c, i)=>{ if (c.startsWith("css-")) {