Skip to content

Commit c811764

Browse files
authored
feat: MetaVar panel view the current match (#649)
1 parent cef0d2c commit c811764

File tree

3 files changed

+17
-6
lines changed

3 files changed

+17
-6
lines changed

website/.vitepress/theme/custom.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
--vp-c-brand-2: #a89f2a;
66
--vp-c-brand-1: #918623;
77
--vp-c-brand-3: #2f4f6d;
8-
--vp-custom-selctor-option-text: #213547;
8+
--vp-custom-selector-option-text: #213547;
99

1010

1111
--vp-custom-block-tip-text: var(--vp-c-text-1);
1212
--vp-custom-block-tip-bg: var(--vp-c-green-soft);
1313
--vp-custom-block-tip-code-bg: var(--vp-c-green-soft);
1414
}
1515
.dark {
16-
--vp-custom-selctor-option-text: #213547;
17-
}
16+
--vp-custom-selector-option-text: #213547;
17+
}

website/src/components/EnvDisplay.vue

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@ function decrement() {
4848
</td>
4949
</tr>
5050
</tbody>
51+
<tfoot>
52+
<tr>
53+
<td colspan="2">
54+
Now it's the {{ currentIndex + 1 }}th matched
55+
<span class="match-count">({{ currentIndex + 1 }}/{{props.envs.length}})</span>
56+
</td>
57+
</tr>
58+
</tfoot>
5159
</table>
5260
<div class="choose-match">
5361
<button @click="decrement">Prev Match</button>
@@ -97,6 +105,9 @@ function decrement() {
97105
border-left: 1px solid var(--vp-c-divider);
98106
width: 75%;
99107
}
108+
.metavar-table tfoot .match-count {
109+
color: #999;
110+
}
100111
.choose-match {
101112
margin-top: 1em;
102113
}
@@ -116,4 +127,4 @@ function decrement() {
116127
.no-match-tip ul > li {
117128
margin-top: 4px;
118129
}
119-
</style>
130+
</style>

website/src/components/SelectLang.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ select {
3232
cursor: pointer;
3333
}
3434
.selector-option-text {
35-
color: var(--vp-custom-selctor-option-text);
35+
color: var(--vp-custom-selector-option-text);
3636
}
3737
@media only screen and (max-width: 780px) {
3838
.selector {
3939
display: none;
4040
}
4141
}
42-
</style>
42+
</style>

0 commit comments

Comments
 (0)