simplifying design...

This commit is contained in:
Marcell Mars 2020-12-18 15:02:50 +01:00
parent cd549ba763
commit aa9fb83435
22 changed files with 736 additions and 512 deletions

View file

@ -385,12 +385,12 @@ img {
font-weight: bold; font-weight: bold;
} }
#TableOfContents > ol:first-child > span > li > a::after { /* #TableOfContents > ol:first-child > span > li > a::after { */
content: "¶"; /* content: "¶"; */
color: rgba(0, 0, 0, 0.2); /* color: rgba(0, 0, 0, 0.2); */
font-size: 1.3em; /* font-size: 1.3em; */
padding-left: 0.1em; /* padding-left: 0.1em; */
} /* } */
.rightcolumn { .rightcolumn {
/* display: grid; /* display: grid;
@ -526,12 +526,13 @@ blockquote {
} }
.hpar { .hpar {
position: absolute; display: none;
font-size: 1.7em; /* position: absolute; */
font-style: normal; /* font-size: 1.7em; */
color: rgba(0, 0, 0, 0.1); /* font-style: normal; */
top: 0; /* color: rgba(0, 0, 0, 0.1); */
margin-top: -0.4em; /* top: 0; */
/* margin-top: -0.4em; */
} }
.smallcaps { .smallcaps {

View file

@ -0,0 +1,101 @@
{{ $s := partialCached "scratch.html" . }}
{{ $currentDir := "" }}
{{ with .File }}
{{ $currentDir = .Dir }}
{{ end }}
{{ $currentFile := (printf "/%s" .File) }}
{{ $scratch := $s.Get $currentFile }}
{{ $is_in_ := newScratch }}
{{ with eq $scratch.depth "crust" }}
{{ range $scratch.is_in }}
{{ range $k,$v := $s.Get (printf "/%s" .File) }}
{{ if eq $k "is_in" }}
{{ range $v }}
{{ $is_in_.Set (printf "/%s" .File) (printf "/%s" .File) }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ $is_in_is_in := (slice) }}
{{ range $is_in_.Values }}
{{ $is_in_is_in = $is_in_is_in | append ($.GetPage .) }}
{{ end }}
{{ if eq hugo.Environment "preview" }}
<div class="headiter">
<a class="edit-button" target="_blank" href="{{ $.Site.Params.sandpointsGiteaUrl }}/_edit/master/content/{{ .File }}">EDIT_THIS</a>
{{ with $scratch.core }}<a class="edit-button" target="_blank" href="{{ $.Site.Params.sandpointsGiteaUrl }}/_new/master/content/{{ index . 0 }}/">ADD_{{ index . 0 | upper }}</a>{{ end }}
{{ with $scratch.mantle }}<a class="edit-button" target="_blank" href="{{ $.Site.Params.sandpointsGiteaUrl }}/_new/master/content/{{ index . 0 }}/">ADD_{{ index . 0 | upper }}</a>{{ end }}
{{ with $scratch.crust }}<a class="edit-button" target="_blank" href="{{ $.Site.Params.sandpointsGiteaUrl }}/_new/master/content/{{ index . 0 }}/">ADD_{{ index . 0 | upper }}</a>{{ end }}
{{ if not $scratch.core }}<a class="edit-button" target="_blank" href="{{ $.Site.Params.sandpointsGiteaUrl }}/_new/master/content/{{ $currentDir }}">ADD_{{ substr $currentDir 0 -1 | upper }}</a>{{ end }}
<a class="edit-button" target="_blank" href="{{ $.Site.Params.sandpointsGiteaUrl }}/_edit/master/PUBLISH.trigger.md">PUBLISH</a>
<a class="edit-button" target="_blank" href="{{ $.Site.Params.sandpointsGiteaUrl }}"> ? </a>
</div>
{{ end }}
<div class="header">
<a title="{{ $.Site.Home.Title }}'s Bibliotheke" href="/library/BROWSE_LIBRARY.html" class="bibliotheke" target="_blank">
<img src="/images/bibliotheke.svg" />
</a>
<div class="breadcrumbs">
{{ if eq $scratch.depth "mantle" }}
{{ with gt (len $scratch.is_in) 1 }}
<div class="ddmenu">
<input id="toggly0" type="checkbox">
<label for="toggly0" tabindex="1"><span class="sup">cf.&nbsp;</span><a href="{{ with (index $scratch.is_in 0) }}{{ .RelPermalink }}{{ end }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ with index $scratch.is_in 0 }}<i>{{ .Title }}</i></a>&nbsp;{{ end }}</label>
<div class="hiddendiv">
<ul class="mt-4">
{{ range after 1 $scratch.is_in }}
<li><a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}"><i>{{ .Title }}</i></a></li>
{{ end }}
</ul>
</div>
</div>
{{ else }}
<a href="{{ with (index $scratch.is_in 0) }}{{ .RelPermalink }}{{ end }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}"><span class="supt">{{ with (index $scratch.is_in 0) }}</span><i>{{ .Title }}</i></a>{{ end }}
{{ end }}
<span class="mantlebar"><i> » <a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a></i></span>
{{ end }}
{{ if eq $scratch.depth "crust" }}
{{ with gt (len $is_in_is_in) 1 }}
<div class="ddmenu">
<input id="toggly1" type="checkbox">
<label for="toggly1" tabindex="1"><span class="sup">cf.&nbsp;</span><a href="{{ with (index $is_in_is_in 0) }}{{ .RelPermalink }}{{ end }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ with (index $is_in_is_in 0) }}<i>{{ .Title }}</i></a>&nbsp;{{ end }}</label>
<div class="hiddendiv">
<ul class="mt-4">
{{ range after 1 $is_in_is_in }}
<li><a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}"><i>{{ .Title }}</i></a></li>
{{ end }}
</ul>
</div>
</div>
{{ else }}
{{ $home := index $is_in_is_in 0 }}
<a href="{{ $home.RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}"><i>{{ $home.Title }}</i></a>
{{ end }}
{{ with gt (len $scratch.is_in) 1 }}
»&nbsp;
<div class="ddmenu">
<input id="toggly" type="checkbox">
<label for="toggly" tabindex="1"><span class="sup">cf.&nbsp;</span><a href="{{ with (index $scratch.is_in 0) }}{{ .RelPermalink }}{{ end }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ with (index $scratch.is_in 0) }}<i>{{ .Title }}</i></a>&nbsp;{{ end }}</label>
<div class="hiddendiv">
<ul class="mt-4">
{{ range after 1 $scratch.is_in }}
<li><a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}"><i>{{ .Title }}</i></a></li>
{{ end }}
</ul>
</div>
</div>
{{ else }}»&nbsp;<a href="{{ with (index $scratch.is_in 0) }}{{ .RelPermalink }}{{ end }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ with (index $scratch.is_in 0) }}<i>{{ .Title }}</i></a>{{ end }}
{{ end }}
<span class="mantlebar"><i> » <a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a></i></span>
{{ end }}
</div>
</div>

View file

@ -0,0 +1,81 @@
{{ $s := partialCached "scratch.html" . }}
{{ $currentNode := . }}
{{ $currentDir := "" }}
{{ with .File }}
{{ $currentDir = .Dir }}
{{ end }}
{{ $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>
<div class="grid">
<div class="leftcolumn">
{{ if ne (trim .Page.TableOfContents "\n") "<nav id=\"TableOfContents\"></nav>" }}
{{ .Page.TableOfContents }}
{{ 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">
{{- 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 -}}
{{ if in .Page.Site.Params.sandpointsMentionedIn (substr $currentDir 0 -1) }}
<div class="has">
{{ with $scratch.backlinks }}
<div class="hassup">mentioned in</div>
{{ end }}
<div class="afterhas">
{{ range $scratch.backlinks }}
<div class="{{ $scratch.child_depth }}">
<a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a>
</div>
{{ end }}
</div></div>
{{ end }}
{{ if and (not (eq $scratch.depth "crust")) $scratch.has_children }}
<div class="has">
{{ with $scratch.has }}
<div class="hassup">has {{ $scratch.has }}</div>
{{ end }}
<div class="afterhas">
{{ range $scratch.has_children }}
<div class="{{ $scratch.child_depth }}">
<a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a>
</div>
{{ end }}
</div></div>
{{ end }}
{{ if eq $scratch.depth "crust" }}
<div class="has">
<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="journal"></div><div class="abstract"><span class="supt">abstract</span>{{ . | markdownify }}</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 }}

File diff suppressed because one or more lines are too long

View file

@ -1,21 +1,20 @@
{{ define "singlebody" }} {{ define "singlebody" }}
{{ $currentNode := . }}
{{ $currentDir := "" }}
{{ with .File }}
{{ $currentDir = .Dir }}
{{ end }}
{{ $currentFile := (printf "/%s" .File) }}
{{ $currentNode := . }} <div class="coretitle"><span class="supt">Sitemap{{ substr $.Site.Title 0 1 }}</span>{{ substr $.Site.Title 1 }} ({{ $currentDir }})</div>
{{ $currentDir := "" }}
{{ with .File }}
{{ $currentDir = .Dir }}
{{ end }}
{{ $currentFile := (printf "/%s" .File) }}
<div class="coretitle"><span class="supt">Sitemap{{ substr $.Site.Title 0 1 }}</span>{{ substr $.Site.Title 1 }} ({{ $currentDir }})</div> {{ $s := partialCached "scratch.html" . }}
{{ $noTriad := (slice) }}
{{ $s := partialCached "scratch.html" . }} {{ range $p := .Site.RegularPages }}
{{ $noTriad := (slice) }} {{ $scratch := $s.Get (printf "/%s" $p.File) }}
{{ range $p := .Site.RegularPages }} {{ if eq $scratch.depth "core" }}
{{ $scratch := $s.Get (printf "/%s" $p.File) }} <div class="sitemap" ><div class="{{ with $p.File }}{{ if eq $currentDir .Dir }}highline{{ end }}{{ end }}"><a href="{{- $p.RelPermalink -}}{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}"{{- with $p.Title}} title="{{- $p.Title -}}"{{- end -}}><span class="sup">{{- substr $p.File.Dir 0 -1 -}}</span>{{- $p.Title -}}</a></div>
{{ if eq $scratch.depth "core" }}
<div class="sitemap" ><div class="{{ with $p.File }}{{ if eq $currentDir .Dir }}highline{{ end }}{{ end }}"><a href="{{- $p.RelPermalink -}}{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}"{{- with $p.Title}} title="{{- $p.Title -}}"{{- end -}}><span class="sup">{{- substr $p.File.Dir 0 -1 -}}</span>{{- $p.Title -}}</a></div>
{{ range $coreKid := $scratch.has_children }} {{ range $coreKid := $scratch.has_children }}
<div class="sitemap"><a href="{{- $coreKid.RelPermalink -}}{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}"{{- with $coreKid.Title}} title="{{- $coreKid.Title -}}"{{- end -}}><div class="{{ with $coreKid.File }}{{ if eq $currentDir .Dir }}highline{{ end }}{{ end }}"><span class="sup">{{- substr $coreKid.File.Dir 0 -1 -}}</span>{{- $coreKid.Title -}}</a></div> <div class="sitemap"><a href="{{- $coreKid.RelPermalink -}}{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}"{{- with $coreKid.Title}} title="{{- $coreKid.Title -}}"{{- end -}}><div class="{{ with $coreKid.File }}{{ if eq $currentDir .Dir }}highline{{ end }}{{ end }}"><span class="sup">{{- substr $coreKid.File.Dir 0 -1 -}}</span>{{- $coreKid.Title -}}</a></div>
{{ $scratchCKid := $s.Get (printf "/%s" $coreKid.File) }} {{ $scratchCKid := $s.Get (printf "/%s" $coreKid.File) }}

View file

@ -1,11 +1,6 @@
{{- define "singlebody" -}} {{- define "singlebody" -}}
{{- partialCached "header.html" . .RelPermalink -}}
{{- partialCached "header.html" . .RelPermalink -}} <h1>{{ .Title }}</h1>
{{- partialCached "singlebody.html" . .RelPermalink -}}
<h1>{{ .Title }}</h1> <div class="content">{{ .Content }}</div>
{{- partialCached "singlebody.html" . .RelPermalink -}}
<div class="content">{{ .Content }}</div>
{{- end -}} {{- end -}}

View file

@ -4,13 +4,15 @@
<meta name="theme-color" content="#ffffff"> <meta name="theme-color" content="#ffffff">
{{ if .Description }} {{ if .Description }}
<meta name="description" content="{{ .Description }}" /> <meta name="description" content="{{ .Description }}" />
{{ end }} {{ end }}
{{ if .Keywords }} {{ if .Keywords }}
<meta name="keywords" content="{{ delimit .Keywords "," }}" /> <meta name="keywords" content="{{ delimit .Keywords "," }}" />
{{ end }} {{ end }}
{{ if .Params.Author }} {{ if .Params.Author }}
<meta name="author" content="{{ .Params.Author}}" /> <meta name="author" content="{{ .Params.Author}}" />
{{ end }} {{ end }}
{{ template "_internal/opengraph.html" . }} {{ template "_internal/opengraph.html" . }}

View file

@ -180,7 +180,7 @@
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ $_.SetInMap $pPath "debug" (printf "%#v" $debug) }} {{ $_.SetInMap $pPath "debug" (printf "%#v" $debug) }}
{{ end }} {{ end }}
{{ return $_ }} {{ return $_ }}

View file

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="{{ with .Site.LanguageCode }}{{ . }}{{- else -}}en-us{{- end -}}">
<head>
{{- partialCached "head.html" . -}}
{{- partial "pagedjs.html" . -}}
</head>
<body>
<article>
{{- block "singlebody" . -}}{{- end -}}
</article>
</body>
</html>

View file

@ -0,0 +1,24 @@
{{- define "singlebody" -}}
{{ $s := partialCached "scratch.html" . }}
{{ $p := $.GetPage .Params.print }}
{{ $scratch := $s.Get (printf "/%s" $p.File) }}
{{ $currentDir := "" }}
{{ with .File }}
{{ $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>
{{ end }}
{{- end -}}

View file

@ -8,8 +8,10 @@ description = "Sandpoints Theme"
homepage = "https://git.sandpoints.org/Drawwell/Sandpoints" homepage = "https://git.sandpoints.org/Drawwell/Sandpoints"
tags = ["syllabus"] tags = ["syllabus"]
features = [] features = []
min_version = "0.41" min_version = "0.79.0"
[author] authors = [
name = "marcell mars" {name = "Marcell Mars", homepage = "https://git.sandpoints.org"},
homepage = "https://ki.ber.kom.uni.st" {name = "Sean Dockray", homepage = "https://git.sandpoints.org"},
{name = "Vincent W.J. van Gerven Oei", homepage = "http://www.vangervenoei.com"}
]

View file

@ -1 +1 @@
# git.sandpoints.org/Drawwell/SandpointsTheme v0.0.0-20201214024649-d07052efd534 # git.sandpoints.org/Drawwell/SandpointsTheme v0.0.0-20201218140110-4732c15fd7b6

View file

@ -6,6 +6,7 @@ disableKinds = ["RSS", "sitemap"]
[taxonomies] [taxonomies]
keyword = "keywords" keyword = "keywords"
[params] [params]
description = "Some description should land here...." description = "Some description should land here...."
images = ["/UNS-logo.png"] images = ["/UNS-logo.png"]
@ -68,3 +69,9 @@ disableKinds = ["RSS", "sitemap"]
[[module.imports.mounts]] [[module.imports.mounts]]
source = "customizations/Dotawo/static/css/site.min.css" source = "customizations/Dotawo/static/css/site.min.css"
target = "static/css/site.min.css" target = "static/css/site.min.css"
[[module.imports.mounts]]
source = "customizations/Dotawo/layouts/partials/header.html"
target = "layouts/partials/header.html"
[[module.imports.mounts]]
source = "customizations/Dotawo/layouts/partials/singlebody.html"
target = "layouts/partials/singlebody.html"