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
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\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
// Add PurgeCSS in production | |
// See: https://github.com/gatsbyjs/gatsby/issues/5778#issuecomment-402481270 | |
const PurgeCssPlugin = require(`purgecss-webpack-plugin`) | |
const path = require(`path`) | |
const glob = require(`glob`) | |
const PATHS = { | |
src: path.join(__dirname, `src`) | |
} |
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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
AddDefaultCharset UTF-8 | |
# ----------------------------------------------------------------------------------------------- | |
# If you only want to allow HTTPS, uncomment the RewriteCond and RewriteRule lines below. | |
# ----------------------------------------------------------------------------------------------- | |
RewriteCond %{HTTPS} off |
NewerOlder