Skip to content

Commit

Permalink
Merge pull request #92 from math-comp/mca_doc_140
Browse files Browse the repository at this point in the history
mca doc 1.4.0
  • Loading branch information
affeldt-aist authored Sep 24, 2024
2 parents 50ed72b + b84f1dc commit 7328443
Show file tree
Hide file tree
Showing 188 changed files with 102,998 additions and 8 deletions.
202 changes: 202 additions & 0 deletions analysis/htmldoc_1_4_0/coq2html.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@

/* Classes:
h1.title the title of the page
div.coq encloses all generated body
div.doc contents of (** *) comments
div.footer footer
summary.toggleproof "Proof." line
div.proofscript contents of proof script
span.docright contents of (**r *) comments
span.bracket contents of [ ] within comments
span.comment contents of (* *) comments
span.string string literals "..."
span.kwd Coq keyword
span.id any other identifier
*/

* {
box-sizing: border-box;
}

body {
font-family: Arial, Helvetica;
margin: 8px;
font-size: large;
}

main {
margin-top: 0em;
}

div.sidebar {
left: 8px;
height: calc(100vh);
width: 200px;
position: fixed;
overflow-y: scroll;
}
div.sidebar li {
list-style: none;
}
div.sidebar ul {
padding-inline-start: 10px;
}

h1 {
font-size: 1.5em;
font-weight: bold;
align-items: center;
}
h2 {
margin-left: 0em;
padding: 0px;
color: #580909
}

h3 {
margin-left: 0em;
padding: 0px;
color: #C05001;
}

h1, h2, h3 {
font-family: sans-serif;

}

div.coq {
margin-left: 0%;
margin-right: 0%;
font-family: monospace;
}

div.doc {
margin-left: 0%;
margin-top: 0.2em;
margin-bottom: 0.5em;
font-family: serif;
background-color: #f2f1f1;
}

summary.toggleproof {
list-style-position: outside;
font-size: 0.8em;
text-decoration: underline;
}

div.proofscript {
font-size: 0.8em;
}

div.footer {
margin-top: 1em;
margin-bottom: 1em;
font-size: 0.8em;
font-style: italic;
}

span.docright {
position: absolute;
left: 60%;
width: 40%;
font-family: serif;
}

span.bracket {
font-family: monospace;
color: #008000;
}

span.vernacular {
color: #9400d3;
}

span.gallina-kwd {
color: #228b22;
}

.hierarchy-builder {
color: #ff4500;
margin: 2em 0;
border: solid 1px #cd0000;
}

span.comment {
color: #008000;
}

span.string {
color: Maroon;
}

a:visited {color : #0000BF; text-decoration : none; }
a:link {color : #0000BF; text-decoration : none; }
a:hover {text-decoration : none; }
a:active {text-decoration : none; }

.coq :target {
background-color: yellow;
transition: background-color 0.5s;
}

pre.ssrdoc {
border: solid 2px;
padding-left: 1em;
padding-right: 1em;
}

div.ssrdoc {
border: solid 2px;
padding-left: 1em;
padding-right: 1em;
}

div.content {
margin-left: 200px;
padding-left: 12px;
}

.warning {
color: #cd0000;
}

.darkmode--activated .sidebar {
color: white;
}

.darkmode--activated .sidebar h2 {
color: #a7f6f6;
}

.darkmode--activated span.katex {
color: white;
}

.darkmode--activated span.docright {
color: white;
}

@media screen and (max-width:960px) {

body {
font-family: Arial, Helvetica;
margin-left: 0.5em;
margin-right: 0.5em;
font-size: large;
}

div.doc {
margin-left: 0%;
margin-top: 0.2em;
margin-bottom: 0.5em;
font-family: serif;
background-color: #f2f1f1;
}

div.coq {
margin-left: 1%;
margin-right: 1%;
font-family: monospace;
}

}
106 changes: 106 additions & 0 deletions analysis/htmldoc_1_4_0/coq2html.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@

function renderMarkdowns()
{
const md = markdownit({html:true})
.use(texmath, { engine: katex,
delimiters: 'dollars'} );
const elements = document.querySelectorAll('.markdown,.md');
for (let elem of elements) {
elem.innerHTML = md.render(elem.textContent);
}
}

function showDarkmodeWidget()
{
new Darkmode({
time: '0.1s',
label: '🌓',
}).showWidget();
}

function setUpSavingDetails() {
$('details').on('toggle', function(event) {
var id = $(this).attr('id')
var isOpen = $(this).attr('open')
console.log(id, isOpen)
window.localStorage.setItem('details-'+id, isOpen)
})

function setDetailOpenStatus(item) {
if (item.includes('details-')) {
var id = item.split('details-')[1];
var status = window.localStorage.getItem(item)
if (status == 'open'){
$("#"+CSS.escape(id)).attr('open',true)
}
}
}

$( document ).ready(function() {
console.log("document ready: "+localStorage.length);
for (var i = 0; i < localStorage.length; i++) {
console.log("setDetail: "+localStorage.key(i));
setDetailOpenStatus(localStorage.key(i));
}
});
}

function init()
{
renderMarkdowns();
showDarkmodeWidget();
setUpSavingDetails();
}

function renderMarkdowns()
{
const md = markdownit({html:true})
.use(texmath, { engine: katex,
delimiters: 'dollars'} );
const elements = document.querySelectorAll('.markdown,.md');
for (let elem of elements) {
elem.innerHTML = md.render(elem.textContent);
}
}

function showDarkmodeWidget()
{
new Darkmode({
time: '0.1s',
label: '🌓',
}).showWidget();
}

function setUpSavingDetails() {
$('details').on('toggle', function(event) {
var id = $(this).attr('id')
var isOpen = $(this).attr('open')
console.log(id, isOpen)
window.localStorage.setItem('details-'+id, isOpen)
})

function setDetailOpenStatus(item) {
if (item.includes('details-')) {
var id = item.split('details-')[1];
var status = window.localStorage.getItem(item)
if (status == 'open'){
$("#"+CSS.escape(id)).attr('open',true)
}
}
}

$( document ).ready(function() {
console.log("document ready: "+localStorage.length);
for (var i = 0; i < localStorage.length; i++) {
console.log("setDetail: "+localStorage.key(i));
setDetailOpenStatus(localStorage.key(i));
}
});
}

function init()
{
renderMarkdowns();
showDarkmodeWidget();
setUpSavingDetails();
}
Loading

0 comments on commit 7328443

Please sign in to comment.