Skip to content

Commit

Permalink
update anchor links
Browse files Browse the repository at this point in the history
  • Loading branch information
AykutSarac committed Oct 11, 2024
1 parent 9ab7c6f commit 180ca72
Show file tree
Hide file tree
Showing 14 changed files with 34 additions and 14 deletions.
6 changes: 5 additions & 1 deletion src/containers/Editor/components/BottomBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,11 @@ export const BottomBar = () => {

<StyledRight>
<StyledBottomBarItem>Nodes: {nodeCount}</StyledBottomBarItem>
<Link href="https://github.com/AykutSarac/jsoncrack.com/discussions" target="_blank">
<Link
href="https://github.com/AykutSarac/jsoncrack.com/discussions"
target="_blank"
rel="noopener"
>
<StyledBottomBarItem>
<VscFeedback />
Feedback
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const isURL = (word: string) => {
const Linkify = (text: string) => {
const addMarkup = (word: string) => {
return isURL(word)
? `<a onclick="event.stopPropagation()" href="${word}" style="text-decoration: underline; pointer-events: all;" target="_blank" rel="noreferrer">${word}</a>`
? `<a onclick="event.stopPropagation()" href="${word}" style="text-decoration: underline; pointer-events: all;" target="_blank" rel="noopener noreferrer">${word}</a>`
: word;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export const NotSupported = () => {
<StyledInfo>
Use ToDiagram for larger data size, faster performance, and more features.
</StyledInfo>
<Link href="https://todiagram.com" target="_blank" passHref>
<Link href="https://todiagram.com" target="_blank" passHref rel="noopener">
<Button
mt="lg"
size="lg"
Expand Down
2 changes: 1 addition & 1 deletion src/containers/Landing/HeroSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export const HeroSection = () => {
<StyledHeroSection>
<StyledHeroSectionBody>
<Stack flex="1" miw={250} mx="auto" align="center">
<Link href="https://todiagram.com?ref=jsoncrack.com">
<Link href="https://todiagram.com?ref=jsoncrack.com" rel="noopener">
<Flex justify="center" fz="sm" c="gray.8" gap="8" align="center">
built by
<Image src="/assets/todiagram_logo.png" alt="Todiagram Logo" h={14} loading="eager" />
Expand Down
9 changes: 5 additions & 4 deletions src/containers/Landing/LovedBy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const Featured = ({ stars }: LovedByProps) => {
<StyledFeaturedItem
href="https://github.com/AykutSarac/jsoncrack.com"
target="_blank"
rel="noreferrer"
rel="noopener"
>
<FaGithub color="black" size={28} />
<Text fz="md" fw={600} c="gray.8">
Expand All @@ -38,7 +38,7 @@ const Featured = ({ stars }: LovedByProps) => {
<StyledFeaturedItem
href="https://news.ycombinator.com/item?id=32626873"
target="_blank"
rel="noreferrer"
rel="noopener"
>
<FaHackerNews color="#FF6600" size={28} />
<Text fz="md" fw={600} c="gray.8">
Expand All @@ -48,7 +48,7 @@ const Featured = ({ stars }: LovedByProps) => {
<StyledFeaturedItem
href="https://www.producthunt.com/products/JSON-Crack"
target="_blank"
rel="noreferrer"
rel="noopener"
>
<FaProductHunt color="#DA552F" size={28} />
<Text fz="md" fw={600} c="gray.8">
Expand All @@ -68,9 +68,9 @@ export const LovedBy = ({ stars }: LovedByProps) => {
component="a"
href="https://twitter.com/intent/post?text=Looking%20to%20understand%20or%20explore%20some%20JSON%3F%20Just%20paste%20or%20upload%20to%20visualize%20it%20as%20a%20graph%20with%20https%3A%2F%2Fjsoncrack.com%20%F0%9F%98%8D%20"
target="_blank"
rel="noreferrer"
color="black"
leftSection={<FaXTwitter />}
rel="noopener"
>
Share on X
</Button>
Expand All @@ -80,6 +80,7 @@ export const LovedBy = ({ stars }: LovedByProps) => {
target="_blank"
color="#0077B5"
leftSection={<FaLinkedin />}
rel="noopener"
>
Share on LinkedIn
</Button>
Expand Down
1 change: 1 addition & 0 deletions src/containers/Landing/SeePremium.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export const SeePremium = () => {
mt="xl"
rightSection={<FaArrowRightLong />}
radius="xl"
rel="noopener"
>
See more
</Button>
Expand Down
1 change: 1 addition & 0 deletions src/containers/Modals/JPathModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export const JPathModal = ({ opened, onClose }: ModalProps) => {
fz="sm"
target="_blank"
href="https://docs.oracle.com/cd/E60058_01/PDF/8.0.8.x/8.0.8.0.0/PMF_HTML/JsonPath_Expressions.htm"
rel="noopener noreferrer"
>
Read documentation. <VscLinkExternal />
</Anchor>
Expand Down
2 changes: 1 addition & 1 deletion src/containers/Modals/JQModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const JQModal = ({ opened, onClose }: ModalProps) => {
fz="sm"
target="_blank"
href="https://jqlang.github.io/jq/manual/"
rel="noreferrer"
rel="noopener noreferrer"
>
Read documentation. <VscLinkExternal />
</Anchor>
Expand Down
2 changes: 1 addition & 1 deletion src/containers/Modals/SchemaModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export const SchemaModal = ({ opened, onClose }: ModalProps) => {
fz="sm"
target="_blank"
href="https://niem.github.io/json/sample-schema/"
rel="noreferrer"
rel="noopener noreferrer"
>
View Examples <VscLinkExternal />
</Anchor>
Expand Down
2 changes: 1 addition & 1 deletion src/containers/Modals/UpgradeModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const UpgradeModal = ({ opened, onClose }: ModalProps) => {
<List.Item>Tabs for multiple documents</List.Item>
<List.Item>...faster, and more</List.Item>
</List>
<Link href="https://todiagram.com" target="_blank" passHref>
<Link href="https://todiagram.com" target="_blank" passHref rel="noopener">
<Button
color="green"
fullWidth
Expand Down
1 change: 1 addition & 0 deletions src/containers/Toolbar/AccountMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export const AccountMenu = () => {
href="https://todiagram.com/sign-up?utm_source=signup&utm_medium=app&utm_content=toolbar"
target="_blank"
leftSection={<VscSignIn />}
rel="noopener"
>
<Text size="xs">Sign up</Text>
</Menu.Item>
Expand Down
2 changes: 1 addition & 1 deletion src/layout/AuthLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export const AuthLayout = ({ children }: React.PropsWithChildren) => {
</Center>
<Alert py="sm" mb="md" color="indigo" icon={<FaInfoCircle />}>
Premium editor has been moved to{" "}
<Anchor href="https://todiagram.com" inherit>
<Anchor href="https://todiagram.com" inherit rel="noopener">
todiagram.com
</Anchor>
.
Expand Down
13 changes: 11 additions & 2 deletions src/layout/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export const Footer = () => {
fz="sm"
c="gray.5"
href="https://marketplace.visualstudio.com/items?itemName=AykutSarac.jsoncrack-vscode"
rel="noopener"
>
VS Code
</Anchor>
Expand All @@ -34,6 +35,7 @@ export const Footer = () => {
fz="sm"
c="gray.5"
target="_blank"
rel="noopener"
>
Open Source
</Anchor>
Expand All @@ -58,12 +60,13 @@ export const Footer = () => {
aria-label="LinkedIn"
href="https://www.linkedin.com/company/jsoncrack"
fz="sm"
rel="noopener"
>
<ThemeIcon variant="transparent" color="gray.5">
<FaLinkedin size={20} />
</ThemeIcon>
</Anchor>
<Anchor aria-label="X" fz="sm" href="https://x.com/jsoncrack">
<Anchor aria-label="X" fz="sm" href="https://x.com/jsoncrack" rel="noopener">
<ThemeIcon variant="transparent" color="gray.5">
<FaXTwitter size={20} />
</ThemeIcon>
Expand All @@ -72,12 +75,18 @@ export const Footer = () => {
aria-label="GitHub"
href="https://github.com/AykutSarac/jsoncrack.com"
fz="sm"
rel="noopener"
>
<ThemeIcon variant="transparent" color="gray.5">
<FaGithub size={20} />
</ThemeIcon>
</Anchor>
<Anchor aria-label="Discord" fz="sm" href="https://discord.com/invite/yVyTtCRueq">
<Anchor
aria-label="Discord"
fz="sm"
href="https://discord.com/invite/yVyTtCRueq"
rel="noopener"
>
<ThemeIcon variant="transparent" color="gray.5">
<FaDiscord size={20} />
</ThemeIcon>
Expand Down
3 changes: 3 additions & 0 deletions src/layout/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export const Navbar = () => {
color="black"
size="md"
radius="md"
rel="noopener"
>
VS Code
</Button>
Expand All @@ -77,6 +78,7 @@ export const Navbar = () => {
color="black"
size="md"
radius="md"
rel="noopener"
>
Open Source
</Button>
Expand All @@ -100,6 +102,7 @@ export const Navbar = () => {
color="black"
size="md"
radius="md"
rel="noopener"
>
Upgrade
</Button>
Expand Down

0 comments on commit 180ca72

Please sign in to comment.