Skip to content

Commit

Permalink
refactor(theme): adjust some keys
Browse files Browse the repository at this point in the history
  • Loading branch information
mydearxym committed Oct 7, 2023
1 parent 5878c37 commit 6b81abc
Show file tree
Hide file tree
Showing 22 changed files with 24 additions and 40 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
"styled-components": "^6.0.8",
"stylis": "^4.3.0",
"timeago-react": "^3.0.5",
"tinykeys": "^1.4.0",
"tinykeys": "^2.1.0",
"tsparticles-confetti": "^2.12.0",
"typewriter-effect": "^2.19.0",
"urql": "^3.0.3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export const MainWrapper = styled.div<{ metric: TMetric }>`
`
export const ArticleWrapper = styled.div`
font-size: 15px;
/* background: ${theme('drawer.articleBg')}; */
/* border-radius: 5px; */
background: transparent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ export const InnerWrapper = styled.div`
border-image-slice: 1;
`
/* background: ${theme('drawer.articleBg')}; */
export const Label = styled.div`
font-size: 13px;
color: ${theme('article.digest')};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export const MainWrapper = styled.div`
width: 100%;
`};
`
/* background: ${theme('drawer.articleBg')}; */
export const ArticleWrapper = styled.div`
font-size: 15px;
background: transparent;
Expand Down
3 changes: 2 additions & 1 deletion src/containers/thread/ThreadSidebar/ClassicLayout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const ClassicLayout: FC<TProps> = ({ showCommunityBadge }) => {

{showCommunityBadge && (
<Fragment>
<DividerTitle>团队</DividerTitle>
<DividerTitle>团队成员</DividerTitle>
<Br top={14} />
</Fragment>
)}
Expand All @@ -90,6 +90,7 @@ const ClassicLayout: FC<TProps> = ({ showCommunityBadge }) => {
text="参与讨论"
onClick={() => onPublish(ARTICLE_CAT.FEATURE)}
onMenuSelect={onPublish}
left={-2}
offset={[0, 5]}
/>
</PublishWrapper>
Expand Down
4 changes: 2 additions & 2 deletions src/containers/thread/ThreadSidebar/styles/classic_layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ export const StickyWrapper = styled.div`
`
export const DividerTitle = styled.div`
${css.row('align-center')};
color: ${theme('article.title')};
color: ${theme('article.digest')};
font-size: 14px;
font-weight: 600;
font-weight: 500;
`
export const CommunityJoinersWrapper = styled.div<TActive>`
${css.row()};
Expand Down
2 changes: 2 additions & 0 deletions src/containers/tool/Drawer/styles/add_on/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ export const TopArea = styled.div<{ showShare: boolean }>`
${css.column('align-both')}
padding-left: 12px;
z-index: 100000;
border: 1px solid;
border-color: ${theme('drawer.border')};
&:before {
content: '';
Expand Down
2 changes: 2 additions & 0 deletions src/containers/tool/Drawer/styles/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ export const DrawerContent = styled.div<{ type: string }>`
border-radius: ${({ type }) => (isWideMode(type) ? 0 : '10px')};
box-shadow: ${({ type }) =>
isWideMode(type) ? theme('drawer.shadow') : theme('drawer.shadowLite')};
border: 1px solid;
border-color: ${theme('drawer.border')};
`
type TDrawerMobile = { options: Record<string, unknown>; bgColor: string }
export const DrawerMobileContent = styled.div<TDrawerMobile>`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const CommentBlock = styled.div`
position: relative;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
border-radius: 3px;
background: ${theme('drawer.articleBg')};
background: ${theme('drawer.bg')};
`
export const ActionsWrapper = styled.div`
${css.row('align-center')};
Expand Down
2 changes: 1 addition & 1 deletion src/containers/unit/Comments/styles/list/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ export const CommentBlock = styled.div`
position: relative;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
border-radius: 3px;
background: ${theme('drawer.articleBg')};
background: ${theme('drawer.bg')};
`
2 changes: 1 addition & 1 deletion src/containers/unit/Comments/styles/locked_message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const Wrapper = styled.div`
position: relative;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
border-radius: 3px;
background: ${theme('drawer.articleBg')};
background: ${theme('drawer.bg')};
`

export const LockIcon = styled(Img)`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const UserWrapper = styled.div`
margin-right: 5px;
padding: 20px 10px;
border-bottom: 1px solid;
border-bottom-color: ${theme('drawer.divider')};
border-bottom-color: ${theme('divider')};
`
export const UserAvatar = styled(Img)`
${css.size(55)};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const UserWrapper = styled.div`
padding-top: 10px;
padding-bottom: 10px;
border-bottom: 1px solid;
border-bottom-color: ${theme('drawer.divider')};
border-bottom-color: ${theme('divider')};
`
export const UserAvatar = styled(Img)`
${css.size(32)};
Expand Down
4 changes: 1 addition & 3 deletions src/containers/user/UserLister/styles/user_list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import css, { theme } from '@/css'
export const TableWrapper = styled.div`
${css.rowWrap()};
`
// background: ${theme('drawer.articleBg')};

export const UserWrapper = styled.div`
${css.row()};
width: 48%;
Expand All @@ -16,7 +14,7 @@ export const UserWrapper = styled.div`
padding-top: 10px;
padding-bottom: 10px;
border-bottom: 1px solid;
border-bottom-color: ${theme('drawer.divider')};
border-bottom-color: ${theme('divider')};
`
export const UserAvatar = styled(Img)`
${css.size(55)};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import CollectionSVG from '@/icons/CollectionBookmark'

export const Wrapper = styled.div`
border-bottom: 1px solid;
border-bottom-color: ${theme('drawer.divider')};
border-bottom-color: ${theme('divider')};
`
export const InfoWrapper = styled.div`
${css.row('align-center', 'justify-between')};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const Wrapper = styled.div<{ visible: boolean }>`
height: 60px;
background: #fff; // to-theme
border-bottom: 1px solid;
border-bottom-color: ${theme('drawer.divider')};
border-bottom-color: ${theme('divider')};
z-index: 5;
transition: all 0.2s;
`
Expand Down
1 change: 1 addition & 0 deletions src/widgets/CustomHeaderLinks/styles/header_layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export const GroupItem = styled(LinkItem)<TActive>`
${css.row('align-center')};
position: relative;
padding-right: 22px;
color: ${({ $active }) => ($active ? theme('article.title') : theme('article.digest'))};
background: ${({ $active }) => ($active ? theme('hoverBg') : '')};
&:hover {
Expand Down
1 change: 1 addition & 0 deletions src/widgets/CustomHeaderLinks/styles/sidebar_layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export const GroupItem = styled(LinkItem)<TGroupItem>`
height: 28px;
margin-top: 2px;
margin-bottom: 2px;
color: ${({ $active }) => ($active ? theme('article.title') : theme('article.digest'))};
background: ${({ $active }) => ($active ? theme('hoverBg') : '')};
&:hover {
Expand Down
1 change: 1 addition & 0 deletions src/widgets/CustomHeaderLinks/styles/tabber_layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export const GroupItem = styled(LinkItem)<TActive>`
${css.row('align-center')};
position: relative;
padding-right: 22px;
color: ${({ $active }) => ($active ? theme('article.title') : theme('article.digest'))};
background: ${({ $active }) => ($active ? theme('hoverBg') : '')};
&:hover {
Expand Down
1 change: 0 additions & 1 deletion src/widgets/OauthHinter/styles/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export const Wrapper = styled.div`
height: 100vh;
background: ${theme('banner.bg')};
border-top: 4px solid;
border-top-color: ${theme('drawer.topLine')};
`
export const IconsWrapper = styled.div`
${css.row('justify-center')};
Expand Down
11 changes: 1 addition & 10 deletions utils/themes/skins/day.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,16 +159,7 @@ const day = {
shadow: '-8px 8px 20px 11px rgb(143 143 143 / 2%)',
shadowLite: '-8px 8px 20px 11px rgb(143 143 143 / 2%)',
closerShadow: '-7px 4px 20px 0px rgb(143 143 143 / 2%)',
markdownHelperBg: '#F9FCFC',
accountBg: '#FFFFFF',
articleBg: '#FFFFFF',
helper: '#d9e5e6',
helperHover: '#83a2a5',
topLine: '#22292E',
icon: 'tomato',
divider: '#e0e6e5',
/* single article page sidebar divider */
sideDivider: '#e4e4e4',
border: 'transparent',
},
comment: {
bg: contentBg,
Expand Down
15 changes: 3 additions & 12 deletions utils/themes/skins/night.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,23 +152,14 @@ const night = {
},
drawer: {
title: threadTitle,
mask: 'rgba(31, 34, 37, 0.15)',
mask: 'rgb(31 34 37 / 41%)',
desc: descText,
font: primaryColor,
bg: contentBg,
bg: '#252525',
shadow: '-13px 1px 20px 11px rgb(0 0 0 / 9%)',
shadowLite: '-8px 8px 20px 11px rgb(143 143 143 / 2%)',
closerShadow: '-3px 12px 20px 0px rgb(32 29 29 / 83%)',
markdownHelperBg: '#F9FCFC',
accountBg: '#FFFFFF',
articleBg: '#FFFFFF',
helper: '#d9e5e6',
helperHover: '#83a2a5',
topLine: '#22292E',
icon: 'tomato',
divider: '#e0e6e5',
/* single article page sidebar divider */
sideDivider: '#e4e4e4',
border: '#363636',
},
comment: {
bg: contentBg,
Expand Down

0 comments on commit 6b81abc

Please sign in to comment.