diff --git a/package.json b/package.json index 3e36a155..99c8f1fa 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "preview": "astro preview", "server": "node server/server.mjs", "start": "astro dev", + "start:local": "cross-env PUBLIC_API_URL=http://localhost:8080 astro dev", "typecheck": "astro check && tsc --noEmit", "typecheck:watch": "tsc --noEmit --watch", "vercel-build": "astro build" @@ -46,7 +47,7 @@ "@nanostores/router": "^0.7.0", "@nanostores/solid": "^0.3.0", "@popperjs/core": "^2.11.6", - "@solid-devtools/debugger": "^0.14.0", + "@solid-devtools/debugger": "^0.15.1", "@solid-devtools/logger": "^0.5.0", "@solid-primitives/memo": "^1.1.2", "@solid-primitives/storage": "^1.3.3", @@ -57,15 +58,15 @@ "@typescript-eslint/parser": "^5.43.0", "@urql/core": "^3.0.5", "@urql/devtools": "^2.0.3", - "@urql/exchange-auth": "^1.0.0", "@urql/exchange-graphcache": "^5.0.5", "astro": "^1.6.8", "astro-eslint-parser": "^0.9.0", "bcryptjs": "^2.4.3", - "bootstrap": "5.2.2", + "bootstrap": "^5.2.2", "clsx": "^1.2.1", "cookie": "^0.5.0", "cookie-signature": "^1.2.0", + "cross-env": "^7.0.3", "eslint": "^8.27.0", "eslint-config-stylelint": "^17.0.0", "eslint-import-resolver-typescript": "^3.5.2", @@ -112,7 +113,7 @@ "prosemirror-view": "^1.29.1", "rollup": "^2.79.1", "rollup-plugin-visualizer": "^5.8.3", - "sass": "^1.56.1", + "sass": "1.32.13", "solid-devtools": "^0.22.0", "solid-js": "^1.6.2", "solid-js-form": "^0.1.5", @@ -133,6 +134,7 @@ "unique-names-generator": "^4.7.1", "uuid": "^9.0.0", "vite": "^3.2.4", + "vite-plugin-html-purgecss": "^0.1.1", "ws": "^8.11.0", "y-prosemirror": "^1.2.0", "y-protocols": "^1.0.5", diff --git a/src/components/Article/SharePopup.tsx b/src/components/Article/SharePopup.tsx index 90beb439..e5263178 100644 --- a/src/components/Article/SharePopup.tsx +++ b/src/components/Article/SharePopup.tsx @@ -1,7 +1,7 @@ import { Icon } from '../_shared/Icon' import { t } from '../../utils/intl' -import styles from '../_shared/Popup.module.scss' +import styles from '../_shared/Popup/Popup.module.scss' import type { PopupProps } from '../_shared/Popup' import { Popup } from '../_shared/Popup' diff --git a/src/components/Author/Card.module.scss b/src/components/Author/Card.module.scss index 8c26fd24..91ac16b3 100644 --- a/src/components/Author/Card.module.scss +++ b/src/components/Author/Card.module.scss @@ -15,9 +15,6 @@ .authorDetails { display: flex; flex: 1; - width: max-content; - - // padding-right: 1.2rem; @include media-breakpoint-down(sm) { flex-wrap: wrap; @@ -193,6 +190,7 @@ .authorSubscribe { margin-top: 2rem; + padding-left: 0; } .authorDetails { diff --git a/src/components/Author/Card.tsx b/src/components/Author/Card.tsx index 7cd3131a..feb02cb4 100644 --- a/src/components/Author/Card.tsx +++ b/src/components/Author/Card.tsx @@ -11,6 +11,7 @@ import { clsx } from 'clsx' import { useSession } from '../../context/session' interface AuthorCardProps { + caption?: string compact?: boolean hideDescription?: boolean hideFollow?: boolean @@ -30,7 +31,10 @@ export const AuthorCard = (props: AuthorCardProps) => { () => session()?.news?.authors?.some((u) => u === props.author.slug) || false ) const canFollow = createMemo(() => !props.hideFollow && session()?.user?.slug !== props.author.slug) - const bio = () => props.author.bio || t('Our regular contributor') + const bio = createMemo(() => { + return props.caption || props.author.bio || t('Our regular contributor') + }) + const name = () => { return props.author.name === 'Дискурс' && locale() !== 'ru' ? 'Discours' diff --git a/src/components/Author/Full.scss b/src/components/Author/Full.scss index 4b505f0d..65db4de0 100644 --- a/src/components/Author/Full.scss +++ b/src/components/Author/Full.scss @@ -1,6 +1,5 @@ .user-details { margin-bottom: 4.4rem; - padding: 0; } .author-page { diff --git a/src/components/Author/Full.tsx b/src/components/Author/Full.tsx index ddd25c1b..b240ae2b 100644 --- a/src/components/Author/Full.tsx +++ b/src/components/Author/Full.tsx @@ -4,11 +4,9 @@ import './Full.scss' export const AuthorFull = (props: { author: Author }) => { return ( -
-
-
- -
+
+
+
) diff --git a/src/components/Discours/Banner.module.scss b/src/components/Discours/Banner.module.scss index 5a8bfc89..667b4a79 100644 --- a/src/components/Discours/Banner.module.scss +++ b/src/components/Discours/Banner.module.scss @@ -29,13 +29,8 @@ display: flex; flex-direction: column; justify-content: center; - padding-left: 0; padding-top: 1em; - @include media-breakpoint-up(sm) { - padding-left: $grid-gutter-width; - } - a { display: inline-block; margin: 0 1em 1em 0; diff --git a/src/components/Discours/Banner.tsx b/src/components/Discours/Banner.tsx index f14d2a8e..ed9bd925 100644 --- a/src/components/Discours/Banner.tsx +++ b/src/components/Discours/Banner.tsx @@ -6,19 +6,21 @@ import { clsx } from 'clsx' export default () => { return (
-
-
-

{t('Discours is created with our common effort')}

-

- {t('Support us')} - {t('Become an author')} - showModal('auth')}> - {t('Join the community')} - -

-
-
- {t('Discours')} +
+
+
+

{t('Discours is created with our common effort')}

+

+ {t('Support us')} + {t('Become an author')} + showModal('auth')}> + {t('Join the community')} + +

+
+
+ {t('Discours')} +
diff --git a/src/components/Discours/Footer.module.scss b/src/components/Discours/Footer.module.scss index 990b9ed6..624d5a47 100644 --- a/src/components/Discours/Footer.module.scss +++ b/src/components/Discours/Footer.module.scss @@ -34,12 +34,6 @@ margin-top: 0.8rem; } - .wideContainer { - @include media-breakpoint-down(sm) { - padding: 0 $container-padding-x; - } - } - ::selection { background: #fff; color: #000; diff --git a/src/components/Discours/Footer.tsx b/src/components/Discours/Footer.tsx index 1f5fe364..f22423d3 100644 --- a/src/components/Discours/Footer.tsx +++ b/src/components/Discours/Footer.tsx @@ -109,7 +109,7 @@ export const Footer = () => { ] return (