diff options
| author | jackyzha0 <[email protected]> | 2020-05-11 20:47:11 -0700 |
|---|---|---|
| committer | jackyzha0 <[email protected]> | 2020-05-11 20:47:11 -0700 |
| commit | 1f750b3ef0e4e3c0153006551c4449eabb10d1e5 (patch) | |
| tree | 743221486279d7c7840ae7c54b066b5cc96bcc97 /frontend/src | |
| parent | Merge pull request #16 from jackyzha0/password (diff) | |
| download | ctrl-v-1f750b3ef0e4e3c0153006551c4449eabb10d1e5.tar.xz ctrl-v-1f750b3ef0e4e3c0153006551c4449eabb10d1e5.zip | |
add basic link + route
Diffstat (limited to 'frontend/src')
| -rw-r--r-- | frontend/src/components/App.js | 45 | ||||
| -rw-r--r-- | frontend/src/components/Header.js | 20 | ||||
| -rw-r--r-- | frontend/src/css/index.css | 35 |
3 files changed, 74 insertions, 26 deletions
diff --git a/frontend/src/components/App.js b/frontend/src/components/App.js index 17240f5..2f438e9 100644 --- a/frontend/src/components/App.js +++ b/frontend/src/components/App.js @@ -1,15 +1,48 @@ import React from 'react'; -import Header from './Header' import PasteArea from './PasteArea' import Footer from './Footer' +import styled from 'styled-components' +import { + BrowserRouter as Router, + Switch, + Route, + Link +} from "react-router-dom"; + +const SpacedTitle = styled.div` + margin-top: 10vh +` + +const Inline = styled.div` + display: inline-block +` + +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> + ); +} function App() { return ( - <div className="lt-content-column"> - <Header /> - <PasteArea /> - <Footer /> - </div> + <Router> + <div className="lt-content-column"> + <SpacedTitle> + <nav> + <h1 className="mainLogo"> + <span role="img" aria-label="clipboard">📋 </span> + <Link to="/">ctrl-v</Link> + </h1> + + <Desc /> + </nav> + </SpacedTitle> + + <PasteArea/> + + <Footer /> + </div> + </Router> ); } diff --git a/frontend/src/components/Header.js b/frontend/src/components/Header.js deleted file mode 100644 index a0c5ee8..0000000 --- a/frontend/src/components/Header.js +++ /dev/null @@ -1,20 +0,0 @@ -import React from 'react'; -import styled from 'styled-components' - -const SpacedTitle = styled.div` - margin-top: 10vh -` - -const Header = () => { - return ( - <SpacedTitle> - <h1> - <span role="img" aria-label="clipboard">📋 </span> - ctrl-v - </h1> - <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> - </SpacedTitle> - ); -} - -export default Header;
\ No newline at end of file diff --git a/frontend/src/css/index.css b/frontend/src/css/index.css index 3d05fa0..3279aac 100644 --- a/frontend/src/css/index.css +++ b/frontend/src/css/index.css @@ -94,4 +94,39 @@ input[type=submit] { padding: 0.8em 2em; margin: 2em 0; outline: 0; +} + +ul { + list-style-type: none; + display: inline-block; +} + +li { + display: inline-block; + margin: 0 1em; +} + +.mainLogo { + display: inline-block; +} + +.mainLogo a { + text-decoration: none; + position: relative; + margin: 3px; +} + +.mainLogo a::after { + content: ""; + position: absolute; + left: 0; + bottom: 0; + height: 4px; + background-color: #111111; + width: 0; + transition: width 0.25s ease; +} + +.mainLogo:hover a::after { + width: 100%; }
\ No newline at end of file |