Skip to content

Commit b4e2e19

Browse files
committed
Deploying to gh-pages from @ 50b66c4 🚀
1 parent e2b835b commit b4e2e19

15 files changed

+135
-92
lines changed

‎documentation/Database.html‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ <h2><a href="index.html"><div class="text">sql.js</div></a></h2><div class="sear
4949

5050
<div id="main">
5151

52-
<h1 class="page-title">Database</h1>
52+
<h1 id='page-title' class="page-title">Database</h1>
5353

5454

5555

@@ -2294,9 +2294,7 @@ <h4 class="name" id=".SqlValue">
22942294

22952295
</div>
22962296

2297-
<br class="clear">
2298-
2299-
<footer>
2297+
<footer id="footer">
23002298

23012299
</footer>
23022300

‎documentation/Statement.html‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ <h2><a href="index.html"><div class="text">sql.js</div></a></h2><div class="sear
4949

5050
<div id="main">
5151

52-
<h1 class="page-title">Statement</h1>
52+
<h1 id='page-title' class="page-title">Statement</h1>
5353

5454

5555

@@ -1963,9 +1963,7 @@ <h4 class="name" id=".BindParams">
19631963

19641964
</div>
19651965

1966-
<br class="clear">
1967-
1968-
<footer>
1966+
<footer id="footer">
19691967

19701968
</footer>
19711969

‎documentation/StatementIterator.html‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ <h2><a href="index.html"><div class="text">sql.js</div></a></h2><div class="sear
4949

5050
<div id="main">
5151

52-
<h1 class="page-title">StatementIterator</h1>
52+
<h1 id='page-title' class="page-title">StatementIterator</h1>
5353

5454

5555

@@ -717,9 +717,7 @@ <h5 class="subsection-title">Properties</h5>
717717

718718
</div>
719719

720-
<br class="clear">
721-
722-
<footer>
720+
<footer id="footer">
723721

724722
</footer>
725723

‎documentation/api.js.html‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ <h2><a href="index.html"><div class="text">sql.js</div></a></h2><div class="sear
4949

5050
<div id="main">
5151

52-
<h1 class="page-title">api.js</h1>
52+
<h1 id='page-title' class="page-title">api.js</h1>
5353

5454

5555

@@ -1271,9 +1271,7 @@ <h1 class="page-title">api.js</h1>
12711271

12721272
</div>
12731273

1274-
<br class="clear">
1275-
1276-
<footer>
1274+
<footer id="footer">
12771275

12781276
</footer>
12791277

‎documentation/global.html‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ <h2><a href="index.html"><div class="text">sql.js</div></a></h2><div class="sear
4949

5050
<div id="main">
5151

52-
<h1 class="page-title">Global</h1>
52+
<h1 id='page-title' class="page-title">Global</h1>
5353

5454

5555

@@ -562,9 +562,7 @@ <h5 class="subsection-title">Properties</h5>
562562

563563
</div>
564564

565-
<br class="clear">
566-
567-
<footer>
565+
<footer id="footer">
568566

569567
</footer>
570568

‎documentation/index.html‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,7 @@ <h4>Statement</h4>
9292

9393
</div>
9494

95-
<br class="clear">
96-
97-
<footer>
95+
<footer id="footer">
9896

9997
</footer>
10098

‎documentation/module-SqlJs.html‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ <h2><a href="index.html"><div class="text">sql.js</div></a></h2><div class="sear
4949

5050
<div id="main">
5151

52-
<h1 class="page-title">SqlJs</h1>
52+
<h1 id='page-title' class="page-title">SqlJs</h1>
5353

5454

5555

@@ -112,9 +112,7 @@ <h3 class="subsection-title">Classes</h3>
112112

113113
</div>
114114

115-
<br class="clear">
116-
117-
<footer>
115+
<footer id="footer">
118116

119117
</footer>
120118

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,49 @@
11
/* global document */
22
(function() {
33
var targets = document.querySelectorAll('pre');
4+
var main = document.querySelector('#main');
5+
6+
var footer = document.querySelector('#footer');
7+
var pageTitle = document.querySelector('#page-title');
8+
var pageTitleHeight = 0;
9+
10+
var footerHeight = footer.getBoundingClientRect().height;
11+
12+
if (pageTitle) {
13+
pageTitleHeight = pageTitle.getBoundingClientRect().height;
14+
15+
// Adding margin (Outer height)
16+
pageTitleHeight += 45;
17+
}
18+
19+
// subtracted 20 for extra padding.
20+
// eslint-disable-next-line no-undef
21+
var divMaxHeight = window.innerHeight - pageTitleHeight - footerHeight - 80;
422

523
setTimeout(function() {
624
targets.forEach(function(item) {
725
var innerHTML = item.innerHTML;
826
var divElement = document.createElement('div');
927

28+
divElement.style.maxHeight = divMaxHeight + 'px';
29+
divElement.style.marginTop = '2rem';
1030
divElement.innerHTML = innerHTML;
1131
// item.removeChild();
1232
item.innerHTML = '';
1333
item.appendChild(divElement);
1434
});
35+
36+
// eslint-disable-next-line no-undef
37+
main.style.minHeight = window.innerHeight - footerHeight - 15 + 'px';
38+
39+
// See if we have to move something into view
40+
// eslint-disable-next-line no-undef
41+
var location = window.location.href.split('#')[1];
42+
43+
if (location && location.length > 0) {
44+
var element = document.querySelector('#'.concat(location));
45+
46+
element.scrollIntoView();
47+
}
1548
}, 300);
1649
})();

‎documentation/scripts/misc.js‎

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,16 @@ function copyFunction(id) {
2323
// selecting the pre element
2424
var code = document.getElementById(id);
2525

26-
// selecting the code element of that pre element
27-
code = code.childNodes[0];
26+
// selecting the ol.linenums
27+
var element = code.querySelector('.linenums');
28+
29+
if (!element) {
30+
// selecting the code block
31+
element = code.querySelector('code');
32+
}
2833

2934
// copy
30-
copy(code.innerText);
35+
copy(element.innerText);
3136

3237
// show tooltip
3338
showTooltip('tooltip-' + id);
@@ -61,7 +66,7 @@ function copyFunction(id) {
6166
// else langNameDiv = '';
6267

6368
// appending everything to the current pre element
64-
allPre[i].innerHTML += langNameDiv + copyToClipboard;
69+
allPre[i].innerHTML += '<div class="pre-top-bar-container">' + langNameDiv + copyToClipboard + '</div>';
6570
allPre[i].setAttribute('id', id);
6671
}
6772
})();

‎documentation/styles/clean-jsdoc-theme-base.css‎

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,34 +17,36 @@ pre {
1717
position: relative;
1818
}
1919

20+
.pre-top-bar-container {
21+
align-items: center;
22+
display: flex;
23+
justify-content: space-between;
24+
left: 0;
25+
padding: 0.3125rem 1.5rem;
26+
position: absolute;
27+
right: 0;
28+
top: 0;
29+
}
30+
2031
.code-copy-icon-container {
2132
align-items: center;
2233
border-radius: 50%;
2334
cursor: pointer;
2435
display: flex;
25-
height: 30px;
36+
height: 1.875rem;
2637
justify-content: center;
27-
position: absolute;
28-
right: 15px;
29-
top: 10px;
3038
transition: 0.3s;
31-
width: 30px;
39+
width: 1.875rem;
3240
}
3341

3442
.code-copy-icon-container > div {
35-
margin-top: 4px;
43+
margin-top: 0.25rem;
3644
position: relative;
3745
}
3846

3947
.sm-icon {
40-
height: 16px;
41-
width: 16px;
42-
}
43-
44-
.code-lang-name-container {
45-
left: 15px;
46-
position: absolute;
47-
top: 10px;
48+
height: 1rem;
49+
width: 1rem;
4850
}
4951

5052
.code-lang-name {

0 commit comments

Comments
 (0)