{
)
const ogTitle = t('Feed')
- const myPopupProps = {
- horizontalAnchor: 'right',
- }
-
return (
diff --git a/src/components/_shared/DropDown/DropDown.module.scss b/src/components/_shared/DropDown/DropDown.module.scss
index 77784eb3..993f5f51 100644
--- a/src/components/_shared/DropDown/DropDown.module.scss
+++ b/src/components/_shared/DropDown/DropDown.module.scss
@@ -1,6 +1,7 @@
.trigger {
white-space: nowrap;
}
+
.chevron {
vertical-align: top;
diff --git a/src/components/_shared/Lightbox/Lightbox.module.scss b/src/components/_shared/Lightbox/Lightbox.module.scss
index de7910d2..6add1468 100644
--- a/src/components/_shared/Lightbox/Lightbox.module.scss
+++ b/src/components/_shared/Lightbox/Lightbox.module.scss
@@ -9,7 +9,6 @@
align-items: center;
justify-content: center;
z-index: 10000;
-
animation: 300ms fadeIn;
animation-fill-mode: forwards;
diff --git a/src/components/_shared/ShareLinks/ShareLinks.tsx b/src/components/_shared/ShareLinks/ShareLinks.tsx
index 89d5fefa..b27c24c6 100644
--- a/src/components/_shared/ShareLinks/ShareLinks.tsx
+++ b/src/components/_shared/ShareLinks/ShareLinks.tsx
@@ -1,12 +1,9 @@
-import { getPagePath } from '@nanostores/router'
import { createSocialShare, FACEBOOK, TELEGRAM, TWITTER, VK } from '@solid-primitives/share'
-import { Input } from '@thisbeyond/solid-select'
import { clsx } from 'clsx'
import { createSignal, Show } from 'solid-js'
import { useLocalize } from '../../../context/localize'
import { useSnackbar } from '../../../context/snackbar'
-import { router } from '../../../stores/router'
import { Icon } from '../Icon'
import { Popover } from '../Popover'
diff --git a/src/components/_shared/ShareModal/ShareModal.tsx b/src/components/_shared/ShareModal/ShareModal.tsx
index 12734c59..0d9c9427 100644
--- a/src/components/_shared/ShareModal/ShareModal.tsx
+++ b/src/components/_shared/ShareModal/ShareModal.tsx
@@ -1,10 +1,7 @@
import { useLocalize } from '../../../context/localize'
import { Modal } from '../../Nav/Modal'
-import { Button } from '../Button'
import { ShareLinks } from '../ShareLinks'
-import styles from '../ShareLinks/ShareLinks.module.scss'
-
type Props = {
modalTitle?: string
shareUrl?: string
diff --git a/src/components/_shared/UserSearch/UserSearch.module.scss b/src/components/_shared/UserSearch/UserSearch.module.scss
index c8239e41..45a6d74d 100644
--- a/src/components/_shared/UserSearch/UserSearch.module.scss
+++ b/src/components/_shared/UserSearch/UserSearch.module.scss
@@ -1,8 +1,7 @@
.UserSearch {
.searchHeader {
display: flex;
- flex-direction: row;
- flex-wrap: nowrap;
+ flex-flow: row nowrap;
width: 100%;
gap: 1rem;
}
@@ -10,8 +9,7 @@
.field {
border-bottom: 2px solid var(--background-color-invert);
display: flex;
- flex-direction: row;
- flex-wrap: nowrap;
+ flex-flow: row nowrap;
padding: 4px 0;
align-items: center;
width: 100%;
@@ -28,6 +26,7 @@
&::placeholder {
color: #404040;
}
+
&:focus {
outline: none;
}
diff --git a/src/utils/getImageUrl.ts b/src/utils/getImageUrl.ts
index 93f7f616..7805efa0 100644
--- a/src/utils/getImageUrl.ts
+++ b/src/utils/getImageUrl.ts
@@ -1,5 +1,7 @@
import { thumborUrl } from './config'
+const thumborPrefix = `${thumborUrl}/unsafe/`
+
const getSizeUrlPart = (options: { width?: number; height?: number } = {}) => {
const widthString = options.width ? options.width.toString() : ''
const heightString = options.height ? options.height.toString() : ''
@@ -14,8 +16,6 @@ const getSizeUrlPart = (options: { width?: number; height?: number } = {}) => {
export const getImageUrl = (src: string, options: { width?: number; height?: number } = {}) => {
const sizeUrlPart = getSizeUrlPart(options)
- const thumborPrefix = `${thumborUrl}/unsafe/`
-
if (src.startsWith(thumborPrefix)) {
const thumborKey = src.replace(thumborPrefix, '')
return `${thumborUrl}/unsafe/${sizeUrlPart}${thumborKey}`
@@ -23,3 +23,27 @@ export const getImageUrl = (src: string, options: { width?: number; height?: num
return `${thumborUrl}/unsafe/${sizeUrlPart}${src}`
}
+
+export const getOpenGraphImageUrl = (
+ src: string,
+ options: {
+ topic: string
+ title: string
+ author: string
+ width?: number
+ height?: number
+ },
+) => {
+ const sizeUrlPart = getSizeUrlPart(options)
+
+ const filtersPart = `filters:discourstext('${encodeURIComponent(options.topic)}','${encodeURIComponent(
+ options.author,
+ )}','${encodeURIComponent(options.title)}')/`
+
+ if (src.startsWith(thumborPrefix)) {
+ const thumborKey = src.replace(thumborPrefix, '')
+ return `${thumborUrl}/unsafe/${sizeUrlPart}${filtersPart}${thumborKey}`
+ }
+
+ return `${thumborUrl}/unsafe/${sizeUrlPart}${filtersPart}${src}`
+}