mirror of
https://github.com/jbowdre/runtimeterror.git
synced 2024-11-25 00:12:18 +00:00
Compare commits
No commits in common. "5babcd07ba955be689b284e045b5ff6ed3acfbec" and "d21051a781e56fbee1dcee99248ec4f3dece9710" have entirely different histories.
5babcd07ba
...
d21051a781
7 changed files with 11 additions and 21 deletions
|
@ -1 +0,0 @@
|
||||||
"use strict";function addBackToTop(){var o,t,e,n,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=i.backgroundColor,d=void 0===r?"#000":r,a=i.cornerOffset,c=void 0===a?20:a,s=i.diameter,l=void 0===s?56:s,u=i.ease,p=void 0===u?function(o){return.5*(1-Math.cos(Math.PI*o))}:u,m=i.id,h=void 0===m?"back-to-top":m,b=i.innerHTML,v=void 0===b?'<svg viewBox="0 0 24 24"><path d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"></path></svg>':b,f=i.onClickScrollTo,x=void 0===f?0:f,w=i.scrollContainer,g=void 0===w?document.body:w,k=i.scrollDuration,y=void 0===k?100:k,T=i.showWhenScrollTopIs,M=void 0===T?1:T,z=i.size,E=void 0===z?l:z,C=i.textColor,L=void 0===C?"#fff":C,N=i.zIndex,I=void 0===N?1:N,A=g===document.body,B=A&&document.documentElement;o=Math.round(.43*E),t=Math.round(.29*E),e="#"+h+"{background:"+d+";-webkit-border-radius:50%;-moz-border-radius:50%;border-radius:50%;bottom:"+c+"px;-webkit-box-shadow:0 2px 5px 0 rgba(0,0,0,.26);-moz-box-shadow:0 2px 5px 0 rgba(0,0,0,.26);box-shadow:0 2px 5px 0 rgba(0,0,0,.26);color:"+L+";cursor:pointer;display:block;height:"+E+"px;opacity:1;outline:0;position:fixed;right:"+c+"px;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;-webkit-transition:bottom .2s,opacity .2s;-o-transition:bottom .2s,opacity .2s;-moz-transition:bottom .2s,opacity .2s;transition:bottom .2s,opacity .2s;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:"+E+"px;z-index:"+I+"}#"+h+" svg{display:block;fill:currentColor;height:"+o+"px;margin:"+t+"px auto 0;width:"+o+"px}#"+h+".hidden{bottom:-"+E+"px;opacity:0}",(n=document.createElement("style")).appendChild(document.createTextNode(e)),document.head.insertAdjacentElement("afterbegin",n);var D=function(){var o=document.createElement("div");return o.id=h,o.className="hidden",o.innerHTML=v,o.addEventListener("click",function(o){o.preventDefault(),function(){var o="function"==typeof x?x():x,t=window,e=t.performance,n=t.requestAnimationFrame;if(y<=0||void 0===e||void 0===n)return q(o);var i=e.now(),r=j(),d=r-o;n(function o(t){var e=Math.min((t-i)/y,1);q(r-Math.round(p(e)*d)),e<1&&n(o)})}()}),document.body.appendChild(o),o}(),H=!0;function S(){j()>=M?function(){if(!H)return;D.className="",H=!1}():function(){if(H)return;D.className="hidden",H=!0}()}function j(){return g.scrollTop||B&&document.documentElement.scrollTop||0}function q(o){g.scrollTop=o,B&&(document.documentElement.scrollTop=o)}(A?window:g).addEventListener("scroll",S),S()}
|
|
|
@ -1,4 +1,3 @@
|
||||||
// based on https://victoria.dev/blog/add-search-to-hugo-static-sites-with-lunr/
|
|
||||||
function displayResults (results, store) {
|
function displayResults (results, store) {
|
||||||
const searchResults = document.getElementById('results');
|
const searchResults = document.getElementById('results');
|
||||||
if (results.length) {
|
if (results.length) {
|
||||||
|
|
|
@ -11,7 +11,7 @@ enableInlineShortcodes = true
|
||||||
# sectionPagesMenu = "main"
|
# sectionPagesMenu = "main"
|
||||||
|
|
||||||
[outputs]
|
[outputs]
|
||||||
home = ['html', 'rss']
|
home = ['html', 'rss', 'json']
|
||||||
section = ['html']
|
section = ['html']
|
||||||
taxonomy = ['html',]
|
taxonomy = ['html',]
|
||||||
term = ['html', 'rss']
|
term = ['html', 'rss']
|
||||||
|
|
7
layouts/_default/index.json
Normal file
7
layouts/_default/index.json
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{{- $.Scratch.Add "index" slice -}}
|
||||||
|
{{- range .Site.Pages -}}
|
||||||
|
{{- if ne .Type "search" -}}
|
||||||
|
{{- $.Scratch.Add "index" (dict "title" .Title "body" .Plain "link" .Permalink "section" .Section "tags" .Params.tags) -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- jsonify (uniq ($.Scratch.Get "index")) -}}
|
|
@ -3,19 +3,7 @@
|
||||||
<p class="powered_by">{"powered_by": [{{- range $i, $link := .Site.Params.powerLinks }}{{ if $i }}, {{ end }}"<a target="_blank" href="{{ $link.url }}">{{ $link.title }}</a>"{{ end }}]}
|
<p class="powered_by">{"powered_by": [{{- range $i, $link := .Site.Params.powerLinks }}{{ if $i }}, {{ end }}"<a target="_blank" href="{{ $link.url }}">{{ $link.title }}</a>"{{ end }}]}
|
||||||
<br><<a target="_blank" href="https://github.com/jbowdre/runtimeterror">view source</a>></p>
|
<br><<a target="_blank" href="https://github.com/jbowdre/runtimeterror">view source</a>></p>
|
||||||
|
|
||||||
<!-- Back to Top button via https://github.com/vfeskov/vanilla-back-to-top -->
|
|
||||||
{{ $jsToTop := resources.Get "js/back-to-top.js" | minify }}
|
|
||||||
<script src="{{ $jsToTop.RelPermalink }}"></script>
|
|
||||||
<script>addBackToTop({
|
|
||||||
diameter: 56,
|
|
||||||
backgroundColor: '#383838',
|
|
||||||
textColor: '#c45a5a'
|
|
||||||
})</script>
|
|
||||||
|
|
||||||
<!-- Search index via https://victoria.dev/blog/add-search-to-hugo-static-sites-with-lunr/ -->
|
|
||||||
{{ partial "search-index.html" .}}
|
{{ partial "search-index.html" .}}
|
||||||
|
|
||||||
<!-- Code Copy button via https://digitaldrummerj.me/hugo-add-copy-code-snippet-button/ -->
|
|
||||||
{{ if (findRE "<pre" .Content 1) }}
|
{{ if (findRE "<pre" .Content 1) }}
|
||||||
{{ $jsCopy := resources.Get "js/code-copy-button.js" | minify }}
|
{{ $jsCopy := resources.Get "js/code-copy-button.js" | minify }}
|
||||||
<script src="{{ $jsCopy.RelPermalink }}"></script>
|
<script src="{{ $jsCopy.RelPermalink }}"></script>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<br>
|
<br>
|
||||||
<ul id="results">
|
<ul id="results">
|
||||||
<li>
|
<li>
|
||||||
What is it you desire?
|
Enter a keyword above to search this site.
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
{{ end }}
|
{{ end }}
|
|
@ -177,7 +177,7 @@ ul.pagination li {
|
||||||
|
|
||||||
/* statuslol overrides */
|
/* statuslol overrides */
|
||||||
.statuslol {
|
.statuslol {
|
||||||
background: var(--off-bg) !important;
|
background: var(--inner-bg) !important;
|
||||||
flex-direction:column
|
flex-direction:column
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -224,8 +224,6 @@ form {
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
border-radius: 0.25rem;
|
border-radius: 0.25rem;
|
||||||
outline: 0.25rem solid var(--bg);
|
outline: 0.25rem solid var(--bg);
|
||||||
width: 240px;
|
|
||||||
transition: width .2s ease-in-out, outline .2s ease-in-out;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
input {
|
input {
|
||||||
|
@ -245,7 +243,6 @@ input:focus {
|
||||||
|
|
||||||
form:focus-within {
|
form:focus-within {
|
||||||
outline: 1px solid var(--logo);
|
outline: 1px solid var(--logo);
|
||||||
width: 100%;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
form button {
|
form button {
|
||||||
|
|
Loading…
Reference in a new issue