Skip to content

Commit 22e84dd

Browse files
committed
fix: style
1 parent f164c4a commit 22e84dd

File tree

7 files changed

+55
-22
lines changed

7 files changed

+55
-22
lines changed

src/app/cloak/LearnMore/index.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
1+
"use client"
2+
13
import { Box, Container } from "@mui/material"
24

35
import Button from "@/components/Button"
46
import { CLOAK_HERO_LINKS } from "@/constants"
7+
import useCheckViewport from "@/hooks/useCheckViewport"
58

69
const LearnMore = () => {
10+
const { isMobile } = useCheckViewport()
711
return (
8-
<Box sx={{ backgroundColor: "themeBackground.brand", py: "6rem" }}>
12+
<Box sx={{ backgroundColor: "themeBackground.highlight", py: "5.6rem" }}>
913
<Container
1014
sx={{
1115
display: "flex",
1216
justifyContent: "center",
1317
}}
1418
>
15-
<Button size="small" whiteButton href={CLOAK_HERO_LINKS[0].href} className="!w-[280px]">
19+
<Button size={isMobile ? "small" : "medium"} whiteButton href={CLOAK_HERO_LINKS[0].href} className="!w-[280px] md:!w-[340px]">
1620
Learn more about Cloak’s design
1721
</Button>
1822
</Container>

src/app/cloak/Workflow/AppCard/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const AppCard = props => {
2424
"list image"
2525
`,
2626
],
27-
p: ["1.5rem 1.5rem 2rem", "2rem 3rem 2.4rem", "2rem 3rem 2.4rem", "2.7rem 4.5rem"],
27+
p: ["1.5rem 1.1rem 2rem", "2rem 3rem 2.4rem", "2rem 3rem 2.4rem", "2.7rem 4.5rem 2.7rem 5.2rem"],
2828
borderRadius: "2rem",
2929
backgroundColor: "rgba(235, 194, 142, 0.23)",
3030
rowGap: ["0.8rem", "1.4rem"],
@@ -38,6 +38,7 @@ const AppCard = props => {
3838
lineHeight: 1.4,
3939
fontWeight: 500,
4040
pt: [0, 0, "0.5rem"],
41+
pl: ["8px", 0],
4142
gridArea: "title",
4243
}}
4344
>
@@ -62,13 +63,12 @@ const AppCard = props => {
6263
component="ul"
6364
sx={{
6465
gridArea: "list",
65-
gap: "3px",
66+
gap: ["3px", "3px", "6px"],
6667
listStyle: "none",
6768
"& li": {
6869
position: "relative",
6970
whiteSpace: "nowrap",
7071
pl: ["10px", "12px"],
71-
ml: ["-4px", "-8px"],
7272
"&::before": {
7373
content: '""',
7474
position: "absolute",

src/app/template.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,15 @@ import { Box } from "@mui/material"
66

77
import Footer from "@/components/Footer"
88
import Header from "@/components/Header"
9-
import useHideFooter from "@/hooks/useHideFooter"
10-
import { isSepolia } from "@/utils"
119

1210
import "./global"
1311

1412
export default function RootTemplate({ children }: { children: ReactNode }) {
15-
const hideFooter = useHideFooter()
16-
1713
return (
1814
<Box sx={{ minHeight: "100vh" }}>
1915
<Header></Header>
2016
{children}
21-
{!(isSepolia || hideFooter) && <Footer />}
17+
<Footer />
2218
</Box>
2319
)
2420
}

src/components/Button/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const sizes = {
2929
small: {
3030
height: "4rem",
3131
fontSize: { desktop: "1.4rem", mobile: "1.4rem" },
32-
fontWeight: 500,
32+
fontWeight: 600,
3333
},
3434
medium: {
3535
height: "4.8rem",

src/components/Footer/index.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,20 @@
1+
"use client"
2+
3+
import useHideFooter from "@/hooks/useHideFooter"
4+
import { isSepolia } from "@/utils"
5+
16
import PureFooter from "./PureFooter"
27
import Support from "./Support"
38

49
const Footer = () => {
10+
const { hideSupport } = useHideFooter()
11+
12+
if (isSepolia) {
13+
return null
14+
}
515
return (
616
<>
7-
<Support />
17+
{!hideSupport && <Support />}
818
<PureFooter></PureFooter>
919
</>
1020
)

src/hooks/useHideFooter.ts

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
1-
// import { usePathname } from "next/navigation"
2-
// import { useMemo } from "react"
1+
"use client"
2+
3+
import { usePathname } from "next/navigation"
4+
import { useMemo } from "react"
35

46
const useHideFooter = () => {
5-
// const pathname = usePathname()
6-
7-
// const hidden = useMemo(
8-
// () => pathname.match(/^\/canvas(\/\w*)?$/g),
9-
// [pathname],
10-
// )
11-
// return hidden
12-
return false
7+
const pathname = usePathname()
8+
9+
const hideSupport = useMemo(() => pathname.match(/^\/cloak(\/\w*)?$/g), [pathname])
10+
return { hideSupport }
1311
}
1412

1513
export default useHideFooter

src/types/css.d.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
declare module "*.css" {
2+
const content: { [className: string]: string }
3+
export default content
4+
}
5+
6+
declare module "*.scss" {
7+
const content: { [className: string]: string }
8+
export default content
9+
}
10+
11+
declare module "*.sass" {
12+
const content: { [className: string]: string }
13+
export default content
14+
}
15+
16+
// 为第三方库的 CSS 导入添加声明
17+
declare module "swiper/css" {
18+
const content: any
19+
export default content
20+
}
21+
22+
declare module "swiper/css/*" {
23+
const content: any
24+
export default content
25+
}

0 commit comments

Comments
 (0)