Skip to content

Commit e907688

Browse files
author
rakeshAlgo
committed
fix style guide changes
1 parent 4d820b8 commit e907688

File tree

10 files changed

+92
-47
lines changed

10 files changed

+92
-47
lines changed

preview-src/index.adoc

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,6 @@ Installation will vary based on your operation system.
5757
<div class="ulist tabs">
5858
<ul>
5959
<li>
60-
<p><a id="tabset1_demo"></a> Code Block</p>
61-
</li>
62-
<li>
6360
<p><a id="tabset1_ubuntu"></a>Ubuntu</p>
6461
</li>
6562
<li>
@@ -71,28 +68,7 @@ Installation will vary based on your operation system.
7168
</ul>
7269
</div>
7370
<div class="content">
74-
<div class="tab-pane is-active" aria-labelledby="tabset1_demo">
75-
<div class="paragraph">
76-
++++
77-
[source,json]
78-
----
79-
{
80-
"_id": "_design/myddoc",
81-
"views": {
82-
"view1": {
83-
"map": "function(doc, meta) { if (doc.value) { emit(doc.value, meta.id);} }"
84-
}
85-
},
86-
"options": {
87-
"updateMinChanges": 1000,
88-
"replicaUpdateMinChanges": 20000
89-
}
90-
}
91-
----
92-
++++
93-
</div>
94-
</div>
95-
<div class="tab-pane" aria-labelledby="tabset1_ubuntu">
71+
<div class="tab-pane is-active" aria-labelledby="tabset1_ubuntu">
9672
<div class="paragraph">
9773
<p>Content for Ubuntu tab.</p>
9874
</div>
@@ -171,7 +147,7 @@ You could also use it to mark new features, but _only within the version in whic
171147
== Labels for a Section
172148

173149
[.labels]
174-
[.edition]##{enterprise}##[.status]##{developer-preview}##
150+
[.edition]##{enterprise}##
175151

176152
To create an edition label, use a span with the role `edition`.
177153
To create a status label, use a span with the role `status`.

src/css/clipboard.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
cursor: pointer;
1010
font-family: "Source Sans Pro", sans-serif;
1111
color: var(--color-brand-gray4);
12+
z-index: 1;
1213
}
1314

1415
a.copy-code-button:focus, a.copy-code-button:hover{

src/css/doc.css

Lines changed: 51 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -60,18 +60,19 @@
6060
.doc h4 > a.anchor,
6161
.doc h5 > a.anchor,
6262
.doc h6 > a.anchor {
63-
color: var(--color-brand-red);
64-
background-image: linear-gradient(-45deg, var(--color-brand-purple), var(--color-brand-red) 75%);
63+
color: var(--color-brand-blue-secondary);
64+
/* background-image: linear-gradient(-45deg, var(--color-brand-purple), var(--color-brand-red) 75%);
6565
background-clip: text;
66-
-webkit-text-fill-color: transparent;
66+
-webkit-text-fill-color: transparent; */
6767
font-weight: var(--weight-normal);
6868
position: absolute;
6969
text-decoration: none;
7070
width: 2ex;
71-
margin-left: -1.75ex;
71+
margin-left: -2ex;
7272
visibility: hidden;
73-
transform: scale(0.9);
73+
transform: scale(0.75);
7474
text-align: center;
75+
font-size: 30px;
7576
}
7677

7778
.doc h1 a.anchor::before,
@@ -80,7 +81,8 @@
8081
.doc h4 a.anchor::before,
8182
.doc h5 a.anchor::before,
8283
.doc h6 a.anchor::before {
83-
content: "\00a7";
84+
content: "\f0c1";
85+
font-family: "Font Awesome 5 Free"; font-weight: 900;
8486
}
8587

8688
.doc h1:hover a.anchor,
@@ -507,7 +509,7 @@
507509

508510
/* NOTE assume pre.highlight contains code[data-lang] */
509511

510-
.doc pre.highlight code::after,
512+
/* .doc pre.highlight code::after,
511513
.doc pre:not(.highlight)::after{
512514
content: '';
513515
display: inline-block;
@@ -517,7 +519,7 @@
517519
position: absolute;
518520
right: 0;
519521
top: 0;
520-
}
522+
} */
521523

522524
.doc pre.highlight {
523525
position: relative;
@@ -533,9 +535,9 @@
533535
color: var(--hljs-number);
534536
}
535537

536-
.doc .listingblock code[data-lang]::before {
538+
/* .doc .listingblock code[data-lang]::before {
537539
content: attr(data-lang);
538-
color: var("--color-brand-gray1") /*#f8f8f2*/;
540+
color: var("--color-brand-gray1");
539541
display: none;
540542
font-size: 0.75rem;
541543
font-weight: var(--weight-normal);
@@ -554,6 +556,45 @@
554556
display: block;
555557
}
556558
559+
*/
560+
561+
.doc .listingblock code[data-lang] + .data-source {
562+
content: attr(data-lang);
563+
color: var("--color-brand-gray1");
564+
display: none;
565+
font-size: 0.75rem;
566+
font-weight: var(--weight-normal);
567+
letter-spacing: 1px;
568+
line-height: 18px;
569+
text-transform: uppercase;
570+
position: absolute;
571+
top: 0.375rem;
572+
right: 2rem;
573+
font-family: "Source Sans Pro", sans-serif;
574+
padding-right: 6px;
575+
border-right: 1px solid var(--color-brand-gray9);
576+
}
577+
578+
.doc .listingblock:hover code[data-lang] + .data-source {
579+
display: block;
580+
}
581+
582+
.doc .listingblock pre .fade-shadow {
583+
content: '';
584+
display: inline-block;
585+
background: transparent linear-gradient(180deg, #F1F7FE0D 0%, #F1F7FE40 18%, #F1F7FE 68%, #F1F7FE 100%) 0% 0% no-repeat padding-box;
586+
width: 65px;
587+
height: 80%;
588+
position: absolute;
589+
right: 0;
590+
top: 0;
591+
}
592+
593+
code.language-console.hljs.shell{
594+
white-space: nowrap;
595+
overflow-x: auto;
596+
}
597+
557598
.doc .dlist {
558599
margin: 1.5rem 0;
559600
}

src/css/labels.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
font-size: var(--labels-font-size);
2323
font-weight: var(--weight-bold);
2424
line-height: var(--labels-line-height);
25+
font-family: "Source Sans Pro", sans-serif;
2526
}
2627
.doc .labels li:first-child::before {
2728
content: "";
@@ -51,13 +52,15 @@
5152
padding: 6px;
5253
text-transform: uppercase;
5354
margin-right: var(--base-small-space);
55+
font-family: "Source Sans Pro", sans-serif;
5456
}
5557

5658
.doc .labels li a,
5759
.doc span.edition a,
5860
.doc span.status a,
5961
.doc span.community a {
6062
text-decoration: none;
63+
font-family: "Source Sans Pro", sans-serif;
6164
}
6265

6366
.doc span.edition *,

src/css/main.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ main p {
6363
color: var(--color-brand-blue-secondary);
6464
}
6565

66+
.article-banner p .fab {
67+
margin-right: 10px;
68+
font-size: var(--heading-h3) ;
69+
}
6670
.article-banner a.btn {
6771
color: var(--color-brand-blue-secondary);
6872
display: block;

src/css/toolbar.css

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,27 @@
1+
.sidebar-box .tools {
2+
margin-left: 0.75rem;
3+
}
4+
.tools ul { padding-left: 0; }
5+
16
.tools .edit {
2-
width: 1.5em;
3-
height: 1.5em;
7+
/* width: 1.5em;
8+
height: 1.5em; */
9+
display: inline-block;
10+
width: 100%;
11+
list-style: none;
412
}
513

614
.tools .edit a {
715
display: inline-block;
8-
width: 100%;
16+
/* width: 100%;
917
height: 100%;
10-
text-indent: 100%;
18+
text-indent: 100%; */
1119
white-space: nowrap;
1220
overflow: hidden;
13-
background: url(../img/edit.svg) no-repeat center;
14-
background-size: 75%;
21+
background: url(../img/edit.svg) no-repeat center left;
22+
background-size: 15px;
1523
vertical-align: top;
16-
color: transparent;
24+
color: #999999;
25+
padding-left: 25px;
26+
font-family: "Source Sans Pro", sans-serif;
1727
}

src/js/07-copy-to-clipboard.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@
66
//button.type = 'button'
77
button.dataset.title = 'Copy'
88

9+
var dataSource = document.createElement('span')
10+
dataSource.className = 'data-source'
11+
dataSource.innerHTML += codeBlock.dataset.lang
12+
13+
var fadeShadow = document.createElement('span')
14+
fadeShadow.className = 'fade-shadow'
15+
916
button.addEventListener('click', function (e) {
1017
if (e.target && e.target.matches('a.copy-code-button')) {
1118
navigator.clipboard.writeText(codeBlock.innerText).then(
@@ -27,6 +34,8 @@
2734
}
2835
})
2936
var pre = codeBlock.parentNode
37+
pre.appendChild(dataSource)
3038
pre.appendChild(button)
39+
pre.appendChild(fadeShadow)
3140
})
3241
})()

src/partials/main.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
{{#if page.componentVersion.prerelease}}
55
<p>You are viewing the documentation for a prerelease version.</p>
66
{{else}}
7-
<p>A newer version of this documentation is available.</p>
7+
<p> <i class="fab fa-asymmetrik"></i> A newer version of this documentation is available.</p>
88
{{/if}}
99
<a class="btn" href="{{ifelse (eq env.SUPPORTS_CURRENT_URL 'true') (relativize (current-url page.url)) (relativize page.latest.url)}}">View Latest</a>
1010
</div>
1111
{{/unless}}
1212
<div class="article-header">
1313
{{> nav-control}}
1414
{{> crumbs}}
15-
{{> toolbar}}
15+
{{!-- {{> toolbar}} --}}
1616
</div>
1717
{{> article}}
1818
</main>

src/partials/toc.hbs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<aside class="toc sidebar">
22
<div class="sidebar-box">
3+
{{> toolbar}}
34
<div class="toc-menu"></div>
45
<div class="is-this-helpful-box">
56
<h4> Is this page helpful?</h4>

src/partials/toolbar.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
{{#if (eq page.component.name 'home')}}
33
<div class="tools" role="navigation">
44
<ul>
5-
<li class="tool edit"><a href="{{home-edit-url page.editUrl 'https://github.com/couchbase/docs-site' page.origin.branch}}" title="Edit Page" target="_blank" rel="noopener">Edit</a></li>
5+
<li class="tool edit"><a href="{{home-edit-url page.editUrl 'https://github.com/couchbase/docs-site' page.origin.branch}}" title="Edit Page" target="_blank" rel="noopener">Edit on GitHub</a></li>
66
</ul>
77
</div>
88
{{else}}
99
{{#unless (and (or page.origin.private (includes page.origin.url '@')) (ne page.origin.worktree true))}}
1010
<div class="tools" role="navigation">
1111
<ul>
12-
<li class="tool edit"><a href="{{page.editUrl}}" title="Edit Page" target="_blank" rel="noopener">Edit</a></li>
12+
<li class="tool edit"><a href="{{page.editUrl}}" title="Edit Page" target="_blank" rel="noopener">Edit on GitHub</a></li>
1313
</ul>
1414
</div>
1515
{{/unless}}

0 commit comments

Comments
 (0)