diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/components/BlockQuote.js | 13 | ||||
-rw-r--r-- | src/components/BlockQuote.module.css | 3 | ||||
-rw-r--r-- | src/components/ExternalLink.js | 11 | ||||
-rw-r--r-- | src/components/Highlight.js | 10 | ||||
-rw-r--r-- | src/components/Highlight.module.css | 6 |
5 files changed, 43 insertions, 0 deletions
diff --git a/src/components/BlockQuote.js b/src/components/BlockQuote.js new file mode 100644 index 00000000..7c8a5f5c --- /dev/null +++ b/src/components/BlockQuote.js @@ -0,0 +1,13 @@ +import React from 'react'; +import ExternalLink from './ExternalLink.js'; +import styles from './BlockQuote.module.css'; +import { Icon } from '@iconify/react'; // Import the entire Iconify library. + +export default function BlockQuote({children, refs, href}) { + return ( + <blockquote class={styles.qt}> + {children} + <footer><cite><ExternalLink href={href}><Icon inline icon="zondicons:book-reference" height="18"/> {refs}</ExternalLink></cite></footer> + </blockquote> + ); +}
\ No newline at end of file diff --git a/src/components/BlockQuote.module.css b/src/components/BlockQuote.module.css new file mode 100644 index 00000000..0b8256e7 --- /dev/null +++ b/src/components/BlockQuote.module.css @@ -0,0 +1,3 @@ +.qt { + background-color: var(--ifm-code-background); +}
\ No newline at end of file diff --git a/src/components/ExternalLink.js b/src/components/ExternalLink.js new file mode 100644 index 00000000..82c87300 --- /dev/null +++ b/src/components/ExternalLink.js @@ -0,0 +1,11 @@ +import React from 'react'; +//import styles from './ExternalLink.module.css'; +import ExternalLinkIcon from '@theme/Icon/ExternalLink'; + +export default function ExternalLink({children, href}) { + return ( + <a href={href} rel={"noopener noreferrer"} target={"_blank"}> + {children} <ExternalLinkIcon /> + </a> + ); +}
\ No newline at end of file diff --git a/src/components/Highlight.js b/src/components/Highlight.js new file mode 100644 index 00000000..427b8029 --- /dev/null +++ b/src/components/Highlight.js @@ -0,0 +1,10 @@ +import React from 'react'; +import styles from './Highlight.module.css'; + +export default function Highlight({children}) { + return( + <span className={styles.span}> + {children} + </span> + ); +}
\ No newline at end of file diff --git a/src/components/Highlight.module.css b/src/components/Highlight.module.css new file mode 100644 index 00000000..a1eb5491 --- /dev/null +++ b/src/components/Highlight.module.css @@ -0,0 +1,6 @@ +.span { + background-color: yellow; + border-radius: '2px'; + color: '#fff'; + padding: '0.2rem'; +}
\ No newline at end of file |