fix: 修复菜单未sticky

This commit is contained in:
KazooTTT
2025-02-07 16:35:46 +08:00
parent 954b5aebd8
commit 2619f3c307
2 changed files with 1 additions and 20 deletions

View File

@ -1,6 +1,5 @@
--- ---
import { Icon } from "astro-icon/components"; import { Icon } from "astro-icon/components";
import { cn } from "@/utils/tailwind";
export interface Props { export interface Props {
className?: string; className?: string;
@ -9,10 +8,7 @@ export interface Props {
const { className = "", dataPagefindBody = true } = Astro.props; const { className = "", dataPagefindBody = true } = Astro.props;
--- ---
<article <article class={`${className}`} data-pagefind-body={dataPagefindBody}>
class={cn("mx-auto max-w-3xl overflow-x-hidden px-4", className)}
data-pagefind-body={dataPagefindBody}
>
<slot /> <slot />
<div id="myModal" class="modal"> <div id="myModal" class="modal">

View File

@ -121,18 +121,3 @@ const socialImageURL = new URL(ogImage ? ogImage : "/social-card.png", Astro.url
</script> </script>
<meta content={Astro.generator} name="generator" /> <meta content={Astro.generator} name="generator" />
<style is:global>
html,
body {
overflow-x: hidden;
width: 100%;
position: relative;
}
/* 确保所有图片不会溢出容器 */
img {
max-width: 100%;
height: auto;
}
</style>