fix(style): sidebar right blur notch

pull/712/head
Percy Ma 3 years ago
parent 03ac2233b5
commit db326c1e02
No known key found for this signature in database
GPG Key ID: A1803D3315E6CCBC

@ -52,6 +52,13 @@ const { hasSidebar } = useSidebar()
transition: border-color 0.5s, background-color 0.5s; transition: border-color 0.5s, background-color 0.5s;
} }
@media (min-width: 768px) {
.VPNavBar.has-sidebar {
padding-right: 0;
}
}
@media (min-width: 768px) { @media (min-width: 768px) {
.VPNavBar { .VPNavBar {
padding: 0 32px; padding: 0 32px;

@ -1,14 +1,19 @@
<script lang="ts" setup> <script lang="ts" setup>
import { useData } from 'vitepress' import { useData } from 'vitepress'
import VPSocialLinks from './VPSocialLinks.vue' import VPSocialLinks from './VPSocialLinks.vue'
import { useSidebar } from '../composables/sidebar'
const { theme } = useData() const { theme } = useData()
const { hasSidebar } = useSidebar()
</script> </script>
<template> <template>
<VPSocialLinks <VPSocialLinks
v-if="theme.socialLinks" v-if="theme.socialLinks"
class="VPNavBarSocialLinks" :class="{
'VPNavBarSocialLinks' : true,
'has-sidebar' : hasSidebar
}"
:links="theme.socialLinks" :links="theme.socialLinks"
/> />
</template> </template>
@ -24,4 +29,8 @@ const { theme } = useData()
align-items: center; align-items: center;
} }
} }
.has-sidebar {
padding-right: 32px;
}
</style> </style>

Loading…
Cancel
Save