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

Commit

Permalink
Merge pull request #120 from wangjue666/fix-npm-run-dev
Browse files Browse the repository at this point in the history
Fix npm run dev
  • Loading branch information
wangjue666 authored Sep 27, 2023
2 parents a224baa + a945020 commit 96b81ca
Show file tree
Hide file tree
Showing 5 changed files with 802 additions and 774 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>
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
"serve": "vitepress serve"
},
"devDependencies": {
"prettier": "^2.3.2",
"prettier": "^2.3.1",
"vite-plugin-components": "^0.10.4",
"vite-plugin-icons": "^0.6.3",
"vite-plugin-windicss": "^1.1.1",
"vitepress": "^0.14.1",
"vite-plugin-icons": "^0.6.1",
"vite-plugin-windicss": "^1.0.2",
"vitepress": "^0.14.0",
"windicss": "^3.1.3"
},
"dependencies": {
Expand Down
Loading

0 comments on commit 96b81ca

Please sign in to comment.