-
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.
refactor(v1.0.0): redesigned web interface (#23)
* refactor(theme): update default theme * refactor(comp): update footer * refactor: update main page * refactor(comp): update header * feat(deps): add sitemap generator * chore: remove images loader * refactor: update link button style * feat(pages): customize 404 page * build(deps): add react-markdown * feat: add about page * fix: eslint error of `useColorModeValue` hook * refactor: update about page * fix: add module export on sitemap generator * perf: update link color contrast * feat: add projects page * build(deps): add plaiceholder (#22) * feat: update with image loading placeholder * refactor: update blog page * refactor: minor update page layout * feat: add achievement page * fix: eslint error * refactor: update cv link * build(deps): add react-hook-form (#24) * feat: add contact page * chore: bump web version from 0.1.0 to 1.0.0
- Loading branch information
1 parent
9675bce
commit 340e8aa
Showing
30 changed files
with
4,573 additions
and
1,374 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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
AIRTABLE_API_KEY= | ||
AIRTABLE_BASE_ID= | ||
NEXT_PUBLIC_SITE_URL= |
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 |
---|---|---|
@@ -1,13 +1,58 @@ | ||
import { Link as ChakraLink } from "@chakra-ui/react"; | ||
import { Button, IconButton, Link as ChakraLink } from "@chakra-ui/react"; | ||
import NextLink from "next/link"; | ||
|
||
// has to be a new component because both chakra and next share the `as` keyword | ||
const NextChakraLink = ({ href, as, replace, scroll, shallow, prefetch, ...chakraProps }) => { | ||
return ( | ||
<NextLink passHref href={href} as={as} replace={replace} scroll={scroll} shallow={shallow} prefetch={prefetch}> | ||
<ChakraLink transition="none" _hover={{ textDecoration: "none" }} {...chakraProps} /> | ||
<NextLink href={href} as={as} replace={replace} scroll={scroll} shallow={shallow} prefetch={prefetch} passHref> | ||
<ChakraLink {...chakraProps} /> | ||
</NextLink> | ||
); | ||
}; | ||
|
||
export default NextChakraLink; | ||
const NextChakraLinkButton = ({ | ||
href, | ||
as, | ||
replace, | ||
scroll, | ||
shallow, | ||
prefetch, | ||
isExternal = false, | ||
...chakraProps | ||
}) => { | ||
return ( | ||
<NextLink href={href} as={as} replace={replace} scroll={scroll} shallow={shallow} prefetch={prefetch} passHref> | ||
<Button | ||
as="a" | ||
transition="transform .3s cubic-bezier(.175,.885,.32,1.275), border-color .2s cubic-bezier(.39,.575,.565,1), background-color .2s cubic-bezier(.39,.575,.565,1)" | ||
{...(isExternal && { target: "_blank", rel: "noopener noreferrer" })} | ||
{...chakraProps} | ||
/> | ||
</NextLink> | ||
); | ||
}; | ||
|
||
const NextChakraLinkIconButton = ({ | ||
href, | ||
as, | ||
replace, | ||
scroll, | ||
shallow, | ||
prefetch, | ||
isExternal = false, | ||
...chakraProps | ||
}) => { | ||
return ( | ||
<NextLink href={href} as={as} replace={replace} scroll={scroll} shallow={shallow} prefetch={prefetch} passHref> | ||
<IconButton | ||
as="a" | ||
transition="transform .3s cubic-bezier(.175,.885,.32,1.275), border-color .2s cubic-bezier(.39,.575,.565,1), background-color .2s cubic-bezier(.39,.575,.565,1)" | ||
variant="ghost" | ||
{...(isExternal && { target: "_blank", rel: "noopener noreferrer" })} | ||
{...chakraProps} | ||
/> | ||
</NextLink> | ||
); | ||
}; | ||
|
||
export { NextChakraLink, NextChakraLinkButton, NextChakraLinkIconButton }; |
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,13 @@ | ||
import { NextChakraLink } from "@app-components/NextChakraLink"; | ||
import { Text } from "@chakra-ui/react"; | ||
|
||
export const BaseMarkdown = { | ||
a({ node, ...rest }) { | ||
const href = rest.href; | ||
return <NextChakraLink isExternal={!href.startsWith("#")} {...rest} />; | ||
}, | ||
|
||
p({ node, ...rest }) { | ||
return <Text as="div" {...rest} />; | ||
}, | ||
}; |
Oops, something went wrong.
340e8aa
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: