Skip to content

Commit

Permalink
feat: add cd (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
hidaviddong authored Jul 2, 2024
1 parent 947f6f3 commit 10a421b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/pages/+Layout.jsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import './index.css'
import { usePageContext } from 'vike-react/usePageContext'
export { Layout }
function Layout({ children }) {
const year = new Date().getFullYear();
const pageContext = usePageContext()
const shouldShowCD = pageContext.urlOriginal !== '/'
return (
<div className="w-full selection:text-blue-500 selection:bg-blue-100 flex flex-col items-center">
<main className="h-full w-full flex justify-center items-center flex-col">{children}</main>
<footer className="w-full text-center text-sm text-zinc-700 relative bottom-0">
<footer className="w-full text-center text-sm space-y-4 text-zinc-700 relative bottom-0">
{shouldShowCD && <a href="/" className="font-mono underline underline-offset-1">cd /</a>}
<p>© {year} David Dong. All rights reserved.</p>
</footer>
</div>
Expand Down

0 comments on commit 10a421b

Please sign in to comment.