-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Display language dropdown * Update dependencies * Manually translate nav item groups * Fix CODEOWNERS for real * Update dependencies + native language names in dropdown * Style tweaks to right nav and language switcher * Color tweaks * Add EditPageLink component * Comment out LocaleDropdown
- Loading branch information
Showing
36 changed files
with
1,448 additions
and
2,222 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
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 +1 @@ | ||
@graphprotocol/docs-reviewers | ||
* @graphprotocol/docs-reviewers |
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,36 @@ | ||
import { HTMLAttributes } from 'react' | ||
import { Spacing, BorderRadius, Flex, Icon, buildShadow } from '@edgeandnode/components' | ||
|
||
import { Text, Link } from '@/components' | ||
import { useLocale } from '@/hooks' | ||
|
||
export type EditPageLinkProps = { | ||
mobile?: boolean | ||
} & Omit<HTMLAttributes<HTMLElement>, 'children'> | ||
|
||
export const EditPageLink = ({ mobile = false, ...props }: EditPageLinkProps) => { | ||
const { currentLocale, currentPathWithoutLocale } = useLocale() | ||
|
||
return ( | ||
<Link | ||
href={`https://github.com/graphprotocol/docs/blob/main/pages/${currentLocale}${currentPathWithoutLocale}${ | ||
currentPathWithoutLocale.endsWith('/') ? 'index' : '' | ||
}.mdx`} | ||
target="_blank" | ||
sx={{ | ||
display: 'block', | ||
py: Spacing.S, | ||
borderRadius: BorderRadius.S, | ||
'&:hover': { color: 'White', textShadow: buildShadow('M') }, | ||
transition: 'color 200ms, text-shadow 200ms', | ||
}} | ||
> | ||
<Flex.Row as="span" align="center" gap={Spacing.M}> | ||
<Icon.LogoGitHub /> | ||
<Text weight={mobile ? 'Semibold' : 'Normal'} size={mobile ? '16px' : '14px'}> | ||
Edit page | ||
</Text> | ||
</Flex.Row> | ||
</Link> | ||
) | ||
} |
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
Oops, something went wrong.