diff --git a/src/components/Article/FullArticle.tsx b/src/components/Article/FullArticle.tsx index dd072d35..b1c89325 100644 --- a/src/components/Article/FullArticle.tsx +++ b/src/components/Article/FullArticle.tsx @@ -13,7 +13,7 @@ import { useSession } from '../../context/session' import { MediaItem } from '../../pages/types' import { DEFAULT_HEADER_OFFSET, router, useRouter } from '../../stores/router' import { showModal } from '../../stores/ui' -import { getImageUrl } from '../../utils/getImageUrl' +import { getImageUrl, getOpenGraphImageUrl } from '../../utils/getImageUrl' import { getDescription, getKeywords } from '../../utils/meta' import { Icon } from '../_shared/Icon' import { Image } from '../_shared/Image' @@ -286,9 +286,15 @@ export const FullArticle = (props: Props) => { } } - const ogImage = props.article.cover - ? getImageUrl(props.article.cover, { width: 1200 }) - : getImageUrl('production/image/logo_image.png') + const cover = props.article.cover ?? 'production/image/logo_image.png' + + const ogImage = getOpenGraphImageUrl(cover, { + title: props.article.title, + topic: mainTopic().title, + author: props.article.authors[0].name, + width: 1200, + }) + const description = getDescription(props.article.description || body()) const ogTitle = props.article.title const keywords = getKeywords(props.article) diff --git a/src/components/Feed/ArticleCard/ArticleCard.module.scss b/src/components/Feed/ArticleCard/ArticleCard.module.scss index 9775243c..d3f82554 100644 --- a/src/components/Feed/ArticleCard/ArticleCard.module.scss +++ b/src/components/Feed/ArticleCard/ArticleCard.module.scss @@ -107,7 +107,7 @@ height: 0; margin-bottom: 1.6rem; overflow: hidden; - padding-bottom: 56.2%; //16:9 + padding-bottom: 56.2%; // 16:9 position: relative; transform-origin: 50% 50%; transition: transform 1s ease-in-out; diff --git a/src/components/Feed/FeedArticlePopup/FeedArticlePopup.module.scss b/src/components/Feed/FeedArticlePopup/FeedArticlePopup.module.scss index faf9a96c..54b1df3a 100644 --- a/src/components/Feed/FeedArticlePopup/FeedArticlePopup.module.scss +++ b/src/components/Feed/FeedArticlePopup/FeedArticlePopup.module.scss @@ -46,6 +46,7 @@ li:first-child .action { padding-top: 16px; } + li:last-child .action { padding-bottom: 16px; } diff --git a/src/components/Feed/FeedArticlePopup/FeedArticlePopup.tsx b/src/components/Feed/FeedArticlePopup/FeedArticlePopup.tsx index 74b09880..0c5db941 100644 --- a/src/components/Feed/FeedArticlePopup/FeedArticlePopup.tsx +++ b/src/components/Feed/FeedArticlePopup/FeedArticlePopup.tsx @@ -4,10 +4,7 @@ import { clsx } from 'clsx' import { Show } from 'solid-js' import { useLocalize } from '../../../context/localize' -import { showModal } from '../../../stores/ui' -import { InviteCoAuthorsModal } from '../../_shared/InviteCoAuthorsModal' import { Popup } from '../../_shared/Popup' -import { ShareModal } from '../../_shared/ShareModal' import { SoonChip } from '../../_shared/SoonChip' import styles from './FeedArticlePopup.module.scss' diff --git a/src/components/Nav/AuthModal/PasswordField/PasswordField.tsx b/src/components/Nav/AuthModal/PasswordField/PasswordField.tsx index 6dab7ef8..ffa70cf5 100644 --- a/src/components/Nav/AuthModal/PasswordField/PasswordField.tsx +++ b/src/components/Nav/AuthModal/PasswordField/PasswordField.tsx @@ -1,8 +1,7 @@ import { clsx } from 'clsx' -import { createEffect, createSignal, JSX, on, Show } from 'solid-js' +import { createEffect, createSignal, on, Show } from 'solid-js' import { useLocalize } from '../../../../context/localize' -import { resetSortedArticles } from '../../../../stores/zine/articles' import { Icon } from '../../../_shared/Icon' import styles from './PasswordField.module.scss' diff --git a/src/components/Nav/Modal/Modal.module.scss b/src/components/Nav/Modal/Modal.module.scss index 2beb11fa..d475fb5a 100644 --- a/src/components/Nav/Modal/Modal.module.scss +++ b/src/components/Nav/Modal/Modal.module.scss @@ -1,7 +1,7 @@ .backdrop { align-items: center; display: flex; - background: rgba(20, 20, 20, 0.07); + background: rgb(20 20 20 / 7%); justify-content: center; height: 100%; left: 0; @@ -125,11 +125,13 @@ .maxHeight { height: 100%; } + .container { padding: 0; height: 100%; min-height: 100%; } + .modalInner { padding: 1rem 1rem 0; height: 100%; diff --git a/src/components/Nav/Modal/Modal.tsx b/src/components/Nav/Modal/Modal.tsx index 9069a230..24f9c887 100644 --- a/src/components/Nav/Modal/Modal.tsx +++ b/src/components/Nav/Modal/Modal.tsx @@ -4,7 +4,6 @@ import { redirectPage } from '@nanostores/router' import { clsx } from 'clsx' import { createEffect, createMemo, createSignal, Show } from 'solid-js' -import { useLocalize } from '../../../context/localize' import { useMediaQuery } from '../../../context/mediaQuery' import { router } from '../../../stores/router' import { hideModal, useModalStore } from '../../../stores/ui' @@ -25,7 +24,6 @@ interface Props { } export const Modal = (props: Props) => { - const { t } = useLocalize() const { modal } = useModalStore() const [visible, setVisible] = createSignal(false) const allowClose = createMemo(() => props.allowClose !== false) diff --git a/src/components/Topic/TopicBadge/TopicBadge.module.scss b/src/components/Topic/TopicBadge/TopicBadge.module.scss index 3ca2a2d1..e5166ef1 100644 --- a/src/components/Topic/TopicBadge/TopicBadge.module.scss +++ b/src/components/Topic/TopicBadge/TopicBadge.module.scss @@ -7,9 +7,8 @@ .basicInfo { display: flex; - flex-direction: row; + flex-flow: row nowrap; align-items: flex-start; - flex-wrap: nowrap; flex: 1; gap: 1rem; } diff --git a/src/components/Views/Expo/Expo.tsx b/src/components/Views/Expo/Expo.tsx index a2b90c06..87ee8aec 100644 --- a/src/components/Views/Expo/Expo.tsx +++ b/src/components/Views/Expo/Expo.tsx @@ -147,7 +147,7 @@ export const Expo = (props: Props) => {