diff --git a/src/css/base.css b/src/css/base.css index 1d8a836f..62af9b90 100644 --- a/src/css/base.css +++ b/src/css/base.css @@ -78,6 +78,8 @@ code { color: inherit; } +#redoc { width: 100%; } + a code { color: var(--color-link); background-color: transparent; diff --git a/src/css/contributor.css b/src/css/contributor.css deleted file mode 100644 index 7c3c4cb1..00000000 --- a/src/css/contributor.css +++ /dev/null @@ -1,70 +0,0 @@ -.contributor-list-box { - /* display: flex; */ - align-items: center; - flex-wrap: wrap; - margin: 15px 0 0; - visibility: hidden; - display: none; -} - -.contributor-list-box.show { - visibility: visible; -} - -.contributor-list-box span { - font-size: 0.875rem; - line-height: 1; - color: var(--color-brand-gray3); - position: relative; - padding-right: 15px; -} - -.contributor-list-box .last-commit-date::after { - content: ""; - width: 1px; - height: 100%; - background: var(--color-brand-gray3); - position: absolute; - right: 0; - top: 0; -} - -#otherContributor { - margin-left: 5px; -} - -.contributor-list-box ul { - display: flex; - flex-wrap: wrap; - padding-left: 10px; -} - -.contributor-list-box ul::before { - content: none; -} - -.contributor-list-box ul li { - margin-right: 10px; - width: 22px; - height: 22px; - list-style: none; -} - -.contributor-list-box ul li:last-child { - margin-right: 0; -} - -.contributor-list-box ul li img { - max-width: 100%; - border-radius: 50%; -} - -@media only screen and (max-width: 767px) { - .contributor-list-box span { - padding-right: 10px; - } - - #otherContributor { - padding-right: 0; - } -} diff --git a/src/css/site.css b/src/css/site.css index 8abc7b40..a11160e2 100644 --- a/src/css/site.css +++ b/src/css/site.css @@ -29,7 +29,6 @@ @import "clipboard.css"; @import "table.css"; @import "landing-page.css"; -@import "contributor.css"; @import "terminal.css"; @import "external-link-icon.css"; @import "disable-callouts.css"; diff --git a/src/js/08-contributor-bot.js b/src/js/08-contributor-bot.js deleted file mode 100644 index 9304e27a..00000000 --- a/src/js/08-contributor-bot.js +++ /dev/null @@ -1,87 +0,0 @@ -;(function () { - 'use strict' - var showData = false - var contributors - if (document.getElementById('contributorList')) { - var contributorList = document.getElementById('contributorList') - var commitdateTag = document.getElementById('commitdate') - var otherContributor = document.getElementById('otherContributor') - var contributorListBox = document.querySelector('.contributor-list-box') - var apiURL = 'https://api.github.com' - var githubRepo = '/couchbase/docs-ui' - // var url = 'https://api.github.com/repos/couchbase/docs-ui/stats/contributors' - // var contributorEveryDayURL = 'repos/couchbase/docs-ui/stats/contributors' - // Call the fetch function passing the url of the API as a parameter - // eslint-disable-next-line no-undef - fetch(apiURL + '/repos' + githubRepo + '/stats/contributors') - .then(function (resp) { - var data = resp.json() - return data - }) - .then(function (data) { - showData = true - contributors = data - var otherContributorData = contributors.length - 5 - var maxCommitLength = contributors.length - 1 - var maxCommitAuthor = contributors[maxCommitLength] - // get last commit date - var totalWeek = maxCommitAuthor.weeks - var totaltWeekLength = totalWeek.length - 1 // array - var lastCommitWeek = totalWeek[totaltWeekLength] - var lastCommitTimeStamp = lastCommitWeek.w // object - var lastCommitDate = new Date(lastCommitTimeStamp * 1000) // convert timestamp to date - var getDate = lastCommitDate.getDate() - var getYear = lastCommitDate.getFullYear() - // eslint-disable-next-line no-array-constructor - var month = new Array() - month[0] = 'January' - month[1] = 'February' - month[2] = 'March' - month[3] = 'April' - month[4] = 'May' - month[5] = 'June' - month[6] = 'July' - month[7] = 'August' - month[8] = 'September' - month[9] = 'October' - month[10] = 'November' - month[11] = 'December' - var getMonth = month[lastCommitDate.getMonth()] - var latestCommitDate = getMonth + ' ' + getDate + ', ' + getYear - commitdateTag.append(latestCommitDate) - otherContributor.append(otherContributorData) - - // show html data - if (showData) { - contributorListBox.classList.add('show') - } - // map function - - contributors - .slice(0) - .reverse() - .map(function (contributor, index, arrayobj) { - //show only top 5 contributor - if (index <= 4) { - var contributorAvtar = contributor.author.avatar_url - // var contributorTotalCommit = contributor.total - var authorURL = contributor.author.html_url - // append child in ul - var li = document.createElement('li') - var anchor = document.createElement('a') - var image = document.createElement('img') - image.setAttribute('src', contributorAvtar) - image.setAttribute('alt', '') - anchor.setAttribute('href', authorURL) - anchor.setAttribute('target', '_blank') - li.appendChild(anchor) - anchor.appendChild(image) - contributorList.appendChild(li) - } - }) - }) - .catch(function (err) { - console.log(err, 13) - }) - } -})() diff --git a/src/layouts/404.hbs b/src/layouts/404.hbs index f3795cb4..f848861f 100644 --- a/src/layouts/404.hbs +++ b/src/layouts/404.hbs @@ -1,13 +1,4 @@ - - - -{{> head-first}} -{{{detag (or page.title 'Page Not Found')}}}{{#with site.title}} | {{this}}{{/with}} -{{> head-last}} - - -{{> header}} -{{> body-404}} -{{> footer}} - - +{{> layout-shell + defaultTitle="Page Not Found" + bodyClass="status-404" + bodyTemplate="body-404"}} diff --git a/src/layouts/default.hbs b/src/layouts/default.hbs index 3e941fb7..b0b68f32 100644 --- a/src/layouts/default.hbs +++ b/src/layouts/default.hbs @@ -1,13 +1,2 @@ - - - -{{> head-first}} -{{{detag (or page.title 'Untitled')}}}{{#with site.title}} | {{this}}{{/with}} -{{> head-last}} - - -{{> header}} -{{> body}} -{{> footer}} - - +{{> layout-shell + defaultTitle="Untitled"}} diff --git a/src/layouts/home.hbs b/src/layouts/home.hbs index a9bab46d..d5162704 100644 --- a/src/layouts/home.hbs +++ b/src/layouts/home.hbs @@ -1,14 +1,4 @@ - - - -{{> head-first}} -Couchbase Documentation -{{> head-last}} - - - -{{> header}} -{{> body-home}} -{{> footer}} - - +{{> layout-shell + siteTitleOnly=true + bodyClass="home" + bodyTemplate="body-home"}} diff --git a/src/layouts/landing-page-capella.hbs b/src/layouts/landing-page-capella.hbs index ce5b99cb..0b7cfc5e 100644 --- a/src/layouts/landing-page-capella.hbs +++ b/src/layouts/landing-page-capella.hbs @@ -1,13 +1,8 @@ - - - -{{> head-first}} -{{{detag (or page.title 'landing page')}}}{{#if site.title}} | {{{site.title}}}{{/if}} -{{> head-last}} - - -{{> header}} -{{> body-landing-page-capella}} -{{> footer}} - - +{{> layout-shell + bodyClass="landing-page" + defaultTitle="Landing Page" + bodyTemplate="body-landing" + nav="sidebar" + mainClass="capella-article" + articleClass="landing-page-capella" + capellaImages=true}} diff --git a/src/layouts/landing-page-core-concept.hbs b/src/layouts/landing-page-core-concept.hbs index 4107edce..be766edb 100644 --- a/src/layouts/landing-page-core-concept.hbs +++ b/src/layouts/landing-page-core-concept.hbs @@ -1,13 +1,5 @@ - - - -{{> head-first}} -{{{detag (or page.title 'landing page')}}}{{#if site.title}} | {{{site.title}}}{{/if}} -{{> head-last}} - - -{{> header}} -{{> body-landing-core-concept}} -{{> footer}} - - +{{> layout-shell + bodyClass="landing-page" + defaultTitle="Landing Page" + bodyTemplate="body-landing" + nav="full"}} diff --git a/src/layouts/landing-page-sdk.hbs b/src/layouts/landing-page-sdk.hbs index 51ba56bc..be766edb 100644 --- a/src/layouts/landing-page-sdk.hbs +++ b/src/layouts/landing-page-sdk.hbs @@ -1,13 +1,5 @@ - - - -{{> head-first}} -{{{detag (or page.title 'landing page')}}}{{#if site.title}} | {{{site.title}}}{{/if}} -{{> head-last}} - - -{{> header}} -{{> body-landing-sdk}} -{{> footer}} - - +{{> layout-shell + bodyClass="landing-page" + defaultTitle="Landing Page" + bodyTemplate="body-landing" + nav="full"}} diff --git a/src/layouts/landing-page-top-level-sdk.hbs b/src/layouts/landing-page-top-level-sdk.hbs index 10f691b4..3abd3fd8 100644 --- a/src/layouts/landing-page-top-level-sdk.hbs +++ b/src/layouts/landing-page-top-level-sdk.hbs @@ -1,13 +1,5 @@ - - - -{{> head-first}} -{{{detag (or page.title 'landing page')}}}{{#if site.title}} | {{{site.title}}}{{/if}} -{{> head-last}} - - -{{> header}} -{{> body-landing-top-level-sdk}} -{{> footer}} - - +{{> layout-shell + bodyClass="landing-page" + defaultTitle="Landing Page" + bodyTemplate="body-landing" + nav="sidebar"}} diff --git a/src/layouts/landing-page-tutorials.hbs b/src/layouts/landing-page-tutorials.hbs index 32577dc5..0d0839e5 100644 --- a/src/layouts/landing-page-tutorials.hbs +++ b/src/layouts/landing-page-tutorials.hbs @@ -1,13 +1,5 @@ - - - -{{> head-first}} -{{{detag (or page.title 'landing page')}}}{{#if site.title}} | {{{site.title}}}{{/if}} -{{> head-last}} - - -{{> header}} -{{> body-landing-tutorials}} -{{> footer}} - - +{{> layout-shell + bodyClass="landing-page" + defaultTitle="Landing Page" + bodyTemplate="body-landing" + nav="tutorials-filter"}} diff --git a/src/layouts/landing-page.hbs b/src/layouts/landing-page.hbs index 9d2331bd..ad3e67f6 100644 --- a/src/layouts/landing-page.hbs +++ b/src/layouts/landing-page.hbs @@ -1,13 +1,4 @@ - - - -{{> head-first}} -{{{detag (or page.title 'landing page')}}}{{#if site.title}} | {{{site.title}}}{{/if}} -{{> head-last}} - - -{{> header}} -{{> body-landing}} -{{> footer}} - - +{{> layout-shell + bodyClass="landing-page" + defaultTitle="Landing Page" + bodyTemplate="body-landing"}} diff --git a/src/layouts/rest-api.hbs b/src/layouts/rest-api.hbs index 4b35f710..670442ff 100644 --- a/src/layouts/rest-api.hbs +++ b/src/layouts/rest-api.hbs @@ -1,26 +1,4 @@ - - - -{{> head-first}} - -{{{detag (or page.title 'REST API')}}}{{#if site.title}} | {{{site.title}}}{{/if}} -{{> head-last}} - - - - -{{> header}} - -
- - -{{{page.contents}}} - -
- - -{{> footer}} - - +{{> layout-shell + defaultTitle="REST API" + bodyClass="rest-api" + bodyTemplate="body-rest-api" }} diff --git a/src/layouts/tutorials.hbs b/src/layouts/tutorials.hbs index 9614cf92..1b202ce0 100644 --- a/src/layouts/tutorials.hbs +++ b/src/layouts/tutorials.hbs @@ -1,13 +1,4 @@ - - - -{{> head-first}} -Tutorials{{#with site.title}} | {{this}}{{/with}} -{{> head-last}} - - -{{> header}} -{{> body-tutorials}} -{{> footer}} - - +{{> layout-shell + defaultTitle="Tutorials" + bodyClass="tutorials body tiles" + bodyTemplate="body-tutorials"}} diff --git a/src/partials/article.hbs b/src/partials/article.hbs deleted file mode 100644 index 93616b4a..00000000 --- a/src/partials/article.hbs +++ /dev/null @@ -1,11 +0,0 @@ -
-{{#if page.title}} -
-

{{{page.title}}}

-{{> labels}} -
-{{/if}} -{{> contributor-bot}} -{{{page.contents}}} -{{> pagination}} -
diff --git a/src/partials/body-home.hbs b/src/partials/body-home.hbs index 2f51650b..6f1ad076 100644 --- a/src/partials/body-home.hbs +++ b/src/partials/body-home.hbs @@ -1,8 +1,8 @@
-
{{> llms-guidance}} {{> watermark}} +

{{{page.title}}}

{{{page.contents}}}
diff --git a/src/partials/body-landing-core-concept.hbs b/src/partials/body-landing-core-concept.hbs deleted file mode 100644 index c73c3d0e..00000000 --- a/src/partials/body-landing-core-concept.hbs +++ /dev/null @@ -1,11 +0,0 @@ -
-{{> nav}} -{{> toc}} -
-{{> llms-guidance}} -{{> watermark}} -
-{{{page.contents}}} -
-
-
diff --git a/src/partials/body-landing-page-capella.hbs b/src/partials/body-landing-page-capella.hbs deleted file mode 100644 index cb0380fa..00000000 --- a/src/partials/body-landing-page-capella.hbs +++ /dev/null @@ -1,24 +0,0 @@ -
-{{#if (eq (nav-mode) 'client')}} -{{#with (nav-group-for-page (nav-groups))}} -{{#if ./components.length}} - -{{/if}} -{{/with}} -{{/if}} -
-{{> llms-guidance}} -{{> watermark}} -
- - -{{{page.contents}}} - - -
-
-
diff --git a/src/partials/body-landing-sdk.hbs b/src/partials/body-landing-sdk.hbs deleted file mode 100644 index c73c3d0e..00000000 --- a/src/partials/body-landing-sdk.hbs +++ /dev/null @@ -1,11 +0,0 @@ -
-{{> nav}} -{{> toc}} -
-{{> llms-guidance}} -{{> watermark}} -
-{{{page.contents}}} -
-
-
diff --git a/src/partials/body-landing-top-level-sdk.hbs b/src/partials/body-landing-top-level-sdk.hbs deleted file mode 100644 index 7ed197e4..00000000 --- a/src/partials/body-landing-top-level-sdk.hbs +++ /dev/null @@ -1,20 +0,0 @@ -
-{{#if (eq (nav-mode) 'client')}} -{{#with (nav-group-for-page (nav-groups))}} -{{#if ./components.length}} - -{{/if}} -{{/with}} -{{/if}} -
-{{> llms-guidance}} -{{> watermark}} -
-{{{page.contents}}} -
-
-
diff --git a/src/partials/body-landing-tutorials.hbs b/src/partials/body-landing-tutorials.hbs deleted file mode 100644 index 34075500..00000000 --- a/src/partials/body-landing-tutorials.hbs +++ /dev/null @@ -1,11 +0,0 @@ -
-{{> tutorials-filter}} -
-{{> llms-guidance}} -{{> watermark}} -
-{{{page.contents}}} - -
-
-
diff --git a/src/partials/body-landing.hbs b/src/partials/body-landing.hbs index 12ea6ab1..26bfa79f 100644 --- a/src/partials/body-landing.hbs +++ b/src/partials/body-landing.hbs @@ -1,132 +1,33 @@
-
- {{> llms-guidance}} - {{> watermark}} -
-

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

-
- -
-
-
-

Index

-
-
-

The Index Service supports the creation of primary and secondary - indexes on items stored within Couchbase Server.

-
- -
-
-
-
-
-

Eventing

-
-
-

- 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. -

-
- -
-
-
-
-

Introduction to Couchbase Services

-
-
-
- -
-
-
-
-
-
-
-
-

Analytics

-
-
-

- The Analytics Service provides a parallel data-management - capability; allowing the running of complex analytical queries. -

-
- -
-
-
-

Full Text Search

-
-
-

- Full Text Search (FTS) lets you create, manage, and query - specially purposed indexes, defined on JSON documents within a - Couchbase bucket. -

-
- -
- - -
- - - -
-
+{{#if (eq nav 'full')}} +{{> nav}} +{{> toc}} +{{else if (eq nav 'tutorials-filter')}} +{{> tutorials-filter}} +{{else if (eq nav 'sidebar')}} +{{#if (eq (nav-mode) 'client')}} +{{#with (nav-group-for-page (nav-groups))}} +{{#if ./components.length}} + +{{/if}} +{{/with}} +{{/if}} +{{/if}} +
+{{> llms-guidance}} +{{> watermark}} +
+{{#if capellaImages}} + +{{/if}} +{{{page.contents}}} +{{#if capellaImages}} + +{{/if}} +
+
diff --git a/src/partials/body-rest-api.hbs b/src/partials/body-rest-api.hbs new file mode 100644 index 00000000..6032cc3d --- /dev/null +++ b/src/partials/body-rest-api.hbs @@ -0,0 +1,3 @@ +
+{{{page.contents}}} +
diff --git a/src/partials/body.hbs b/src/partials/body.hbs index 4ab4e12c..9c802b90 100644 --- a/src/partials/body.hbs +++ b/src/partials/body.hbs @@ -1,5 +1,41 @@
{{> nav}} {{> toc}} -{{> main}} +
+{{> llms-guidance}} +{{> watermark}} +{{#unless (or (ne page.attributes.hide-view-latest undefined) (eq page.componentVersion page.component.latest))}} +{{#with page.latest}} +{{#if ./missing}} +{{#if (and @root.page.componentVersion.prerelease (not ./prerelease))}} +
+

You are viewing the documentation for a prerelease version.

+
+{{/if}} +{{else}} +
+{{#if (and @root.page.componentVersion.prerelease (not ./prerelease))}} +

You are viewing the documentation for a prerelease version.

+{{else}} +

A newer version of this documentation is available.

+{{/if}} +View Latest +
+{{/if}} +{{/with}} +{{/unless}} +
+{{> crumbs}} +
+
+{{#if page.title}} +
+

{{{page.title}}}

+{{> labels}} +
+{{/if}} +{{{page.contents}}} +{{> pagination}} +
+
diff --git a/src/partials/contributor-bot.hbs b/src/partials/contributor-bot.hbs deleted file mode 100644 index 77aae769..00000000 --- a/src/partials/contributor-bot.hbs +++ /dev/null @@ -1,5 +0,0 @@ -
- -
    - + -
    \ No newline at end of file diff --git a/src/partials/layout-shell.hbs b/src/partials/layout-shell.hbs new file mode 100644 index 00000000..0dbb2315 --- /dev/null +++ b/src/partials/layout-shell.hbs @@ -0,0 +1,13 @@ + + + +{{> head-first}} +{{#if siteTitleOnly}}{{{site.title}}}{{else}}{{{detag (or page.title defaultTitle)}}}{{#with site.title}} | {{{.}}}{{/with}}{{/if}} +{{> head-last}} + + +{{> header}} +{{> (or bodyTemplate 'body') nav=nav mainClass=mainClass articleClass=articleClass capellaImages=capellaImages}} +{{> footer}} + + diff --git a/src/partials/main.hbs b/src/partials/main.hbs deleted file mode 100644 index 8d453cf8..00000000 --- a/src/partials/main.hbs +++ /dev/null @@ -1,28 +0,0 @@ -
    -{{> llms-guidance }} -{{> watermark}} -{{#unless (or (ne page.attributes.hide-view-latest undefined) (eq page.componentVersion page.component.latest))}} -{{#with page.latest}} -{{#if ./missing}} -{{#if (and @root.page.componentVersion.prerelease (not ./prerelease))}} -
    -

    You are viewing the documentation for a prerelease version.

    -
    -{{/if}} -{{else}} -
    -{{#if (and @root.page.componentVersion.prerelease (not ./prerelease))}} -

    You are viewing the documentation for a prerelease version.

    -{{else}} -

    A newer version of this documentation is available.

    -{{/if}} -View Latest -
    -{{/if}} -{{/with}} -{{/unless}} -
    -{{> crumbs}} -
    -{{> article}} -