From dacbaba1514b7cfd4f7c8a358bd31da2089eb0e0 Mon Sep 17 00:00:00 2001 From: Ilya Y <75578537+ilya-bkv@users.noreply.github.com> Date: Thu, 31 Aug 2023 16:41:34 +0300 Subject: [PATCH] fix aside menu in editor (#201) --- src/components/Views/Edit.module.scss | 7 +- src/components/Views/Edit.tsx | 294 +++++++++++++------------- 2 files changed, 149 insertions(+), 152 deletions(-) diff --git a/src/components/Views/Edit.module.scss b/src/components/Views/Edit.module.scss index 1127afd8..d538f484 100644 --- a/src/components/Views/Edit.module.scss +++ b/src/components/Views/Edit.module.scss @@ -217,10 +217,9 @@ } .wrapperTableOfContents { - position: sticky; - left: 0; - top: 0; - margin-bottom: -157px; + position: fixed; + left: 40px; + top: 100px; width: 240px; padding-top: 100px; } diff --git a/src/components/Views/Edit.tsx b/src/components/Views/Edit.tsx index 13f90841..d3ed8179 100644 --- a/src/components/Views/Edit.tsx +++ b/src/components/Views/Edit.tsx @@ -249,166 +249,164 @@ export const EditView = (props: Props) => { -
-
- - - -
+
+ + + +
-
-
- -
- -
- {t('Add subtitle')} -
-
- -
- {t('Add intro')} -
-
-
- <> -
-
- handleTitleInputChange(value)} - class={styles.titleInput} - placeholder={articleTitle()} - initialValue={form.title} - maxLength={MAX_HEADER_LIMIT} - /> +
+
+ +
+ +
+ {t('Add subtitle')} +
+
+ +
+ {t('Add intro')} +
+
+
+ <> +
+
+ handleTitleInputChange(value)} + class={styles.titleInput} + placeholder={articleTitle()} + initialValue={form.title} + maxLength={MAX_HEADER_LIMIT} + /> - -
{formErrors.title}
-
+ +
{formErrors.title}
+
- -
- handleBaseFieldsChange('artist', event.target.value)} - /> - handleBaseFieldsChange('date', event.target.value)} - /> - handleBaseFieldsChange('genre', event.target.value)} - /> -
-
- - - { - subtitleInput.current = el - }} - allowEnterKey={false} - value={(value) => setForm('subtitle', value)} - class={styles.subtitleInput} - placeholder={t('Subheader')} - initialValue={form.subtitle} - maxLength={MAX_HEADER_LIMIT} - /> - - - setForm('lead', value)} - /> - - -
- - {t('min. 1400×1400 pix')} -
- {t('jpg, .png, max. 10 mb.')} - - } - isMultiply={false} - fileType={'image'} - onUpload={(val) => setForm('coverImageUrl', val[0].url)} - /> - } - > -
+ handleBaseFieldsChange('artist', event.target.value)} + /> + handleBaseFieldsChange('date', event.target.value)} + /> + handleBaseFieldsChange('genre', event.target.value)} + /> +
+
+ + + { + subtitleInput.current = el + }} + allowEnterKey={false} + value={(value) => setForm('subtitle', value)} + class={styles.subtitleInput} + placeholder={t('Subheader')} + initialValue={form.subtitle} + maxLength={MAX_HEADER_LIMIT} + /> + + + setForm('lead', value)} />
- - - handleMediaDelete(index)} - onImagesAdd={(value) => handleAddMedia(value)} - onImagesSorted={(value) => handleSortedMedia(value)} - /> - - - - handleAddMedia(data)} - onVideoDelete={(index) => handleMediaDelete(index)} - /> - - - handleAddMedia(value)} - onAudioChange={handleMediaChange} - onAudioSorted={(value) => handleSortedMedia(value)} - /> + + {t('min. 1400×1400 pix')} +
+ {t('jpg, .png, max. 10 mb.')} + + } + isMultiply={false} + fileType={'image'} + onUpload={(val) => setForm('coverImageUrl', val[0].url)} + /> + } + > +
+ - - -
+
+ + + handleMediaDelete(index)} + onImagesAdd={(value) => handleAddMedia(value)} + onImagesSorted={(value) => handleSortedMedia(value)} + /> + + + + handleAddMedia(data)} + onVideoDelete={(index) => handleMediaDelete(index)} + /> + + + + handleAddMedia(value)} + onAudioChange={handleMediaChange} + onAudioSorted={(value) => handleSortedMedia(value)} + /> + + +
- - setForm('body', body)} - /> -
+ + setForm('body', body)} + /> +