')
+ document.querySelector('.tabs').insertAdjacentHTML('beforeend', ' More ')
+ document.getElementById('activeTabItem').innerText = tab.innerText
+ var dropdownBtn = document.querySelector('.dropdown-btn-down')
+ var dropdownBtnIcon = document.querySelector('.dropdown-btn .fas')
+ dropdownBtn.addEventListener('click', function (e) {
+ e.preventDefault()
+ if (dropdownMenu.style.display === 'block' || dropdownMenu.classList.contains('show')) {
+ dropdownMenu.classList.remove('show')
+ dropdownMenu.classList.add('hide')
+ this.querySelector('.fas').classList.add('fa-chevron-circle-down')
+ this.querySelector('.fas').classList.remove('fa-chevron-circle-up')
+ } else {
+ dropdownMenu.classList.add('show')
+ dropdownMenu.classList.remove('hide')
+ this.querySelector('.fas').classList.add('fa-chevron-circle-up')
+ this.querySelector('.fas').classList.remove('fa-chevron-circle-down')
+ }
+ })
}
- tab.addEventListener('click', activateTab.bind({ tabset: tabset, tab: tab, pane: pane }))
- })
- if (!active && first) {
- first.tab.classList.add('is-active')
- if (first.pane) first.pane.classList.add('is-active')
+ }, 100)
+
+ if (!id) return
+ var pane = getPane(id, tabset)
+ if (!idx) first = { tab: tab, pane: pane }
+ if (!active && hash === '#' + id && (active = true)) {
+ tab.classList.add('is-active')
+ if (pane) pane.classList.add('is-active')
+ } else if (!idx) {
+ tab.classList.remove('is-active')
+ if (pane) pane.classList.remove('is-active')
}
+ tab.addEventListener('click', activateTab.bind({ tabset: tabset, tab: tab, pane: pane }))
+ })
+ if (!active && first) {
+ first.tab.classList.add('is-active')
+ if (first.pane) first.pane.classList.add('is-active')
+ }
+ }
+ tabset.classList.remove('is-loading')
+ clearTimeout(this.checkActiveClass, 20000)
+})
+
+function activateTab (e) {
+ e.preventDefault()
+ var tab = this.tab
+ var pane = this.pane
+ var dropdownMenu = document.querySelector('.tabs ul')
+ var dropdownBtnIcon = document.querySelector('.dropdown-btn-down .fas')
+
+ find('.tabs li, .tab-pane', this.tabset).forEach(function (it) {
+ it === tab || it === pane ? it.classList.add('is-active') : it.classList.remove('is-active')
+ var activeTabList = tab.classList.contains('is-active')
+ if (activeTabList) {
+ document.getElementById('activeTabItem').innerText = tab.innerText
+ dropdownMenu.classList.remove('show')
+ dropdownBtnIcon.classList.add('fa-chevron-circle-down')
+ dropdownBtnIcon.classList.remove('fa-chevron-circle-up')
}
- tabset.classList.remove('is-loading')
})
+}
- function activateTab (e) {
- var tab = this.tab
- var pane = this.pane
- find('.tabs li, .tab-pane', this.tabset).forEach(function (it) {
- it === tab || it === pane ? it.classList.add('is-active') : it.classList.remove('is-active')
- })
+function find (selector, from) {
+ return Array.prototype.slice.call((from || document).querySelectorAll(selector))
+}
+setTimeout(function () {
+ document.querySelector(' #activeTabItem').addEventListener('click', function (e) {
e.preventDefault()
- }
-
- function find (selector, from) {
- return Array.prototype.slice.call((from || document).querySelectorAll(selector))
- }
+ })
+}, 3000)
- function getPane (id, tabset) {
- return find('.tab-pane', tabset).find(function (it) {
- return it.getAttribute('aria-labelledby') === id
- })
- }
-})()
+function getPane (id, tabset) {
+ return find('.tab-pane', tabset).find(function (it) {
+ return it.getAttribute('aria-labelledby') === id
+ })
+}
diff --git a/src/js/06-page-rating.js b/src/js/06-page-rating.js
new file mode 100644
index 0000000..76d4d10
--- /dev/null
+++ b/src/js/06-page-rating.js
@@ -0,0 +1,62 @@
+;(function () {
+ 'use strict'
+
+ var dialogBox = document.getElementById('dialogBox')
+ var helpYesBtn = document.getElementById('yesBtn')
+ var helpNoBtn = document.getElementById('noBtn')
+ var skipBtnMsg = document.getElementById('skipBtnMsg')
+ var feedBackFormBox = document.getElementById('additionalFeedbackBox')
+ var leaveAddtinalBox = document.getElementById('leaveAddtinalBox')
+ var skipLeaveBtn = document.getElementById('skipLeaveBtn')
+ var feedBackMsg = document.querySelector('.feed-back-msg')
+ var submitBtn = document.querySelector('.submit-btn')
+ var leaveYesBtn = document.querySelector('.yes-btn')
+ var feedbackInfoBtn = document.querySelector('.info-btn')
+ var feedbackModal = document.querySelector('.feedback-modal')
+ var closeModalPopup = document.querySelector('.close-popup')
+ // for config
+ var yesBtnData = helpYesBtn.dataset
+ var noBtnData = helpNoBtn.dataset
+
+ helpYesBtn.addEventListener('click', function (e) {
+ dialogBox.style.display = 'block'
+ this.classList.add('active')
+ helpNoBtn.classList.remove('active')
+ console.log(yesBtnData, 16)
+ })
+ helpNoBtn.addEventListener('click', function (e) {
+ dialogBox.style.display = 'block'
+ this.classList.add('active')
+ helpYesBtn.classList.remove('active')
+ console.log(noBtnData, 27)
+ })
+
+ skipBtnMsg.addEventListener('click', function (e) {
+ feedBackFormBox.style.display = 'none'
+ leaveAddtinalBox.style.display = 'block'
+ })
+ skipLeaveBtn.addEventListener('click', function (e) {
+ leaveAddtinalBox.style.display = 'none'
+ feedBackFormBox.style.display = 'block'
+ })
+
+ feedBackMsg.addEventListener('keyup', function (e) {
+ var textareaValue = this.value
+
+ if (textareaValue !== '') {
+ submitBtn.classList.remove('disabled')
+ } else {
+ submitBtn.classList.add('disabled')
+ }
+ })
+ leaveYesBtn.addEventListener('click', function (e) {
+ leaveAddtinalBox.style.display = 'none'
+ })
+ feedbackInfoBtn.addEventListener('click', function (e) {
+ feedbackModal.classList.add('show')
+ })
+
+ closeModalPopup.addEventListener('click', function (e) {
+ feedbackModal.classList.remove('show')
+ })
+})()
diff --git a/src/js/08-table-responsive.js b/src/js/08-table-responsive.js
new file mode 100644
index 0000000..369737e
--- /dev/null
+++ b/src/js/08-table-responsive.js
@@ -0,0 +1,57 @@
+;(function () {
+ 'use strict'
+ /* table js */
+
+ var smallBreak = 768 // Your small screen breakpoint in pixels
+ var tables = document.querySelectorAll('table.tableblock')
+
+ window.onload = function () {
+ shapeTable()
+ }
+ window.addEventListener('resize', function () {
+ shapeTable()
+ })
+
+ function shapeTable () {
+ if (window.innerWidth < smallBreak) {
+ tables.forEach(function (elem, index) {
+ // console.log(elem.querySelector('tr'))
+
+ var columns = elem.querySelectorAll('tbody tr').length
+ var rows = elem.querySelectorAll('thead tr th').length
+ for (var i = 1; i <= rows; i++) {
+ var ele = elem.querySelectorAll('th')
+ if (ele[i] !== undefined) {
+ var maxHeight = ele[i].offsetHeight
+ }
+
+ for (var j = 1; j <= columns; j++) {
+ // console.log(i, j, 23)
+ if (elem.querySelector('tr:nth-child(' + j + ') td:nth-child(' + i + ')') != null &&
+ elem.querySelector(' tr:nth-child(' + j + ') td:nth-child(' + i + ')') !== undefined) {
+ // console.log(elem.querySelector('tr:nth-child(' + j + ') td:nth-child(' + i + ')'), 25)
+ if (elem.querySelector('tr:nth-child(' + j + ') td:nth-child(' + i + ')').offsetHeight > maxHeight) {
+ maxHeight = elem.querySelector('tr:nth-child(' + j + ') td:nth-child(' + i + ')').offsetHeight
+ }
+ if (elem.querySelectorAll('tr:nth-child(' + j + ') td:nth-child(' + i + ')').scrollHeight >
+ elem.querySelector('tr:nth-child(' + j + ') td:nth-child(' + i + ')').offsetHeight) {
+ maxHeight = elem.querySelectorAll('tr:nth-child(' + j + ') td:nth-child(' + i + ')').scrollHeight
+ }
+ }
+ }
+ for (var k = 1; k <= columns; k++) {
+ if (elem.querySelector('tr:nth-child(' + k + ') td:nth-child(' + i + ')') != null && elem.querySelector(
+ 'tr:nth-child(' + k + ') td:nth-child(' + i + ')') !== undefined) {
+ elem.querySelector('tr:nth-child(' + k + ') td:nth-child(' + i + ')').style.height = maxHeight + 'px'
+ elem.querySelector('th:nth-child(' + i + ')').style.height = maxHeight + 'px'
+ }
+ }
+ }
+ })
+ } else {
+ // document.querySelectorAll('table.tableblock td, table.tableblock th')[0].removeAttribute('style')
+ document.querySelectorAll('table.tableblock tbody tr td, table.tableblock thead tr th').forEach(
+ function (elem, ind) { elem.style.height = 'auto' })
+ }
+ }
+})()
diff --git a/src/js/vendor/feedback.js b/src/js/vendor/feedback.js
index 62e03df..d0c7d79 100644
--- a/src/js/vendor/feedback.js
+++ b/src/js/vendor/feedback.js
@@ -1,10 +1,11 @@
;(function () {
'use strict'
- if (Math.max(window.screen.availHeight, window.screen.availWidth) < 769) return
+ if (Math.max(window.screen.availHeight, window.screen.availWidth) > 769) return
window.addEventListener('load', function () {
var config = document.getElementById('feedback-script').dataset
+ console.log(config, config.collectorId, 8)
var script = document.createElement('script')
// eslint-disable-next-line max-len
script.src = 'https://issues.couchbase.com/s/66cd330397e6b28e6a44bd3d603733a8-T/j9sjl8/802003/be0e2f3d0946caa44cd62a35c9de2f18/3.0.7/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector-embededjs/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector-embededjs.js?locale=en-US&collectorId=' + config.collectorId // prettier-ignore
diff --git a/src/layouts/landing-page-core-concept.hbs b/src/layouts/landing-page-core-concept.hbs
new file mode 100644
index 0000000..4cb1a12
--- /dev/null
+++ b/src/layouts/landing-page-core-concept.hbs
@@ -0,0 +1,13 @@
+
+
+
+{{> head-first}}
+ {{{detag (or page.title 'landing page')}}}{{#if site.title}} | {{{site.title}}}{{/if}}
+{{> head-last}}
+
+
+{{> header}}
+{{> body-landing-core-concept}}
+{{> footer}}
+
+
diff --git a/src/layouts/landing-page.hbs b/src/layouts/landing-page.hbs
new file mode 100644
index 0000000..4c5afd1
--- /dev/null
+++ b/src/layouts/landing-page.hbs
@@ -0,0 +1,13 @@
+
+
+
+{{> head-first}}
+ {{{detag (or page.title 'landing page')}}}{{#if site.title}} | {{{site.title}}}{{/if}}
+{{> head-last}}
+
+
+{{> header}}
+{{> body-landing}}
+{{> footer}}
+
+
diff --git a/src/partials/body-landing-core-concept.hbs b/src/partials/body-landing-core-concept.hbs
new file mode 100644
index 0000000..dd0ded9
--- /dev/null
+++ b/src/partials/body-landing-core-concept.hbs
@@ -0,0 +1,104 @@
+
+
+
+
Core Concepts
+
+
+
+
+ Couchbase Server is an open source, distributed, NoSQL document-oriented engagement database.
+ It exposes a fast key-value store with managed cache for sub-millisecond data operations,
+ purpose-built indexers for fast queries and a powerful query engine for executing SQL-like queries.
+
diff --git a/src/partials/body-landing.hbs b/src/partials/body-landing.hbs
new file mode 100644
index 0000000..229718c
--- /dev/null
+++ b/src/partials/body-landing.hbs
@@ -0,0 +1,130 @@
+
+
+
+
Services
+
+
+
+
Couchbase Services support access to and maintenance of data.
+ Services can be deployed with flexibility across available
+ hardware-resources, providing Multi-Dimensional Scaling, whereby a
+ cluster can be tuned for optimal handling of emergent workloads
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Query
+
+
+
Couchbase Services support access to and maintenance of data.
+ Services can be deployed with flexibility across available
+ hardware-resources, providing Multi-Dimensional Scaling, whereby a
+ cluster can be tuned for optimal handling of emergent workloads
+ The Eventing Service provides near real-time handling of changes
+ to data; whereby code is executed either in response to mutations,
+ or as scheduled by timers.
+
+ Please use the form below to provide your feedback. Because your feedback is valuable to us,
+ the information you submit in this form is recorded in our issue tracking system (JIRA), which is publicly available.
+ You can track the status of your feedback using the ticket number displayed in the dialog once you submit the form.
+