diff options
author | flu0r1ne <flu0r1ne@flu0r1ne.net> | 2021-07-21 04:42:31 -0500 |
---|---|---|
committer | flu0r1ne <flu0r1ne@flu0r1ne.net> | 2021-07-21 04:42:58 -0500 |
commit | e424680fc013c291bd7eea4dc63b96401e5126a8 (patch) | |
tree | b39227c50b2c365c49694fa4f86b2630d428ebc2 /templates | |
parent | 437268370661087dbe31323efb18dfe1a518da33 (diff) | |
download | homepage-e424680fc013c291bd7eea4dc63b96401e5126a8.tar.xz homepage-e424680fc013c291bd7eea4dc63b96401e5126a8.zip |
Added a timestamp and sorts posts by timestamp
Diffstat (limited to 'templates')
-rw-r--r-- | templates/Default/default.module.scss | 13 | ||||
-rw-r--r-- | templates/Default/index.tsx | 8 |
2 files changed, 20 insertions, 1 deletions
diff --git a/templates/Default/default.module.scss b/templates/Default/default.module.scss index ba6096f..7dd99c5 100644 --- a/templates/Default/default.module.scss +++ b/templates/Default/default.module.scss @@ -1,4 +1,17 @@ .viewportOverrides { margin-top: 4em; margin-bottom: 3em; +} + +.date { + margin-top: 0.5em; + padding: 0.1em 0.2em; + display: block; +} + +@media screen and (min-width: 1000px) { + .date { + float: right; + padding: 0.1em 0.2em; + } }
\ No newline at end of file diff --git a/templates/Default/index.tsx b/templates/Default/index.tsx index 8902bf8..f693da2 100644 --- a/templates/Default/index.tsx +++ b/templates/Default/index.tsx @@ -7,6 +7,7 @@ import styles from './default.module.scss'; export type DefaultPage = { className?: string; path?: string; + lastUpdated?: string; }; export type RelPathProps = { @@ -37,11 +38,16 @@ const RelPath : FC<RelPathProps> = ({path, ...props}) => { ); } -const DefaultPage : FC<DefaultPage> = ({className, children, path, ...props}) => ( +const LastUpdatedDate : FC = ({children}) => ( + <span className={styles.date}><b>Last Updated: </b>{children}</span> +) + +const DefaultPage : FC<DefaultPage> = ({className, lastUpdated, children, path, ...props}) => ( <Viewport className={clsx(styles.viewportOverrides, className)} > {path !== undefined ? <RelPath path={path!} /> : undefined} + {lastUpdated ? <LastUpdatedDate>{lastUpdated}</LastUpdatedDate> : undefined} {children} </Viewport> ); |