add HTML-only back to top link

This commit is contained in:
Hugo Di Francesco 2020-01-20 20:35:48 +00:00
parent 8f9ef2900a
commit 5eb511914a
2 changed files with 8 additions and 1 deletions

View file

@ -21,7 +21,7 @@ function Header({ siteTitle, siteDescription, siteUrl }) {
<meta name="twitter:image" content={`${siteUrl}/twitter-card.png`} />
</Helmet>
<div>
<h1>
<h1 id="top">
<Link to="/">/uses</Link>
</h1>
<p>

View file

@ -7,6 +7,12 @@ import Layout from '../components/layout';
import Person from '../components/Person';
import Topics from '../components/Topics';
const BackToTopLink = styled.a`
position: fixed;
bottom: 10px;
right: 10px;
`;
function IndexPage() {
const { currentTag } = useContext(FilterContext);
const { allPerson } = useStaticQuery(graphql`
@ -43,6 +49,7 @@ function IndexPage() {
<Person key={person.name} person={person} currentTag={currentTag} />
))}
</People>
<BackToTopLink href="#top">&uarr; Back to top</BackToTopLink>
</Layout>
);
}