diff --git a/src/theme/DocTagDocListPage/index.tsx b/src/theme/DocTagDocListPage/index.tsx index 2a28159a0..e1acc7fa6 100644 --- a/src/theme/DocTagDocListPage/index.tsx +++ b/src/theme/DocTagDocListPage/index.tsx @@ -11,6 +11,7 @@ import SearchMetadata from '@theme/SearchMetadata'; import type {Props} from '@theme/DocTagDocListPage'; import Heading from '@theme/Heading'; import styles from './styles.module.css'; +import useBaseUrl from '@docusaurus/useBaseUrl'; // Very simple pluralization: probably good enough for now function useNDocsTaggedPlural() { @@ -45,18 +46,35 @@ function usePageTitle(props: Props): string { function DocItem({doc}: {doc: Props['tag']['items'][number]}): JSX.Element { return (
-
- {/* */} -
-
+
+ + {/* Image Content */} + + + {/* Title content */} +
+
{doc.title} - {doc.description &&

{doc.description}

} -
+ {/* {doc.description &&

{doc.description}

} */} +
+
+ + {/* Description content */} +
+
+ {doc.description &&

{doc.description}

}
+ +
); } @@ -87,13 +105,16 @@ function DocTagDocListPageContent({
{title} {tag.description &&

{tag.description}

} - - - View All Tags - - + + + + + View All Tags + + +
{tag.items.map((doc) => ( diff --git a/src/theme/DocTagDocListPage/styles.module.css b/src/theme/DocTagDocListPage/styles.module.css index 7316a6ad6..c213055f2 100644 --- a/src/theme/DocTagDocListPage/styles.module.css +++ b/src/theme/DocTagDocListPage/styles.module.css @@ -1,28 +1,50 @@ .item { - box-shadow: 0 1px 3px gray; + /* box-shadow: 0 1px 3px gray; background-color: var(--ifm-background-color); border-radius: 0.5rem; color: black; - overflow: hidden; + overflow: hidden; */ } html[data-theme='dark'] .item { - box-shadow: 0px 1px 3px var(--ifm-color-primary); + /* box-shadow: 0px 1px 3px var(--ifm-color-primary); background-color: var(--ifm-background-color); border-radius: 0.5rem; color: white; - overflow: hidden; + overflow: hidden; */ } .item__inner { align-items: center; display: flex; } + .item__inner div { - padding: 1.5rem; + /* padding: 1.5rem; */ + /* padding-top: 5px; */ + /* padding-left: -25px; */ } -.item__title span { + +.item__title { display: block; font-size: 1.25rem; -} \ No newline at end of file +} + +.item__image { + width: 100%; + max-width: 80px; /* Adjust as needed */ + height: auto; + border-radius: 8px; /* Optional: Rounded corners */ +} + +.item__description { + display: -webkit-box; + -webkit-line-clamp: 3; /* Limit to 3 lines */ + -webkit-box-orient: vertical; + line-clamp: 3; + overflow: hidden; + text-overflow: ellipsis; /* Add '...' at the end */ + max-height: 4.5em; /* Adjust based on your line height */ + line-height: 1.5em; /* Ensures proper line spacing */ +}