Skip to content

Commit c15ad0b

Browse files
authored
Merge pull request #70 from couchbase/aw-bug-fix-2
resolved issue
2 parents e866c0a + fdfa7a3 commit c15ad0b

File tree

4 files changed

+15
-3
lines changed

4 files changed

+15
-3
lines changed

src/css/doc.css

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,16 @@
1616
letter-spacing: -0.025rem;
1717
line-height: var(--line-height-heading);
1818
margin-bottom: 0;
19+
margin-left: -2.5rem;
20+
padding-left: 2.5rem;
1921
}
2022

2123
.doc h1 {
2224
font-size: var(--heading-h1);
2325
font-weight: var(--weight-light);
2426
letter-spacing: 0;
2527
margin: 2.5rem 0 0;
28+
margin-left: -2.5rem;
2629
}
2730

2831
.page-heading-title {
@@ -1091,7 +1094,7 @@ table.tableblock pre code.language-bash.hljs {
10911094

10921095
.doc h2 {
10931096
font-size: var(--heading-h2-sm);
1094-
margin: 1rem 0 1rem;
1097+
margin: 1rem 0 1rem -2.5rem;
10951098
}
10961099

10971100
.doc h3 {

src/js/01-nav.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
})
1515

1616
find(/*'.nav-toggle',*/ '.in-toggle', navMenu.element).forEach(function (toggleBtn) {
17-
console.log(toggleBtn, 17)
17+
// console.log(toggleBtn, 17)
1818
var navItem = findAncestorWithClass('nav-item', toggleBtn, navMenu.element)
1919
toggleBtn.addEventListener('click', toggleActive.bind(navItem))
2020
// var dataDepth = toggleBtn.getAttribute('data-depth')

src/js/02-on-this-page.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
if (sidebar) {
4343
window.addEventListener('load', function () {
4444
onScroll()
45+
hashScroll()
4546
window.addEventListener('scroll', onScroll)
4647
})
4748
}
@@ -92,4 +93,12 @@
9293
function toArray (collection) {
9394
return [].slice.call(collection)
9495
}
96+
97+
function hashScroll () {
98+
// element which needs to be scrolled to
99+
var hasValue = window.location.hash
100+
var elementTillScroll = document.querySelector(hasValue)
101+
// scroll to element
102+
elementTillScroll.scrollIntoView({ behavior: 'smooth', block: 'start' })
103+
}
95104
})()

src/js/05-tabset.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ find('.doc .tabset').forEach(function (tabset) {
4545
var dropdownBtn = tab.parentNode.parentNode.querySelector('.dropdown-btn-down')
4646
var dropdownMenu = tab.parentNode.parentNode.querySelector('.tabs .other-tablist')
4747
dropdownBtn.addEventListener('click', function (e) {
48-
console.log(e, 'enter')
48+
// console.log(e, 'enter')
4949
e.preventDefault()
5050
if (dropdownMenu.style.display === 'block' || dropdownMenu.classList.contains('show')) {
5151
dropdownMenu.classList.remove('show')

0 commit comments

Comments
 (0)