+
+
+
+ {t('Back to editor')}
+
+
+
{t('Publish Settings')}
+
{t('Material card')}
+
+
+ showModal('uploadCoverImage')}
+ value={settingsForm.coverImageUrl ? t('Add another image') : t('Add image')}
+ />
+
+
+
+
+
+
+
+
+
+
+
+
+ {settingsForm.mainTopic.title}
+
+
{settingsForm.title}
+
{settingsForm.subtitle}
+
{user().name}
+
+
+
+
+ {t(
+ 'Choose a title image for the article. You can immediately see how the publication card will look like.'
+ )}
+
+
+
+ setSettingsForm('title', value)}
+ allowEnterKey={false}
+ maxLength={100}
+ />
+ setSettingsForm('subtitle', value)}
+ allowEnterKey={false}
+ maxLength={100}
+ />
+ MAX_LEAD_LIMIT - 1 && '...'}`}
+ value={(value) => setSettingsForm('lead', value)}
+ allowEnterKey={false}
+ maxLength={MAX_LEAD_LIMIT}
+ />
+
+
+
{t('Slug')}
+
+
+ {t('Slug')}
+
+
+
{t('Topics')}
+
+ {t(
+ 'Add a few topics so that the reader knows what your content is about and can find it on pages of topics that interest them. Topics can be swapped, the first topic becomes the title'
+ )}
+
+
+
+ {/*
Соавторы */}
+ {/*
У каждого соавтора можно добавить роль
*/}
+ {/*
*/}
+
+ {/*
*/}
+ {/*
Михаил Драбкин
*/}
+ {/*
*/}
+ {/* */}
+ {/*
*/}
+ {/*
*/}
+
+
+
+
+
+
+
+ handleUploadModalContentCloseSetCover(value)} />
+
+
+ )
+}
diff --git a/src/components/Views/PublishSettings/index.ts b/src/components/Views/PublishSettings/index.ts
new file mode 100644
index 00000000..500c89ca
--- /dev/null
+++ b/src/components/Views/PublishSettings/index.ts
@@ -0,0 +1 @@
+export { PublishSettings } from './PublishSettings'
diff --git a/src/components/_shared/GrowingTextarea/GrowingTextarea.module.scss b/src/components/_shared/GrowingTextarea/GrowingTextarea.module.scss
index 0149af68..81b706eb 100644
--- a/src/components/_shared/GrowingTextarea/GrowingTextarea.module.scss
+++ b/src/components/_shared/GrowingTextarea/GrowingTextarea.module.scss
@@ -3,6 +3,14 @@
width: 100%;
position: relative;
+ &.bordered {
+ box-sizing: border-box;
+ padding: 16px 12px;
+ border-radius: 2px;
+ border: 2px solid var(--black-100);
+ background: var(--white-500, #fff);
+ }
+
.growWrap {
display: grid;
width: 100%;
@@ -40,14 +48,16 @@
white-space: pre-wrap;
word-wrap: break-word;
overflow: hidden;
+ line-height: 1.2;
grid-area: 1 / 1 / 2 / 2;
width: 100%;
padding: 0;
+ margin: 0;
}
}
.maxLength {
- color: #000;
+ color: var(--default-color);
opacity: 1;
position: absolute;
z-index: 1;
@@ -60,7 +70,7 @@
line-height: 1;
user-select: none;
transition: opacity 0.3s ease-in-out;
- background: rgb(255 255 255 / 80%);
+ background: var(--white-500);
&.visible {
opacity: 1;
@@ -71,6 +81,13 @@
animation-iteration-count: 2;
}
}
+
+ &.bordered .maxLength {
+ opacity: 1;
+ font-weight: 500;
+ border: unset;
+ bottom: 0;
+ }
}
@keyframes blink {
diff --git a/src/components/_shared/GrowingTextarea/GrowingTextarea.tsx b/src/components/_shared/GrowingTextarea/GrowingTextarea.tsx
index 7fdc7f8f..d5e70faf 100644
--- a/src/components/_shared/GrowingTextarea/GrowingTextarea.tsx
+++ b/src/components/_shared/GrowingTextarea/GrowingTextarea.tsx
@@ -1,6 +1,7 @@
import { clsx } from 'clsx'
import styles from './GrowingTextarea.module.scss'
-import { createSignal, Show } from 'solid-js'
+import { createSignal, Show, Switch } from 'solid-js'
+import { style } from 'solid-js/web'
type Props = {
class?: string
@@ -9,6 +10,7 @@ type Props = {
value: (string) => void
maxLength?: number
allowEnterKey: boolean
+ variant?: 'bordered'
}
export const GrowingTextarea = (props: Props) => {
@@ -29,7 +31,7 @@ export const GrowingTextarea = (props: Props) => {
}
return (
-
+
-
+
- {`${value().length} / ${props.maxLength}`}
+
+ {`${props.maxLength - value().length}`}
+
diff --git a/src/context/editor.tsx b/src/context/editor.tsx
index 2c3b35b0..3cd0efca 100644
--- a/src/context/editor.tsx
+++ b/src/context/editor.tsx
@@ -26,6 +26,7 @@ export type ShoutForm = {
body: string
coverImageUrl: string
media?: string
+ lead?: string
}
type EditorContextType = {
diff --git a/src/styles/app.scss b/src/styles/app.scss
index b35eb91a..3c49b630 100644
--- a/src/styles/app.scss
+++ b/src/styles/app.scss
@@ -30,8 +30,10 @@
--blue-link: #2638d9;
// names from figma
--black-50: #f7f7f8;
+ --black-100: #e9e9ee;
--black-500: #141414;
--black-400: #696969;
+ --white-500: #fff;
}
[data-editor-dark-mode='true'] {
@@ -49,8 +51,10 @@
--editor-bubble-menu-background: #444;
// names from figma
--black-50: #080807;
+ --black-100: #161611;
--black-500: #ebebeb;
--black-400: #969696;
+ --white-500: #000;
}
* {