Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit e6f278b

Browse files
authored
chore(easter-egg): upvote icon style & drawer style adjust (#1114)
1 parent 8a407c0 commit e6f278b

File tree

7 files changed

+30
-10
lines changed

7 files changed

+30
-10
lines changed
Lines changed: 1 addition & 0 deletions
Loading

src/components/Upvote/UpvoteBtn.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import {
1515
ContentWrapper,
1616
IconWrapper,
1717
IconShadow,
18+
ShipWindow,
1819
UpIcon,
1920
} from './styles/upvote_btn'
2021

@@ -49,7 +50,11 @@ const UpvoteBtn: FC<TProps> = ({ viewerHasUpvoted = false }) => {
4950
<ContentWrapper>
5051
<IconWrapper onClick={handleClick}>
5152
<IconShadow />
52-
<UpIcon src={`${ICON}/shape/upvote.svg`} $active={viewerHasUpvoted} />
53+
<ShipWindow />
54+
<UpIcon
55+
src={`${ICON}/shape/upvote-ship.svg`}
56+
$active={viewerHasUpvoted}
57+
/>
5358
</IconWrapper>
5459
</ContentWrapper>
5560
</Wrapper>

src/components/Upvote/styles/comment_view.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export const Wrapper = styled.div.attrs(({ testid }: TTestable) => ({
1414
margin-left: -9px;
1515
`
1616
export const UpWrapper = styled.div`
17-
margin-left: 9px;
17+
margin-left: 7px;
1818
`
1919
export const CountWrapper = styled.div`
2020
margin-top: -4px;

src/components/Upvote/styles/upvote_btn.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,23 @@ export const IconShadow = styled.div`
159159
transform: opacity 0.2s;
160160
`
161161

162+
export const ShipWindow = styled.div`
163+
position: absolute;
164+
left: 7px;
165+
top: 8px;
166+
width: 5px;
167+
height: 4px;
168+
border-radius: 100%;
169+
display: block;
170+
background: ${theme('thread.articleDigest')};
171+
172+
opacity: 0.6;
173+
`
162174
export const UpIcon = styled(Img)<TActive>`
163175
fill: ${({ $active }) =>
164176
$active ? '#139B9D;' : theme('thread.articleDigest')};
165-
${css.size(17)};
177+
${css.size(18)};
178+
transform: scale(1, 0.8);
166179
margin-top: 1px;
167180
&:hover {
168181
fill: #139b9d;

src/containers/tool/Drawer/AddOn.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ const AddOn: FC<TProps> = ({ type }) => {
3333
/>
3434
<IconButton
3535
path="article/share.svg"
36-
size={20}
37-
mTop={6}
36+
size={19}
37+
mTop={7}
38+
mLeft={-1}
3839
hint="分享本文"
3940
hintPlacement="bottom"
4041
dimWhenIdle

src/containers/viewer/ArticleViewer/WorksViewer/Header.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ const Header: FC<TProps> = ({ article }) => {
6262
<ViewIcon src={`${ICON}/article/viewed.svg`} />{' '}
6363
<Count>{article.views}</Count>
6464
<Space right={14} />
65-
<IconButton path="article/comment.svg" mRight={6} />
65+
<IconButton path="article/comment.svg" mRight={6} size={15} />
6666
<Count>{article.commentsCount}</Count>
6767
{/* <DotDivider space={10} /> */}
68-
<IconButton path="shape/more-l.svg" mLeft={8} mRight={-4} size={14} />
68+
<IconButton path="shape/more-l.svg" mLeft={6} mRight={-4} size={15} />
6969
{/* <IconButton path="shape/more.svg" mRight={0} /> */}
7070
</BaseWrapper>
7171
</CommonInfo>

src/containers/viewer/ArticleViewer/styles/works_viewer/header.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,14 @@ export const EditedHint = styled.div`
6464
`
6565
export const BaseWrapper = styled.div`
6666
${css.flex('align-center')};
67-
margin-top: 8px;
67+
margin-top: 9px;
6868
`
6969
export const ViewIcon = styled(Img)`
7070
fill: ${theme('thread.articleDigest')};
71-
${css.size(16)};
71+
${css.size(15)};
7272
margin-right: 5px;
7373
`
7474
export const Count = styled.div`
7575
color: ${theme('thread.articleDigest')};
76-
font-size: 15px;
76+
font-size: 14px;
7777
`

0 commit comments

Comments
 (0)