diff --git a/CHANGELOG.mdx b/CHANGELOG.mdx index 10029374f..5a44d53c3 100644 --- a/CHANGELOG.mdx +++ b/CHANGELOG.mdx @@ -19,6 +19,10 @@ Prefix the change with one of these keywords: ## [0.26.6] +### Change + +- changed the type of text on cards excerpt to accommodate bold and italic + ### Added - New video for full banner diff --git a/lib/components/Card/CardExcerpt.tsx b/lib/components/Card/CardExcerpt.tsx index fb89e9e6f..2d1d993dc 100644 --- a/lib/components/Card/CardExcerpt.tsx +++ b/lib/components/Card/CardExcerpt.tsx @@ -1,5 +1,5 @@ export interface CardExcerptProps { - text?: string + text?: React.ReactNode | string hasMore?: boolean truncateOnMobile?: boolean } @@ -9,7 +9,7 @@ export const CardExcerpt = ({ text, hasMore, truncateOnMobile }: CardExcerptProp

- {text && text.length > 170 ? `${text.substring(0, 150)}...` : text} + {typeof text === 'string' && text.length > 170 ? `${text.substring(0, 150)}...` : text} {hasMore && More}

) diff --git a/lib/utils/json-lists.js b/lib/utils/json-lists.js index 0fa878b95..bab409e93 100644 --- a/lib/utils/json-lists.js +++ b/lib/utils/json-lists.js @@ -1,6 +1,10 @@ export const videoBanner = [ { title: 'Discover Carleton', name: 'discover', description: 'Discover Carleton and the beautiful city of Ottawa' }, - { title: 'Aerial View of Carleton', name: 'aerial-view', description: 'Aerial view of the beautiful Carleton University campus' }, + { + title: 'Aerial View of Carleton', + name: 'aerial-view', + description: 'Aerial view of the beautiful Carleton University campus', + }, { title: '2025 Carleton University Campus', name: 'campus-2025', diff --git a/public/assets/json/videoBanner.json b/public/assets/json/videoBanner.json index 39ac3e243..a307718d6 100644 --- a/public/assets/json/videoBanner.json +++ b/public/assets/json/videoBanner.json @@ -4,6 +4,11 @@ "name": "discover", "description": "Discover Carleton and the beautiful city of Ottawa" }, + { + "title": "Aerial View of Carleton", + "name": "aerial-view", + "description": "Aerial view of the beautiful Carleton University campus" + }, { "title": "2025 Carleton University Campus", "name": "campus-2025",