fixed viewTransition bug

This commit is contained in:
liyunze 2023-08-14 16:26:28 +08:00
parent 4de61cf803
commit 763b07cbd1
2 changed files with 50 additions and 51 deletions

View file

@ -1,4 +1,4 @@
<div class="w-full"> <div transition:persist class="w-full">
<label <label
class="fixed flex hamburger-menu bg-primary border-2 border-solid border-gray-100 p-2 rounded-lg" class="fixed flex hamburger-menu bg-primary border-2 border-solid border-gray-100 p-2 rounded-lg"
> >

View file

@ -35,17 +35,14 @@ const { title, description } = Astro.props;
rel="stylesheet" rel="stylesheet"
/> />
<script defer src="/_vercel/insights/script.js"></script> <script defer src="/_vercel/insights/script.js"></script>
<ViewTransitions />
<meta name="generator" content={Astro.generator} /> <meta name="generator" content={Astro.generator} />
<title>{title}</title> <title>{title}</title>
</head> </head>
<body> <body>
<NavBar /> <NavBar />
<slot /> <slot />
<ViewTransitions /> </body><style is:global>
</body>
</html>
<style is:global>
* { * {
box-sizing: border-box; box-sizing: border-box;
margin: 0; margin: 0;
@ -69,7 +66,8 @@ const { title, description } = Astro.props;
code { code {
font-family: Menlo, Monaco, Lucida Console, Liberation Mono, font-family: Menlo, Monaco, Lucida Console, Liberation Mono,
DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace; DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New,
monospace;
} }
nav { nav {
@ -92,3 +90,4 @@ const { title, description } = Astro.props;
overflow-x: auto; overflow-x: auto;
} }
</style> </style>
</html>