1
1
<template >
2
2
<div class =" tab-container" :id =" id" >
3
3
<nav ref =" nav" >
4
- <button
5
- :id =" id + '_rtdb'"
6
- :class =" !selectedTab && 'is-selected'"
7
- title =" Realtime Database example"
8
- @focus =" selectOnFocus(0, $event)"
9
- @click =" select(0)"
10
- :disabled =" disable === '0'"
11
- >
4
+ <button :id =" id + '_rtdb'" :class =" !selectedTab && 'is-selected'" title =" Realtime Database example"
5
+ @focus =" selectOnFocus(0, $event)" @click =" select(0)" :disabled =" disable === '0'" >
12
6
<rtdb-logo />
13
7
</button >
14
- <button
15
- :id =" id + '_firestore'"
16
- :class =" selectedTab && 'is-selected'"
17
- title =" Firestore example"
18
- @focus =" selectOnFocus(1, $event)"
19
- @click =" select(1)"
20
- :disabled =" disable === '1'"
21
- >
8
+ <button :id =" id + '_firestore'" :class =" selectedTab && 'is-selected'" title =" Firestore example"
9
+ @focus =" selectOnFocus(1, $event)" @click =" select(1)" :disabled =" disable === '1'" >
22
10
<firestore-logo />
23
11
</button >
24
12
</nav >
@@ -79,16 +67,13 @@ export default {
79
67
80
68
<style >
81
69
:root {
82
- --bgColor : #fff ;
83
- --lightGray : #ddd ;
84
-
85
- --code-bg-color-lighter : #3a404c ;
86
- --code-bg-color-lightest : #5f687b ;
70
+ --code-bg-color-lighter : #323232 ;
71
+ --code-bg-color-lightest : #616161 ;
87
72
}
88
73
</style >
89
74
90
75
<style >
91
- .tab-container > nav {
76
+ .tab-container > nav {
92
77
display : flex ;
93
78
align-items : flex-end ;
94
79
justify-content : flex-end ;
@@ -100,82 +85,84 @@ export default {
100
85
}
101
86
102
87
@media (max-width : 419px ) {
103
- .tab-container > nav {
88
+ .tab-container > nav {
104
89
margin : 0 -1.5rem 0 ;
105
90
}
106
91
}
107
92
108
- .tab-container > nav > button {
93
+ .tab-container > nav > button {
109
94
display : flex ;
110
95
align-items : center ;
111
96
height : 100% ;
112
97
/* padding: 4.6rem 0.7rem 0; */
113
98
padding : 0 0.7rem ;
114
99
margin : 0 ;
115
- border : solid 1px var (--code-bg-color );
100
+ border : solid 1px var (--vp- code-block-bg );
116
101
border-bottom : none ;
117
102
/* filter: brightness(1.1); */
118
103
/* background-color: lighten(var(--code-bg-color), 10%); */
119
104
background-color : var (--code-bg-color-lighter );
120
105
}
121
106
122
- .tab-container > nav > button svg {
107
+ .tab-container > nav > button svg {
123
108
width : 32px ;
124
109
height : 32px ;
125
110
/* margin-top: -3.5rem; */
126
- fill : var (--bgColor );
111
+ fill : var (--vp-code-block-color );
127
112
/* filter: brightness(0.8); */
128
113
}
129
114
130
- .tab-container > nav > button :not (:first-child ) {
115
+ .tab-container > nav > button :not (:first-child ) {
131
116
border-left : none ;
132
117
}
133
118
134
- .tab-container > nav > button :not (:last-child ) {
119
+ .tab-container > nav > button :not (:last-child ) {
135
120
border-right : none ;
136
121
}
137
122
138
- .tab-container > nav > button :first-child {
123
+ .tab-container > nav > button :first-child {
139
124
border-radius : 6px 0 0 ;
140
125
}
141
126
142
- .tab-container > nav > button :last-child {
127
+ .tab-container > nav > button :last-child {
143
128
border-radius : 0 6px 0 0 ;
144
129
}
145
130
146
- .tab-container > nav > button :not ([disabled ]):hover {
131
+ .tab-container > nav > button :not ([disabled ]):hover {
147
132
cursor : pointer ;
148
133
/* background-color: lighten(var(--code-bg-color), 30%); */
149
134
background-color : var (--code-bg-color-lightest );
150
135
/* filter: brightness(1.3); */
151
136
}
152
137
153
- .tab-container > nav > button :not ([disabled ]):hover svg {
154
- fill : var (--bgColor );
138
+ .tab-container > nav > button :not ([disabled ]):hover svg {
139
+ fill : var (--vp-code-block-color );
155
140
}
156
141
157
- .tab-container > nav > button .is-selected :hover {
142
+ .tab-container > nav > button .is-selected :hover {
158
143
filter : brightness (1 );
159
- background-color : var (--code-bg-color );
144
+ background-color : var (--vp-code-block-bg );
145
+
146
+ /* var(--vp-code-block-bg); */
160
147
}
161
148
162
- .tab-container > nav > button : [disabled ] {
163
- /* border-color: lighten(var(--code-bg-color ), 60%); */
164
- border-color : var (--code-bg-color );
149
+ .tab-container > nav > button [disabled ] {
150
+ /* border-color: lighten(var(--vp- code-block-bg ), 60%); */
151
+ border-color : var (--vp- code-block-bg );
165
152
/* filter: brightness(1.6); */
166
153
}
167
154
168
- .tab-container > nav > button [disabled ] svg {
169
- fill : var (--code-bg-color );
155
+ .tab-container > nav > button [disabled ] svg {
156
+ fill : var (--vp- code-block-bg );
170
157
/* filter: brightness(1.6); */
171
158
}
172
159
173
- .tab-container > nav > button .is-selected {
174
- background-color : var (--code-bg-color );
160
+ .tab-container > nav > button .is-selected {
161
+ background-color : var (--vp- code-block-bg );
175
162
}
176
163
177
- .tab-container > nav > button .is-selected svg {
178
- fill : var (--bgColor );
164
+ .tab-container > nav > button .is-selected svg {
165
+ fill : var (--vp-code-block-color );
179
166
}
180
167
181
168
@media (min-width : 420px ) {
0 commit comments