Skip to content

Commit

Permalink
chore(apps/website): add gbl seminar
Browse files Browse the repository at this point in the history
  • Loading branch information
rschlaefli committed Nov 14, 2023
1 parent b4dc263 commit 6ac493c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
17 changes: 14 additions & 3 deletions apps/website/src/components/courses/CourseEntry.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { H3, Prose, Tag } from '@uzh-bf/design-system'
import { MDXRemote } from 'next-mdx-remote'
import { twMerge } from 'tailwind-merge'

interface Props {
name: string
Expand All @@ -8,6 +9,7 @@ interface Props {
semester: string
href: string
institution: string
highlight?: boolean
description?: any
}

Expand All @@ -19,10 +21,16 @@ function CourseEntry({
institution,
href,
description,
}: Props) {
highlight,
}: Readonly<Props>) {
return (
<a href={href} target="_blank" rel="noreferrer">
<div className="h-full cursor-pointer rounded border bg-white px-2 py-2 hover:shadow">
<div
className={twMerge(
'h-full cursor-pointer rounded border bg-white px-2 py-2 hover:shadow',
highlight && 'border-orange-600 bg-orange-50'
)}
>
<H3 className={{ root: 'text-sm' }}>{name}</H3>
<Prose>
<MDXRemote {...description} />
Expand All @@ -31,7 +39,10 @@ function CourseEntry({
{institution && <Tag label={institution} />}
{semester && <Tag label={`${semester} Semester`} />}
{level && <Tag label={level} />}{' '}
{ects && <Tag label={`${ects} ECTS`} />}
{typeof ects !== 'undefined' && <Tag label={`${ects} ECTS`} />}
{highlight && (
<Tag label="New" className={{ root: 'bg-orange-200' }} />
)}
</div>
</div>
</a>
Expand Down
1 change: 1 addition & 0 deletions apps/website/src/pages/games/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ function GBLinUse({ sourceArr }: Props) {
href={frontmatter.href}
semester={frontmatter.semester}
institution={frontmatter.institution}
highlight={frontmatter.highlight}
description={source}
/>
))}
Expand Down
2 changes: 1 addition & 1 deletion kb

0 comments on commit 6ac493c

Please sign in to comment.