Skip to content

Commit bfe1219

Browse files
authored
Merge pull request #81 from couchbase/aw-bug-fix-3
Issue fixes
2 parents 15aacd4 + 644fb49 commit bfe1219

File tree

8 files changed

+62
-18
lines changed

8 files changed

+62
-18
lines changed

src/css/base.css

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,20 @@ i {
9595
padding: 0 var(--width-container-gutter);
9696
}
9797

98+
@media all and (max-width: 992px) {
99+
.container,
100+
.container-fluid {
101+
padding: 0 2rem;
102+
}
103+
}
104+
105+
@media all and (max-width: 767px) {
106+
.container,
107+
.container-fluid {
108+
padding: 0 1.75rem;
109+
}
110+
}
111+
98112
.hide,
99113
.hide-nav {
100114
display: none;

src/css/component-frame.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,7 @@
7474
right: 4px;
7575
}
7676

77-
.component-frame .frame-dropdown.show,
78-
.component-frame .frame-body:hover .frame-dropdown {
77+
.component-frame .frame-dropdown.show {
7978
display: block;
8079
}
8180

src/css/doc.css

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,10 +430,18 @@ ul ul ul {
430430
/* padding-left: var(--base-space); */
431431
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
432432
border-radius: 5px;
433-
/* align-items: center; */
433+
align-items: center;
434434
max-width: var(--image-block-container);
435435
}
436436

437+
.doc .imageblock.text-left {
438+
align-items: flex-start;
439+
}
440+
441+
.doc .imageblock.text-right {
442+
align-items: flex-end;
443+
}
444+
437445
.doc .imageblock img {
438446
display: inline-block;
439447
}
@@ -578,6 +586,7 @@ ul ul ul {
578586
padding-top: var(--base-large-space);
579587
padding-bottom: var(--base-large-space);
580588
/* white-space: pre-wrap; */
589+
581590
/* NOTE enable these styles if side-to-side scrolling is preferred */
582591
overflow-wrap: normal;
583592
word-wrap: normal;

src/css/nav.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -517,14 +517,14 @@ a.collapse-menu span {
517517

518518
nav.nav a.menu-expand-toggle {
519519
transform: rotate(90deg);
520-
right: -4.8rem;
520+
right: -4.3rem;
521521
opacity: 1;
522522
color: #fff;
523523
background-color: var(--color-brand-blue-secondary);
524524
border-radius: 0;
525525
top: 60px;
526526
font-size: 18px;
527-
padding: 6px 14px;
527+
padding: 2px 8px;
528528
text-decoration: none;
529529
}
530530

@@ -549,9 +549,9 @@ a.collapse-menu span {
549549

550550
@media screen and (max-width: 767px) {
551551
nav.nav a.menu-expand-toggle {
552-
right: -3.8rem;
552+
right: -3.4rem;
553553
top: 60px;
554554
font-size: 14px;
555-
padding: 4px 10px;
555+
padding: 2px 5px;
556556
}
557557
}

src/js/01-nav.js

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
var nav = document.querySelector('nav.nav')
55
var menuExpandToggle = document.querySelector('.menu-expand-toggle')
6+
var versionToggle = document.querySelector('.clickable')
7+
var versionDropdownList = document.querySelector('.frame-dropdown')
68
var navMenu = {}
79
if (!(navMenu.element = nav && nav.querySelector('.nav-menu'))) return
810
var navControl
@@ -35,7 +37,7 @@
3537

3638
// Toggle class
3739
function toggleActive (e) {
38-
// this.classList.toggle('open')
40+
this.classList.toggle('open')
3941
this.classList.toggle('is-active')
4042
}
4143

@@ -86,6 +88,23 @@
8688
nav.classList.add('collapse-menu')
8789
}
8890
})
91+
92+
if (versionToggle) {
93+
versionToggle.addEventListener('click', function (e) {
94+
e.preventDefault()
95+
if (versionDropdownList.classList.contains('show')) {
96+
versionDropdownList.classList.remove('show')
97+
} else {
98+
versionDropdownList.classList.add('show')
99+
}
100+
concealEvent(e)
101+
})
102+
}
103+
104+
window.addEventListener('click', function (e) {
105+
versionDropdownList.classList.remove('show')
106+
})
107+
89108
// has children in li
90109
function concealEvent (e) {
91110
e.stopPropagation()

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
if (sidebar) {
4343
window.addEventListener('load', function () {
4444
onScroll()
45-
hashScroll()
45+
// hashScroll()
4646
window.addEventListener('scroll', onScroll)
4747
})
4848
}
@@ -94,11 +94,11 @@
9494
return [].slice.call(collection)
9595
}
9696

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-
}
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+
// }
104104
})()

src/js/06-page-rating.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,10 @@
7878

7979
if (window.location.hash) {
8080
var hash = window.location.hash
81-
$('html, body').animate({ 'scrollTop': $(hash).offset().top }, 'slow')
81+
if ($(hash).length !== 0) {
82+
var offSetValue = $(hash).offset().top
83+
$('html, body').animate({ 'scrollTop': offSetValue }, 'slow')
84+
}
8285
}
8386
/*eslint-env jquery*/
8487
})(jQuery)

src/partials/nav-version-control.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
{{{page.component.title}}}
1414
</span>
1515
<div class="frame-link-dropdowns">
16-
<a class="frame-link component" href="{{relativize page.componentVersion.url}}"><span class="version">{{page.componentVersion.displayVersion}}</span> <i class="fas fa-chevron-down"></i></a>
16+
<a class="frame-link component clickable" href="{{relativize page.componentVersion.url}}"><span class="version">{{page.componentVersion.displayVersion}}</span> <i class="fas fa-chevron-down"></i></a>
1717
<div class="frame-dropdown versions">
1818
<div class="column">
1919
<ul class="frame-dropdown-list">

0 commit comments

Comments
 (0)