Fixed stuff probably

This commit is contained in:
DrMint 2022-06-30 00:06:15 +02:00
parent 520c4e3e35
commit 3e1ebf74fd
4 changed files with 19 additions and 13 deletions

View File

@ -27,7 +27,11 @@ export function Markdawn(props: Props): JSX.Element {
const [openLightBox, LightBox] = useLightBox(); const [openLightBox, LightBox] = useLightBox();
// eslint-disable-next-line no-irregular-whitespace // eslint-disable-next-line no-irregular-whitespace
const text = useMemo(() => `${preprocessMarkDawn(rawText)}`, [rawText]); const text = useMemo(
() => `${preprocessMarkDawn(rawText)}
`,
[rawText]
);
if (text) { if (text) {
return ( return (
@ -264,7 +268,7 @@ export function Markdawn(props: Props): JSX.Element {
name?: string; name?: string;
}) => ( }) => (
<div <div
className="my-8 grid cursor-pointer place-content-center" className="mt-8 mb-12 grid cursor-pointer place-content-center"
onClick={() => { onClick={() => {
openLightBox([ openLightBox([
compProps.src.startsWith("/uploads/") compProps.src.startsWith("/uploads/")
@ -280,6 +284,7 @@ export function Markdawn(props: Props): JSX.Element {
: compProps.src : compProps.src
} }
quality={ImageQuality.Medium} quality={ImageQuality.Medium}
className="drop-shadow-shade-lg"
></Img> ></Img>
</div> </div>
), ),

View File

@ -231,6 +231,7 @@ export default function Content(props: Props): JSX.Element {
libraryItem.attributes.thumbnail?.data?.attributes libraryItem.attributes.thumbnail?.data?.attributes
} }
thumbnailAspectRatio="21/29.7" thumbnailAspectRatio="21/29.7"
thumbnailRounded={false}
topChips={ topChips={
libraryItem.attributes.metadata && libraryItem.attributes.metadata &&
libraryItem.attributes.metadata.length > 0 && libraryItem.attributes.metadata.length > 0 &&

View File

@ -57,9 +57,14 @@ export default function Contents(props: Props): JSX.Element {
); );
const [searchName, setSearchName] = useState(defaultFiltersState.searchName); const [searchName, setSearchName] = useState(defaultFiltersState.searchName);
const effectiveCombineRelatedContent = useMemo(
() => (searchName.length > 1 ? false : combineRelatedContent),
[combineRelatedContent, searchName.length]
);
const filteredItems = useMemo( const filteredItems = useMemo(
() => filterContents(contents, combineRelatedContent, searchName), () => filterContents(contents, effectiveCombineRelatedContent, searchName),
[combineRelatedContent, contents, searchName] [effectiveCombineRelatedContent, contents, searchName]
); );
const groups = useMemo( const groups = useMemo(
@ -67,11 +72,6 @@ export default function Contents(props: Props): JSX.Element {
[langui, groupingMethod, filteredItems] [langui, groupingMethod, filteredItems]
); );
const effectiveCombineRelatedContent = useMemo(
() => (searchName.length > 1 ? false : combineRelatedContent),
[combineRelatedContent, searchName.length]
);
const subPanel = useMemo( const subPanel = useMemo(
() => ( () => (
<SubPanel> <SubPanel>

View File

@ -114,14 +114,14 @@ mark {
@apply text-dark; @apply text-dark;
} }
.formatted blockquote {
@apply border-l-dark;
}
.formatted code { .formatted code {
@apply font-mono; @apply font-mono;
} }
.formatted pre > code {
@apply block whitespace-pre;
}
.formatted ul { .formatted ul {
@apply list-disc pl-4; @apply list-disc pl-4;
} }