diff --git a/themes/sandpoints/assets/css/player.min.css b/themes/sandpoints/assets/css/player.min.css new file mode 100644 index 0000000..0bb9d03 --- /dev/null +++ b/themes/sandpoints/assets/css/player.min.css @@ -0,0 +1 @@ +@-webkit-keyframes spin{from{-webkit-transform:rotate(0deg);opacity:.4}50%{-webkit-transform:rotate(180deg);opacity:1}to{-webkit-transform:rotate(360deg);opacity:.4}}@keyframes spin{from{transform:rotate(0deg);opacity:.2}50%{transform:rotate(180deg);opacity:1}to{transform:rotate(360deg);opacity:.2}}.soundcite-loaded{border-radius:6px;padding:0 5px;display:inline-block;cursor:pointer}.soundcite-loaded:before{display:inline-block;content:"";vertical-align:-10%;margin-right:.25em}.soundcite-loading:before{margin-right:.5em;font-size:.9em;position:relative;top:-.05em;height:.75em;width:.75em;border:2px solid #000;border-right-color:transparent;border-radius:50%;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite}.soundcite-play:before{font-size:.9em;position:relative;top:-.05em;border:.5em solid transparent;border-left:.75em solid #000}.soundcite-pause:before{font-size:.9em;position:relative;top:-.05em;height:1em;border-left:.75em double #000;border-right:.5em solid transparent} \ No newline at end of file diff --git a/themes/sandpoints/assets/css/site.css b/themes/sandpoints/assets/css/site.css index 5c3c7bd..cfe3688 100644 --- a/themes/sandpoints/assets/css/site.css +++ b/themes/sandpoints/assets/css/site.css @@ -432,6 +432,32 @@ body { color: black; } +.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; +} + +a.edit-button { + color:#fff; + text-decoration:none +} + +a.edit-button:hover { + text-decoration:underline; + -webkit-text-decoration-color:red; + text-decoration-color:white; + font-weight:500; + font-size:.97em; + cursor:pointer +} + .header { display: grid; grid-template-columns: auto; diff --git a/themes/sandpoints/assets/css/site.min.css b/themes/sandpoints/assets/css/site.min.css new file mode 100644 index 0000000..2512b34 --- /dev/null +++ b/themes/sandpoints/assets/css/site.min.css @@ -0,0 +1 @@ +/*!normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css*/html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:hidden;border-width:0}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}@font-face{font-family:vollkorn;font-style:italic;font-weight:500;src:url(../fonts/vollkorn-v12-latin-ext_latin-500italic.eot);src:local(''),url(../fonts/vollkorn-v12-latin-ext_latin-500italic.eot?#iefix)format('embedded-opentype'),url(../fonts/vollkorn-v12-latin-ext_latin-500italic.woff2)format('woff2'),url(../fonts/vollkorn-v12-latin-ext_latin-500italic.woff)format('woff'),url(../fonts/vollkorn-v12-latin-ext_latin-500italic.ttf)format('truetype'),url(../fonts/vollkorn-v12-latin-ext_latin-500italic.svg#Vollkorn)format('svg')}@font-face{font-family:vollkorn;font-style:normal;font-weight:400;src:url(../fonts/vollkorn-v12-latin-ext_latin-regular.eot);src:local(''),url(../fonts/vollkorn-v12-latin-ext_latin-regular.eot?#iefix)format('embedded-opentype'),url(../fonts/vollkorn-v12-latin-ext_latin-regular.woff2)format('woff2'),url(../fonts/vollkorn-v12-latin-ext_latin-regular.woff)format('woff'),url(../fonts/vollkorn-v12-latin-ext_latin-regular.ttf)format('truetype'),url(../fonts/vollkorn-v12-latin-ext_latin-regular.svg#Vollkorn)format('svg')}@font-face{font-family:vollkorn;font-style:normal;font-weight:500;src:url(../fonts/vollkorn-v12-latin-ext_latin-500.eot);src:local(''),url(../fonts/vollkorn-v12-latin-ext_latin-500.eot?#iefix)format('embedded-opentype'),url(../fonts/vollkorn-v12-latin-ext_latin-500.woff2)format('woff2'),url(../fonts/vollkorn-v12-latin-ext_latin-500.woff)format('woff'),url(../fonts/vollkorn-v12-latin-ext_latin-500.ttf)format('truetype'),url(../fonts/vollkorn-v12-latin-ext_latin-500.svg#Vollkorn)format('svg')}@font-face{font-family:vollkorn;font-style:italic;font-weight:400;src:url(../fonts/vollkorn-v12-latin-ext_latin-italic.eot);src:local(''),url(../fonts/vollkorn-v12-latin-ext_latin-italic.eot?#iefix)format('embedded-opentype'),url(../fonts/vollkorn-v12-latin-ext_latin-italic.woff2)format('woff2'),url(../fonts/vollkorn-v12-latin-ext_latin-italic.woff)format('woff'),url(../fonts/vollkorn-v12-latin-ext_latin-italic.ttf)format('truetype'),url(../fonts/vollkorn-v12-latin-ext_latin-italic.svg#Vollkorn)format('svg')}@font-face{font-family:great vibes;font-style:normal;font-weight:400;src:url(../fonts/great-vibes-v7-latin-ext_latin-regular.eot);src:local('Great Vibes'),local('GreatVibes-Regular'),url(../fonts/great-vibes-v7-latin-ext_latin-regular.eot?#iefix)format('embedded-opentype'),url(../fonts/great-vibes-v7-latin-ext_latin-regular.woff2)format('woff2'),url(../fonts/great-vibes-v7-latin-ext_latin-regular.woff)format('woff'),url(../fonts/great-vibes-v7-latin-ext_latin-regular.ttf)format('truetype'),url(../fonts/great-vibes-v7-latin-ext_latin-regular.svg#GreatVibes)format('svg')}body{font-family:vollkorn,serif;font-weight:400;max-width:1024px;font-size:1.4rem;padding-left:3rem;padding-top:.5rem;padding-right:2rem;color:#000}.headiter{display:flex;justify-content:space-between;background-color:red;color:#fff;padding-top:1rem;padding-bottom:.5rem;padding-left:1rem;padding-right:1rem;margin-bottom:1rem}a.edit-button{color:#fff;text-decoration:none}a.edit-button:hover{text-decoration:underline;-webkit-text-decoration-color:red;text-decoration-color:#fff;font-weight:500;font-size:.97em;cursor:pointer}.header{display:-ms-grid;display:grid;-ms-grid-columns:auto;grid-template-columns:auto;grid-auto-flow:column;position:-webkit-sticky;position:sticky;top:0;padding-top:.5rem;font-size:1.1rem;background-color:#fff;z-index:10}.mantlebar{display:none}.breadcrumbs{-ms-grid-column:1;grid-column:1}.bibliotheke{width:2.4rem;-ms-grid-column:2;grid-column:2;margin-left:auto}.bibliotheke:hover{text-decoration:none;font-size:1rem}.logolink{width:2.4rem;margin-left:auto}.sandpointlogo{border-radius:50%;border:.3em solid red;display:inline-flex;font-family:great vibes,cursive;font-size:1.2rem;font-weight:700;color:#fff;background-color:red;position:relative;padding-left:1em;padding-right:.3em;padding-bottom:1.2em;max-width:0;max-height:0}.sandpointF{position:absolute;font-size:1.2em;margin-top:-.2em;margin-left:-.4em}.sandpointN{position:absolute;font-size:.7em;margin-top:.4em;color:red;margin-left:-.5em}.sandpointC{position:absolute;font-size:1em;margin-left:-.37em}footer{display:flex;margin-bottom:1rem;margin-top:4rem}li{list-style-type:"› "}li[role=doc-endnote]{list-style-type:decimal}img{width:100%}.sup{display:inline-flex;flex-wrap:nowrap;font-family:great vibes,cursive;font-size:.9em;font-style:normal;color:red;vertical-align:baseline;position:relative;top:-.3em}.sup:hover{font-weight:400!important}.syllabustitle,.coretitle{margin-top:4rem;font-style:italic;font-size:4rem;margin-bottom:4rem}.mantletitle,.crusttitle{margin-top:4rem;font-style:italic;font-size:2rem;margin-bottom:4rem}.has,.afterhas{font-style:italic;font-size:1.4rem}.grid{padding-left:3rem;margin-bottom:4rem;display:-ms-grid;display:grid;-ms-grid-columns:1fr 1fr;grid-template-columns:1fr 1fr}.leftcolumn{-ms-grid-column:1;grid-column:1;padding-right:1.2rem;position:relative}#TableOfContents{margin-left:-2rem;margin-top:-1.5rem}#TableOfContents li{list-style:decimal inside;padding-left:.5rem;color:rgba(0,0,0,.4);margin:0;padding:0}#TableOfContents li a{font-family:vollkorn;font-size:1.4rem;font-weight:500;font-style:normal}#TableOfContents>ol:first-child>span>li>a::after{content:"¶";color:rgba(0,0,0,.2);font-size:1.3em;padding-left:.1em}.rightcolumn{-ms-grid-column:2;grid-column:2;display:-ms-grid;display:grid;-ms-grid-columns:auto 1fr;grid-template-columns:auto 1fr;padding-left:.5rem}.has{-ms-grid-column:1;grid-column:1}.content{margin-top:4rem;padding-left:3rem;padding-right:10rem;max-width:720px}a{color:#000;text-decoration:none}a:hover{text-decoration:underline;-webkit-text-decoration-color:red;text-decoration-color:red;font-weight:500;font-size:.97em;cursor:pointer}h1{display:none}h2{font-weight:500;font-size:1.6rem}h3{font-weight:500;font-size:1.4rem}h4{font-weight:500;font-size:1.2rem}h5{font-weight:500;font-size:1.1rem}h6{font-weight:500;font-size:1rem}blockquote{font-style:italic;border-left:1px red solid;padding-left:1rem;padding-right:2rem;padding-top:.1rem;padding-bottom:.1rem;background-color:#fff9f9}h2+p:first-letter{font-family:great vibes,cursive;color:rgba(0,0,0,.8);font-size:1.5em;line-height:0}.hx{position:relative}.hpar{position:absolute;font-size:1.7em;font-style:normal;color:rgba(0,0,0,.1);top:0;margin-top:-.4em}body{counter-reset:h2}h2{counter-reset:h3}h3{counter-reset:h4}h4{counter-reset:h5}h5{counter-reset:h6}h2:before{color:rgba(0,0,0,.4);counter-increment:h2;content:counter(h2)". "}h3:before{color:rgba(0,0,0,.4);counter-increment:h3;content:counter(h2)"." counter(h3)". "}h4:before{color:rgba(0,0,0,.4);counter-increment:h4;content:counter(h2)"." counter(h3)"." counter(h4)". "}h5:before{color:rgba(0,0,0,.4);counter-increment:h5;content:counter(h2)"." counter(h3)"." counter(h4)"." counter(h5)". "}h6:before{color:rgba(0,0,0,.4);counter-increment:h6;content:counter(h2)"." counter(h3)"." counter(h4)"." counter(h5)"." counter(h6)". "}h2.nocount:before,h3.nocount:before,h4.nocount:before,h5.nocount:before,h6.nocount:before{content:"";counter-increment:none}@media(max-width:767px){html{box-sizing:border-box;max-width:767px;margin:0 auto;padding:0}body{font-size:1rem;padding-left:10px;padding-right:10px}.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:.2em}.content{padding:0;margin:0 auto;margin-top:4rem}.hpar{display:none}.mantletitle{font-size:1.7rem}.sessiongrid{display:none}} \ No newline at end of file diff --git a/themes/sandpoints/assets/js/sandpoints.js b/themes/sandpoints/assets/js/sandpoints.js index 2befed9..d606907 100644 --- a/themes/sandpoints/assets/js/sandpoints.js +++ b/themes/sandpoints/assets/js/sandpoints.js @@ -9,7 +9,7 @@ window.addEventListener('scroll', function(e) { let grid = document.querySelector('.grid') let gridrect = mantletitle.getBoundingClientRect(); - if ((document.querySelector('body').clientHeight - (grid.clientHeight + mantle.clientHeight + 32)) < window.innerHeight) { + if ((document.querySelector('body').clientHeight - (grid.clientHeight + mantletitle.clientHeight + 32)) < window.innerHeight) { return } diff --git a/themes/sandpoints/config/_default/config.toml b/themes/sandpoints/config/_default/config.toml index e2dc0e1..82c40c3 100644 --- a/themes/sandpoints/config/_default/config.toml +++ b/themes/sandpoints/config/_default/config.toml @@ -8,6 +8,7 @@ disableKinds = ["RSS", "sitemap"] [params] description = "Network of activists, researchers and practitioners against the criminalisation of solidarity & for a common care infrastructure." images = ["/images/piratecaqre.png"] + giturl = "http://127.0.0.1:3333/Sandpoints/dev" title = "Pirate Care Syllabus" home = "/syllabus/" diff --git a/themes/sandpoints/layouts/_default/baseof.html b/themes/sandpoints/layouts/_default/baseof.html index dba12ab..b40d12a 100644 --- a/themes/sandpoints/layouts/_default/baseof.html +++ b/themes/sandpoints/layouts/_default/baseof.html @@ -1,23 +1,12 @@ -{{- $filePath := .File -}} -{{- $gitUrl := .Site.Params.giturl -}} - - {{- partial "head.html" . -}} - - {{ with .Site.Data.myvars.edit }} -
- edit_this - add_new_topic - add_new_session - publish - ? -
- {{ end }} - {{- partial "header.html" . -}} - {{$currentNode := . }} -

{{ .Title }}

- {{- block "main" . }}{{- end }} - {{- partial "footer.html" . -}} + + + {{- partialCached "head.html" . -}} + {{- partialCached "sandpointjs.html" . .RelPermalink -}} + + + {{- block "singlebody" . }}{{- end }} + {{- partialCached "footer.html" . -}} diff --git a/themes/sandpoints/layouts/_default/list.html b/themes/sandpoints/layouts/_default/list.html new file mode 100644 index 0000000..aa222a0 --- /dev/null +++ b/themes/sandpoints/layouts/_default/list.html @@ -0,0 +1,3 @@ + diff --git a/themes/sandpoints/layouts/_default/single.html b/themes/sandpoints/layouts/_default/single.html index e061b84..320630f 100644 --- a/themes/sandpoints/layouts/_default/single.html +++ b/themes/sandpoints/layouts/_default/single.html @@ -1,63 +1,52 @@ -{{ define "main" }} -{{$currentNode := . }} +{{- define "singlebody" -}} + +{{ $currentNode := . }} +{{ $currentDir := "" }} +{{ with .File }} + {{ $currentDir = .Dir }} +{{ end }} {{ range $k, $v := $.Site.Data.sandpointsnamegraph }} - {{ if eq (substr $currentNode.File.Dir 0 -1) $k }} + {{ if eq (substr $currentDir 0 -1) $k }} {{ $.Scratch.Set "plural" (index $v "plural") }} {{ $.Scratch.Set "depth" (index $v "depth") }} + + {{ if eq (index $v "depth") "core" }} + {{ $.Scratch.Add "core" $k }} + {{ $.Scratch.Add "mantle" (index $v "has" 0) }} + {{ $.Scratch.Add "crust" (index (index $currentNode.Site.Data.sandpointsnamegraph ($.Scratch.Get "mantle")) "has" 0) }} + {{ end }} + + {{ if eq (index $v "depth") "mantle" }} + {{ $.Scratch.Add "core" (index $v "in" 0) }} + {{ $.Scratch.Add "mantle" $k }} + {{ $.Scratch.Add "crust" (index $v "has" 0) }} + {{ end }} + + {{ if eq (index $v "depth") "crust" }} + {{ $.Scratch.Add "core" (index (index $currentNode.Site.Data.sandpointsnamegraph (index $v "in" 0)) "in" 0) }} + {{ $.Scratch.Add "mantle" (index $v "in" 0) }} + {{ $.Scratch.Add "crust" $k }} + {{ $.Scratch.Add "mantle_has" (index (index $currentNode.Site.Data.sandpointsnamegraph (index $v "in" 0)) "has" 1) }} + {{ end }} + {{ with index $v "in" }} {{ $.Scratch.Set "in" (index $v "in") }} {{ end }} + {{ with index $v "has" }} {{ $.Scratch.Set "has" (index $v "has") }} {{ end }} {{ end }} {{ end }} -
{{ substr .File.Dir 0 -1 }}⁄{{ substr .Title 0 1 }}{{ substr .Title 1 }}
+{{ $depth := $.Scratch.Get "depth" }} +{{- partialCached "header.html" . $depth .RelPermalink hugo.Environment -}} -
-
- {{ if ne (trim .Page.TableOfContents "\n") "" }} - {{ .Page.TableOfContents }} - {{ end }} -
-
- {{ if (not (eq ($.Scratch.Get "depth") "crust")) }} -
- has {{ index ($.Scratch.Get "has") 1 }}⁄ -
-
- {{ range index $currentNode.Params (printf "has_%s" (index ($.Scratch.Get "has") 1) )}} - {{ with $.GetPage (printf "%s%s" (printf "/%s/" (index ($.Scratch.Get "has") 0)) . ) }} - - {{ end }} - {{ end }} - {{ end }} +

{{ .Title }}

- {{ if eq ($.Scratch.Get "depth") "crust" }} -
- in {{ index ($.Scratch.Get "in") 1 }}⁄ -
-
- {{ range where $.Site.RegularPages ".Section" (index ($.Scratch.Get "in") 0) }} - {{ if in (index .Params (printf "has_%s" ($.Scratch.Get "plural"))) $currentNode.File.LogicalName }} - - {{ else if in $currentNode.Params.is_in .File.LogicalName }} - - {{ end }} - {{ end }} - {{ end }} -
-
-
+{{- partialCached "singlebody.html" . $depth .RelPermalink hugo.Environment -}}
{{ .Content }}
-{{ end }} +{{- end -}} diff --git a/themes/sandpoints/layouts/partials/css.html b/themes/sandpoints/layouts/partials/css.html deleted file mode 100644 index 809aaa1..0000000 --- a/themes/sandpoints/layouts/partials/css.html +++ /dev/null @@ -1,10 +0,0 @@ -{{ if (or (eq hugo.Environment "gitea") (eq hugo.Environment "preview") ) }} -{{ $sitemin := resources.Get "css/site.min.css" }} - - -{{ else if (or (eq hugo.Environment "offline") (.Site.IsServer)) }} - {{ $style := resources.Get "css/site.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 }} - -{{ end }} diff --git a/themes/sandpoints/layouts/partials/head.html b/themes/sandpoints/layouts/partials/head.html index 0053bdf..09609c7 100644 --- a/themes/sandpoints/layouts/partials/head.html +++ b/themes/sandpoints/layouts/partials/head.html @@ -1,46 +1,39 @@ - - - - - + + + + - {{ if .Description }} - - {{ end }} - {{ if .Keywords }} - - {{ end }} - {{ if .Params.Author }} - - {{ end }} +{{ if .Description }} + +{{ end }} +{{ if .Keywords }} + +{{ end }} +{{ if .Params.Author }} + +{{ end }} - {{ template "_internal/opengraph.html" . }} - {{ template "_internal/twitter_cards.html" . }} +{{ template "_internal/opengraph.html" . }} +{{ template "_internal/twitter_cards.html" . }} - {{ hugo.Generator }} +{{ hugo.Generator }} - - - - - + + + + + - {{ if (or (eq hugo.Environment "gitea") (eq hugo.Environment "preview") ) }} - {{ $sitemin := resources.Get "css/site.min.css" }} - - {{ $player := resources.Get "css/player.min.css" }} - - {{ else if (or (eq hugo.Environment "offline") (.Site.IsServer)) }} - {{ $style := resources.Get "css/site.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 }} - - {{ end }} +{{ if (or (eq hugo.Environment "gitea") (eq hugo.Environment "preview") ) }} + {{ $sitemin := resources.Get "css/site.min.css" }} + + {{ $player := resources.Get "css/player.min.css" }} + +{{ else if (or (eq hugo.Environment "offline") (.Site.IsServer)) }} + {{ $style := resources.Get "css/site.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 }} + +{{ end }} - - - {{ $sjsopts := dict "targetPath" "js/sandpoints.js" "minify" "true"}} - {{ $sjs := resources.Get "js/sandpoints.js" | js.Build $sjsopts }} - - {{ block "title" . }}{{- .Title }} - {{ .Site.Title -}}{{ end }} - +{{ block "title" . }}{{- .Title }} - {{ .Site.Title -}}{{ end }} diff --git a/themes/sandpoints/layouts/partials/header.html b/themes/sandpoints/layouts/partials/header.html index b40fca1..78de394 100644 --- a/themes/sandpoints/layouts/partials/header.html +++ b/themes/sandpoints/layouts/partials/header.html @@ -1,18 +1,15 @@ -{{ $currentSession := . }} +{{ $currentNode := . }} -{{- range $k, $v := .Page.Site.Data.sandpointsnamegraph -}} - {{ if eq $currentSession.File.Dir (printf "%s/" $k) }} - {{ $.Scratch.Add "depth" (index $v "depth") }} - {{ if eq (index $v "depth") "mantle" }} - {{ $.Scratch.Add "home" (index $v "in" 0) }} - {{ end }} - {{ if eq (index $v "depth") "crust" }} - {{ $.Scratch.Add "home" (index (index $currentSession.Site.Data.sandpointsnamegraph (index $v "in" 0)) "in" 0) }} - {{ $.Scratch.Add "mantle" (index $v "in" 0) }} - {{ $.Scratch.Add "mantle_has" (index (index $currentSession.Site.Data.sandpointsnamegraph (index $v "in" 0)) "has" 1) }} - {{ end }} - {{ end }} -{{- end -}} +{{- $gitUrl := .Site.Params.giturl -}} +{{ if eq hugo.Environment "preview" }} +
+ edit_this + add_new_{{ $.Scratch.Get "mantle" }} + add_new_{{ $.Scratch.Get "crust" }} + publish + ? +
+{{ end }}
@@ -20,7 +17,7 @@
diff --git a/themes/sandpoints/layouts/partials/sandpointjs.html b/themes/sandpoints/layouts/partials/sandpointjs.html new file mode 100644 index 0000000..d023ad6 --- /dev/null +++ b/themes/sandpoints/layouts/partials/sandpointjs.html @@ -0,0 +1,4 @@ + +{{ $sjsopts := dict "targetPath" "js/sandpoints.js" "minify" "true"}} +{{ $sjs := resources.Get "js/sandpoints.js" | js.Build $sjsopts }} + diff --git a/themes/sandpoints/layouts/partials/singlebody.html b/themes/sandpoints/layouts/partials/singlebody.html new file mode 100644 index 0000000..fdcf021 --- /dev/null +++ b/themes/sandpoints/layouts/partials/singlebody.html @@ -0,0 +1,49 @@ +{{ $currentNode := . }} +{{ $currentDir := "" }} +{{ with .File }} + {{ $currentDir = .Dir }} +{{ end }} + +
{{ substr $currentDir 0 -1 }}⁄{{ substr .Title 0 1 }}{{ substr .Title 1 }}
+ +
+
+ {{ if ne (trim .Page.TableOfContents "\n") "" }} + {{ .Page.TableOfContents }} + {{ end }} +
+
+ {{ if (not (eq ($.Scratch.Get "depth") "crust")) }} +
+ has {{ index ($.Scratch.Get "has") 1 }}⁄ +
+
+ {{ range index $currentNode.Params (printf "has_%s" (index ($.Scratch.Get "has") 1) )}} + {{ with $.GetPage (printf "%s%s" (printf "/%s/" (index ($.Scratch.Get "has") 0)) . ) }} + + {{ end }} + {{ end }} + {{ end }} + + {{ if eq ($.Scratch.Get "depth") "crust" }} +
+ in {{ index ($.Scratch.Get "in") 1 }}⁄ +
+
+ {{ range where $.Site.RegularPages ".Section" (index ($.Scratch.Get "in") 0) }} + {{ if in (index .Params (printf "has_%s" ($.Scratch.Get "plural"))) $currentNode.File.LogicalName }} + + {{ else if in $currentNode.Params.is_in .File.LogicalName }} + + {{ end }} + {{ end }} + {{ end }} +
+
+