Skip to content

Commit b9ef2d2

Browse files
committed
feat: mobile optimize
Signed-off-by: Innei <[email protected]>
1 parent ad17dfa commit b9ef2d2

File tree

6 files changed

+7
-8
lines changed

6 files changed

+7
-8
lines changed

src/components/layout/header/internal/HeaderDrawerButton.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export const HeaderDrawerButton = () => {
4848

4949
<Dialog.Content>
5050
<motion.dialog
51-
className="fixed bottom-0 left-0 right-0 top-6 z-[12] flex max-h-[100vh] min-h-0 items-center justify-center overflow-auto rounded-xl bg-base-100/90"
51+
className="fixed left-0 right-0 top-0 z-[12] block overflow-auto rounded-xl bg-base-100/90"
5252
initial={{ opacity: 0.8 }}
5353
animate={{ opacity: 1 }}
5454
exit={{ opacity: 0 }}

src/components/layout/header/internal/HeaderDrawerContent.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@ export const HeaderDrawerContent = () => {
1414
const { config } = useHeaderConfig()
1515

1616
return (
17-
<div className="mt-20 w-[90vw] space-y-4 overflow-auto pb-8 scrollbar-none">
17+
<div className="mt-12 max-h-screen w-[90vw] space-y-4 overflow-auto pb-8 scrollbar-none">
1818
{config.map((section, index) => {
1919
return (
2020
<motion.section
21-
className={index === 0 ? 'mt-8' : undefined}
2221
initial={{ y: 30, opacity: 0 }}
2322
animate={{ y: 0, opacity: 1 }}
2423
transition={{

src/components/ui/code-highlighter/CodeHighlighter.module.css

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
@apply relative flex w-full flex-col overflow-auto;
33

44
pre > code {
5-
@apply block bg-base-100 font-mono text-[14px] font-medium;
5+
@apply block font-mono text-[14px] font-medium;
6+
7+
background: transparent !important;
68
}
79
}
810

src/components/ui/code-highlighter/CodeHighlighter.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export const HighLighter: FC<Props> = (props) => {
4646
}
4747

4848
prevThemeCSS.current = css
49-
}, [theme, isPrintMode])
49+
}, [theme, isPrintMode, systemTheme])
5050
useInsertionEffect(() => {
5151
loadStyleSheet(
5252
'https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/prism/1.23.0/plugins/line-numbers/prism-line-numbers.min.css',

src/components/widgets/comment/CommentBox/CommentBoxLegacyForm.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const FormInput = (props: { fieldKey: FormKey; required?: boolean }) => {
4343
const FormWithUserInfo = () => {
4444
return (
4545
<form className="flex flex-col space-y-4">
46-
<div className="flex space-x-4">
46+
<div className="flex flex-col space-x-0 space-y-4 md:flex-row md:space-x-4 md:space-y-0">
4747
<FormInput fieldKey="author" required />
4848
<FormInput fieldKey="mail" required />
4949
<FormInput fieldKey="url" />

src/components/widgets/note/NoteFooterNavigation.tsx

-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { useRouter } from 'next/navigation'
55
import type { FC } from 'react'
66

77
import { MdiClockTimeThreeOutline } from '~/components/icons/clock'
8-
import { Divider } from '~/components/ui/divider'
98
import { OnlyMobile } from '~/components/ui/viewport/OnlyMobile'
109
import { routeBuilder, Routes } from '~/lib/route-builder'
1110
import { useCurrentNoteDataSelector } from '~/providers/note/CurrentNoteDataProvider'
@@ -34,7 +33,6 @@ export const NoteFooterNavigation: FC<{ noteId: string }> = ({
3433
{/* // 没有 0 的情况 */}
3534
{(!!prevNid || !!nextNid) && (
3635
<>
37-
<Divider className="!w-15 m-auto" />
3836
<section className="relative mt-4 py-2 text-center" data-hide-print>
3937
<div className="flex items-center justify-between [&>*]:inline-flex [&>*]:items-center [&>*]:space-x-2 [&>*]:px-2 [&>*]:py-2">
4038
{!!nextNid && (

0 commit comments

Comments
 (0)