feat: content page UI updates

This commit is contained in:
Chuma McPhoy
2024-09-27 08:49:27 +02:00
parent 724f429696
commit d40aa455de
5 changed files with 79 additions and 24 deletions

View File

@@ -526,6 +526,15 @@ export const renderOptions: RenderOptions = {
) => {
const props = extractPossibleAttributes(node.attrs)
if (props.className) {
if (hasAvailableULFormat(props.className)) {
// @ts-ignore: We want to set css modules classNames even if it does not correspond
// to an existing class in the module style sheet. Due to our css modules plugin for
// typescript, we cannot do this without the ts-ignore
props.className = styles[props.className]
}
}
// Set the number of rows dynamically to create even rows for each column. We want the li:s
// to flow with the column, so therefore this is needed.
let numberOfRows: number | undefined
@@ -538,7 +547,7 @@ export const renderOptions: RenderOptions = {
<ul
key={node.uid}
{...props}
className={styles.ul}
className={`${styles.ul} ${props.className || ""}`}
style={
numberOfRows
? {