-
Notifications
You must be signed in to change notification settings - Fork 1
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 #4 from fabric-testbed/develop
Staging
- Loading branch information
Showing
16 changed files
with
203 additions
and
145 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { Fragment } from 'react' | ||
import { BaseLinkPropTypes } from './' | ||
import { ExternalLinkIcon } from './' | ||
import { Button } from '@mui/joy' | ||
|
||
export const ExternalLink = ({ to, children, ...props }) => { | ||
return ( | ||
<Fragment> | ||
<a | ||
href={ to } | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
{ ...props } | ||
>{ children }</a> | ||
<ExternalLinkIcon /> | ||
</Fragment> | ||
) | ||
} | ||
|
||
ExternalLink.propTypes = { ...BaseLinkPropTypes } | ||
|
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,4 @@ | ||
export * from './link' | ||
export * from './link-icon' | ||
export * from './external-link' | ||
export * from './mail-to-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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { Fragment } from 'react' | ||
import PropTypes from 'prop-types' | ||
import { Link as ReactLink } from 'react-router-dom' | ||
import { NavLink as ReactNavLink } from 'react-router-dom' | ||
import { ExternalLink } from './' | ||
import { MailtoLink } from './' | ||
// | ||
|
||
export const BaseLinkPropTypes = { | ||
to: PropTypes.string.isRequired, | ||
children: PropTypes.node.isRequired, | ||
} | ||
|
||
// | ||
|
||
export const Link = ({ nav, to, children, ...props }) => { | ||
// if this is a navigation menu link, we can bail out now. | ||
if (nav) { | ||
return <ReactNavLink to={ to } { ...props }>{ children }</ReactNavLink> | ||
} | ||
// otherwise, we'll to determine the type of link and | ||
// decorate it with an icon accordingly. | ||
const externalUrlPattern = new RegExp(/^https?:\/\//) | ||
const externalUrlMatch = externalUrlPattern.exec(to) | ||
const mailtoPattern = new RegExp(/^mailto:/) | ||
const mailtoMatch = mailtoPattern.exec(to) | ||
const LinkComponent = externalUrlMatch | ||
? ExternalLink | ||
: mailtoMatch | ||
? MailtoLink | ||
: ReactLink | ||
return <LinkComponent to={to} { ...props }>{children}</LinkComponent> | ||
} | ||
|
||
Link.propTypes = { | ||
nav: PropTypes.bool, | ||
...BaseLinkPropTypes | ||
} | ||
|
||
Link.defaultProps = { | ||
nav: false, | ||
} | ||
|
||
// |
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,14 @@ | ||
import { Fragment } from 'react' | ||
import { BaseLinkPropTypes } from './' | ||
import { MailtoLinkIcon } from './' | ||
|
||
export const MailtoLink = ({ to, children }) => { | ||
return ( | ||
<Fragment> | ||
<a href={ to }>{ children }</a> | ||
<MailtoLinkIcon /> | ||
</Fragment> | ||
) | ||
} | ||
|
||
MailtoLink.propTypes = { ...BaseLinkPropTypes } |
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,25 @@ | ||
# Calls for Action | ||
|
||
## Calls for Demos | ||
Enim voluptate elit ad reprehenderit laborum laborum magna consequat nostrud. Et ut velit velit pariatur incididunt laborum id esse velit duis. Adipisicing aute do proident in cillum duis in dolore tempor ut in officia velit cillum quis. Sint enim sed nulla occaecat quis amet nostrud consequat commodo id irure quis. | ||
|
||
Enim voluptate elit ad reprehenderit laborum laborum magna consequat nostrud. Et ut velit velit pariatur incididunt laborum id esse velit duis. Adipisicing aute do proident in cillum duis in dolore tempor ut in officia velit cillum quis. Sint enim sed nulla occaecat quis amet nostrud consequat commodo id irure quis. | ||
|
||
<button linkTo="https://renci.org/" center="true">Call for Demos</button> | ||
|
||
## Calls for Tutorials | ||
Incididunt id aliquip cillum in aliqua quis qui mollit exercitation in laborum. Nisi in dolore occaecat minim cillum dolor ut cupidatat. Lorem ipsum esse consectetur proident dolor consequat duis sed duis magna ullamco aliquip ut ut reprehenderit minim aliqua laborum proident laborum. | ||
|
||
Enim voluptate elit ad reprehenderit laborum laborum magna consequat nostrud. Et ut velit velit pariatur incididunt laborum id esse velit duis. Adipisicing aute do proident in cillum duis in dolore tempor ut in officia velit cillum quis. Sint enim sed nulla occaecat quis amet nostrud consequat commodo id irure quis. | ||
|
||
<button linkTo="https://renci.org/" center="true">Call for Tutorials</button> | ||
|
||
|
||
## Calls for Presentations | ||
In sit magna pariatur laborum id cillum excepteur nulla tempor occaecat fugiat dolor ut quis duis do in enim. Magna et enim velit in sed officia ut ut ut voluptate. | ||
|
||
Incididunt id aliquip cillum in aliqua quis qui mollit exercitation in laborum. Nisi in dolore occaecat minim cillum dolor ut cupidatat. Lorem ipsum esse consectetur proident dolor consequat duis sed duis magna ullamco aliquip ut ut reprehenderit minim aliqua laborum proident laborum. | ||
|
||
<button linkTo="https://renci.org/" center="true">Call for Presentations</button> | ||
|
||
For more questions, email [Chelsea Davis](mailto:[email protected]) |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.