Skip to content

Commit ac10b6e

Browse files
fix: improve styling and UI positions
1 parent 3412f51 commit ac10b6e

File tree

3 files changed

+17
-10
lines changed

3 files changed

+17
-10
lines changed

website/src/components/Playground.vue

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import EnvDisplay from './EnvDisplay.vue'
1111
import { initializeParser, useAstGrep, Mode as ModeImport } from './astGrep'
1212
1313
// important initialization
14-
await initializeParser()
14+
// await initializeParser()
1515
1616
const {
1717
state,
@@ -72,6 +72,7 @@ let codeMode = shallowRef('code')
7272
Found {{ matchedHighlights.length }} match(es).
7373
</span>
7474
<span v-else>No match found.</span>
75+
<ResetConfig @reset="reset" />
7576
</p>
7677
</template>
7778
</Tabs>
@@ -96,7 +97,6 @@ let codeMode = shallowRef('code')
9697
<template #addon>
9798
<div class="action-bar">
9899
<SelectLang v-model="lang"/>
99-
<ResetConfig @reset="reset" />
100100
</div>
101101
</template>
102102
</Tabs>
@@ -125,6 +125,13 @@ let codeMode = shallowRef('code')
125125
/* keep here since monaco suggestion details are not expanded by default */
126126
filter: drop-shadow(0 0 16px #00000020);
127127
}
128+
129+
.match-result {
130+
display: flex;
131+
justify-content: space-between;
132+
align-items: center;
133+
}
134+
128135
.action-bar {
129136
display: flex;
130137
align-items: center;

website/src/components/ResetConfig.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const emits = defineEmits<{
1818
height: 2em;
1919
border-radius: 50%;
2020
padding: 0px;
21-
display: flex;
21+
display: inline-flex;
2222
justify-content: center;
2323
align-items: center;
2424
background: transparent;

website/src/components/Toolbars.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ async function onShare() {
2222

2323
<template>
2424
<div class="toolbars">
25-
<button class="floating" title="Copy your code URL to share!" @click="onShare">
25+
<button class="floating" data-title="Copy your code URL to share!" @click="onShare">
2626
<Share style="width: 24px; height: 24px;"/>
2727
</button>
2828
<button
@@ -66,12 +66,12 @@ async function onShare() {
6666
}
6767
6868
@media only screen and (min-width: 780px) {
69-
[title] {
69+
[data-title] {
7070
position: relative;
7171
}
7272
73-
[title]:after {
74-
content: attr(title);
73+
[data-title]:after {
74+
content: attr(data-title);
7575
position: absolute;
7676
left: -10%;
7777
bottom: 50%;
@@ -85,12 +85,12 @@ async function onShare() {
8585
transition: 0.2s;
8686
border-radius: 5px;
8787
}
88-
89-
.dark [title]:after {
88+
89+
.dark [data-title]:after {
9090
color: var(--vp-c-brand-1);
9191
}
9292
93-
[title]:hover:after {
93+
[data-title]:hover:after {
9494
opacity: 1;
9595
}
9696
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy