-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #107 from daodaoedu/dev
merge: dev to prod
- Loading branch information
Showing
38 changed files
with
430 additions
and
281 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { IoMdCloseCircleOutline } from 'react-icons/io'; | ||
import { Box, Typography } from '@mui/material'; | ||
|
||
const ErrorMessage = ({ errText }) => { | ||
return ( | ||
errText && ( | ||
<Box | ||
sx={{ | ||
mt: '8px', | ||
display: 'flex', | ||
alignItems: 'center', | ||
gap: '8px', | ||
color: '#EF5364', | ||
bgcolor: '#FFEFF1', | ||
borderRadius: '4px', | ||
padding: '4px 8px', | ||
fontSize: '14px', | ||
}} | ||
> | ||
<IoMdCloseCircleOutline size={20} /> | ||
<Typography as="p">{errText}</Typography> | ||
</Box> | ||
) | ||
); | ||
}; | ||
|
||
export default ErrorMessage; |
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
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,107 @@ | ||
import React from 'react'; | ||
import styled from '@emotion/styled'; | ||
import Link from 'next/link'; | ||
import { useRouter } from 'next/router'; | ||
|
||
const TermsMenuWrapper = styled.nav` | ||
position: sticky; | ||
top: 138px; | ||
left: 0; | ||
padding: 40px 0; | ||
margin-right: 1em; | ||
background-color: #fff; | ||
width: 200px; | ||
border-radius: 4px; | ||
box-shadow: 0px 2px 1px -1px rgba(0, 0, 0, 0.2), | ||
0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12); | ||
@media (max-width: 1040px) { | ||
display: none; | ||
} | ||
h2 { | ||
margin-bottom: 1em; | ||
padding: 0 1em; | ||
font-weight: 500; | ||
font-size: 18px; | ||
} | ||
ul { | ||
list-style-type: none; | ||
padding: 0; | ||
margin: 0; | ||
} | ||
li { | ||
margin-bottom: 10px; | ||
} | ||
a { | ||
color: #16b9b3; | ||
padding: 0 1em; | ||
@media (hover: hover) { | ||
&:hover { | ||
text-decoration: underline; | ||
text-underline-offset: 0.2em; | ||
} | ||
} | ||
} | ||
.current { | ||
position: relative; | ||
&:before { | ||
content: ''; | ||
position: absolute; | ||
left: 0em; | ||
top: 50%; | ||
transform: translateY(-50%); | ||
width: 0; | ||
height: 0; | ||
border-top: 0.5em solid transparent; | ||
border-bottom: 0.5em solid transparent; | ||
border-left: 0.5em solid #16b9b3; | ||
border-right: 0.5em solid transparent; | ||
} | ||
} | ||
`; | ||
|
||
const TermsMenu = () => { | ||
const router = useRouter(); | ||
const currentPath = router.pathname; | ||
|
||
return ( | ||
<TermsMenuWrapper> | ||
<h2>網站規約</h2> | ||
<ul> | ||
<li> | ||
<Link | ||
href="/terms/privacypolicy" | ||
className={currentPath === '/terms/privacypolicy' ? 'current' : ''} | ||
> | ||
隱私權政策 | ||
</Link> | ||
</li> | ||
<li> | ||
<Link | ||
href="/terms/ipr" | ||
className={currentPath === '/terms/ipr' ? 'current' : ''} | ||
> | ||
智慧財產權 | ||
</Link> | ||
</li> | ||
<li> | ||
<Link | ||
href="/terms/service" | ||
className={currentPath === '/terms/service' ? 'current' : ''} | ||
> | ||
使用者條款 | ||
</Link> | ||
</li> | ||
</ul> | ||
</TermsMenuWrapper> | ||
); | ||
}; | ||
|
||
export default TermsMenu; |
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,15 @@ | ||
import React from 'react'; | ||
import Navigation from '@/shared/components/Navigation_v2'; | ||
import Footer from '@/shared/components/Footer_v2'; | ||
|
||
const DefaultLayout = ({ children }) => { | ||
return ( | ||
<> | ||
<Navigation /> | ||
{children} | ||
<Footer /> | ||
</> | ||
); | ||
}; | ||
|
||
export default DefaultLayout; |
Oops, something went wrong.