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

Commit e234b93

Browse files
authored
style(avatar): quote image concept (#991)
* style(UserPage): the quote image concept, just ui * style(homePage): quote avatar concept for post item
1 parent 28ff8cb commit e234b93

File tree

5 files changed

+27
-12
lines changed

5 files changed

+27
-12
lines changed

src/components/TheAvatar/PostItemAvatar.js

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,24 @@
11
import React from 'react'
22

3-
import { ICON } from '@/config'
3+
// import { ICON } from '@/config'
44
import ImgFallback from '@/components/ImgFallback'
5-
import { Wrapper, Avatar, Tail } from './styles/post_item_avatar'
5+
import { Wrapper, Avatar, QuoteAvatar } from './styles/post_item_avatar'
66

77
const PostItemAvatar = ({ user, onSelect }) => {
88
return (
99
<Wrapper onClick={() => onSelect(user)}>
10-
<Avatar
11-
src={user.avatar}
12-
fallback={<ImgFallback user={user} size={38} top={2} />}
13-
/>
14-
<Tail src={`${ICON}/shape/tail.svg`} />
10+
{user.login === 'mydearxym' ? (
11+
<QuoteAvatar
12+
src={user.avatar}
13+
fallback={<ImgFallback user={user} size={38} top={2} />}
14+
/>
15+
) : (
16+
<Avatar
17+
src={user.avatar}
18+
fallback={<ImgFallback user={user} size={38} top={2} />}
19+
/>
20+
)}
21+
{/* <Tail src={`${ICON}/shape/tail.svg`} /> */}
1522
</Wrapper>
1623
)
1724
}

src/components/TheAvatar/styles/post_item_avatar.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ export const Avatar = styled(Img)`
1919
opacity: ${theme('avatarOpacity')};
2020
margin-top: 2px;
2121
`
22+
export const QuoteAvatar = styled(Avatar)`
23+
${css.circle(38)};
24+
border: 2px solid;
25+
border-color: #217470;
26+
`
2227
export const Tail = styled(TailBase)`
2328
${Wrapper}:hover & {
2429
left: -6px;

src/components/UserBrief/styles/avatar.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@ export const Wrapper = styled.div`
1010
margin-right: 12px;
1111
`
1212
export const Avatar = styled(Img)`
13-
width: 150px;
14-
height: 150px;
13+
width: 200px;
14+
height: 200px;
15+
border-radius: 67px;
16+
border: 5px solid;
17+
border-color: #217470;
1518
display: block;
16-
border-radius: 100%;
19+
margin-left: -5px;
1720
`
1821
// export const Avatar = styled(Img)`
1922
// border-radius: 4px;

src/components/UserBrief/styles/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export const Wrapper = styled.div`
1010
export const BriefTextWrapper = styled.div`
1111
/* align-items: ${({ view }) =>
1212
view === VIEW.DESKTOP ? 'center' : 'flex-start'}; */
13-
margin-top: 20px;
13+
margin-top: 35px;
1414
`
1515
export const UserTitle = styled.div`
1616
${css.flex()};

src/containers/content/UserContent/styles/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const BannerWrapper = styled.div`
1616
position: relative;
1717
background: ${theme('banner.bg')};
1818
width: 100%;
19-
height: 120px;
19+
height: 145px;
2020
margin-bottom: 20px;
2121
${({ metric }) => css.fitPageWidth(metric)};
2222
`

0 commit comments

Comments
 (0)