Skip to content

Commit

Permalink
docs: 首页动画性能问题
Browse files Browse the repository at this point in the history
  • Loading branch information
camera-2018 committed Oct 21, 2024
1 parent 711bc04 commit 89f2650
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .vitepress/components/WikiLogo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ onMounted(() => {

<template>
<div class="wiki-logo-img">
<svg width="400" height="300" viewBox="200 100 400 300" fill="none" xmlns="http://www.w3.org/2000/svg">
<svg width="364" height="300" viewBox="200 100 400 300" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip1_1_2)">
<g clip-path="url(#clip2_1_2)">
<path
Expand Down
8 changes: 7 additions & 1 deletion .vitepress/theme/Layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import DefaultTheme from 'vitepress/theme'
import { nextTick, provide } from 'vue'
import { useMediumZoom } from './useMediumZoom';
const { isDark } = useData()
const enableTransitions = () =>
'startViewTransition' in document &&
window.matchMedia('(prefers-reduced-motion: no-preference)').matches
Expand Down Expand Up @@ -189,4 +188,11 @@ useMediumZoom()
.animate.jumbo:after {
animation: jumbo-5f0d2d0c 90s linear infinite
}
@media (max-width: 768px) {
.animate.jumbo:after {
animation: none;
}
}
</style>
2 changes: 1 addition & 1 deletion .vitepress/theme/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,6 @@ mjx-container {

@media (max-width: 640px) {
.wiki-logo-img > svg {
transform: translate(-36px, 32px) !important;
transform: translate(-20px, 32px) !important;
}
}

0 comments on commit 89f2650

Please sign in to comment.