Skip to content

Commit

Permalink
fix(DocPage): upd design
Browse files Browse the repository at this point in the history
  • Loading branch information
Feverqwe committed Jan 17, 2024
1 parent c3a675c commit fa6dda6
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 50 deletions.
34 changes: 5 additions & 29 deletions src/components/ContributorAvatars/ContributorAvatars.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,37 +32,13 @@ $avatarWrapperBigSize: 33px;
margin: 0 $avatarBorder;
@include disable-link-styles;

& > * {
@include contributors-text();
}

@media screen and (max-width: map-get($screenBreakpoints, 'sm')) {
&_onlyAuthor > *:last-child {
margin-left: 5px;
}

& > *:last-child,
& > .desktop {
display: none;
}

&_onlyAuthor > *:last-child {
display: block;
}

& > *:not(:last-child) {
margin-right: 0px;
}
a:hover,
a:active {
color: var(--g-color-text-link-hover);
}

@media screen and (min-width: map-get($screenBreakpoints, 'sm')) {
& > .mobile {
display: none;
}

& > *:last-child {
margin-right: 0px;
}
& > * {
@include contributors-text();
}
}

Expand Down
14 changes: 2 additions & 12 deletions src/components/ContributorAvatars/ContributorAvatars.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const ContributorAvatars: React.FC<ContributorAvatarsProps> = (props) => {
return null;
}

if (isAuthor && contributors.length === 1) {
if (contributors.length === 1) {
return getOneAvatar(contributors[0], isAuthor, onlyAuthor);
}

Expand Down Expand Up @@ -78,17 +78,7 @@ function getOneAvatar(

return (
<div className={b('one_contributor', wrapperModifiers)}>
<div className={'desktop'}>{getRedirectingAvatar(avatarData, contributor.url)} </div>
<div className={'mobile'}>
{isAuthor && onlyAuthor ? (
getRedirectingAvatar(avatarData, contributor.url, true)
) : (
<AvatarWithDescription
contributor={contributor}
avatarSize={AvatarSizes.SMALL}
/>
)}
</div>
{getRedirectingAvatar(avatarData, contributor.url)}
<div>
<Link href={contributor.url}>{getName(contributor, isAuthor)}</Link>
</div>
Expand Down
1 change: 0 additions & 1 deletion src/components/Contributors/Contributors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

.dc-contributors {
display: flex;
margin: 0 0 32px;

&__title {
@include contributors-text();
Expand Down
15 changes: 12 additions & 3 deletions src/components/DocPage/DocPage.scss
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
}

&__title {
margin-bottom: 8px;
margin-bottom: 12px;

@include text-size(display-2);
}
Expand Down Expand Up @@ -236,8 +236,17 @@

&__page-contributors {
display: flex;
& > div + div {
margin-left: 20px;
margin-bottom: 24px;
flex-wrap: wrap;

& > div {
margin-right: 20px;
margin-bottom: 8px;
line-height: 24px;
}

& > div:last-child {
margin-right: 0;
}
}

Expand Down
7 changes: 4 additions & 3 deletions src/components/UpdatedAtDate/UpdatedAtDate.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

.dc-updated-at-date {
display: flex;
margin: 0 0 32px;

font-size: 13px;
font-weight: 400;
align-self: center;

&__wrapper {
align-self: center;
}
}
4 changes: 3 additions & 1 deletion src/components/UpdatedAtDate/UpdatedAtDate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ const UpdatedAtDate: React.FC<UpdatedAtDateProps> = ({updatedAt}) => {

return (
<div className={b()}>
{t<string>('title')} {updatedAtFormatted}
<div className={b('wrapper')}>
{t<string>('title')} {updatedAtFormatted}
</div>
</div>
);
};
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,6 @@
"prev": "Предыдущая страница"
},
"updated-at-date": {
"title": "Обновлено"
"title": "Обновлена"
}
}

0 comments on commit fa6dda6

Please sign in to comment.