A Pen by Brent Stradling on CodePen.
This file contains hidden or 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
| /* | |
| * Generates an SVG from a remote url | |
| */ | |
| import React, {useEffect, useState} from 'react' | |
| export default ({ url }) => { | |
| const [element, setElement] = useState(null); | |
| const getSvgFromUrl = url => { | |
| return fetch(url) |
This file contains hidden or 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
| const LightenDarkenColor = (color, amount, pound) => { | |
| let usePound = false; | |
| if (color[0] === '#') { | |
| color = color.slice(1); | |
| usePound = true; | |
| } | |
| if(pound !== undefined) usePound = pound | |
| const num = parseInt(color, 16); |
This file contains hidden or 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
| {"lastUpload":"2020-09-28T23:52:03.803Z","extensionVersion":"v3.4.3"} |
This file contains hidden or 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
| nav | |
| ul | |
| - for (i = 1; i <= 8; i++) | |
| li(class="link link-" + i) | |
| svg(width="24" height="24" viewBox="0 0 24 24") | |
| path(d="M4,4H20A2,2 0 0,1 22,6V18A2,2 0 0,1 20,20H4C2.89,20 2,19.1 2,18V6C2,4.89 2.89,4 4,4M12,11L20,6H4L12,11M4,18H20V8.37L12,13.36L4,8.37V18Z") | |
| span Item |