@@ -51,10 +51,12 @@ import {
51
51
} from '@edgeandnode/gds/icons'
52
52
53
53
import {
54
+ CalendarIcon ,
54
55
Callout ,
55
56
CodeBlock ,
56
57
DocSearch ,
57
58
Heading ,
59
+ HourglassIcon ,
58
60
Image ,
59
61
Link ,
60
62
type LinkProps ,
@@ -710,32 +712,18 @@ function MDXContent({ toc: headings, children }: ComponentPropsWithoutRef<Nextra
710
712
) : null }
711
713
{ ! frontMatter . hideContentHeader ? (
712
714
< header className = "col-[container] pt-12 transition-[padding] duration-[var(--graph-docs-layout-transition-duration)]" >
715
+ { readingTime ? (
716
+ // TODO: Use space-600 from the new colors when GDS is updated
717
+ < span className = "mb-3 flex items-center gap-1 text-text" >
718
+ < HourglassIcon readingTime = { Math . ceil ( readingTime . minutes ) } />
719
+ < p className = "text-body-small" >
720
+ { Math . ceil ( readingTime . minutes ) } { t ( 'global.page.readingTime.minutes' ) }
721
+ </ p >
722
+ </ span >
723
+ ) : null }
713
724
{ frontMatter . title ? (
714
725
< h1 className = "text-heading-large text-white xs:text-heading-xlarge" > { frontMatter . title } </ h1 >
715
726
) : null }
716
- { /* TODO: Design "last updated" and "reading time" */ }
717
- { lastUpdated ? (
718
- < p className = "text-body-small mt-3 text-white/48" >
719
- < span > { t ( 'global.page.lastUpdated' ) } :</ span > { ' ' }
720
- < time
721
- dateTime = { lastUpdated . toISOString ( ) }
722
- // Removes hydration errors because `toLocaleDateString` show different results in Node.js and in browser for some languages like `ar`
723
- suppressHydrationWarning
724
- >
725
- { lastUpdated . toLocaleDateString ( locale , {
726
- month : 'long' ,
727
- day : 'numeric' ,
728
- year : 'numeric' ,
729
- } ) }
730
- </ time >
731
- </ p >
732
- ) : null }
733
- { readingTime ? (
734
- < p className = "text-body-small mt-3 text-white/48" >
735
- { t ( 'global.page.readingTime.title' ) } : { Math . ceil ( readingTime . minutes ) } { ' ' }
736
- { t ( 'global.page.readingTime.minutes' ) }
737
- </ p >
738
- ) : null }
739
727
</ header >
740
728
) : null }
741
729
< section
@@ -784,7 +772,26 @@ function MDXContent({ toc: headings, children }: ComponentPropsWithoutRef<Nextra
784
772
>
785
773
{ children }
786
774
</ section >
787
- < div className = "col-[container] flex justify-end pb-12 group-data-[hide-table-of-contents]/layout-toc-grid:hidden xl:hidden" >
775
+ < div className = "col-[container] flex items-center justify-between pb-12" >
776
+ { lastUpdated ? (
777
+ < span className = "flex items-center gap-1 text-text" >
778
+ < CalendarIcon date = { lastUpdated . getDate ( ) } />
779
+ { /* TODO: Use space-600 from the new colors when GDS is updated */ }
780
+ < p className = "text-body-xsmall" >
781
+ < time
782
+ dateTime = { lastUpdated . toISOString ( ) }
783
+ // Removes hydration errors because `toLocaleDateString` show different results in Node.js and in browser for some languages like `ar`
784
+ suppressHydrationWarning
785
+ >
786
+ { lastUpdated . toLocaleDateString ( locale , {
787
+ month : 'long' ,
788
+ day : 'numeric' ,
789
+ year : 'numeric' ,
790
+ } ) }
791
+ </ time >
792
+ </ p >
793
+ </ span >
794
+ ) : null }
788
795
{ /* TODO: Use `ExperimentalLink` */ }
789
796
< LegacyLink variant = "secondary" href = { editPageUrl } target = "_blank" size = "14px" >
790
797
< SocialGitHub alt = "" />
@@ -837,11 +844,6 @@ function MDXContent({ toc: headings, children }: ComponentPropsWithoutRef<Nextra
837
844
>
838
845
< header className = "mb-4 flex gap-4" >
839
846
< div > { t ( 'global.page.onThisPage' ) } </ div >
840
- { /* TODO: Use `ExperimentalLink` */ }
841
- < LegacyLink variant = "secondary" href = { editPageUrl } target = "_blank" size = "14px" >
842
- < SocialGitHub alt = "" />
843
- { t ( 'global.page.edit' ) }
844
- </ LegacyLink >
845
847
</ header >
846
848
{ headings . length > 0 ? (
847
849
< nav
0 commit comments