diff options
| author | jackyzha0 <[email protected]> | 2021-03-05 16:53:52 -0800 |
|---|---|---|
| committer | jackyzha0 <[email protected]> | 2021-03-05 16:53:52 -0800 |
| commit | 0c2d38a59f890afed6466658e1ad0341656137c8 (patch) | |
| tree | 930fb412655daa5243e38f06b94757ce965a0892 /frontend/src/components/App.js | |
| parent | fix(typo): public api docs endpoint (diff) | |
| download | ctrl-v-0c2d38a59f890afed6466658e1ad0341656137c8.tar.xz ctrl-v-0c2d38a59f890afed6466658e1ad0341656137c8.zip | |
title refactor
Diffstat (limited to 'frontend/src/components/App.js')
| -rw-r--r-- | frontend/src/components/App.js | 42 |
1 files changed, 19 insertions, 23 deletions
diff --git a/frontend/src/components/App.js b/frontend/src/components/App.js index 543cd46..f28a220 100644 --- a/frontend/src/components/App.js +++ b/frontend/src/components/App.js @@ -7,35 +7,33 @@ import { BrowserRouter as Router, Switch, Route, - Link, useParams } from "react-router-dom"; import Raw from './renderers/Raw' -const SpacedTitle = styled.div` - margin-top: 10vh +const Logo = styled.div` + position: absolute; + bottom: 1.5em; + left: 2em; + opacity: 0.3; + + & h1 { + font-size: 3rem; + } ` -const Desc = () => { - return ( - <h3>a modern, <a href="https://github.com/jackyzha0/ctrl-v" target="_blank" rel="noopener noreferrer">open-source</a> pastebin with latex and markdown rendering support</h3> - ); -} +const Main = styled.main` + margin-top: 10vh; +` const GetPasteWithParam = () => { let { hash } = useParams(); - - return ( - <ViewPaste hash = {hash} /> - ); + return <ViewPaste hash = {hash} />; } const GetRawWithParam = () => { let { hash } = useParams(); - - return ( - <Raw hash={hash} /> - ); + return <Raw hash={hash} />; } const App = () => { @@ -47,17 +45,15 @@ const App = () => { /> <Route> <div className="lt-content-column"> - <SpacedTitle> + <Logo> <nav> <h1 className="mainLogo"> - <span role="img" aria-label="clipboard">📋 </span> - <Link to="/">ctrl-v</Link> + <a href="https://github.com/jackyzha0/ctrl-v">ctrl-v</a> </h1> - <Desc /> </nav> - </SpacedTitle> + </Logo> - <main id="appElement"> + <Main id="appElement"> <Switch> <Route path="/:hash" children={<GetPasteWithParam />} @@ -66,7 +62,7 @@ const App = () => { <NewPaste /> </Route> </Switch> - </main> + </Main> <Footer /> </div> |