Parcourir la source

updating theme

master
Sean Dockray il y a 3 ans
Parent
révision
041395c415
8 fichiers modifiés avec 52 ajouts et 11 suppressions
  1. +29
    -1
      _vendor/git.sandpoints.org/Drawwell/SandpointsTheme/assets/js/sandpoints.js
  2. +2
    -2
      _vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/_default/_markup/render-image.html
  3. +1
    -1
      _vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/partials/sandpointjs.html
  4. +3
    -0
      _vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/partials/singlebody.html
  5. +13
    -5
      _vendor/git.sandpoints.org/Drawwell/SandpointsTheme/static/css/print.css
  6. +1
    -1
      _vendor/modules.txt
  7. +1
    -1
      go.mod
  8. +2
    -0
      go.sum

+ 29
- 1
_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/assets/js/sandpoints.js Voir le fichier

@@ -54,13 +54,41 @@ window.addEventListener("scroll", function (e) {
}
});

function editPage(repoJsId) {
let relPath = "../".repeat(relPathDepth - 1);
var el = document.createElement('script');
el.onload = ()=> {
console.log("loading...")
console.log(repo)
}
el.src = `${relPath}js/repo/${repoJsId}.js`
document.body.appendChild(el)
document.location.href = `${relPath}svedit/index.html#${repoJsId}`
ev}

window.addEventListener("keyup", (e)=> {
if (e.key == "e") {
editPage(sandpointsPageId)
}
})

window.addEventListener("DOMContentLoaded", (e) => {
document.querySelectorAll('.triadlink').forEach((i) => {
console.log(i)
i.addEventListener("click", (ev) => {
if (ev.ctrlKey) {
ev.preventDefault()
editPage(ev.target.getAttribute("repoid"))
}
})
})
let preview = document.querySelector("#preview");
if (
location.pathname.split("/").includes("_preview") ||
location.hash.startsWith("#/_edit")
) {
preview.style.display = "flex";
evpreview.style.display = "flex";
}

let par = document.querySelector(


+ 2
- 2
_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/_default/_markup/render-image.html Voir le fichier

@@ -29,9 +29,9 @@
{{- $session := $.Page.Site.GetPage (printf "/%s" (replace .Destination ":" "/")) -}}
{{ .Page.Scratch.Add "links" (slice $session) }}
{{- if not $text_link -}}
<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>
<a class="triadlink" repoid="{{- $session.File.UniqueID -}}" 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 -}}
<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>
<a class="triadlink" repoid="{{- $session.File.UniqueID -}}" 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 -}}
{{- else -}}
<a href="{{- .Destination -}}/{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}">{{- $text_link -}}⦚<span>{{- .Destination -}} not found</span></a>


+ 1
- 1
_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/partials/sandpointjs.html Voir le fichier

@@ -1,4 +1,4 @@
<script type="text/javascript">var relPathDepth = {{- .RelPermalink | strings.Count "/" -}};</script>
<script type="text/javascript">var relPathDepth = {{- .RelPermalink | strings.Count "/" -}};var sandpointsPageId = "{{- with .File -}}{{- .UniqueID -}}{{- end -}}";</script>
{{ $sjsopts := dict "targetPath" "js/sandpoints.js" "minify" "true"}}
{{ $sjs := resources.Get "js/sandpoints.js" | js.Build $sjsopts }}
<script defer src='{{ $sjs.RelPermalink }}' type="application/javascript"></script>

+ 3
- 0
_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/layouts/partials/singlebody.html Voir le fichier

@@ -93,3 +93,6 @@
{{ with .Page.Params.abstract }}<div class="abstract"><span class="supt">abstract⁄</span>{{ . | $.Page.RenderString | htmlUnescape | safeHTML }}</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 -}}

{{ $var := printf "repo={\"frontmatter\": %s, \"content\": %s, \"path\": \"%s\", \"relpermalink\": \"%s\"}" (jsonify .Params) (jsonify .RawContent) .File.Path .RelPermalink| resources.FromString (printf "js/repo/%s.js" .File.UniqueID) }}
{{ $dummy := $var.Permalink }}

+ 13
- 5
_vendor/git.sandpoints.org/Drawwell/SandpointsTheme/static/css/print.css Voir le fichier

@@ -6,8 +6,8 @@
}

@page:left {
margin-right: 0.6in;
margin-left: 1.1in;
margin-right: 0.8in;
margin-left: 0.9in;
@bottom-left-corner {
content: counter(page);
font-size: 1rem;
@@ -21,8 +21,8 @@
}

@page:right {
margin-left: 0.6in;
margin-right: 1.1in;
margin-left: 0.8in;
margin-right: 0.9in;
@bottom-right-corner {
content: counter(page);
font-size: 1rem;
@@ -56,7 +56,11 @@
padding: 0;
margin: 0;
}

.sup,
.hassup {
color: black;
}
.grid {
display: inline;
}
@@ -225,4 +229,8 @@
background: white;
padding-left: 0.1rem;
}
ol[data-split-from] {
padding-left: 0.5rem;
}
}

+ 1
- 1
_vendor/modules.txt Voir le fichier

@@ -1 +1 @@
# git.sandpoints.org/Drawwell/SandpointsTheme v0.0.0-20210219121445-3e058b4ebb35
# git.sandpoints.org/Drawwell/SandpointsTheme v0.0.0-20210328004009-992897b9cb1a

+ 1
- 1
go.mod Voir le fichier

@@ -2,4 +2,4 @@ module git.sandpoints.org/sean/MachineListening

go 1.15

require git.sandpoints.org/Drawwell/SandpointsTheme v0.0.0-20210219121445-3e058b4ebb35 // indirect
require git.sandpoints.org/Drawwell/SandpointsTheme v0.0.0-20210328004009-992897b9cb1a // indirect

+ 2
- 0
go.sum Voir le fichier

@@ -2,3 +2,5 @@ git.sandpoints.org/Drawwell/SandpointsTheme v0.0.0-20210216002744-19b7d5c22a12 h
git.sandpoints.org/Drawwell/SandpointsTheme v0.0.0-20210216002744-19b7d5c22a12/go.mod h1:VmIeeZ1BJRLjBO9x4d45BkYsYiwa/D0OrSNUglKTam4=
git.sandpoints.org/Drawwell/SandpointsTheme v0.0.0-20210219121445-3e058b4ebb35 h1:8njXT/9HNxrAzMJbOZQR5oKoYWAKGOA6p85aOVljWEo=
git.sandpoints.org/Drawwell/SandpointsTheme v0.0.0-20210219121445-3e058b4ebb35/go.mod h1:VmIeeZ1BJRLjBO9x4d45BkYsYiwa/D0OrSNUglKTam4=
git.sandpoints.org/Drawwell/SandpointsTheme v0.0.0-20210328004009-992897b9cb1a h1:++a2TBqFp/Zr24QhC29MDoBge+F0LdbfDmw66iBs4zk=
git.sandpoints.org/Drawwell/SandpointsTheme v0.0.0-20210328004009-992897b9cb1a/go.mod h1:VmIeeZ1BJRLjBO9x4d45BkYsYiwa/D0OrSNUglKTam4=

Chargement…
Annuler
Enregistrer