mirror of
https://github.com/uetchy/namae.git
synced 2025-03-17 04:30:31 +09:00
feat: add author
This commit is contained in:
parent
2f0789e2b5
commit
5552cb7b75
52
src/App.js
52
src/App.js
@ -1,5 +1,7 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import styled, { createGlobalStyle } from 'styled-components'
|
import styled, { createGlobalStyle } from 'styled-components'
|
||||||
|
import { FaTwitter, FaGlobe } from 'react-icons/fa'
|
||||||
|
|
||||||
import { useDeferredState } from './hooks/state'
|
import { useDeferredState } from './hooks/state'
|
||||||
import { CardHolder } from './components/Card'
|
import { CardHolder } from './components/Card'
|
||||||
import GithubCard from './components/GithubCard'
|
import GithubCard from './components/GithubCard'
|
||||||
@ -32,17 +34,18 @@ export default function App() {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<GlobalStyle />
|
<GlobalStyle />
|
||||||
<header>
|
<Header>
|
||||||
<Logo>namae.dev — name your new project</Logo>
|
<Logo>namae.dev</Logo>
|
||||||
|
<SubHeader>name your new project</SubHeader>
|
||||||
<Input
|
<Input
|
||||||
onChange={onChange}
|
onChange={onChange}
|
||||||
|
type="text"
|
||||||
placeholder="awesome-package"
|
placeholder="awesome-package"
|
||||||
autoComplete="off"
|
autoComplete="off"
|
||||||
autoCorrect="off"
|
autoCorrect="off"
|
||||||
autoCapitalize="off"
|
autoCapitalize="off"
|
||||||
spellCheck="false"
|
|
||||||
/>
|
/>
|
||||||
</header>
|
</Header>
|
||||||
{query && query.length > 0 ? (
|
{query && query.length > 0 ? (
|
||||||
<Result>
|
<Result>
|
||||||
<ResultHeader>Result for {query}</ResultHeader>
|
<ResultHeader>Result for {query}</ResultHeader>
|
||||||
@ -60,17 +63,46 @@ export default function App() {
|
|||||||
</CardHolder>
|
</CardHolder>
|
||||||
</Result>
|
</Result>
|
||||||
) : null}
|
) : null}
|
||||||
|
<Footer>
|
||||||
|
<p>
|
||||||
|
Made with{' '}
|
||||||
|
<span role="img" aria-label="love">
|
||||||
|
🐤
|
||||||
|
</span>{' '}
|
||||||
|
by U{' '}
|
||||||
|
<a
|
||||||
|
href="https://twitter.com/uetschy"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer">
|
||||||
|
<FaTwitter />
|
||||||
|
</a>{' '}
|
||||||
|
<a href="https://uechi.io" target="_blank" rel="noopener noreferrer">
|
||||||
|
<FaGlobe />
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
</Footer>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
const Logo = styled.div`
|
const Header = styled.header`
|
||||||
margin: 15px;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
`
|
`
|
||||||
|
|
||||||
|
const Logo = styled.div`
|
||||||
|
margin: 15px 0 5px;
|
||||||
|
font-family: sans-serif;
|
||||||
|
font-weight: bold;
|
||||||
|
`
|
||||||
|
|
||||||
|
const SubHeader = styled.div`
|
||||||
|
font-size: 0.8em;
|
||||||
|
font-style: italic;
|
||||||
|
`
|
||||||
|
|
||||||
const Input = styled.input`
|
const Input = styled.input`
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
margin-top: 20px;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
outline: none;
|
outline: none;
|
||||||
font-size: 4rem;
|
font-size: 4rem;
|
||||||
@ -93,3 +125,11 @@ const ResultHeader = styled.div`
|
|||||||
font-size: 1.2rem;
|
font-size: 1.2rem;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
`
|
`
|
||||||
|
|
||||||
|
const Footer = styled.footer`
|
||||||
|
margin-top: 40px;
|
||||||
|
text-align: center;
|
||||||
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
|
||||||
|
Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
|
||||||
|
font-size: 0.8em;
|
||||||
|
`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user