Skip to content

Commit

Permalink
fix: style bug
Browse files Browse the repository at this point in the history
  • Loading branch information
liukaiming-alipay committed Nov 8, 2024
1 parent 6283af3 commit bc6cef4
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 44 deletions.
87 changes: 44 additions & 43 deletions docusaurus/src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -83,50 +83,51 @@
border-radius: 12px;
padding: 14px 32px;
font-size: 14px !important;
}

.container > h1 {
font-size: 24px !important;
color: #1a1b25e0 !important;
line-height: 32px !important;
font-weight: 600 !important;
}

.container > h2 {
font-size: 24px !important;
color: #1a1b25e0 !important;
line-height: 32px !important;
font-weight: 600 !important;
margin-top: 28px !important;
}

.container > a {
font-size: 14px !important;
color: #1677ff !important;
}

.breadcrumbs__item:not(:last-child):after {
content: "/";
background: none;
margin: 0 0 0 5px !important;
font-size: 14px !important;
}

h1 {
font-size: 24px !important;
color: #1a1b25e0 !important;
line-height: 32px !important;
font-weight: 600 !important;
}

h2 {
font-size: 24px !important;
color: #1a1b25e0 !important;
line-height: 32px !important;
font-weight: 600 !important;
margin-top: 28px !important;
}

p,
th,
td,
li,
span {
font-size: 14px !important;
color: #1a1b25e0 !important;
line-height: 22px !important;
}

a {
font-size: 14px !important;
color: #1677ff !important;
}
.breadcrumbs__item:not(:last-child):after {
content: "/";
background: none;
margin: 0 0 0 5px !important;
font-size: 14px !important;
}

.breadcrumbs__link {
background-color: transparent !important;
font-size: 12px !important;
color: #0a0a0ae1 !important;
line-height: 20px;
padding: 0;
}
.breadcrumbs__link {
background-color: transparent !important;
font-size: 12px !important;
color: #0a0a0ae1 !important;
line-height: 20px;
padding: 0;
}

.container > p,
.container > th,
.container > td,
.container > li,
.container > span {
font-size: 14px !important;
color: #1a1b25e0 !important;
line-height: 22px !important;
}

/* Cascader style */
Expand Down
12 changes: 11 additions & 1 deletion docusaurus/src/theme/DocBreadcrumbs/Items/Home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@ export default function HomeBreadcrumbItem(): JSX.Element {
}
};


const homeText = () => {
const lang =
pathname?.split("/")?.find((item) => ["zh", "en"].includes(item)) || "en";
if (lang === "en") {
return "Docs";
}
return "文档";
}

return (
<li className="breadcrumbs__item">
<Link
Expand All @@ -35,7 +45,7 @@ export default function HomeBreadcrumbItem(): JSX.Element {

href={homeHref()}>
<div style={{ color: '#1a1b2572' }}>
文档
{homeText()}
</div>
</Link>
</li>
Expand Down

0 comments on commit bc6cef4

Please sign in to comment.