-
Notifications
You must be signed in to change notification settings - Fork 8
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 #982 from basedosdados/development
Development
- Loading branch information
Showing
105 changed files
with
6,448 additions
and
1,816 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
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,36 +1,40 @@ | ||
import { Link as ChakraLink } from "@chakra-ui/react"; | ||
import NextLink from 'next/link'; | ||
import { useEffect, useState } from "react"; | ||
import { useCheckMobile } from "../../hooks/useCheckMobile.hook"; | ||
import { useRouter } from 'next/router'; | ||
|
||
export default function Link({ | ||
export default function SectionLink({ | ||
children, | ||
href, | ||
target, | ||
...props | ||
}) { | ||
const [isMobileMod, setIsMobileMod] = useState(false) | ||
const isMobile = useCheckMobile(); | ||
const { locale } = useRouter(); | ||
|
||
useEffect(() => { | ||
setIsMobileMod(isMobile) | ||
}, [isMobile]) | ||
|
||
return ( | ||
<ChakraLink | ||
width="fit-content" | ||
target={target} | ||
href={href} | ||
fontFamily="Ubuntu" | ||
fontSize={isMobileMod ? "12px" : "15px"} | ||
letterSpacing={isMobileMod ? "0.2px" : "0.1px"} | ||
fontWeight="700" | ||
color="#42B0FF" | ||
_hover={{ textDecoration: "none", opacity:"0.6" }} | ||
paddingBottom="4px" | ||
borderBottom="1px solid #42B0FF" | ||
{...props} | ||
> | ||
{children} | ||
</ChakraLink> | ||
<NextLink href={href} locale={locale} passHref legacyBehavior> | ||
<ChakraLink | ||
width="fit-content" | ||
target={target} | ||
fontFamily="Ubuntu" | ||
fontSize={isMobileMod ? "12px" : "15px"} | ||
letterSpacing={isMobileMod ? "0.2px" : "0.1px"} | ||
fontWeight="700" | ||
color="#42B0FF" | ||
_hover={{ textDecoration: "none", opacity:"0.6" }} | ||
paddingBottom="4px" | ||
borderBottom="1px solid #42B0FF" | ||
{...props} | ||
> | ||
{children} | ||
</ChakraLink> | ||
</NextLink> | ||
); | ||
} |
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,24 +1,28 @@ | ||
import { Tag } from "@chakra-ui/react"; | ||
import Link from '../atoms/Link'; | ||
import { Tag } from '@chakra-ui/react'; | ||
|
||
export function ThemeTag({ name, ...style }) { | ||
export function ThemeTag({ slug, locale, ...props }) { | ||
return ( | ||
<Tag | ||
position="relative" | ||
fontSize="10px" | ||
whiteSpace="nowrap" | ||
borderRadius="8px" | ||
padding="2px 8px" | ||
color="#252A32" | ||
backgroundColor="#DEDFE0" | ||
cursor="pointer" | ||
letterSpacing="0.2px" | ||
fontWeight="300" | ||
fontFamily="ubuntu" | ||
{...style} | ||
> | ||
<a href={`/dataset?tag=${name.toLowerCase()}`} target="_blank"> | ||
{name} | ||
</a> | ||
<Link | ||
href={`/dataset?tag=${slug}`} | ||
locale={locale} | ||
fontWeight="300" | ||
fontFamily="ubuntu" | ||
fontSize="10px" | ||
color="#252A32" | ||
letterSpacing="0.2px" | ||
position="relative" | ||
whiteSpace="nowrap" | ||
{...props} | ||
> | ||
{slug} | ||
</Link> | ||
</Tag> | ||
); | ||
} |
Oops, something went wrong.