Skip to content

Commit 784049a

Browse files
committed
Merge branch 'master' of https://github.com/couchbase/docs-ui-sandbox into aw-bug-fix-3
2 parents c0aac7c + 6f0d7c5 commit 784049a

20 files changed

+89
-176
lines changed

README.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
= Couchbase Documentation UI
22
// Variables:
3-
:current-release: prod-79
3+
:current-release: prod-85
44
// Settings:
55
:!example-caption:
66
:experimental:

src/css/base.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,12 @@ i {
9999
.hide-nav {
100100
display: none;
101101
}
102+
103+
@media screen and (min-width: 992px) {
104+
.body.container {
105+
padding-left: 0;
106+
}
107+
}
102108
/* .container-fluid {
103109
max-width: var(--width-container-fluid);
104110
padding: 0;

src/css/body.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,6 @@ aside.toc.sidebar {
5959

6060
@media screen and (max-width: 767px) {
6161
div.body {
62-
margin-top: 3.9rem;
62+
margin-top: 4.2rem;
6363
}
6464
}

src/css/component-frame.css

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
.frame-body {
2222
margin-left: var(--base-extra-small-space);
23-
position: relative;
23+
/* position: relative; */
2424
padding-top: 12px;
2525
padding-bottom: 12px;
2626
padding-right: 0;
@@ -32,7 +32,7 @@
3232

3333
.frame-body .title {
3434
margin: 0 0 0 0;
35-
font-size: var(--font-medium);
35+
font-size: 1.125rem;
3636
line-height: 1.5rem;
3737
font-weight: var(--weight-semibold);
3838
color: var(--color-brand-gray1);
@@ -56,8 +56,12 @@
5656
.frame-body .frame-link {
5757
position: relative;
5858
color: var(--color-brand-gray1);
59-
font-size: 18px;
60-
margin-left: 4px;
59+
font-size: 1.125rem;
60+
font-weight: var(--weight-semibold);
61+
}
62+
63+
.frame-body .frame-link .version {
64+
margin: 0 8px 0 4px;
6165
}
6266

6367
.frame-dropdown {
@@ -67,6 +71,7 @@
6771
top: 100%;
6872
z-index: 1;
6973
padding: 0;
74+
right: 4px;
7075
}
7176

7277
.component-frame .frame-dropdown.show,
@@ -76,8 +81,6 @@
7681

7782
.frame-link-dropdowns .frame-link {
7883
color: var(--color-brand-gray1);
79-
font-weight: var(--weight-semibold);
80-
margin: 0;
8184
font-family: "Source Sans Pro", sans-serif;
8285
}
8386

@@ -89,7 +92,7 @@
8992
.frame-dropdown .frame-dropdown-list,
9093
.frame-dropdown .related {
9194
margin: 0;
92-
padding: 0;
95+
padding: 0.5rem 0;
9396
list-style: none;
9497
min-width: 125px;
9598
}
@@ -103,7 +106,7 @@
103106

104107
.frame-dropdown ul li a,
105108
.frame-dropdown .related li a {
106-
padding: 8px 0.625rem;
109+
padding: 0.5rem 1rem;
107110
display: inline-block;
108111
width: 100%;
109112
color: var(--color-brand-primary);
@@ -140,7 +143,7 @@ ul.frame-dropdown-list li:last-child,
140143
.frame-link,
141144
.frame-item,
142145
.navbar-item {
143-
font-size: var(--font-small);
146+
font-size: var(--font-base);
144147
color: var(--color-brand-gray4);
145148
text-decoration: none;
146149
}

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/css/header.css

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -107,20 +107,21 @@
107107

108108
.try-btn {
109109
font-weight: var(--weight-bold);
110+
margin-left: var(--column-space);
110111
}
111112

112113
.parent-site {
113-
margin: 0 10px;
114-
padding: 0 10px;
114+
/* margin: 0 10px;
115+
padding: 0 10px; */
115116
/* border-right: 1px solid var(--color-brand-gray5);
116117
border-left: 1px solid var(--color-brand-gray5); */
117118
}
118119

119-
.parent-site a {
120+
/* .parent-site a {
120121
color: var(--color-brand-gray4);
121122
font-size: 1rem;
122123
font-family: "Source Sans Pro", sans-serif;
123-
}
124+
} */
124125

125126
.search .query {
126127
border: none;
@@ -239,10 +240,10 @@
239240
width: 283px;
240241
}
241242

242-
.parent-site {
243+
/* .parent-site {
243244
margin: 0;
244245
padding: 0 var(--column-space);
245-
}
246+
} */
246247

247248
.navbar.navbar-new-top {
248249
padding: 1.25rem 0;
@@ -267,7 +268,8 @@
267268

268269
.primary-action {
269270
flex-wrap: wrap;
270-
justify-content: center;
271+
justify-content: space-around;
272+
width: 100%;
271273
}
272274

273275
.navbar-collapse {
@@ -294,17 +296,18 @@
294296
right: 5px;
295297
}
296298

297-
.parent-site {
299+
/* .parent-site {
298300
border-left: none;
299301
}
300302
301303
.parent-site a {
302304
color: var(--color-brand-white);
303-
}
305+
} */
304306

305307
.try-btn {
306308
background: var(--color-brand-white);
307309
color: var(--color-brand-blue);
310+
margin: 0;
308311
}
309312

310313
.header-bottom-row.is-active {

src/css/nav.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -251,9 +251,9 @@ html.is-clipped--nav {
251251
background-size: 75%;
252252
}
253253

254-
.is-inactive {
254+
/* .is-inactive {
255255
display: none;
256-
}
256+
} */
257257

258258
.main-nav-parent {
259259
font-size: var(--font-small);
@@ -316,7 +316,7 @@ html.is-clipped--nav {
316316
color: var(--color-brand-black);
317317
font-size: var(--font-base);
318318
line-height: var(--line-height-base);
319-
font-weight: var(--weight-semibold);
319+
/* font-weight: var(--weight-semibold); */
320320
}
321321

322322
.is-active[data-depth='0'] .is-active > .nav-line[data-depth="1"] {

src/helpers/canonical-url.js

Lines changed: 0 additions & 40 deletions
This file was deleted.

src/helpers/latest-page-url.js

Lines changed: 0 additions & 26 deletions
This file was deleted.

src/js/01-nav.js

Lines changed: 6 additions & 60 deletions
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')
@@ -31,68 +31,14 @@
3131
}
3232
})
3333

34-
// fitNavMenuInit({})
35-
// window.addEventListener('load', fitNavMenuInit)
36-
// window.addEventListener('resize', fitNavMenuInit)
37-
3834
if ((navControl = document.querySelector('main .nav-control'))) navControl.addEventListener('click', revealNav)
3935

40-
// function scrollItemToMiddle (el, parentEl) {
41-
// var adjustment = (el.getBoundingClientRect().height - parentEl.getBoundingClientRect().height) * 0.5 + el.offsetTop
42-
// if (adjustment > 0) parentEl.scrollTop = adjustment
43-
// }
44-
45-
// function fitNavMenuInit (e) {
46-
// window.removeEventListener('scroll', fitNavMenuOnScroll)
47-
// navMenu.element.style.height = ''
48-
// if ((navMenu.preferredHeight = navMenu.element.getBoundingClientRect().height) > 0) {
49-
// // QUESTION should we check if x value > 0 instead?
50-
// if (window.getComputedStyle(nav).visibility === 'visible') {
51-
// if (!navMenu.encroachingElement) navMenu.encroachingElement = document.querySelector('footer.footer')
52-
// fitNavMenu(navMenu.preferredHeight, (navMenu.viewHeight = window.innerHeight), navMenu.encroachingElement)
53-
// window.addEventListener('scroll', fitNavMenuOnScroll)
54-
// }
55-
// if (currentPageItem && e.type !== 'resize') {
56-
// scrollItemToMiddle(currentPageItem.querySelector('.nav-link'), navMenu.element)
57-
// }
58-
// }
59-
// }
60-
61-
// function fitNavMenuOnScroll () {
62-
// fitNavMenu(navMenu.preferredHeight, navMenu.viewHeight, navMenu.encroachingElement)
63-
// }
64-
65-
// function fitNavMenu (preferredHeight, availableHeight, encroachingElement) {
66-
// var reclaimedHeight = availableHeight - encroachingElement.getBoundingClientRect().top
67-
/*eslint max-len: ["error", { "code": 180 }]*/
68-
// navMenu.element.style.height = reclaimedHeight > 0 ? Math.max(0, preferredHeight - reclaimedHeight) + 'px' : ''
69-
// }
70-
71-
var navMenuControl
72-
if (document.querySelector('.main-nav-parent')) {
73-
navMenuControl = document.querySelector('.main-nav-parent')
74-
navMenuControl.addEventListener('click', function () {
75-
for (var i = 0; i < navItems.length; i++) {
76-
navItems[i].classList.remove('is-active')
77-
navItems[i].classList.remove('is-inactive')
78-
navItems[i].classList.remove('open')
79-
}
80-
this.style.display = 'none'
81-
})
82-
}
8336
// Toggle class
8437
function toggleActive (e) {
85-
// if (this.getAttribute('data-depth') === '1') {
86-
// var otherNavs = document.querySelectorAll('.nav-item[data-depth="0"]:not(.is-active)')
87-
// for (var i = 0; i < otherNavs.length; i++) {
88-
// otherNavs[i].classList.add('is-inactive')
89-
// }
90-
// }
91-
this.classList.toggle('open')
38+
// this.classList.toggle('open')
9239
this.classList.toggle('is-active')
9340
}
9441

95-
var navItems = document.querySelectorAll('.nav .nav-item')
9642
function revealNav (e) {
9743
if (nav.classList.contains('is-active')) return hideNav(e)
9844
document.documentElement.classList.add('is-clipped--nav')
@@ -148,7 +94,7 @@
14894
setTimeout(function () {
14995
if (document.querySelector('.is-current-page')) {
15096
var currentPageMenu = document.querySelector('.is-current-page')
151-
var topPositon = currentPageMenu.offsetTop
97+
var topPositon = currentPageMenu.offsetTop - 100
15298
var leftMenu = document.querySelector('.left-sidebar-menu .nav-menu')
15399
leftMenu.scrollTop = topPositon
154100
}
@@ -166,9 +112,9 @@
166112

167113
// hide main menu for top level navigation -
168114

169-
if (nav.className.includes('is-current-page')) {
170-
navMenuControl.style.display = 'none'
171-
}
115+
// if (nav.className.includes('is-current-page')) {
116+
// navMenuControl.style.display = 'none'
117+
// }
172118

173119
// hide in second level menu
174120
if (nav.className.includes('is-current-path')) {

0 commit comments

Comments
 (0)