Skip to content

Commit

Permalink
Merge branch '1.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
imonroe committed Dec 4, 2024
2 parents 28352b1 + 48cb3ad commit 5519719
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ const SulStudyPlaceMetadata = async ({node}: Props) => {
return (
<>
<title>{pageTitle}</title>
<meta name="description" content={description} />
{description && <meta name="description" content={description} />}
<meta property="og:title" content={pageTitle} />
<meta property="og:description" content={description} />
{description && <meta property="og:description" content={description} />}

{image && (
<>
Expand All @@ -34,7 +34,7 @@ const SulStudyPlaceMetadata = async ({node}: Props) => {
<meta property="og:type" content="website" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content={pageTitle} />
<meta name="twitter:description" content={description} />
{description && <meta name="twitter:description" content={description} />}
</>
)
}
Expand Down
6 changes: 3 additions & 3 deletions src/components/node/stanford-news/stanford-news-metadata.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ const SulStudyPlaceMetadata = async ({node}: Props) => {
return (
<>
<title>{pageTitle}</title>
<meta name="description" content={description} />
{description && <meta name="description" content={description} />}
<meta property="og:title" content={pageTitle} />
<meta property="og:description" content={description} />
{description && <meta property="og:description" content={description} />}
<meta property="og:type" content="article" />
{node.suNewsPublishingDate && (
<meta property="article:published_time" content={new Date(node.suNewsPublishingDate.time).toISOString()} />
Expand All @@ -43,7 +43,7 @@ const SulStudyPlaceMetadata = async ({node}: Props) => {
<meta property="og:type" content="website" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content={pageTitle} />
<meta name="twitter:description" content={description} />
{description && <meta name="twitter:description" content={description} />}
</>
)
}
Expand Down
6 changes: 3 additions & 3 deletions src/components/node/stanford-page/stanford-page-metadata.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ const StanfordPageMetadata = async ({node, isHome}: Props) => {
return (
<>
<title>{pageTitle}</title>
<meta name="description" content={description} />
{description && <meta name="description" content={description} />}
<meta property="og:title" content={pageTitle} />
<meta property="og:description" content={description} />
{description && <meta property="og:description" content={description} />}

{image && (
<>
Expand All @@ -38,7 +38,7 @@ const StanfordPageMetadata = async ({node, isHome}: Props) => {
<meta property="og:type" content="website" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content={pageTitle} />
<meta name="twitter:description" content={description} />
{description && <meta name="twitter:description" content={description} />}
</>
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ const StanfordPersonMetadata = async ({node}: Props) => {
return (
<>
<title>{pageTitle}</title>
<meta name="description" content={description} />
{description && <meta name="description" content={description} />}
<meta property="og:title" content={pageTitle} />
<meta property="og:description" content={description} />
{description && <meta property="og:description" content={description} />}
<meta property="og:type" content="profile" />
<meta property="profile:first_name" content={node.suPersonFirstName} />
<meta property="profile:last_name" content={node.suPersonLastName} />
Expand All @@ -37,7 +37,7 @@ const StanfordPersonMetadata = async ({node}: Props) => {
<meta property="og:type" content="website" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content={pageTitle} />
<meta name="twitter:description" content={description} />
{description && <meta name="twitter:description" content={description} />}
</>
)
}
Expand Down
6 changes: 3 additions & 3 deletions src/components/node/sul-library/sul-library-metadata.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ const SulLibraryMetadata = async ({node}: Props) => {
return (
<>
<title>{pageTitle}</title>
<meta name="description" content={description} />
{description && <meta name="description" content={description} />}
<meta property="og:title" content={pageTitle} />
<meta property="og:description" content={description} />
{description && <meta property="og:description" content={description} />}

{image && (
<>
Expand All @@ -35,7 +35,7 @@ const SulLibraryMetadata = async ({node}: Props) => {
<meta property="og:type" content="website" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content={pageTitle} />
<meta name="twitter:description" content={description} />
{description && <meta name="twitter:description" content={description} />}
</>
)
}
Expand Down
6 changes: 5 additions & 1 deletion src/lib/format-html.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,11 @@ const options: HTMLReactParserOptions = {
return <pre {...nodeProps}>{domToReact(domNode.children as DOMNode[], options)}</pre>

case "figure":
nodeProps.className += " table mb-20"
nodeProps.className = twMerge(
nodeProps.className,
"table mb-20",
!nodeProps.className.includes("float") && "w-full"
)
delete nodeProps.role
return <figure {...nodeProps}>{domToReact(domNode.children as DOMNode[], options)}</figure>
case "figcaption":
Expand Down
20 changes: 11 additions & 9 deletions src/styles/globals.css
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
@import 'decanter/fonts.css';
@import "decanter/fonts.css";

@tailwind base;
@tailwind components;
@tailwind utilities;

/* Styles for react-tiny-oembed containers */
div .__embed_column,
.aspect-\[16\/9\] .__embed_column {
width: 100%;
max-width: 100%;
height: 100%;
display: block;
margin-bottom: 1.6em;
}

.aspect-\[16\/9\] .__embed_column iframe {
Expand All @@ -21,12 +23,12 @@
@layer utilities {
/* Added to get center alignment on branches table. */
@media screen and (max-width: 40em) {
.responsiveTable td.branch-hours,
.responsiveTable td.table-image {
display: flex;
justify-content: center;
}
.responsiveTable td.branch-hours,
.responsiveTable td.table-image {
display: flex;
justify-content: center;
}
}
.responsive-table .tdBefore {
display: none !important;
}
Expand All @@ -35,7 +37,7 @@
border: none !important;
}
.responsive-table tbody tr {
border-bottom: 1px #ABABA9 solid !important;
border-bottom: 1px #ababa9 solid !important;
}
.responsive-table tr td.pivoted {
padding-top: 0 !important;
Expand All @@ -51,7 +53,7 @@
}
@media screen and (max-width: 40em) {
.responsiveTable.responsive-table-study td.table-image {
display: block;
display: block;
}
}
}
}

0 comments on commit 5519719

Please sign in to comment.