@@ -72,6 +72,7 @@ export interface TitleIconProps {
72
72
export interface PageTitleProps {
73
73
currentPageTitle : string ;
74
74
subTitle ?: string ;
75
+ description ?: string ;
75
76
disallowLaTeX ?: boolean ;
76
77
help ?: ReactElement ;
77
78
className ?: string ;
@@ -80,7 +81,7 @@ export interface PageTitleProps {
80
81
preview ?: boolean ;
81
82
icon ?: TitleIconProps ;
82
83
}
83
- export const PageTitle = ( { currentPageTitle, subTitle, disallowLaTeX, help, className, audienceViews, modalId, preview, icon} : PageTitleProps ) => {
84
+ export const PageTitle = ( { currentPageTitle, subTitle, description , disallowLaTeX, help, className, audienceViews, modalId, preview, icon} : PageTitleProps ) => {
84
85
const dispatch = useAppDispatch ( ) ;
85
86
const openModal = useAppSelector ( ( state : AppState ) => Boolean ( state ?. activeModals ?. length ) ) ;
86
87
const headerRef = useRef < HTMLHeadingElement > ( null ) ;
@@ -118,12 +119,17 @@ export const PageTitle = ({currentPageTitle, subTitle, disallowLaTeX, help, clas
118
119
}
119
120
120
121
return < h1 id = "main-heading" tabIndex = { - 1 } ref = { headerRef } className = { classNames ( "h-title h-secondary d-sm-flex" , { "align-items-center py-4" : isPhy } , className ) } >
121
- { icon && (
122
- icon . type === "img" ? < img src = { icon . icon } alt = "" className = "me-3" />
123
- : icon . type === "hex" ? < PhyHexIcon icon = { icon . icon } subject = { icon . subject } /> : undefined ) }
124
- < div className = "me-auto" data-testid = { "main-heading" } >
125
- { formatPageTitle ( currentPageTitle , disallowLaTeX ) }
126
- { subTitle && < span className = "h-subtitle d-none d-sm-block" > { subTitle } </ span > }
122
+ < div className = "me-auto" >
123
+ < div className = "d-sm-flex align-items-center" >
124
+ { icon && (
125
+ icon . type === "img" ? < img src = { icon . icon } alt = "" className = "me-3" />
126
+ : icon . type === "hex" ? < PhyHexIcon icon = { icon . icon } subject = { icon . subject } /> : undefined ) }
127
+ < div className = "me-auto" data-testid = { "main-heading" } >
128
+ { formatPageTitle ( currentPageTitle , disallowLaTeX ) }
129
+ { subTitle && < span className = "h-subtitle d-none d-sm-block" > { subTitle } </ span > }
130
+ </ div >
131
+ </ div >
132
+ { description && < div className = "h-description" > { description } </ div > }
127
133
</ div >
128
134
< Helmet >
129
135
< meta property = "og:title" content = { currentPageTitle } />
0 commit comments