doc updates

This commit is contained in:
David Botton 2025-11-20 00:09:16 -05:00
parent 6ab1e21f40
commit e95700908d
5 changed files with 2605 additions and 48 deletions

2510
doc/clog-manual.html vendored

File diff suppressed because it is too large Load diff

47
doc/live.js vendored Normal file
View file

@ -0,0 +1,47 @@
function mglpaxAddDocumentListener() {
const paxToDocument = document.getElementById('paxToDocument');
paxToDocument.addEventListener('keypress', function(event) {
if (event.key === 'Enter') {
const inputText = paxToDocument.value;
const url = new URL(window.location.href);
const baseUrl = url.origin +
url.pathname.substring(0, url.pathname.lastIndexOf('/') + 1);
window.location.href = baseUrl + "pax:" + inputText + url.search;
}
});
}
function mglpaxAddAproposListener() {
const paxToApropos = document.getElementById('paxToApropos');
paxToApropos.addEventListener('keypress', function(event) {
if (event.key === 'Enter') {
const inputText = paxToApropos.value;
const url = new URL(window.location.href);
const baseUrl = url.origin +
url.pathname.substring(0, url.pathname.lastIndexOf('/') + 1);
window.location.href = baseUrl + "pax-eval:" +
'(mgl-pax::pax-apropos* ' +
encodeURIComponent(toLispLiteralString(inputText)) +
' t nil nil)' + url.search;
}
});
}
function toLispLiteralString(str) {
let literal = '"'; // Start with an opening double quote
for (let i = 0; i < str.length; i++) {
const char = str[i];
switch (char) {
case '"':
literal += '\\"';
break;
case '\\':
literal += '\\\\';
break;
default:
literal += char;
}
}
literal += '"'; // End with a closing double quote
return literal;
}

87
doc/style.css vendored
View file

@ -39,7 +39,6 @@
body { body {
font-family: var(--font-family); font-family: var(--font-family);
font-feature-settings: var(--font-feature-settings);
margin: auto; margin: auto;
background-color: #faf9f6; background-color: #faf9f6;
color: #333; color: #333;
@ -74,7 +73,6 @@ ul + p, ol + p, dl + p {
h1 { h1 {
font-family: var(--font-family-heading); font-family: var(--font-family-heading);
font-feature-settings: var(--font-feature-settings-heading);
font-weight: normal; font-weight: normal;
text-transform: uppercase; text-transform: uppercase;
letter-spacing: 0.18em; letter-spacing: 0.18em;
@ -185,18 +183,32 @@ ul, ol, dl {
margin: 0; margin: 0;
} }
a { a, a .mjx-math * {
/* text-decoration: none; */
/* color: #0233c8; */
color: #333; color: #333;
text-decoration: underline;
text-decoration-thickness: 0.04em; text-decoration-thickness: 0.04em;
text-underline-offset: 0.1em; text-underline-offset: 0.1em;
} }
a:hover { h1 a .mjx-math *,
h2 a .mjx-math *,
h3 a .mjx-math *,
h4 a .mjx-math *,
h5 a .mjx-math *,
h6 a .mjx-math * {
text-decoration: none;
}
a:hover, a:hover .mjx-math * {
text-decoration: underline; text-decoration: underline;
} }
/* MathJax subscripts, accents, etc */
a .mjx-sub *, a:hover .mjx-sub *,
a .mjx-over *, a:hover .mjx-over * {
text-decoration: none;
}
img { img {
display: block; display: block;
max-width: 90%; max-width: 90%;
@ -215,13 +227,15 @@ img {
/* background-color: #EEEEEE; */ /* background-color: #EEEEEE; */
} }
.locative-type a { .locative-type {
text-decoration: none;
border-bottom: 0;
font-weight: bold; font-weight: bold;
color: #444; color: #444;
} }
.locative-type a {
text-decoration: none;
}
.reference-object { .reference-object {
background-color: #EBE8E2; background-color: #EBE8E2;
/* The live browser does not lowercase. Balance the space around /* The live browser does not lowercase. Balance the space around
@ -234,7 +248,7 @@ img {
font-size: 98%; font-size: 98%;
} }
.reference-object a { .reference-object a, .reference-object a * {
text-decoration: none; text-decoration: none;
border-bottom: none; border-bottom: none;
} }
@ -244,7 +258,8 @@ img {
} }
.locative-args code { .locative-args code {
font-family: sans-serif; font-family: var(--font-family);
font-size: 1rem;
} }
.navigation a { .navigation a {
@ -301,24 +316,24 @@ img {
/* Syntax highlighting with Colorize */ /* Syntax highlighting with Colorize */
.symbol { color : #770055; background-color : transparent; border: 0px; margin: 0px;} .symbol { color: #770055; font-style: normal; background-color: transparent; border: 0px; margin: 0px;}
a.symbol:link { color : #229955; background-color : transparent; text-decoration: none; border: 0px; margin: 0px; } a.symbol:link { color: #229955; background-color: transparent; text-decoration: none; border: 0px; margin: 0px; }
a.symbol:active { color : #229955; background-color : transparent; text-decoration: none; border: 0px; margin: 0px; } a.symbol:active { color: #229955; background-color: transparent; text-decoration: none; border: 0px; margin: 0px; }
a.symbol:visited { color : #229955; background-color : transparent; text-decoration: none; border: 0px; margin: 0px; } a.symbol:visited { color: #229955; background-color: transparent; text-decoration: none; border: 0px; margin: 0px; }
a.symbol:hover { color : #229955; background-color : transparent; text-decoration: none; border: 0px; margin: 0px; } a.symbol:hover { color: #229955; background-color: transparent; text-decoration: none; border: 0px; margin: 0px; }
.special { color : #FF5000; background-color : inherit; } .special { color: #FF5000; background-color: inherit; }
.keyword { color : #770000; background-color : inherit; } .keyword { color: #770000; background-color: inherit; }
.comment { color : #007777; background-color : inherit; } .comment { color: #007777; background-color: inherit; }
.string { color : #777777; background-color : inherit; } .string { color: #777777; background-color: inherit; }
.atom { color : #314F4F; background-color : inherit; } .atom { color: #314F4F; background-color: inherit; }
.macro { color : #FF5000; background-color : inherit; } .macro { color: #FF5000; background-color: inherit; }
.variable { color : #36648B; background-color : inherit; } .variable { color: #36648B; background-color: inherit; }
.function { color : #8B4789; background-color : inherit; } .function { color: #8B4789; background-color: inherit; }
.attribute { color : #FF5000; background-color : inherit; } .attribute { color: #FF5000; background-color: inherit; }
.character { color : #0055AA; background-color : inherit; } .character { color: #0055AA; background-color: inherit; }
.syntaxerror { color : #FF0000; background-color : inherit; } .syntaxerror { color: #FF0000; background-color: inherit; }
.diff-deleted { color : #5F2121; background-color : inherit; } .diff-deleted { color: #5F2121; background-color: inherit; }
.diff-added { color : #215F21; background-color : inherit; } .diff-added { color: #215F21; background-color: inherit; }
/* Disable rainbow nesting on hover */ /* Disable rainbow nesting on hover */
@ -368,7 +383,8 @@ a.symbol:hover { color : #229955; background-color : transparent; text-decoratio
line-height: 1.0; line-height: 1.0;
} }
#toc a { #toc a,
#toc a * {
text-decoration: none; text-decoration: none;
border-bottom: none; border-bottom: none;
} }
@ -406,7 +422,8 @@ a.symbol:hover { color : #229955; background-color : transparent; text-decoratio
box-shadow: inset -5px 0px 10px -5px #000; box-shadow: inset -5px 0px 10px -5px #000;
} }
#page-toc a { #page-toc a,
#page-toc a * {
color: #fff; color: #fff;
} }
@ -415,6 +432,10 @@ a.symbol:hover { color : #229955; background-color : transparent; text-decoratio
margin-bottom: 1em; margin-bottom: 1em;
} }
#link-to-home {
padding-left: 0;
}
.menu-block-title { .menu-block-title {
font-size: 90%; font-size: 90%;
} }
@ -432,3 +453,7 @@ a.symbol:hover { color : #229955; background-color : transparent; text-decoratio
font-size: 80%; font-size: 80%;
color: #777777; color: #777777;
} }
#paxToDocument, #paxToApropos {
min-width: 17em;
}

2
doc/toc.min.js vendored
View file

@ -5,4 +5,4 @@
* copyright Greg Allen 2014 * copyright Greg Allen 2014
* MIT License * MIT License
*/ */
!function(a){a.fn.smoothScroller=function(b){b=a.extend({},a.fn.smoothScroller.defaults,b);var c=a(this);return a(b.scrollEl).animate({scrollTop:c.offset().top-a(b.scrollEl).offset().top-b.offset},b.speed,b.ease,function(){var a=c.attr("id");a.length&&(history.pushState?history.pushState(null,null,"#"+a):document.location.hash=a),c.trigger("smoothScrollerComplete")}),this},a.fn.smoothScroller.defaults={speed:400,ease:"swing",scrollEl:"body,html",offset:0},a("body").on("click","[data-smoothscroller]",function(b){b.preventDefault();var c=a(this).attr("href");0===c.indexOf("#")&&a(c).smoothScroller()})}(jQuery),function(a){var b={};a.fn.toc=function(b){var c,d=this,e=a.extend({},jQuery.fn.toc.defaults,b),f=a(e.container),g=a(e.selectors,f),h=[],i=e.activeClass,j=function(b,c){if(e.smoothScrolling&&"function"==typeof e.smoothScrolling){b.preventDefault();var f=a(b.target).attr("href");e.smoothScrolling(f,e,c)}a("li",d).removeClass(i),a(b.target).parent().addClass(i)},k=function(){c&&clearTimeout(c),c=setTimeout(function(){for(var b,c=a(window).scrollTop(),f=Number.MAX_VALUE,g=0,j=0,k=h.length;k>j;j++){var l=Math.abs(h[j]-c);f>l&&(g=j,f=l)}a("li",d).removeClass(i),b=a("li:eq("+g+")",d).addClass(i),e.onHighlight(b)},50)};return e.highlightOnScroll&&(a(window).bind("scroll",k),k()),this.each(function(){var b=a(this),c=a(e.listType);g.each(function(d,f){var g=a(f);h.push(g.offset().top-e.highlightOffset);var i=e.anchorName(d,f,e.prefix);if(f.id!==i){a("<span/>").attr("id",i).insertBefore(g)}var l=a("<a/>").text(e.headerText(d,f,g)).attr("href","#"+i).bind("click",function(c){b.trigger("selected",a(this).attr("href"))}),m=a("<li/>").addClass(e.itemClass(d,f,g,e.prefix)).append(l);c.append(m)}),b.html(c)})},jQuery.fn.toc.defaults={container:"body",listType:"<ul/>",selectors:"h1,h2,h3",smoothScrolling:function(b,c,d){a(b).smoothScroller({offset:c.scrollToOffset}).on("smoothScrollerComplete",function(){d()})},scrollToOffset:0,prefix:"toc",activeClass:"toc-active",onHighlight:function(){},highlightOnScroll:!0,highlightOffset:100,anchorName:function(c,d,e) {try{return d.previousElementSibling.previousElementSibling.lastChild.id;}catch(err){return e + '-' + c;}},headerText:function(a,b,c){return c.text()},itemClass:function(a,b,c,d){return d+"-"+c[0].tagName.toLowerCase()}}}(jQuery); !function(a){a.fn.smoothScroller=function(b){b=a.extend({},a.fn.smoothScroller.defaults,b);var c=a(this);return a(b.scrollEl).animate({scrollTop:c.offset().top-a(b.scrollEl).offset().top-b.offset},b.speed,b.ease,function(){var a=c.attr("id");a.length&&(history.pushState?history.pushState(null,null,"#"+a):document.location.hash=a),c.trigger("smoothScrollerComplete")}),this},a.fn.smoothScroller.defaults={speed:400,ease:"swing",scrollEl:"body,html",offset:0},a("body").on("click","[data-smoothscroller]",function(b){b.preventDefault();var c=a(this).attr("href");0===c.indexOf("#")&&a(c).smoothScroller()})}(jQuery),function(a){var b={};a.fn.toc=function(b){var c,d=this,e=a.extend({},jQuery.fn.toc.defaults,b),f=a(e.container),g=a(e.selectors,f),h=[],i=e.activeClass,j=function(b,c){if(e.smoothScrolling&&"function"==typeof e.smoothScrolling){b.preventDefault();var f=a(b.target).attr("href");e.smoothScrolling(f,e,c)}a("li",d).removeClass(i),a(b.target).parent().addClass(i)},k=function(){c&&clearTimeout(c),c=setTimeout(function(){for(var b,c=a(window).scrollTop(),f=Number.MAX_VALUE,g=0,j=0,k=h.length;k>j;j++){var l=Math.abs(h[j]-c);f>l&&(g=j,f=l)}a("li",d).removeClass(i),b=a("li:eq("+g+")",d).addClass(i),e.onHighlight(b)},50)};return e.highlightOnScroll&&(a(window).bind("scroll",k),k()),this.each(function(){var b=a(this),c=a(e.listType);g.each(function(d,f){var g=a(f);h.push(g.offset().top-e.highlightOffset);var i=e.anchorName(d,f,e.prefix);if(f.id!==i){a("<span/>").attr("id",i).insertBefore(g)}var l=a("<a/>").text(e.headerText(d,f,g)).attr("href","#"+i).bind("click",function(c){b.trigger("selected",a(this).attr("href"))}),m=a("<li/>").addClass(e.itemClass(d,f,g,e.prefix)).append(l);c.append(m)}),b.html(c)})},jQuery.fn.toc.defaults={container:"body",listType:"<ul/>",selectors:"h1,h2,h3",smoothScrolling:function(b,c,d){a(b).smoothScroller({offset:c.scrollToOffset}).on("smoothScrollerComplete",function(){d()})},scrollToOffset:0,prefix:"toc",activeClass:"toc-active",onHighlight:function(){},highlightOnScroll:!0,highlightOffset:100,anchorName:function(c,d,e) {try{return d.previousElementSibling.previousElementSibling.lastChild.id||(e+'-'+c);}catch(err){return e+'-'+c;}},headerText:function(a,b,c){return c.text()},itemClass:function(a,b,c,d){return d+"-"+c[0].tagName.toLowerCase()}}}(jQuery);

View file

@ -303,6 +303,13 @@ Events in clog-base
:ctrl-key t or nil if ctrl-key held down :ctrl-key t or nil if ctrl-key held down
:shift-key t or nil if shift-key held down :shift-key t or nil if shift-key held down
:meta-key t or nil if meta-key held down :meta-key t or nil if meta-key held down
:event-type :wheel
:delta-x change in x float
:delta-y change in y float
:delta-z change in z float
:delta-mode unit of measure used for delta values
0 - pixel 1 - line 2 - page
:event-type :pointer :event-type :pointer
:x x relative to the target :x x relative to the target