From abda1a596667b9ede72fbb6d8bb06da8eeffff0f Mon Sep 17 00:00:00 2001 From: mydearxym Date: Sat, 17 Jul 2021 11:52:21 +0800 Subject: [PATCH] chore(easter-egg): upvote icon style & drawer style adjust --- public/icons/static/shape/upvote-ship.svg | 1 + src/components/Upvote/UpvoteBtn.tsx | 7 ++++++- src/components/Upvote/styles/comment_view.ts | 2 +- src/components/Upvote/styles/upvote_btn.ts | 15 ++++++++++++++- src/containers/tool/Drawer/AddOn.tsx | 5 +++-- .../viewer/ArticleViewer/WorksViewer/Header.tsx | 4 ++-- .../ArticleViewer/styles/works_viewer/header.ts | 6 +++--- 7 files changed, 30 insertions(+), 10 deletions(-) create mode 100644 public/icons/static/shape/upvote-ship.svg diff --git a/public/icons/static/shape/upvote-ship.svg b/public/icons/static/shape/upvote-ship.svg new file mode 100644 index 000000000..4b4efeeef --- /dev/null +++ b/public/icons/static/shape/upvote-ship.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/components/Upvote/UpvoteBtn.tsx b/src/components/Upvote/UpvoteBtn.tsx index 3a740ca60..46d48a126 100644 --- a/src/components/Upvote/UpvoteBtn.tsx +++ b/src/components/Upvote/UpvoteBtn.tsx @@ -15,6 +15,7 @@ import { ContentWrapper, IconWrapper, IconShadow, + ShipWindow, UpIcon, } from './styles/upvote_btn' @@ -49,7 +50,11 @@ const UpvoteBtn: FC = ({ viewerHasUpvoted = false }) => { - + + diff --git a/src/components/Upvote/styles/comment_view.ts b/src/components/Upvote/styles/comment_view.ts index 83bbb3d3a..d3d76a409 100755 --- a/src/components/Upvote/styles/comment_view.ts +++ b/src/components/Upvote/styles/comment_view.ts @@ -14,7 +14,7 @@ export const Wrapper = styled.div.attrs(({ testid }: TTestable) => ({ margin-left: -9px; ` export const UpWrapper = styled.div` - margin-left: 9px; + margin-left: 7px; ` export const CountWrapper = styled.div` margin-top: -4px; diff --git a/src/components/Upvote/styles/upvote_btn.ts b/src/components/Upvote/styles/upvote_btn.ts index 919f185c5..984f0536e 100644 --- a/src/components/Upvote/styles/upvote_btn.ts +++ b/src/components/Upvote/styles/upvote_btn.ts @@ -159,10 +159,23 @@ export const IconShadow = styled.div` transform: opacity 0.2s; ` +export const ShipWindow = styled.div` + position: absolute; + left: 7px; + top: 8px; + width: 5px; + height: 4px; + border-radius: 100%; + display: block; + background: ${theme('thread.articleDigest')}; + + opacity: 0.6; +` export const UpIcon = styled(Img)` fill: ${({ $active }) => $active ? '#139B9D;' : theme('thread.articleDigest')}; - ${css.size(17)}; + ${css.size(18)}; + transform: scale(1, 0.8); margin-top: 1px; &:hover { fill: #139b9d; diff --git a/src/containers/tool/Drawer/AddOn.tsx b/src/containers/tool/Drawer/AddOn.tsx index f1fc02e71..4d318f4ea 100755 --- a/src/containers/tool/Drawer/AddOn.tsx +++ b/src/containers/tool/Drawer/AddOn.tsx @@ -33,8 +33,9 @@ const AddOn: FC = ({ type }) => { /> = ({ article }) => { {' '} {article.views} - + {article.commentsCount} {/* */} - + {/* */} diff --git a/src/containers/viewer/ArticleViewer/styles/works_viewer/header.ts b/src/containers/viewer/ArticleViewer/styles/works_viewer/header.ts index dcfcf5a17..1155119e9 100644 --- a/src/containers/viewer/ArticleViewer/styles/works_viewer/header.ts +++ b/src/containers/viewer/ArticleViewer/styles/works_viewer/header.ts @@ -64,14 +64,14 @@ export const EditedHint = styled.div` ` export const BaseWrapper = styled.div` ${css.flex('align-center')}; - margin-top: 8px; + margin-top: 9px; ` export const ViewIcon = styled(Img)` fill: ${theme('thread.articleDigest')}; - ${css.size(16)}; + ${css.size(15)}; margin-right: 5px; ` export const Count = styled.div` color: ${theme('thread.articleDigest')}; - font-size: 15px; + font-size: 14px; `