Skip to content

Commit fb1cbab

Browse files
authored
Merge pull request #34 from couchbase/ui-bug-fixes
Sandbox UI bug fixes
2 parents ae984ea + 236e6d1 commit fb1cbab

35 files changed

+336
-329
lines changed

src/css/doc.css

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -415,12 +415,11 @@
415415
.doc .abstract blockquote * {
416416
font-weight: inherit;
417417
}
418-
419-
.doc .abstract blockquote::before {
418+
/* .doc .abstract blockquote::before {
420419
content: "Summary: ";
421420
color: var(--color-muted);
422421
font-weight: var(--weight-medium);
423-
}
422+
} */
424423

425424
.doc ul {
426425
margin: 0;

src/css/landing-page.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,6 @@
244244

245245
/* CSS for nav filter */
246246
.nav.tutorials-filter .nav-menu {
247-
top: calc(0.91rem + var(--height-navbar));
248247
padding: 20px;
249248
background: var(--color-brand-gray7);
250249
}

src/css/nav.css

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,32 @@
2222
overflow-y: auto;
2323
background-color: var(--color-brand-gray7);
2424
height: var(--height-nav);
25-
transition: all 0.3s;
25+
}
26+
27+
.version-control-box + .nav-menu {
28+
height: var(--height-nav-with-version);
29+
}
30+
31+
@media screen and (max-width: 768px) {
32+
.left-sidebar-menu {
33+
top: 0;
34+
bottom: 0;
35+
left: 0;
36+
transform: translateX(-100%);
37+
z-index: var(--z-index-nav-mobile);
38+
}
39+
}
40+
41+
@media screen and (min-width: 769px) {
42+
.left-sidebar-menu {
43+
top: var(--height-to-body);
44+
margin-bottom: 1.5rem;
45+
height: 100%;
46+
/* height: var(--height-nav); */
47+
z-index: var(--z-index-nav);
48+
border-left: 2px solid #eee;
49+
border-right: 2px solid #eee;
50+
}
2651
}
2752

2853
.nav-menu .nav-link,

src/css/table.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ table.table-tutorial tr td:last-child {
119119
top: -30px;
120120
}
121121

122-
div + table.tableblock.caption-table,
122+
table.tableblock.caption-table,
123123
div.ulist + table.tableblock,
124124
table.tableblock + table.tableblock {
125125
margin-top: 2.5rem;

src/css/toc.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@
7676
transition: all 0.3s;
7777
}
7878

79-
.toc .toc-menu li a.is-active::before,
80-
.toc .toc-menu li a:hover::before {
79+
.toc .toc-menu li a.is-active::before {
8180
height: 100%;
8281
}
8382

src/css/vars.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@
7070
--height-to-body: calc(var(--height-navbar) + var(--height-spacer));
7171
--height-min-body: calc(100vh - var(--height-to-body));
7272
--height-toc-sidebar: calc(var(--height-min-body));
73-
--height-nav: calc(100vh - var(--height-to-body) - var(--height-version-control));
73+
--height-nav: calc(var(--height-min-body) + var(--height-spacer));
74+
--height-nav-with-version: calc(100vh - var(--height-to-body) - var(--height-version-control));
7475
--nav-menu-top-space: calc(var(--height-to-body) + var(--height-version-control));
7576
/* --width-main-gutter: 1.5rem; */
7677
--width-main-gutter: 2.5rem;

src/js/06-page-rating.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@
2222
// dialogBox.style.display = 'block'
2323
this.classList.add('active')
2424
helpNoBtn.classList.remove('active')
25-
console.log(yesBtnData, 16)
25+
// console.log(yesBtnData, 16)
2626
})
2727
helpNoBtn.addEventListener('click', function (e) {
2828
// dialogBox.style.display = 'block'
2929
this.classList.add('active')
3030
helpYesBtn.classList.remove('active')
31-
console.log(noBtnData, 27)
31+
// console.log(noBtnData, 27)
3232
})
3333
skipBtnMsg.addEventListener('click', function (e) {
3434
dialogBox.style.display = 'none'

src/js/08-contributor-bot.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
;(function () {
22
'use strict'
3-
// console.log('contributor page')
43
var showData = false
54
var contributors
65
var contributorList = document.getElementById('contributorList')

src/js/09-table-responsive.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
function shapeTable () {
1616
if (window.innerWidth < smallBreak) {
1717
tables.forEach(function (elem, index) {
18-
// console.log(elem.querySelector('tr'))
19-
2018
var columns = elem.querySelectorAll('tbody tr').length
2119
var rows = elem.querySelectorAll('thead tr th').length
2220
for (var i = 1; i <= rows; i++) {
@@ -26,12 +24,11 @@
2624
}
2725

2826
for (var j = 1; j <= columns; j++) {
29-
// console.log(i, j, 23)
27+
3028
if (
3129
elem.querySelector('tr:nth-child(' + j + ') td:nth-child(' + i + ')') != null &&
3230
elem.querySelector(' tr:nth-child(' + j + ') td:nth-child(' + i + ')') !== undefined
3331
) {
34-
// console.log(elem.querySelector('tr:nth-child(' + j + ') td:nth-child(' + i + ')'), 25)
3532
if (elem.querySelector('tr:nth-child(' + j + ') td:nth-child(' + i + ')').offsetHeight > maxHeight) {
3633
maxHeight = elem.querySelector('tr:nth-child(' + j + ') td:nth-child(' + i + ')').offsetHeight
3734
}

src/js/10-landing-page-nav.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
// add class even odd
99
var $allData = $('.data-filter-column')
1010
for (var i = 0; i < $allData.length; i++) {
11-
console.log(i, 445, $allData[i])
1211
if (i % 2 === 1) {
1312
$allData[i].classList.add('even')
1413
} else {
@@ -24,7 +23,6 @@
2423
if (!Object.prototype.hasOwnProperty.call(selectedFiltersData, this.name)) {
2524
selectedFiltersData[this.name] = []
2625
}
27-
// console.log(selectedFiltersData, 27)
2826
selectedFiltersData[this.name].push(this.value.toLowerCase())
2927
})
3028
// create a collection containing all of the filterable elements
@@ -39,9 +37,7 @@
3937
var currentFilterValues = $(this).find('.sub-heading').data('category').toLowerCase().split(' ')
4038

4139
$.each(currentFilterValues, function (_, currentFilterValue) {
42-
// console.log('enter', currentFilterValues, currentFilterValue)
4340
if ($.inArray(currentFilterValue, filterValues) !== -1) {
44-
console.log('true', currentFilterValue, filterValues)
4541
matched = true
4642
return false
4743
}
@@ -54,7 +50,6 @@
5450
$('.data-filter-column').addClass('hide').filter($filteredResultsData).addClass('show').removeClass('hide')
5551
// add class for data-filter-column
5652
for (var i = 0; i < $filteredResultsData.length; i++) {
57-
console.log(i, 445, $filteredResultsData[i])
5853
if (i % 2 === 1) {
5954
$filteredResultsData[i].classList.add('even')
6055
} else {
@@ -70,9 +65,6 @@
7065
inputs[j].checked = false
7166
}
7267
for (var i = 0; i < $allData.length; i++) {
73-
console.log(i, 445, $allData[i])
74-
// $allData[i].classList.remove('even')
75-
// $allData[i].classList.remove('odd')
7668
if (i % 2 === 1) {
7769
$allData[i].classList.add('even')
7870
} else {

0 commit comments

Comments
 (0)