site: fix home page rtl style and footer icons (#40003)

* docs: fix home page rtl style

* style: fix rtl style

* Update package.json

* style: fix card text align

* style: update footer icons
This commit is contained in:
afc163 2023-01-04 19:37:57 +08:00 committed by GitHub
parent df4542e20c
commit c8bc3ce6c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 23 additions and 47 deletions

View File

@ -76,7 +76,7 @@ const RecommendItem = ({ extra, index, icons, itemCss }: RecommendItemProps) =>
<Typography.Paragraph type="secondary" style={{ flex: 'auto' }}> <Typography.Paragraph type="secondary" style={{ flex: 'auto' }}>
{extra.description} {extra.description}
</Typography.Paragraph> </Typography.Paragraph>
<div style={{ display: 'flex', justifyContent: 'space-between' }}> <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
<Typography.Text>{extra.date}</Typography.Text> <Typography.Text>{extra.date}</Typography.Text>
{icon && <img src={icon.href} style={{ height: token.fontSize }} alt="banner" />} {icon && <img src={icon.href} style={{ height: token.fontSize }} alt="banner" />}
</div> </div>

View File

@ -114,7 +114,7 @@ const useStyle = () => {
`, `,
menu: css` menu: css`
margin-left: auto; margin-inline-start: auto;
`, `,
darkSideMenu: css``, darkSideMenu: css``,

View File

@ -10,7 +10,7 @@ export default () => {
styles={css` styles={css`
@font-face { @font-face {
font-weight: normal; font-weight: normal;
font-family: PuHuiTi; font-family: AlibabaPuHuiTi;
src: url('//at.alicdn.com/t/webfont_6e11e43nfj.woff2') format('woff2'), src: url('//at.alicdn.com/t/webfont_6e11e43nfj.woff2') format('woff2'),
url('//at.alicdn.com/t/webfont_6e11e43nfj.woff') format('woff'), url('//at.alicdn.com/t/webfont_6e11e43nfj.woff') format('woff'),
/* chrome、firefox */ url('//at.alicdn.com/t/webfont_6e11e43nfj.ttf') format('truetype'); /* chrome、firefox、opera、Safari, Android, iOS 4.2+ */ /* chrome、firefox */ url('//at.alicdn.com/t/webfont_6e11e43nfj.ttf') format('truetype'); /* chrome、firefox、opera、Safari, Android, iOS 4.2+ */
@ -19,7 +19,7 @@ export default () => {
@font-face { @font-face {
font-weight: bold; font-weight: bold;
font-family: PuHuiTi; font-family: AlibabaPuHuiTi;
src: url('//at.alicdn.com/t/webfont_exesdog9toj.woff2') format('woff2'), src: url('//at.alicdn.com/t/webfont_exesdog9toj.woff2') format('woff2'),
url('//at.alicdn.com/t/webfont_exesdog9toj.woff') format('woff'), url('//at.alicdn.com/t/webfont_exesdog9toj.woff') format('woff'),
/* chrome、firefox */ url('//at.alicdn.com/t/webfont_exesdog9toj.ttf') /* chrome、firefox */ url('//at.alicdn.com/t/webfont_exesdog9toj.ttf')

View File

@ -78,8 +78,6 @@
"app.footer.data-vis": "Data Visualization", "app.footer.data-vis": "Data Visualization",
"app.footer.eggjs": "Enterprise Node Framework", "app.footer.eggjs": "Enterprise Node Framework",
"app.footer.motion": "Motion Solution", "app.footer.motion": "Motion Solution",
"app.footer.antd-library": "Axure library",
"app.footer.antux": "Sitemap Template",
"app.footer.community": "Community", "app.footer.community": "Community",
"app.footer.help": "Help", "app.footer.help": "Help",
"app.footer.change-log": "Change Log", "app.footer.change-log": "Change Log",

View File

@ -77,8 +77,6 @@
"app.footer.data-vis": "数据可视化", "app.footer.data-vis": "数据可视化",
"app.footer.eggjs": "企业级 Node 开发框架", "app.footer.eggjs": "企业级 Node 开发框架",
"app.footer.motion": "设计动效", "app.footer.motion": "设计动效",
"app.footer.antd-library": "Axure 部件库",
"app.footer.antux": "页面逻辑素材",
"app.footer.community": "社区", "app.footer.community": "社区",
"app.footer.help": "帮助", "app.footer.help": "帮助",
"app.footer.change-log": "更新日志", "app.footer.change-log": "更新日志",
@ -89,7 +87,7 @@
"app.footer.segmentfault": "SegmentFault", "app.footer.segmentfault": "SegmentFault",
"app.footer.discussions": "讨论区", "app.footer.discussions": "讨论区",
"app.footer.bug-report": "报告 Bug", "app.footer.bug-report": "报告 Bug",
"app.footer.issues": "讨论列表", "app.footer.issues": "议题",
"app.footer.version": "文档版本:", "app.footer.version": "文档版本:",
"app.footer.author": "蚂蚁集团体验技术部出品 @ XTech", "app.footer.author": "蚂蚁集团体验技术部出品 @ XTech",
"app.footer.work_with_us": "加入我们", "app.footer.work_with_us": "加入我们",

View File

@ -10,11 +10,11 @@ import {
HistoryOutlined, HistoryOutlined,
IssuesCloseOutlined, IssuesCloseOutlined,
MediumOutlined, MediumOutlined,
ProfileOutlined,
QuestionCircleOutlined, QuestionCircleOutlined,
TwitterOutlined, TwitterOutlined,
UsergroupAddOutlined, UsergroupAddOutlined,
ZhihuOutlined, ZhihuOutlined,
MessageOutlined,
} from '@ant-design/icons'; } from '@ant-design/icons';
import { css } from '@emotion/react'; import { css } from '@emotion/react';
import { TinyColor } from '@ctrl/tinycolor'; import { TinyColor } from '@ctrl/tinycolor';
@ -67,6 +67,10 @@ const useStyle = () => {
} }
} }
.rc-footer-item-icon {
top: -1.5px;
}
.rc-footer-container { .rc-footer-container {
max-width: 1208px; max-width: 1208px;
margin-inline: auto; margin-inline: auto;
@ -252,7 +256,7 @@ const Footer = () => {
LinkComponent: Link, LinkComponent: Link,
}, },
{ {
icon: <ProfileOutlined />, icon: <QuestionCircleOutlined />,
title: <FormattedMessage id="app.footer.faq" />, title: <FormattedMessage id="app.footer.faq" />,
url: getLink('/docs/react/faq'), url: getLink('/docs/react/faq'),
LinkComponent: Link, LinkComponent: Link,
@ -270,7 +274,7 @@ const Footer = () => {
openExternal: true, openExternal: true,
}, },
{ {
icon: <QuestionCircleOutlined />, icon: <MessageOutlined />,
title: <FormattedMessage id="app.footer.discussions" />, title: <FormattedMessage id="app.footer.discussions" />,
url: 'https://github.com/ant-design/ant-design/discussions', url: 'https://github.com/ant-design/ant-design/discussions',
openExternal: true, openExternal: true,
@ -324,12 +328,7 @@ const Footer = () => {
openExternal: true, openExternal: true,
}, },
{ {
icon: ( icon: <img src="https://www.eggjs.org/logo.svg" alt="Egg" />,
<img
src="https://gw.alipayobjects.com/zos/antfincdn/v2%24rh7lqpu/82f338dd-b0a6-41bc-9a86-58aaa9df217b.png"
alt="Egg"
/>
),
title: 'Egg', title: 'Egg',
url: 'https://eggjs.org', url: 'https://eggjs.org',
description: <FormattedMessage id="app.footer.egg.slogan" />, description: <FormattedMessage id="app.footer.egg.slogan" />,

View File

@ -7,17 +7,17 @@ import useSiteToken from '../../../hooks/useSiteToken';
const useStyle = () => { const useStyle = () => {
const { token } = useSiteToken(); const { token } = useSiteToken();
const { antCls, headerHeight, colorTextHeading, fontFamily, mobileMaxWidth } = token; const { headerHeight, colorTextHeading, fontFamily, mobileMaxWidth } = token;
return { return {
logo: css` logo: css`
height: ${headerHeight}px; height: ${headerHeight}px;
padding-left: 40px; padding-inline-start: 40px;
overflow: hidden; overflow: hidden;
color: ${colorTextHeading}; color: ${colorTextHeading};
font-weight: bold; font-weight: bold;
font-size: 18px; font-size: 18px;
font-family: PuHuiTi, ${fontFamily}, sans-serif; font-family: AlibabaPuHuiTi, ${fontFamily}, sans-serif;
line-height: ${headerHeight}px; line-height: ${headerHeight}px;
letter-spacing: -0.18px; letter-spacing: -0.18px;
white-space: nowrap; white-space: nowrap;
@ -29,26 +29,15 @@ const useStyle = () => {
color: ${colorTextHeading}; color: ${colorTextHeading};
} }
${antCls}-row-rtl & {
float: right;
padding-right: 40px;
padding-left: 0;
}
img { img {
height: 32px; height: 32px;
margin-right: 12px; margin-inline-end: 12px;
vertical-align: middle; vertical-align: middle;
${antCls}-row-rtl & {
margin-right: 0;
margin-left: 16px;
}
} }
@media only screen and (max-width: ${mobileMaxWidth}px) { @media only screen and (max-width: ${mobileMaxWidth}px) {
padding-right: 0; padding-inline-start: 0;
padding-left: 0; padding-inline-end: 0;
} }
`, `,
}; };

View File

@ -102,19 +102,11 @@ const useStyle = () => {
> * { > * {
flex: none; flex: none;
margin: 0 12px 0 0; margin: 0;
margin-inline-end: 12px;
&:last-child { &:last-child {
margin-right: 40px; margin-inline-end: 40px;
}
}
${token.antCls}-row-rtl & {
> * {
&:last-child {
margin-right: 12px;
margin-left: 40px;
}
} }
} }
`, `,

View File

@ -246,7 +246,7 @@
"prismjs": "^1.29.0", "prismjs": "^1.29.0",
"progress": "^2.0.3", "progress": "^2.0.3",
"qs": "^6.10.1", "qs": "^6.10.1",
"rc-footer": "^0.6.6", "rc-footer": "^0.6.8",
"rc-tween-one": "^3.0.3", "rc-tween-one": "^3.0.3",
"rc-virtual-list": "^3.4.11", "rc-virtual-list": "^3.4.11",
"react": "^18.0.0", "react": "^18.0.0",