Skip to content

Commit

Permalink
Merge branch 'SofiaUlianova/change-hw-image-types' into VladimirFyodo…
Browse files Browse the repository at this point in the history
…rov/change-hw-image-types
  • Loading branch information
VladimirFyodorov committed Oct 24, 2023
2 parents 0f2a9d6 + f15e787 commit 0c63647
Show file tree
Hide file tree
Showing 26 changed files with 458 additions and 123 deletions.
18 changes: 18 additions & 0 deletions src/assets/images/Svg/Edit.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
export default Edit;

function Edit() {
return (
<svg viewBox="0 0 35 35" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_2240_49)">
<path d="M3.10003 24.32L0.0600304 33.17C-0.20997 33.96 0.54003 34.71 1.33003 34.44L10.17 31.4L3.10003 24.33V24.32Z"/>
<path d="M24.5422 2.88216L4.50989 22.9145L11.581 29.9856L31.6133 9.95322L24.5422 2.88216Z"/>
<path d="M33.03 1.46C31.08 -0.490002 27.91 -0.490002 25.96 1.46L33.03 8.53C34.98 6.58 34.98 3.41 33.03 1.46Z"/>
</g>
<defs>
<clipPath id="clip0_2240_49">
<rect width="34.5" height="34.5" fill="white"/>
</clipPath>
</defs>
</svg>
);
}
16 changes: 16 additions & 0 deletions src/assets/images/Svg/Trash.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
export default Trash;

function Trash() {
return (
<svg viewBox="0 0 19 24" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_2235_44)">
< path d="M5.98225 6.23489V19.7693M9.14028 6.23489V19.7693M12.2983 6.23489V19.7693M2.12944 3.4107V21.6912C2.12944 22.1875 2.53548 22.5935 3.03174 22.5935L15.2579 22.5484C15.7541 22.5484 16.1601 22.1424 16.1601 21.6461V3.4107M0.451172 3.15806H18.0189M12.181 2.67082V1.35347C12.181 0.857205 11.775 0.451172 11.2787 0.451172H6.88454C6.38828 0.451172 5.98225 0.857205 5.98225 1.35347V2.67082" stroke-linecap="round" stroke-linejoin="round"/>
</g>
<defs>
<clipPath id="clip0_2235_44">
<rect width="18.47" height="23.0446"/>
</clipPath>
</defs>
</svg>
);
}
18 changes: 18 additions & 0 deletions src/assets/images/Svg/Upload.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
export default Upload;

function Upload() {
return (
<svg viewBox="0 0 52 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_2241_11)">
<path d="M30.15 33.22C46.15 33.22 50.23 30.21 49.65 22.72C49.15 16.22 41.65 15.72 41.65 15.72C41.65 15.72 44.63 6.88001 34.65 2.72001C22.65 -2.27999 17.65 9.72001 17.65 9.72001C8.64996 5.72001 7.64996 14.72 7.64996 14.72C0.149957 16.22 0.939957 24.54 2.64996 27.72C5.63996 33.28 11.15 33.22 18.15 33.22" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M24.25 16.79V37.91" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M18.25 22.22L24.25 16.25L30.12 22.22" stroke-linecap="round" stroke-linejoin="round"/>
</g>
<defs>
<clipPath id="clip0_2241_11">
<rect width="51.2" height="39.41" fill="white"/>
</clipPath>
</defs>
</svg>
);
}
1 change: 1 addition & 0 deletions src/assets/images/edit.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/assets/images/edit2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions src/assets/images/edit3.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/assets/images/trash.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions src/assets/images/upload.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 9 additions & 4 deletions src/assets/translations/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -147,17 +147,22 @@
"navTubsPractice": "Задание",
"navTubsResults": "Итоги",
"deadlineUploadText": "Дедлайн: ",
"deadlineUploadTime": " 23:59 по Мск",
"deadlineUploadTime": " 23:59\u00A0по\u00A0Мск",
"deadlineResultsText": "Публикация итогов: ",
"uploadBtn": "Загрузить работу",
"resultLinkTitle": "Результаты задания",
"editTitle": "Редактировать...",
"upload": {
"fieldsTitle": "Результаты задания",
"filesTitle": "Файлы",
"filesBtn": "Добавить",
"submitBtn": "Отправить на проверку",
"submitDescription": "до дедлайна, чтобы получить обратную связь",
"descriptionInputLabel": "Описание",
"descriptionInputPlaceholder": "Комментарий к работе",
"externalHomeworkLinkInputLabel": "Ссылка"
"addCaption": "Добавить описание",
"contentInputLabel": "Ссылка",
"contentTextareaLabel": "Описание",
"filesEmpty1": "Загрузите файлы",
"filesEmpty2": "Картинка должна весить меньше 3 мб"
},
"homework": {
"title": "Описание"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@

@include set-media(md) {
padding-bottom: set-calc(16);
p {
padding-bottom: set-calc(8);
}
}
}

Expand All @@ -33,7 +36,11 @@
}

.resultLinkTitle {
padding-bottom: set-calc(8);
padding-bottom: set-calc(16);

@include set-media(md) {
padding-bottom: set-calc(8);
}
}

.resultLinkGroup {
Expand All @@ -43,55 +50,59 @@

.resultLink {
cursor: pointer;
margin-right: set-calc(24);
margin-right: set-calc(28);
transition: background-color 0.2s ease-in-out, color ease-in-out 0.2s;

@include set-media(md) {
margin-right: set-calc(32);
}
}

.remove {
.edit {
cursor: pointer;
display: flex;
align-items: end;
align-items: center;
padding-bottom: set-calc(1);
transition: fill $d-hover ease-in-out, color ease-in-out $d-hover;
}

.remove:hover {
.removeTitle {
.edit:hover {
.editTitle {
color: $black;
}
.removeImg svg {
stroke: $black;
.editImg path{
fill: $black;
}

}

.removeImg {
padding-bottom: set-calc(2);
.editImg {
margin-right: set-calc(4);
}

.removeImg svg {
width: set-calc(8);
height: set-calc(8);
.editImg svg {
width: set-calc(24);
height: set-calc(24);

stroke: $grey-inactive;
stroke-linecap: round;
stroke-width: 2;
path {
fill: $grey-inactive;
}
}

.removeTitle {
.editTitle {
color: $grey-inactive;
}

.uploadBtnWrapper {
position: sticky;
top: set-calc(60);
grid-column: 4 / 5;
margin-bottom: set-calc(72);
margin-bottom: set-calc(72);

@include set-media(md) {
position: relative;
top: 0;
margin-bottom: set-calc(48);
margin-bottom: set-calc(48);
}
}

Expand Down
32 changes: 17 additions & 15 deletions src/pages/Course/Lesson/Components/LessonContent/LessonContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ import { IHomeworkData, IHomeworkDataWPopulate, ILessonContent, ILessonData } fr
import classes from './LessonContent.module.scss';

import Article from 'ui/Article/Article';
import Edit from 'assets/images/Svg/Edit';

import { formatI18nT } from 'shared';

import Cross from 'assets/images/Svg/Cross';

export default LessonContent;

const t = formatI18nT('courseLesson');
Expand Down Expand Up @@ -35,25 +34,28 @@ interface IUpploadProps {
function Uppload({ endDate, resultsEndDate }: IUpploadProps) {
return (
<Fragment>
<div className={classes.uploadDeadline + ' s-text-24'}>
{t('deadlineUploadText')} {getWeekDay(endDate)} {formatLessonDate(endDate)} {t('deadlineUploadTime')}
<br/>
{t('deadlineResultsText')} {getWeekDay(resultsEndDate)} {formatLessonResultsDate(resultsEndDate)}
</div>
<div className={classes.uploadBtnWrapper}>
<a className={classes.uploadBtn + ' s-text-24'} href='#upload-form'>Загрузить работу</a>
<div className={classes.uploadDeadline}>
<p className='s-text-24'>
{t('deadlineUploadText')} {getWeekDay(endDate)} {formatLessonDate(endDate)} {t('deadlineUploadTime')}
</p>
<p className='s-text-24'>
{t('deadlineResultsText')} {getWeekDay(resultsEndDate)} {formatLessonResultsDate(resultsEndDate)}
</p>
</div>
{/* <div className={classes.resultLinkWrapper}>
<h3 className={classes.resultLinkTitle + ' s-text-24'}>Результаты задания</h3>
<div className={classes.resultLinkWrapper}>
<h3 className={classes.resultLinkTitle + ' s-text-28'}>{t('resultLinkTitle')}</h3>
<div className={classes.resultLinkGroup}>
<a className={classes.resultLink + ' s-text-18 key-link'} href='#upload-form'>Sofiia Ulianova</a>
<button className={classes.remove}>
<div className={classes.removeImg}>
<Cross/>
<button className={classes.edit}>
<div className={classes.editImg}>
<Edit/>
</div>
<div className={classes.removeTitle + ' s-text-14'}>Удалить</div>
{/* <div className={classes.editTitle + ' s-text-16'}>{t('editTitle')}</div> */}
</button>
</div>
</div>
{/* <div className={classes.uploadBtnWrapper}>
<a className={classes.uploadBtn + ' s-text-24'} href='#upload-form'>{t('uploadBtn')}</a>
</div> */}
</Fragment>
);
Expand Down
Loading

0 comments on commit 0c63647

Please sign in to comment.