Browse Source

several theme updates

master
Sean Dockray 3 years ago
parent
commit
41ea193c3d
7 changed files with 50 additions and 34 deletions
  1. +3
    -1
      .gitignore
  2. +0
    -1
      custom_syadmin/git_hooks_post-receive.py
  3. +1
    -1
      static/css/site.css
  4. +3
    -3
      themes/sandpoints/assets/css/site.css
  5. +8
    -8
      themes/sandpoints/assets/js/sandpoints.js
  6. +31
    -16
      themes/sandpoints/layouts/partials/header.html
  7. +4
    -4
      themes/sandpoints/package-lock.json

+ 3
- 1
.gitignore View File

@@ -1,2 +1,4 @@
public
public/*
public/*
themes/sandpoints/node_modules
resources

+ 0
- 1
custom_syadmin/git_hooks_post-receive.py View File

@@ -9,7 +9,6 @@ python "D:\dev\websites\sandpoints-dev\custom_syadmin\git_hooks_post-receive.py"
--git_repo "D:\dev\websites\pirate-care-syllabus\gitea\gitea-repositories\gitea\pirate-care-syllabus.git" \
--website "D:\dev\websites\testing-ground\sandpoints" \
--website_preview "D:\dev\websites\testing-ground\sandpoints\_preview" \
--hugo_preview_url http://localhost:8000/_preview/ \
--library "D:\dev\websites\pirate-care-syllabus\_library" \
--tmp_dir "D:\tmp\tmp"
--oldrev $oldrev \


+ 1
- 1
static/css/site.css
File diff suppressed because it is too large
View File


+ 3
- 3
themes/sandpoints/assets/css/site.css View File

@@ -442,7 +442,7 @@ body {
z-index: 10;
}

.topicbar {
.mantlebar {
display: none;
}

@@ -725,10 +725,10 @@ h6:before {

h2.nocount:before, h3.nocount:before, h4.nocount:before, h5.nocount:before, h6.nocount:before { content: ""; counter-increment: none }

@media (max-width: 361px) {
@media (max-width: 415px) {
html {
box-sizing: border-box;
max-width: 360px;
max-width: 414px;
margin: 0 auto;
padding: 0;
}


+ 8
- 8
themes/sandpoints/assets/js/sandpoints.js View File

@@ -1,20 +1,20 @@
window.addEventListener('scroll', function(e) {
if (document.querySelector('body').clientWidth > 1024) {
let rightcolumn = document.querySelector('.rightcolumn');
let topicstitle = document.querySelector('.topicstitle')
let topicbar = document.querySelector('.topicbar')
let mantletitle = document.querySelector('.mantletitle') || document.querySelector('.crusttitle');
let mantlebar = document.querySelector('.mantlebar')
let grid = document.querySelector('.grid')
let gridrect = topicstitle.getBoundingClientRect();
let gridrect = mantletitle.getBoundingClientRect();
if (gridrect.top < 20 && !grid.classList.contains('moved')) {
grid.classList.add('moved');
topicbar.style.display = "inline";
topicstitle.style.visibility = "hidden";
mantlebar.style.display = "inline";
mantletitle.style.visibility = "hidden";
grid.style.display = "none";
window.scrollBy({top: grid.clientHeight + topicstitle.clientHeight, behavior: 'smooth'})
window.scrollBy({top: grid.clientHeight + mantletitle.clientHeight, behavior: 'smooth'})
} else if (gridrect.top > 21 && grid.classList.contains('moved')) {
grid.classList.remove('moved');
topicstitle.style.visibility = "visible";
topicbar.style.display = "none";
mantletitle.style.visibility = "visible";
mantlebar.style.display = "none";
grid.style.display = "grid";
window.scroll({top: 0, behavior: 'smooth'})
}


+ 31
- 16
themes/sandpoints/layouts/partials/header.html View File

@@ -1,30 +1,45 @@
{{ $currentSession := . }}

{{ $_ := newScratch }}
{{- range $k, $v := .Page.Site.Data.sandpointsnamegraph -}}
{{ if eq $currentSession.File.Dir (printf "%s/" $k) }}
{{ $_.Add "depth" (index $v "depth") }}
{{ if eq (index $v "depth") "mantle" }}
{{ $_.Add "home" (index $v "in" 0) }}
{{ end }}
{{ if eq (index $v "depth") "crust" }}
{{ $_.Add "home" (index (index $currentSession.Site.Data.sandpointsnamegraph (index $v "in" 0)) "in" 0) }}
{{ $_.Add "mantle" (index $v "in" 0) }}
{{ $_.Add "mantle_has" (index (index $currentSession.Site.Data.sandpointsnamegraph (index $v "in" 0)) "has" 1) }}
{{ end }}
{{ end }}
{{- 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 not .IsHome }}
<a href="{{ with $.GetPage $.Site.Params.home }}{{ .RelPermalink }}{{ end }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}"><span class="sup">{{ substr $.Site.Home.Title 0 1 }}</span><i>{{ substr $.Site.Home.Title 1 }}</i></a>
{{ if ne ($_.Get "depth") "core" }}
<a href="{{ with $currentSession.Site.GetPage (printf "/%s/index.md" ($_.Get "home")) }}{{ .RelPermalink }}{{ end }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}"><span class="sup">{{ with $currentSession.Site.GetPage (printf "/%s/index.md" ($_.Get "home")) }}{{ substr .Title 0 1 }}</span><i>{{ substr .Title 1 }}</i></a>{{ end }}
{{ end }}

{{ if eq .File.Dir "topic/" }}
<div class="topicbar"><i> » <a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a></i></div>
{{ if eq ($_.Get "depth") "mantle" }}
<span class="mantlebar"><i> » <a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a></i></span>
{{ end }}

{{ $.Scratch.Set "counter" 0 }}
{{ range where $.Site.RegularPages ".Section" "topic" }}
{{ if in .Params.has_sessions $currentSession.File.LogicalName }}
{{ $.Scratch.Set "counter" (add ($.Scratch.Get "counter") 1) }}
{{ if lt ($.Scratch.Get "counter") 2 }}
<span><i> » <a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a></i></span>
{{ end }}
{{ if eq ($_.Get "depth") "crust" }}
{{ $.Scratch.Set "counter" 0 }}
{{ range where $.Site.RegularPages ".Section" ($_.Get "mantle") }}
{{ if in (index .Params (printf "has_%s" ($_.Get "mantle_has"))) $currentSession.File.LogicalName }}
{{ $.Scratch.Set "counter" (add ($.Scratch.Get "counter") 1) }}
{{ if lt ($.Scratch.Get "counter") 2 }}
<span><i> » <a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a></i></span>
{{ end }}
{{ end }}
{{ end }}
{{ end }}

{{ if eq .File.Dir "session/" }}
<span class="topicbar"><i> » <a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a></i></span>
{{ end }}
<span class="mantlebar"><i> » <a href="{{ $currentSession.RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ $currentSession.Title }}</a></i></span>
{{ end }}
</div>
</div>

+ 4
- 4
themes/sandpoints/package-lock.json View File

@@ -919,7 +919,7 @@
"integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==",
"dev": true,
"requires": {
"has-flag": "3.0.0"
"has-flag": "^3.0.0"
}
}
}
@@ -950,8 +950,8 @@
"integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
"dev": true,
"requires": {
"@types/color-name": "1.1.1",
"color-convert": "2.0.1"
"@types/color-name": "^1.1.1",
"color-convert": "^2.0.1"
}
},
"chalk": {
@@ -970,7 +970,7 @@
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"requires": {
"color-name": "1.1.4"
"color-name": "~1.1.4"
}
},
"color-name": {


Loading…
Cancel
Save