mirror of
https://github.com/BradNut/awesome-uses
synced 2025-09-08 17:40:31 +00:00
add HTML-only back to top link
This commit is contained in:
parent
8f9ef2900a
commit
5eb511914a
2 changed files with 8 additions and 1 deletions
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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">↑ Back to top</BackToTopLink>
|
||||
</Layout>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue