@@ -433,26 +433,26 @@ body { | |||||
} | } | ||||
.headiter { | .headiter { | ||||
display: flex; | |||||
justify-content: space-between; | |||||
background-color: red; | |||||
color: white; | |||||
padding-top: 1rem; | |||||
padding-bottom: 0.5rem; | |||||
padding-left: 1rem; | |||||
padding-right:1rem; | |||||
margin-bottom: 1rem; | |||||
display:flex; | |||||
justify-content:space-between; | |||||
border-bottom: 0.3rem solid red; | |||||
border-top: 0.1rem solid red; | |||||
padding-top:1rem; | |||||
padding-bottom:.5rem; | |||||
padding-left:1rem; | |||||
padding-right:1rem; | |||||
margin-bottom:1rem | |||||
} | } | ||||
a.edit-button { | a.edit-button { | ||||
color:#fff; | |||||
color:#000; | |||||
text-decoration:none | text-decoration:none | ||||
} | } | ||||
a.edit-button:hover { | a.edit-button:hover { | ||||
text-decoration:underline; | text-decoration:underline; | ||||
-webkit-text-decoration-color:red; | -webkit-text-decoration-color:red; | ||||
text-decoration-color:white; | |||||
text-decoration-color:red; | |||||
font-weight:500; | font-weight:500; | ||||
font-size:.97em; | font-size:.97em; | ||||
cursor:pointer | cursor:pointer | ||||
@@ -29,7 +29,7 @@ | |||||
<link rel="stylesheet" href="{{ $sitemin.RelPermalink }}" /> | <link rel="stylesheet" href="{{ $sitemin.RelPermalink }}" /> | ||||
{{ $player := resources.Get "css/player.min.css" }} | {{ $player := resources.Get "css/player.min.css" }} | ||||
<link rel="stylesheet" href="{{ $player.RelPermalink }}" /> | <link rel="stylesheet" href="{{ $player.RelPermalink }}" /> | ||||
{{ else if (or (eq hugo.Environment "offline") (.Site.IsServer)) }} | |||||
{{ else if (eq hugo.Environment "development") }} | |||||
{{ $style := resources.Get "css/site.css" | postCSS (dict "config" "assets/css/postcss.config.js") | minify }} | {{ $style := resources.Get "css/site.css" | postCSS (dict "config" "assets/css/postcss.config.js") | minify }} | ||||
<link rel="stylesheet" href="{{ $style.RelPermalink }}" /> | <link rel="stylesheet" href="{{ $style.RelPermalink }}" /> | ||||
{{ $style := resources.Get "css/player.css" | postCSS (dict "config" "assets/css/postcss.config.js") | minify }} | {{ $style := resources.Get "css/player.css" | postCSS (dict "config" "assets/css/postcss.config.js") | minify }} | ||||
@@ -24,11 +24,11 @@ | |||||
{{ if eq hugo.Environment "preview" }} | {{ if eq hugo.Environment "preview" }} | ||||
{{- $gitUrl := .Site.Params.giturl -}} | {{- $gitUrl := .Site.Params.giturl -}} | ||||
<div class="headiter"> | <div class="headiter"> | ||||
<a class="edit-button" target="_blank" href="{{ $gitUrl }}/_edit/master/content/{{ .File }}">edit_this</a> | |||||
<a class="edit-button" target="_blank" href="{{ $gitUrl }}/_new/master/content/{{ $scratch.core }}/">add_new_{{ $scratch.core }}</a> | |||||
<a class="edit-button" target="_blank" href="{{ $gitUrl }}/_new/master/content/{{ $scratch.mantle }}/">add_new_{{ $scratch.mantle }}</a> | |||||
<a class="edit-button" target="_blank" href="{{ $gitUrl }}/_new/master/content/{{ $scratch.crust }}/">add_new_{{ $scratch.crust }}</a> | |||||
<a class="edit-button" target="_blank" href="{{ $gitUrl }}/_edit/master/PUBLISH.trigger.md">publish</a> | |||||
<a class="edit-button" target="_blank" href="{{ $gitUrl }}/_edit/master/content/{{ .File }}">EDIT_THIS</a> | |||||
<a class="edit-button" target="_blank" href="{{ $gitUrl }}/_new/master/content/{{ with $scratch.core }}{{ index . 0 }}{{ end }}/">ADD_{{ with $scratch.core }}{{ index . 0 | upper }}{{ end }}</a> | |||||
<a class="edit-button" target="_blank" href="{{ $gitUrl }}/_new/master/content/{{ with $scratch.mantle }}{{ index . 0 }}{{ end }}/">ADD_{{ with $scratch.mantle }}{{ index . 0 | upper }}{{ end }}</a> | |||||
<a class="edit-button" target="_blank" href="{{ $gitUrl }}/_new/master/content/{{ with $scratch.crust }}{{ index . 0 }}{{ end }}/">ADD_{{ with $scratch.crust }}{{ index . 0 | upper }}{{ end }}</a> | |||||
<a class="edit-button" target="_blank" href="{{ $gitUrl }}/_edit/master/PUBLISH.trigger.md">PUBLISH</a> | |||||
<a class="edit-button" target="_blank" href="{{ $gitUrl }}"> ? </a> | <a class="edit-button" target="_blank" href="{{ $gitUrl }}"> ? </a> | ||||
</div> | </div> | ||||
{{ end }} | {{ end }} | ||||
@@ -39,17 +39,29 @@ | |||||
</a> | </a> | ||||
<div class="breadcrumbs"> | <div class="breadcrumbs"> | ||||
{{ if eq $scratch.depth "mantle" }} | {{ if eq $scratch.depth "mantle" }} | ||||
{{ if isset $scratch "is_in" }} | |||||
{{ with gt (len $scratch.is_in) 1 }} | |||||
<div class="ddmenu"> | |||||
<input id="toggly0" type="checkbox"> | |||||
<label for="toggly0" tabindex="1"><span class="sup">cf. </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> {{ 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="sup">{{ with (index $scratch.is_in 0) }}{{ substr .Title 0 1 }}</span><i>{{ substr .Title 1 }}</i></a>{{ end }} | <a href="{{ with (index $scratch.is_in 0) }}{{ .RelPermalink }}{{ end }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}"><span class="sup">{{ with (index $scratch.is_in 0) }}{{ substr .Title 0 1 }}</span><i>{{ substr .Title 1 }}</i></a>{{ end }} | ||||
{{ end }} | |||||
{{ end }} | |||||
<span class="mantlebar"><i> » <a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a></i></span> | <span class="mantlebar"><i> » <a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a></i></span> | ||||
{{ end }} | |||||
{{ end }} | |||||
{{ if eq $scratch.depth "crust" }} | {{ if eq $scratch.depth "crust" }} | ||||
{{ with gt (len $is_in_is_in) 1 }} | {{ with gt (len $is_in_is_in) 1 }} | ||||
<div class="ddmenu"> | <div class="ddmenu"> | ||||
<input id="toggly1" type="checkbox"> | <input id="toggly1" type="checkbox"> | ||||
<label for="toggly1" tabindex="1"><span class="sup">cf. </span><a href="{{ with (index $scratch.is_in 0) }}{{ .RelPermalink }}{{ end }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ with (index $is_in_is_in 0) }}<i>{{ .Title }}</i></a> {{ end }}</label> | |||||
<label for="toggly1" tabindex="1"><span class="sup">cf. </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> {{ end }}</label> | |||||
<div class="hiddendiv"> | <div class="hiddendiv"> | ||||
<ul class="mt-4"> | <ul class="mt-4"> | ||||
{{ range after 1 $is_in_is_in }} | {{ range after 1 $is_in_is_in }} | ||||
@@ -32,14 +32,30 @@ | |||||
{{ with $gp.File }} | {{ with $gp.File }} | ||||
{{ $core := substr .Dir 0 -1 }} | {{ $core := substr .Dir 0 -1 }} | ||||
{{ $.Scratch.SetInMap $gpPath "core" $core }} | |||||
{{ $.Scratch.SetInMap $cpPath "core" $core }} | |||||
{{ if isset ($.Scratch.Get $gpPath) "core" }} | |||||
{{ $.Scratch.SetInMap $gpPath "core" (uniq ((index ($.Scratch.Get $gpPath) "core") | append $core)) }} | |||||
{{ else }} | |||||
{{ $.Scratch.SetInMap $gpPath "core" (slice $core) }} | |||||
{{ end }} | |||||
{{ if isset ($.Scratch.Get $cpPath) "core" }} | |||||
{{ $.Scratch.SetInMap $cpPath "core" (uniq ((index ($.Scratch.Get $cpPath) "core") | append $core)) }} | |||||
{{ else }} | |||||
{{ $.Scratch.SetInMap $cpPath "core" (slice $core) }} | |||||
{{ end }} | |||||
{{ end }} | {{ end }} | ||||
{{ with $cp.File }} | {{ with $cp.File }} | ||||
{{ $mantle := substr .Dir 0 -1 }} | {{ $mantle := substr .Dir 0 -1 }} | ||||
{{ $.Scratch.SetInMap $gpPath "mantle" $mantle }} | |||||
{{ $.Scratch.SetInMap $cpPath "mantle" $mantle }} | |||||
{{ if isset ($.Scratch.Get $gpPath) "mantle" }} | |||||
{{ $.Scratch.SetInMap $gpPath "mantle" (uniq ((index ($.Scratch.Get $gpPath) "mantle") | append $mantle)) }} | |||||
{{ else }} | |||||
{{ $.Scratch.SetInMap $gpPath "mantle" (slice $mantle) }} | |||||
{{ end }} | |||||
{{ if isset ($.Scratch.Get $cpPath) "mantle" }} | |||||
{{ $.Scratch.SetInMap $cpPath "mantle" (uniq ((index ($.Scratch.Get $cpPath) "mantle") | append $mantle)) }} | |||||
{{ else }} | |||||
{{ $.Scratch.SetInMap $cpPath "mantle" (slice $mantle) }} | |||||
{{ end }} | |||||
{{ end }} | {{ end }} | ||||
{{ with $.Scratch.Get $gpPath }} | {{ with $.Scratch.Get $gpPath }} | ||||
@@ -56,6 +72,16 @@ | |||||
{{ $.Scratch.SetInMap $cpPath "plural" $plur }} | {{ $.Scratch.SetInMap $cpPath "plural" $plur }} | ||||
{{ $.Scratch.SetInMap $cpPath "has" $scp }} | {{ $.Scratch.SetInMap $cpPath "has" $scp }} | ||||
{{ if isset $cp.Params $kcp }} | |||||
{{ $.Scratch.SetInMap $cpPath "has_children" (slice) }} | |||||
{{ if isset ($.Scratch.Get $cpPath) "is_in" }} | |||||
{{ $isincore := index ($.Scratch.Get $cpPath) "is_in" | append $gp}} | |||||
{{ $.Scratch.SetInMap $cpPath "is_in" (uniq $isincore) }} | |||||
{{ else }} | |||||
{{ $.Scratch.SetInMap $cpPath "is_in" (slice $gp) }} | |||||
{{ end }} | |||||
{{ end }} | |||||
{{ range index $cp.Params $kcp }} | {{ range index $cp.Params $kcp }} | ||||
{{ $gcp := $.GetPage (printf "/%s/%s" $sincp .) }} | {{ $gcp := $.GetPage (printf "/%s/%s" $sincp .) }} | ||||
{{ $gcpPath := printf "/%s" $gcp.File }} | {{ $gcpPath := printf "/%s" $gcp.File }} | ||||
@@ -67,24 +93,47 @@ | |||||
{{ else }} | {{ else }} | ||||
{{ $.Scratch.SetInMap $cpPath "has_children" (slice $gcp) }} | {{ $.Scratch.SetInMap $cpPath "has_children" (slice $gcp) }} | ||||
{{ end }} | {{ end }} | ||||
{{ if .is_in }} | |||||
{{ $isincore := index . "is_in" | append $gp}} | |||||
{{ $.Scratch.SetInMap $cpPath "is_in" (uniq $isincore) }} | |||||
{{ else }} | |||||
{{ $.Scratch.SetInMap $cpPath "is_in" (slice $gp) }} | |||||
{{ end }} | |||||
{{ end }} | {{ end }} | ||||
{{ $.Scratch.SetInMap $gcpPath "depth" "crust" }} | {{ $.Scratch.SetInMap $gcpPath "depth" "crust" }} | ||||
{{ $.Scratch.SetInMap $gcpPath "plural" $plurcp }} | {{ $.Scratch.SetInMap $gcpPath "plural" $plurcp }} | ||||
{{ $.Scratch.SetInMap $gcpPath "in" (slice $sin $plur) }} | {{ $.Scratch.SetInMap $gcpPath "in" (slice $sin $plur) }} | ||||
{{ with $gp.File }} | |||||
{{ $core := substr .Dir 0 -1 }} | |||||
{{ if isset ($.Scratch.Get $gcpPath) "core" }} | |||||
{{ $.Scratch.SetInMap $gcpPath "core" (uniq ((index ($.Scratch.Get $gcpPath) "core") | append $core)) }} | |||||
{{ else }} | |||||
{{ $.Scratch.SetInMap $gcpPath "core" (slice $core) }} | |||||
{{ end }} | |||||
{{ end }} | |||||
{{ with $cp.File }} | |||||
{{ $mantle := substr .Dir 0 -1 }} | |||||
{{ if isset ($.Scratch.Get $gcpPath) "mantle" }} | |||||
{{ $.Scratch.SetInMap $gcpPath "mantle" (uniq ((index ($.Scratch.Get $gcpPath) "mantle") | append $mantle)) }} | |||||
{{ else }} | |||||
{{ $.Scratch.SetInMap $gcpPath "mantle" (slice $mantle) }} | |||||
{{ end }} | |||||
{{ end }} | |||||
{{ with $gcp.File }} | {{ with $gcp.File }} | ||||
{{ $crust := substr .Dir 0 -1 }} | {{ $crust := substr .Dir 0 -1 }} | ||||
{{ $.Scratch.SetInMap $gpPath "crust" $crust }} | |||||
{{ $.Scratch.SetInMap $cpPath "crust" $crust }} | |||||
{{ $.Scratch.SetInMap $gcpPath "crust" $crust }} | |||||
{{ if isset ($.Scratch.Get $gpPath) "crust" }} | |||||
{{ $.Scratch.SetInMap $gpPath "crust" (uniq ((index ($.Scratch.Get $gpPath) "crust") | append $crust)) }} | |||||
{{ else }} | |||||
{{ $.Scratch.SetInMap $gpPath "crust" (slice $crust) }} | |||||
{{ end }} | |||||
{{ if isset ($.Scratch.Get $cpPath) "crust" }} | |||||
{{ $.Scratch.SetInMap $cpPath "crust" (uniq ((index ($.Scratch.Get $cpPath) "crust") | append $crust)) }} | |||||
{{ else }} | |||||
{{ $.Scratch.SetInMap $cpPath "crust" (slice $crust) }} | |||||
{{ end }} | |||||
{{ if isset ($.Scratch.Get $gcpPath) "crust" }} | |||||
{{ $.Scratch.SetInMap $gcpPath "crust" (uniq ((index ($.Scratch.Get $gcpPath) "crust") | append $crust)) }} | |||||
{{ else }} | |||||
{{ $.Scratch.SetInMap $gcpPath "crust" (slice $crust) }} | |||||
{{ end }} | |||||
{{ end }} | {{ end }} | ||||
{{ with $.Scratch.Get $gcpPath }} | {{ with $.Scratch.Get $gcpPath }} | ||||
@@ -8,15 +8,6 @@ | |||||
{{ $currentFile := (printf "/%s" .File) }} | {{ $currentFile := (printf "/%s" .File) }} | ||||
{{ $scratch := $s.Get $currentFile }} | {{ $scratch := $s.Get $currentFile }} | ||||
{{ $has_children := true }} | |||||
{{ if isset $scratch "has_children" }} | |||||
{{ if eq (len $scratch.has_children) 1 }} | |||||
{{ if not (index $scratch.has_children 0) }} | |||||
{{ $has_children = false }} | |||||
{{ end }} | |||||
{{ end }} | |||||
{{ end }} | |||||
<div class="{{ $scratch.depth }}title"><span class="sup">{{ substr $currentDir 0 -1 }}⁄{{ substr .Title 0 1 }}</span>{{ substr .Title 1 }}</div></div> | <div class="{{ $scratch.depth }}title"><span class="sup">{{ substr $currentDir 0 -1 }}⁄{{ substr .Title 0 1 }}</span>{{ substr .Title 1 }}</div></div> | ||||
<div class="grid"> | <div class="grid"> | ||||
@@ -26,7 +17,7 @@ | |||||
{{ end }} | {{ end }} | ||||
</div> | </div> | ||||
<div class="rightcolumn"> | <div class="rightcolumn"> | ||||
{{ if and ($has_children) (not (eq $scratch.depth "crust")) }} | |||||
{{ if and (not (eq $scratch.depth "crust")) $scratch.has_children }} | |||||
<div class="has"> | <div class="has"> | ||||
{{ if isset $scratch "has" }} | {{ if isset $scratch "has" }} | ||||
<span class="sup">has {{ $scratch.has }}⁄</span> | <span class="sup">has {{ $scratch.has }}⁄</span> | ||||