Skip to content

Commit

Permalink
Attribution added for background image
Browse files Browse the repository at this point in the history
  • Loading branch information
Andras Nemeseri committed Oct 25, 2024
1 parent 8f2d15a commit a586239
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 20 deletions.
8 changes: 8 additions & 0 deletions src/assets/home.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@
margin: 0 0 2rem;
}

#Attribution {
position: absolute;
bottom: 1rem;
right: 1rem;
font-size: 0.8rem;
text-decoration: none;
}

@media only screen and (max-width: 767px) {
#Welcome h1 {
font-size: 3rem;
Expand Down
41 changes: 21 additions & 20 deletions src/components/Layout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Link, useRouterState } from "@tanstack/react-router";
import EmailLink from "./EmailLink";
import { Link, useRouterState } from '@tanstack/react-router';
import EmailLink from './EmailLink';

type LayoutProps = {
children: React.ReactElement;
Expand All @@ -9,23 +9,24 @@ export default function Layout({ children }: LayoutProps) {
const router = useRouterState();

return (
<div id="Layout" className={router.location.href.slice(1) || 'home'}>
<header id="SiteHeader">
<nav>
<Link to="/">Home</Link>
<Link to="/about">About</Link>
<Link to="/street-photography">Street Photography</Link><br className='display-under-620' />
<Link to="/family-photos">Family Photos</Link>
{/* todo: add email form */}
<EmailLink>Contact</EmailLink>
</nav>
</header>
<main>
{children}
</main>
{/*<footer id="SiteFooter">
</footer>*/}
</div>
<>
<div id='Layout' className={router.location.href.slice(1) || 'home'}>
<header id='SiteHeader'>
<nav>
<Link to='/'>Home</Link>
<Link to='/about'>About</Link>
<Link to='/street-photography'>Street Photography</Link><br className='display-under-620' />
<Link to='/family-photos'>Family Photos</Link>
{/* todo: add email form */}
<EmailLink>Contact</EmailLink>
</nav>
</header>
<main>
{children}
</main>
</div>
{!router.location.href.slice(1) &&
<a href='https://vecteezy.com' target='_blank' id='Attribution' title='Background image downloaded from Vecteezy.com'>Vecteezy.com</a>}
</>
);
}

0 comments on commit a586239

Please sign in to comment.