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 PropTypes from 'prop-types' | |
import Img from 'gatsby-image' | |
const Image = ({ node, alt, className }) => { | |
if (node.childImageSharp && node.childImageSharp.fluid) { | |
return ( | |
<Img fluid={node.childImageSharp.fluid} alt={alt} className={className} /> | |
) | |
} |
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
<?php | |
namespace App\Listeners; | |
use TightenCo\Jigsaw\Jigsaw; | |
use App\Utilities\ResizeImageUtility; | |
class ResizeImageListener | |
{ | |
public function handle(Jigsaw $jigsaw) |
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
<?php | |
namespace modules; | |
use yii\base\Module; | |
use Craft; | |
use craft\volumes\Local; | |
use vaersaagod\dospaces\Volume; | |
/** | |
* Custom module class. |
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
<?php | |
namespace Theme; | |
use Illuminate\Support\Collection; | |
use Zttp\Zttp; | |
class Instagram { | |
protected $cache_mins; |
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
const path = require('path') | |
const { createFilePath } = require('gatsby-source-filesystem') | |
const { fmImagesToRelative } = require('gatsby-remark-relative-images') | |
const config = require('./site-config.json') | |
exports.onCreateNode = ({ node, actions, getNode }) => { | |
const { createNodeField } = actions | |
fmImagesToRelative(node) | |
if (node.internal.type === 'MarkdownRemark') { |
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
<?php | |
namespace App\Middleware; | |
use Psr\Container\ContainerInterface; | |
class TokenAuthentication | |
{ | |
private $container; |
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
<?php | |
namespace App\Middleware; | |
class HostMiddleware | |
{ | |
/** | |
* Host middleware invokable class | |
* | |
* @param \Psr\Http\Message\ServerRequestInterface $request PSR7 request |
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
/* | |
Usage: | |
<a href="#url" data-modal-open="modal-123">Open Modal</a> | |
<div class="modal" data-modal="modal-123"> | |
<button data-modal-close="modal-123">Close Modal</button> | |
... | |
</div> |
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
/* | |
Usage: | |
new ScrollWatcher({ | |
selector: '.header--scroll', | |
classes: 'header--scroll-in-view', | |
scrollOffset: 0, | |
}) | |
*/ | |
export default class { |
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
<?php | |
namespace App\Support\Collection; | |
use \Illuminate\Support\Collection; | |
class CustomCollection extends Collection { | |
/** | |
* Converts array items to a collections recursively. |
NewerOlder