Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] real dark #2946

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions config/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import os from 'os';
import pageRoutes from './router.config';
import webpackPlugin from './plugin.config';
import defaultSettings from '../src/defaultSettings';
import Dark from './dark';

const plugins = [
[
Expand Down Expand Up @@ -68,6 +69,7 @@ export default {
// https://ant.design/docs/react/customize-theme-cn
theme: {
'primary-color': defaultSettings.primaryColor,
...Dark,
},
externals: {
'@antv/data-set': 'DataSet',
Expand Down
33 changes: 33 additions & 0 deletions config/dark.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
export default {
'@layout-body-background': '#171717',
'@background-color-base': '#262626',
'@body-background': '#404041',
'@layout-sider-background': '#001529',
'@component-background': '#262626',
'@input-bg': '#313133',
'@btn-default-bg': '#262626',
'@border-color-base': '#1e1e1e',
'@border-color-split': '#363636',
'@heading-color': '#E3E3E3',
'@text-color': '#E3E3E3',
'@text-color-secondary': 'fade(#fff, 65%)',
'@table-selected-row-bg': '#3a3a3a',
'@table-expanded-row-bg': '#3b3b3b',
'@table-header-bg': '#3a3a3b',
'@table-row-hover-bg': '#3a3a3b',
'@layout-trigger-color': 'fade(#fff, 80%)',
'@layout-trigger-background': '#313232',
'@alert-message-color': 'fade(#000, 67%)',
'@item-hover-bg': 'fade(#1890ff, 20%)',
'@item-active-bg': 'fade(#1890ff, 40%)',
'@disabled-color': 'rgba(255, 255, 255, 0.25)',
'@tag-default-bg': '#262628',
'@popover-bg': '#262629',
'@wait-icon-color': 'fade(#fff, 64%)',
'@background-color-light': 'fade(#1890ff, 40%)',
'@collapse-header-bg': '#262629',
'@info-color': '#313133',
'@primary-color': '#0050b3',
'@highlight-color': '#a8071a',
'@warning-color': '#613400',
};
2 changes: 1 addition & 1 deletion src/components/Charts/TimelineChart/index.less
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.timelineChart {
background: #fff;
background: @component-background;
}
2 changes: 1 addition & 1 deletion src/components/FooterToolbar/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
height: 56px;
line-height: 56px;
box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.03);
background: #fff;
background: @component-background;
border-top: 1px solid @border-color-split;
padding: 0 24px;
z-index: 9;
Expand Down
2 changes: 1 addition & 1 deletion src/components/GlobalHeader/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
.header {
height: 64px;
padding: 0;
background: #fff;
box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
position: relative;
background-color: @layout-body-background;
}

.logo {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Result/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
}

.extra {
background: #fafafa;
background: @component-background;
padding: 24px 40px;
border-radius: @border-radius-sm;
text-align: left;
Expand Down
2 changes: 1 addition & 1 deletion src/components/SettingDrawer/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

.content {
min-height: 100%;
background: #fff;
background: @component-background;
position: relative;
}

Expand Down
3 changes: 0 additions & 3 deletions src/pages/List/Applications.less
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
.ant-card-meta-avatar {
font-size: 0;
}
.ant-card-actions {
background: #f7f9fa;
}
.ant-list .ant-list-item-content-single {
max-width: 100%;
}
Expand Down
5 changes: 1 addition & 4 deletions src/pages/List/CardList.less
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
max-width: 100%;
}
}
.ant-card-actions {
background: #f7f9fa;
}
.ant-card-body:hover {
.ant-card-meta-title > a {
color: @primary-color;
Expand Down Expand Up @@ -45,7 +42,7 @@
}

.newButton {
background-color: #fff;
background-color: @component-background;
border-color: @border-color-base;
border-radius: @border-radius-sm;
color: @text-color-secondary;
Expand Down
5 changes: 3 additions & 2 deletions src/pages/Result/Error.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { formatMessage, FormattedMessage } from 'umi/locale';
import { Button, Icon, Card } from 'antd';
import Result from '@/components/Result';
import PageHeaderWrapper from '@/components/PageHeaderWrapper';
import styles from './index.less';

const extra = (
<Fragment>
Expand All @@ -20,7 +21,7 @@ const extra = (
/>
</div>
<div style={{ marginBottom: 16 }}>
<Icon style={{ color: '#f5222d', marginRight: 8 }} type="close-circle-o" />
<Icon style={{ marginRight: 8 }} className={styles.error_icon} type="close-circle-o" />
<FormattedMessage
id="app.result.error.hint-text1"
defaultMessage="Your account has been frozen"
Expand All @@ -31,7 +32,7 @@ const extra = (
</a>
</div>
<div>
<Icon style={{ color: '#f5222d', marginRight: 8 }} type="close-circle-o" />
<Icon style={{ marginRight: 8 }} className={styles.error_icon} type="close-circle-o" />
<FormattedMessage
id="app.result.error.hint-text2"
defaultMessage="Your account is not yet eligible to apply"
Expand Down
5 changes: 5 additions & 0 deletions src/pages/Result/index.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@import '~antd/lib/style/themes/default.less';

.error_icon {
color: @highlight-color;
}