Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/adaptive #104

Merged
merged 21 commits into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
01350c7
feat(profile): create adaptive 375-1920 for sidebar
elrouss Oct 18, 2023
95024c9
fix(sidebar): paddings in buttons
elrouss Oct 18, 2023
98670ca
Merge pull request #89 from Medical-Information-Portal-Stethoscope/fe…
elrouss Oct 18, 2023
e3d6d81
feat(adaptive): adaptive for auth
AleksandrDronov Oct 19, 2023
035c438
feat(profile): make adaptive tab editing user info
elrouss Oct 20, 2023
a0e3d4e
Merge pull request #92 from Medical-Information-Portal-Stethoscope/fe…
elrouss Oct 20, 2023
4d984e3
feat(adaptive): adaptive for signup activation
AleksandrDronov Oct 21, 2023
a95f953
feat(adaptive): adaptive for login
AleksandrDronov Oct 21, 2023
ff691c0
feat(creating-an-article): make adaptive 375-1920 in all states
elrouss Oct 21, 2023
e29ed55
Merge pull request #93 from Medical-Information-Portal-Stethoscope/fe…
elrouss Oct 21, 2023
b37adba
feat(adaptive): adaptive for reset password
AleksandrDronov Oct 21, 2023
69e81b5
feat(favorites-page): make adaptive 375-1920
elrouss Oct 21, 2023
d938f5b
Merge pull request #94 from Medical-Information-Portal-Stethoscope/fe…
elrouss Oct 21, 2023
fb03d74
fix(favorites): heading if gallery is empty
elrouss Oct 21, 2023
461d4a6
feat(profile): remake adaptive due to new template
elrouss Oct 23, 2023
428c749
Merge pull request #95 from Medical-Information-Portal-Stethoscope/fe…
AleksandrDronov Oct 24, 2023
56548ac
Merge branch 'feat/adaptive' into feat/adaptive-registration
AleksandrDronov Oct 24, 2023
eb89229
feat: buttons paddings
AleksandrDronov Oct 24, 2023
02e556c
fix: change back OnlyUnAuth
AleksandrDronov Oct 25, 2023
8ba7091
feat(adaptive): adaptive for sign-up. fix styles
AleksandrDronov Oct 26, 2023
3fb8a42
Merge pull request #91 from Medical-Information-Portal-Stethoscope/fe…
elrouss Oct 26, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/assets/styles/abstracts/variables/colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ $color-neutral-700: #484554;
$color-neutral-600: #666372;
$color-neutral-500: #838090;
$color-neutral-400: #ada9bb;
$color-neutral-350: #bdbdbd;
$color-neutral-300: #bbb;
$color-neutral-150: #ececec;
$color-neutral-100: #f4f4f4;
Expand Down
2 changes: 2 additions & 0 deletions src/assets/styles/abstracts/variables/fonts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ $font-size-text-medium-small: 1.6rem;
$font-size-text-medium-additional: 1.6rem;
$font-size-text-small: 1.4rem;
$font-size-text-small-extra: 1.2rem;
$font-size-text-small-extra-extra: 0.9rem;
$font-size-mobile-text-medium: 1.6rem;

$font-line-height-huge: calc(8rem / $font-size-huge * 100%);
Expand Down Expand Up @@ -40,3 +41,4 @@ $font-line-height-mobile-text-medium: calc(
);

$font-letter-spacing-main: 0.4px;
$font-letter-spacing-tablet: 0.2px;
58 changes: 58 additions & 0 deletions src/components/cards/article-preview/article-preview.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ $border: 1px solid
}
}

&--favorites {
@media screen and (max-width: calc($media-desktop-medium - 1px)) {
padding: 16px;
}
}

&--news,
&--fullPageNews {
max-width: 1208px;
Expand Down Expand Up @@ -79,6 +85,10 @@ $border: 1px solid
row-gap: 16px;
}
}

@media screen and (max-width: calc($media-tablet-small-extra - 1px)) {
row-gap: 12px;
}
}

.imageWrapper {
Expand Down Expand Up @@ -157,6 +167,30 @@ $border: 1px solid
}
}

&--favorites {
@media screen and (max-width: calc($media-desktop-large - 1px)) {
height: calc-fluid-element(
180,
320,
$media-desktop-small,
$media-desktop-large
);
}

@media screen and (max-width: calc($media-desktop-medium - 1px)) {
> button {
&:last-child {
top: 7px;
right: 7px;
}
}
}

@media screen and (max-width: $media-desktop-small) {
height: 180px;
}
}

&--fullPageNews,
&--news {
height: 292px;
Expand Down Expand Up @@ -243,6 +277,12 @@ $border: 1px solid
}
}

&--favorites {
@media screen and (max-width: calc($media-desktop-medium - 1px)) {
min-height: 148px;
}
}

&--fullPageNews,
&--news {
min-height: 243px;
Expand Down Expand Up @@ -281,6 +321,15 @@ $border: 1px solid
@media screen and (max-width: calc($media-tablet-small - 1px)) {
font-size: $font-size-text-medium;
}

&--favorites {
@media screen and (max-width: calc($media-desktop-medium - 1px)) {
font-size: $font-size-text-medium;
font-weight: 600;
line-height: $font-line-height-text-medium;
letter-spacing: $font-letter-spacing-main;
}
}
}

.text {
Expand Down Expand Up @@ -346,6 +395,15 @@ $border: 1px solid
margin-top: 16px;
}

&--favorites {
@media screen and (max-width: calc($media-desktop-medium - 1px)) {
height: 64px;
font-size: $font-size-text-small;
line-height: $font-line-height-text-small;
letter-spacing: $font-letter-spacing-main;
}
}

&--fullPageArticle {
@media screen and (max-width: $media-tablet-large) {
height: 48px;
Expand Down
17 changes: 15 additions & 2 deletions src/components/cards/article-preview/article-preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,13 @@ interface ICardArticlePreviewProps {
} | null;
views_count: number;
};
type: 'media' | 'news' | 'fullPageArticle' | 'fullPageNews' | 'default';
type:
| 'media'
| 'news'
| 'favorites'
| 'fullPageArticle'
| 'fullPageNews'
| 'default';
hasFavoriteButton?: boolean;
extraClass?: string;
route: string;
Expand Down Expand Up @@ -84,7 +90,14 @@ const CardArticlePreview: FC<ICardArticlePreviewProps> = ({
)}
>
<div className={styles.title}>
<h3 className={styles.heading}>{title}</h3>
<h3
className={classNames(
styles.heading,
styles[`heading--${type}`]
)}
>
{title}
</h3>
<p className={classNames(styles.text, styles[`text--${type}`])}>
{converMdToHTML(annotation, true)}
</p>
Expand Down
145 changes: 137 additions & 8 deletions src/components/entry/entry.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,17 @@
@import 'assets/styles/abstracts/variables/fonts';
@import 'assets/styles/abstracts/variables/wrappers';
@import 'assets/styles/abstracts/placeholders';
@import 'assets/styles/abstracts/variables/media-queries';
@import 'assets/styles/abstracts/functions';

.main {
display: grid;
grid-template-columns: 50.62% 49.38%;
height: 100vh;

@media screen and (max-width: $media-tablet-large) {
grid-template-columns: 100%;
}
}

.columnLeft,
Expand All @@ -19,17 +25,33 @@
.columnRight {
background-color: $color-brand-primary-900;

@media screen and (max-width: $media-tablet-large) {
background-color: $color-neutral-0;
align-items: flex-start;
padding: 72px 0 0;
}

&SignUp {
padding: 64px 0;
}
}

.logo {
display: flex;
flex-direction: column;
align-items: flex-end;
@extend %text-size-large;
color: inherit;
@media screen and (max-width: calc($media-desktop-large - 1px)) {
padding: calc-fluid-element(
40px,
64px,
$media-desktop-small,
$media-desktop-large
)
0;
}

@media screen and (max-width: calc($media-desktop-small - 1px)) {
padding: 40px 0;
}

@media screen and (max-width: $media-tablet-large) {
padding: 72px 0 0;
}
}
}

.formWrapper {
Expand All @@ -40,6 +62,65 @@
box-sizing: border-box;
background-color: $color-neutral-0;
border-radius: 24px;

@media screen and (max-width: calc($media-desktop-large - 1px)) {
max-width: calc-fluid-element(
480px,
$wrapper-entry-form-desktop,
$media-desktop-small,
$media-desktop-large
);
}

@media screen and (max-width: calc($media-desktop-small - 1px)) {
max-width: 480px;
}

@media screen and (max-width: $media-tablet-large) {
max-width: 335px;
box-sizing: content-box;
}

&SignUp {
@media screen and (max-width: calc($media-desktop-large - 1px)) {
padding: calc-fluid-element(
32px,
48px,
$media-desktop-small,
$media-desktop-large
);
}

@media screen and (max-width: calc($media-desktop-small - 1px)) {
padding: 32px;
}

@media screen and (max-width: calc($media-mobile-large - 1px)) {
padding: 20px 20px 0;
}
}

&SignInAndReset {
composes: formWrapperSignUp;

@media screen and (max-width: $media-tablet-large) {
padding-top: 72px;
}

@media screen and (max-width: calc($media-mobile-large - 1px)) {
padding: 40px 20px 0;
}
}

&NotSignUpAndSignInAndReset {
@media screen and (max-width: $media-tablet-large) {
padding-top: 72px;
}

@media screen and (max-width: calc($media-mobile-large - 1px)) {
padding: 40px 20px 0;
}
}
}

.form {
Expand All @@ -50,9 +131,57 @@
.heading {
padding-bottom: 40px;
@extend %heading-size-medium;

@media screen and (max-width: calc($media-desktop-large - 1px)) {
font-size: calc-fluid-element(
calc($font-size-heading-3 * 10),
calc($font-size-heading-2 * 10),
$media-desktop-small,
$media-desktop-large
);
}

@media screen and (max-width: calc($media-desktop-medium - 1px)) {
line-height: $font-line-height-heading-3;
letter-spacing: $font-letter-spacing-main;
font-weight: 600;
padding-bottom: 16px;
}

@media screen and (max-width: calc($media-desktop-small - 1px)) {
font-size: $font-size-heading-3;
}

&NotSignUp {
@media screen and (max-width: $media-tablet-large) {
text-align: center;
}
}
}

.commentary {
@extend %text-size-small;
color: $color-neutral-500;

@media screen and (max-width: calc($media-desktop-large - 1px)) {
font-size: calc-fluid-element(
calc($font-size-text-small-extra * 10),
calc($font-size-text-small * 10),
$media-desktop-small,
$media-desktop-large
);
}

@media screen and (max-width: calc($media-desktop-medium - 1px)) {
line-height: $font-line-height-text-small-extra;
}

@media screen and (max-width: calc($media-desktop-small - 1px)) {
font-size: $font-size-text-small-extra;
}
}

.button {
padding-left: 10px;
padding-right: 10px;
}
Loading