Skip to content

Commit

Permalink
💄 footer style details
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 committed Sep 19, 2019
1 parent d9b0582 commit fa88090
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 28 deletions.
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -141,7 +141,7 @@
"warning": "~4.0.3"
},
"devDependencies": {
"@ant-design/colors": "^3.1.0",
"@ant-design/colors": "^3.2.2",
"@ant-design/tools": "^8.0.4",
"@packtracker/webpack-plugin": "^2.0.1",
"@sentry/browser": "^5.4.0",
Expand Down Expand Up @@ -201,7 +201,7 @@
"prettier": "^1.17.1",
"pretty-quick": "^1.11.0",
"querystring": "^0.2.0",
"rc-footer": "^0.2.3",
"rc-footer": "^0.3.2",
"rc-queue-anim": "^1.6.12",
"rc-scroll-anim": "^2.5.8",
"rc-tween-one": "^2.4.1",
Expand Down
15 changes: 15 additions & 0 deletions site/theme/static/footer.less
@@ -1,2 +1,17 @@
@import '~rc-footer/assets/index.css';
@import './colors';

.rc-footer {
&-container {
max-width: unset;
padding: 60px;
}

&-bottom-container {
max-width: calc(100% - 120px);
}

&-columns {
justify-content: space-between;
}
}
20 changes: 9 additions & 11 deletions site/theme/template/Home/index.jsx
Expand Up @@ -41,19 +41,17 @@ function getStyle() {
#header .ant-row > div:last-child .header-lang-button {
margin-right: 0;
}
footer .footer-wrap {
width: 100%;
.rc-footer-container {
max-width: 1200px;
padding: 86px 24px 93px 24px;
margin: auto;
padding: 80px 0;
}
@media only screen and (max-width: 767.99px) {
#footer .footer-wrap {
padding: 40px 24px;
}
footer .footer-wrap .ant-row {
padding: 0;
}
.rc-footer-bottom-container {
max-width: 1200px;
}
.rc-footer-columns {
justify-content: space-around;
}
`;
}
Expand Down
35 changes: 20 additions & 15 deletions site/theme/template/Layout/Footer.jsx
Expand Up @@ -97,6 +97,7 @@ class Footer extends React.Component {
{
title: <FormattedMessage id="app.footer.design-resources" />,
url: getLocalizedPathname('/docs/spec/download', isZhCN),
LinkComponent: Link,
},
{
title: <FormattedMessage id="app.footer.chinamirror" />,
Expand Down Expand Up @@ -148,6 +149,7 @@ class Footer extends React.Component {
icon: <Icon type="usergroup-add" />,
title: <FormattedMessage id="app.footer.work_with_us" />,
url: getLocalizedPathname('/docs/spec/work-with-us', isZhCN),
LinkComponent: Link,
},
],
},
Expand All @@ -164,11 +166,13 @@ class Footer extends React.Component {
icon: <Icon type="history" />,
title: <FormattedMessage id="app.footer.change-log" />,
url: getLocalizedPathname('/changelog', isZhCN),
LinkComponent: Link,
},
{
icon: <Icon type="profile" />,
title: <FormattedMessage id="app.footer.faq" />,
url: getLocalizedPathname('/docs/react/faq', isZhCN),
LinkComponent: Link,
},
{
icon: <Icon type="bug" />,
Expand Down Expand Up @@ -296,6 +300,9 @@ class Footer extends React.Component {
},
{
title: this.renderThemeChanger(),
style: {
marginTop: 20,
},
},
],
},
Expand All @@ -320,7 +327,7 @@ class Footer extends React.Component {
});
};

const lessUrl = 'https://gw.alipayobjects.com/os/lib/less.js/3.8.1/less.min.js';
const lessUrl = 'https://gw.alipayobjects.com/os/lib/less/3.10.3/dist/less.min.js';

if (this.lessLoaded) {
changeColor();
Expand Down Expand Up @@ -373,20 +380,18 @@ class Footer extends React.Component {
const { color } = this.state;
const colors = Object.keys(presetPalettes).filter(item => item !== 'grey');
return (
<div style={{ marginTop: 20 }}>
<ColorPicker
type="sketch"
small
color={color}
position="top"
presetColors={[
...colors.map(c => presetPalettes[c][5]),
...colors.map(c => presetPalettes[c][4]),
...colors.map(c => presetPalettes[c][6]),
]}
onChangeComplete={this.handleColorChange}
/>
</div>
<ColorPicker
type="sketch"
small
color={color}
position="top"
presetColors={[
...colors.map(c => presetPalettes[c][5]),
...colors.map(c => presetPalettes[c][4]),
...colors.map(c => presetPalettes[c][6]),
]}
onChangeComplete={this.handleColorChange}
/>
);
}

Expand Down

0 comments on commit fa88090

Please sign in to comment.