Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Commit

Permalink
chore: 调整编译的一些警告
Browse files Browse the repository at this point in the history
  • Loading branch information
wangjue666 committed Sep 15, 2023
1 parent a224baa commit 3991b62
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 42 deletions.
4 changes: 2 additions & 2 deletions .vitepress/theme-default/components/NavBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@
</template>

<script setup lang="ts">
import { defineEmits } from 'vue';
import { defineEmit } from 'vue';
import NavBarTitle from './NavBarTitle.vue';
import NavLinks from './NavLinks.vue';
import ToggleSideBarButton from './ToggleSideBarButton.vue';
import DarkModeSwitch from './DarkModeSwitch.vue';
import { useRepo } from '../composables/repo';
defineEmits(['toggle']);
defineEmit(['toggle']);
const repo = useRepo();
</script>
Expand Down
33 changes: 14 additions & 19 deletions .vitepress/theme-default/components/NavBarTitle.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,25 @@
:href="$withBase($localePath)"
:aria-label="`${$siteByRoute.title}, back to home`"
>
<img
v-if="$themeConfig.logo"
class="logo"
:src="$withBase($themeConfig.logo)"
alt="Logo"
/>
<img v-if="$themeConfig.logo" class="logo" :src="$withBase($themeConfig.logo)" alt="Logo" />
{{ $site.title }}
</a>
</template>

<style scoped>
.nav-bar-title {
font-size: 1.3rem;
font-weight: 600;
color: var(--c-text);
}
.nav-bar-title {
font-size: 1.3rem;
font-weight: 600;
color: var(--c-text);
}
.nav-bar-title:hover {
text-decoration: none;
}
.nav-bar-title:hover {
text-decoration: none;
}
.logo {
margin-right: 0.75rem;
height: 1.3rem;
vertical-align: bottom;
}
.logo {
margin-right: 0.75rem;
height: 1.3rem;
vertical-align: bottom;
}
</style>
42 changes: 21 additions & 21 deletions .vitepress/theme-default/components/ToggleSideBarButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,31 @@
</div>
</template>

<script>
export default {
emits: ['toggle']
}
<script lang="ts">
export default {
emits: ['toggle'],
};
</script>

<style>
.sidebar-button {
position: absolute;
top: 0.6rem;
left: 1rem;
display: none;
padding: 0.6rem;
cursor: pointer;
}
.sidebar-button .icon {
display: block;
width: 1.25rem;
height: 1.25rem;
}
@media screen and (max-width: 719px) {
.sidebar-button {
position: absolute;
top: 0.6rem;
left: 1rem;
display: none;
padding: 0.6rem;
cursor: pointer;
}
.sidebar-button .icon {
display: block;
width: 1.25rem;
height: 1.25rem;
}
@media screen and (max-width: 719px) {
.sidebar-button {
display: block;
}
}
}
</style>

0 comments on commit 3991b62

Please sign in to comment.