diff --git a/README.md b/README.md index 32bd1ab04372f54aae370e2f1580152fb0b6f616..4bd740d7ed3d9cda46c6da9778f2e0775c4e1d53 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Install nodejs with version >=18.17.0 and npm (which should come pre-packaged wi Running `npm run dev` is the recommended way to start the development server (compiling and serving files over http, automatically refreshing components when their code is updated etc.) -`npm run dev`: Starts development server +`NEXT_PUBLIC_API_URL_PREFIX=http://localhost:5000 npm run dev`: Starts development server `npm run build`: Compiles website into static files, output placed in `out/` diff --git a/src/components/AnnouncementComponent.tsx b/src/components/AnnouncementComponent.tsx index 8a562545e97df1f045bff9fd1b821c33931b7a9f..b91fdb14cfe7378ae2f4e2417c250fd584f589a3 100644 --- a/src/components/AnnouncementComponent.tsx +++ b/src/components/AnnouncementComponent.tsx @@ -103,11 +103,7 @@ export default function AnnouncementComponent({ allowMarkdown={true} /> ) : ( - <span - className={ - "flex-grow-1 p-children-inline disable-last-paragraph-spacing" - } - > + <span className={"flex-grow-1 disable-last-paragraph-spacing"}> <StylizedText markdown={true}>{announcement.text}</StylizedText> </span> )} diff --git a/src/components/CourseListing.tsx b/src/components/CourseListing.tsx index a3d6eca54d8857f6fe0db86ecacb386d5ccc4a2e..a91ec7acfac69f4c1bc5fbec656282a5eca59ab7 100644 --- a/src/components/CourseListing.tsx +++ b/src/components/CourseListing.tsx @@ -153,7 +153,7 @@ export function LectureListItem({ initialValue={lecture.title} /> </li> - {lecture.speaker ? ( + {lecture.speaker && ( <li> Gehalten von{" "} <EmbeddedOMFieldComponent @@ -163,10 +163,9 @@ export function LectureListItem({ field_type="string" initialValue={lecture.speaker} allowMarkdown={true} + inline /> </li> - ) : ( - <></> )} <li> diff --git a/src/components/OMConfigComponent.tsx b/src/components/OMConfigComponent.tsx index d72d12b642925b07339fa6fd888cf2196e0ca224..45a3e1e670b8242b8b818907c6faea0cb65c623e 100644 --- a/src/components/OMConfigComponent.tsx +++ b/src/components/OMConfigComponent.tsx @@ -112,6 +112,7 @@ export function EmbeddedOMFieldComponent({ field_type, initialValue, allowMarkdown = false, + inline = false, className = "", }: { object_type: string; @@ -120,6 +121,7 @@ export function EmbeddedOMFieldComponent({ field_type: "boolean" | "string" | "datetime" | "semester_string"; initialValue: any; allowMarkdown?: boolean; + inline?: boolean; className?: string; }) { const api = useBackendContext(); @@ -243,7 +245,11 @@ export function EmbeddedOMFieldComponent({ } return ( <span - className={className + " p-children-inline disable-last-paragraph-spacing"} + className={ + className + + (inline ? " p-children-inline" : "") + + " disable-last-paragraph-spacing" + } onDoubleClick={() => { if (!editMode) return; beforeEditingValue.current = value;