Skip to content

Commit b537719

Browse files
committed
Deploying to gh-pages from @ daaf1b6 🚀
1 parent 77206ac commit b537719

File tree

16 files changed

+435
-192
lines changed

16 files changed

+435
-192
lines changed

404.html

Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55
<meta charset="UTF-8">
66
<title>Page not found - CBMC Proof Debugger</title>
77
<base href="/">
8+
9+
810
<!-- Custom HTML head -->
9-
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
11+
1012
<meta name="description" content="">
1113
<meta name="viewport" content="width=device-width, initial-scale=1">
1214
<meta name="theme-color" content="#ffffff" />
@@ -17,25 +19,28 @@
1719
<link rel="stylesheet" href="css/general.css">
1820
<link rel="stylesheet" href="css/chrome.css">
1921
<link rel="stylesheet" href="css/print.css" media="print">
22+
2023
<!-- Fonts -->
2124
<link rel="stylesheet" href="FontAwesome/css/font-awesome.css">
2225
<link rel="stylesheet" href="fonts/fonts.css">
26+
2327
<!-- Highlight.js Stylesheets -->
2428
<link rel="stylesheet" href="highlight.css">
2529
<link rel="stylesheet" href="tomorrow-night.css">
2630
<link rel="stylesheet" href="ayu-highlight.css">
2731

2832
<!-- Custom theme stylesheets -->
33+
2934
</head>
3035
<body>
3136
<!-- Provide site root to javascript -->
32-
<script type="text/javascript">
37+
<script>
3338
var path_to_root = "";
3439
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
3540
</script>
3641

3742
<!-- Work around some values being stored in localStorage wrapped in quotes -->
38-
<script type="text/javascript">
43+
<script>
3944
try {
4045
var theme = localStorage.getItem('mdbook-theme');
4146
var sidebar = localStorage.getItem('mdbook-sidebar');
@@ -51,7 +56,7 @@
5156
</script>
5257

5358
<!-- Set the theme before any content is loaded, prevents flash -->
54-
<script type="text/javascript">
59+
<script>
5560
var theme;
5661
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
5762
if (theme === null || theme === undefined) { theme = default_theme; }
@@ -63,7 +68,7 @@
6368
</script>
6469

6570
<!-- Hide / unhide sidebar before it is displayed -->
66-
<script type="text/javascript">
71+
<script>
6772
var html = document.querySelector('html');
6873
var sidebar = 'hidden';
6974
if (document.body.clientWidth >= 1080) {
@@ -84,7 +89,7 @@
8489
<div id="page-wrapper" class="page-wrapper">
8590

8691
<div class="page">
87-
<div id="menu-bar-hover-placeholder"></div>
92+
<div id="menu-bar-hover-placeholder"></div>
8893
<div id="menu-bar" class="menu-bar sticky bordered">
8994
<div class="left-buttons">
9095
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
@@ -94,7 +99,7 @@
9499
<i class="fa fa-paint-brush"></i>
95100
</button>
96101
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
97-
<li role="none"><button role="menuitem" class="theme" id="light">Light (default)</button></li>
102+
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
98103
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
99104
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
100105
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
@@ -111,6 +116,7 @@ <h1 class="menu-title">CBMC Proof Debugger</h1>
111116
<a href="print.html" title="Print this book" aria-label="Print this book">
112117
<i id="print-button" class="fa fa-print"></i>
113118
</a>
119+
114120
</div>
115121
</div>
116122

@@ -124,8 +130,9 @@ <h1 class="menu-title">CBMC Proof Debugger</h1>
124130
</ul>
125131
</div>
126132
</div>
133+
127134
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
128-
<script type="text/javascript">
135+
<script>
129136
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
130137
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
131138
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
@@ -142,26 +149,37 @@ <h1 id="document-not-found-404"><a class="header" href="#document-not-found-404"
142149

143150
<nav class="nav-wrapper" aria-label="Page navigation">
144151
<!-- Mobile navigation buttons -->
152+
153+
145154
<div style="clear: both"></div>
146155
</nav>
147156
</div>
148157
</div>
149158

150159
<nav class="nav-wide-wrapper" aria-label="Page navigation">
160+
151161
</nav>
152162

153163
</div>
154164

155-
<script type="text/javascript">
165+
166+
167+
168+
<script>
156169
window.playground_copyable = true;
157170
</script>
158-
<script src="elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
159-
<script src="mark.min.js" type="text/javascript" charset="utf-8"></script>
160-
<script src="searcher.js" type="text/javascript" charset="utf-8"></script>
161-
<script src="clipboard.min.js" type="text/javascript" charset="utf-8"></script>
162-
<script src="highlight.js" type="text/javascript" charset="utf-8"></script>
163-
<script src="book.js" type="text/javascript" charset="utf-8"></script>
171+
172+
173+
<script src="elasticlunr.min.js"></script>
174+
<script src="mark.min.js"></script>
175+
<script src="searcher.js"></script>
176+
177+
<script src="clipboard.min.js"></script>
178+
<script src="highlight.js"></script>
179+
<script src="book.js"></script>
164180

165181
<!-- Custom JS scripts -->
182+
183+
166184
</body>
167185
</html>

book.js

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,16 @@
44
window.onunload = function () { };
55

66
// Global variable, shared between modules
7-
function playground_text(playground) {
7+
function playground_text(playground, hidden = true) {
88
let code_block = playground.querySelector("code");
99

1010
if (window.ace && code_block.classList.contains("editable")) {
1111
let editor = window.ace.edit(code_block);
1212
return editor.getValue();
13-
} else {
13+
} else if (hidden) {
1414
return code_block.textContent;
15+
} else {
16+
return code_block.innerText;
1517
}
1618
}
1719

@@ -166,7 +168,6 @@ function playground_text(playground) {
166168
.filter(function (node) {return node.classList.contains("editable"); })
167169
.forEach(function (block) { block.classList.remove('language-rust'); });
168170

169-
Array
170171
code_nodes
171172
.filter(function (node) {return !node.classList.contains("editable"); })
172173
.forEach(function (block) { hljs.highlightBlock(block); });
@@ -300,6 +301,13 @@ function playground_text(playground) {
300301
themePopup.querySelector("button#" + get_theme()).focus();
301302
}
302303

304+
function updateThemeSelected() {
305+
themePopup.querySelectorAll('.theme-selected').forEach(function (el) {
306+
el.classList.remove('theme-selected');
307+
});
308+
themePopup.querySelector("button#" + get_theme()).classList.add('theme-selected');
309+
}
310+
303311
function hideThemes() {
304312
themePopup.style.display = 'none';
305313
themeToggleButton.setAttribute('aria-expanded', false);
@@ -355,6 +363,7 @@ function playground_text(playground) {
355363

356364
html.classList.remove(previousTheme);
357365
html.classList.add(theme);
366+
updateThemeSelected();
358367
}
359368

360369
// Set theme
@@ -592,7 +601,7 @@ function playground_text(playground) {
592601
text: function (trigger) {
593602
hideTooltip(trigger);
594603
let playground = trigger.closest("pre");
595-
return playground_text(playground);
604+
return playground_text(playground, false);
596605
}
597606
});
598607

css/chrome.css

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,8 @@ ul#searchresults span.teaser em {
507507
padding: 0;
508508
list-style: none;
509509
display: none;
510+
/* Don't let the children's background extend past the rounded corners. */
511+
overflow: hidden;
510512
}
511513
.theme-popup .default {
512514
color: var(--icons);
@@ -515,7 +517,7 @@ ul#searchresults span.teaser em {
515517
width: 100%;
516518
border: 0;
517519
margin: 0;
518-
padding: 2px 10px;
520+
padding: 2px 20px;
519521
line-height: 25px;
520522
white-space: nowrap;
521523
text-align: left;
@@ -527,8 +529,10 @@ ul#searchresults span.teaser em {
527529
.theme-popup .theme:hover {
528530
background-color: var(--theme-hover);
529531
}
530-
.theme-popup .theme:hover:first-child,
531-
.theme-popup .theme:hover:last-child {
532-
border-top-left-radius: inherit;
533-
border-top-right-radius: inherit;
532+
533+
.theme-selected::before {
534+
display: inline-block;
535+
content: "✓";
536+
margin-left: -14px;
537+
width: 14px;
534538
}

css/general.css

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ body {
2222
}
2323

2424
code {
25-
font-family: "Source Code Pro", Consolas, "Ubuntu Mono", Menlo, "DejaVu Sans Mono", monospace, monospace !important;
26-
font-size: 0.875em; /* please adjust the ace font size accordingly in editor.js */
25+
font-family: var(--mono-font) !important;
26+
font-size: var(--code-font-size);
2727
}
2828

2929
/* make long words/inline code not x overflow */
@@ -148,6 +148,18 @@ blockquote {
148148
border-bottom: .1em solid var(--quote-border);
149149
}
150150

151+
kbd {
152+
background-color: var(--table-border-color);
153+
border-radius: 4px;
154+
border: solid 1px var(--theme-popup-border);
155+
box-shadow: inset 0 -1px 0 var(--theme-hover);
156+
display: inline-block;
157+
font-size: var(--code-font-size);
158+
font-family: var(--mono-font);
159+
line-height: 10px;
160+
padding: 4px 5px;
161+
vertical-align: middle;
162+
}
151163

152164
:not(.footnote-definition) + .footnote-definition,
153165
.footnote-definition + :not(.footnote-definition) {

css/variables.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
--page-padding: 15px;
77
--content-max-width: 750px;
88
--menu-bar-height: 50px;
9+
--mono-font: "Source Code Pro", Consolas, "Ubuntu Mono", Menlo, "DejaVu Sans Mono", monospace, monospace;
10+
--code-font-size: 0.875em /* please adjust the ace font size accordingly in editor.js */
911
}
1012

1113
/* Themes */

0 commit comments

Comments
 (0)