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
import React from "react"; | |
import _get from "lodash.get"; | |
import GatsbyImage from "gatsby-image"; | |
const fallbackUrl = "/fallback-image.svg"; | |
const placeholderSVG = `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cdefs/%3E%3Cpath fill='%23eee' d='M0 0h10v10H0z'/%3E%3C/svg%3E`; | |
const Image = ({ src, srcset, id, imageFile, sizes, ...props }) => { | |
const width = _get(props, "width"); | |
const height = _get(props, "height"); |
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
import React from "react"; | |
import GatsbyImage from "gatsby-image"; | |
const previewSVG = ({ width, height }) => ` | |
<svg xmlns="http://www.w3.org/2000/svg" width="${width}" height="${height}" viewBox="0 0 ${width} ${height}"> | |
<rect fill="#eee" width="${width}" height="${height}"/> | |
</svg> | |
`; | |
const Image = ({ src, srcset, width, height, id, localFile, ...props }) => { |
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
<?xml version="1.0"?> | |
<ruleset name="AHY_WordPress"> | |
<description>A custom set of rules to check for a WordPress project</description> | |
<exclude-pattern>/public/wp/*</exclude-pattern> | |
<exclude-pattern>*.twig</exclude-pattern> | |
<rule ref="Squiz.PHP.CommentedOutCode"/> | |
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace"/> | |
<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter"/> |