-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reorganising file structure and cleaning up folders and files
- Loading branch information
Showing
10 changed files
with
150 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import styled from "styled-components" | ||
|
||
export const BtnRed = styled.button` | ||
border: none; | ||
cursor: pointer; | ||
font-size: 1.3rem; | ||
font-weight: 500; | ||
color: ${p => p.theme.bg}; | ||
background-color: ${p => p.theme.red}; | ||
border-radius: ${p => p.theme.buttonR}; | ||
align-self: center; | ||
padding: 0.5rem 1.5rem; | ||
transition: all 0.2s ease-in-out; | ||
&:hover { | ||
background-color: ${p => p.theme.pink}; | ||
} | ||
` | ||
|
||
export const Btn = styled.button` | ||
border: none; | ||
cursor: pointer; | ||
font-size: 1.3rem; | ||
font-weight: 500; | ||
color: ${p => p.theme.bg}; | ||
background-color: ${p => p.theme.violet}; | ||
border-radius: ${p => p.theme.buttonR}; | ||
align-self: center; | ||
padding: 0.5rem 1.5rem; | ||
transition: all 0.2s ease-in-out; | ||
&:hover { | ||
background-color: ${p => p.theme.pink}; | ||
} | ||
` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
import styled, { css } from 'styled-components' | ||
import appTheme from '../../styles/theme' | ||
|
||
const LoadingContainer = styled.div` | ||
display: flex; | ||
justify-self: center; | ||
align-self: center; | ||
align-items: center; | ||
justify-content: center; | ||
margin: 4rem 0; | ||
` | ||
|
||
function createAnimation() { | ||
let styles = '' | ||
for (let i = 1; i <= 5; i++) { | ||
const e = 4 // the constant to update the difference between start and end | ||
styles += ` | ||
& span:nth-child(${i}) { | ||
animation: pulse${i} 4s ease-in-out infinite; | ||
} | ||
@keyframes pulse${i} { | ||
${i * e}% { | ||
font-size: var(--size); | ||
color:${appTheme.fg}; | ||
} | ||
${i * e + 2 * e}% { | ||
font-size: calc(var(--size) * 1.3); | ||
color:${appTheme.pink}; | ||
} | ||
${i * e + 4 * e}% { | ||
font-size: var(--size); | ||
color:${appTheme.pink}; | ||
} | ||
} | ||
` | ||
} | ||
return css` | ||
${styles} | ||
` | ||
} | ||
|
||
const JPText = styled.p.attrs(() => ({ | ||
lang: 'ja', | ||
}))` | ||
--size: 3rem; | ||
font-size: var(--size); | ||
font-weight: 600; | ||
color: ${p => p.theme.fg}; | ||
white-space: nowrap; | ||
transition: all ease-in-out 0.25s; | ||
line-height: 1.8rem; /* keep in mind this is vertical text, so this is the width */ | ||
${createAnimation()} | ||
` | ||
|
||
const Loading = () => { | ||
return ( | ||
<LoadingContainer> | ||
<JPText> | ||
<span>ロ</span> | ||
<span>ー</span> | ||
<span>デ</span> | ||
<span>ィ</span> | ||
<span>ン</span> | ||
<span>グ</span> | ||
{/* <span>あ</span> */} | ||
{/* <span>り</span> */} | ||
{/* <span>が</span> */} | ||
{/* <span>と</span> */} | ||
{/* <span>う</span> */} | ||
</JPText> | ||
</LoadingContainer> | ||
) | ||
} | ||
|
||
export default Loading |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters