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 fs = require(`fs-extra`) | |
const request = require(`request`) | |
const path = require(`path`) | |
const config = require(`./../gatsby-config`) | |
module.exports = async ({ actions, graphql }) => { | |
const GET_MEDIA_ITEMS = ` | |
query GET_MEDIA_ITEMS($first: Int) { | |
wpgraphql { | |
mediaItems(first: $first) { |
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\Composers; | |
use Roots\Acorn\View\Composer; | |
use \App\Models\Post; | |
class PostContent extends Composer | |
{ |
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 fs = require('fs') | |
const geo = require('./data') | |
const legit = ({properties: {postal}}) => | |
postal && postal.length > 0 | |
geo.features.forEach(feature => { | |
const op = legit(feature) && { | |
fileName: `./${feature.properties.postal}.geo.json`, | |
data: JSON.stringify({ |
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
<InnerBlocks | |
allowedBlocks={ALLOWED_BLOCKS} | |
renderAppender={() => ( | |
<div className="flex justify-center"> | |
<button className="button button-primary button-large center mx-auto" onClick={() => this.setState({popover: true})}> | |
Insert glossary item | |
</button> | |
{this.state.popover && ( | |
<Popover | |
position='bottom' |
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 | |
\Illuminate\Support\Collection::macro('recursive', function () { | |
return $this->map(function ($value) { | |
if (is_array($value) || is_object($value)) { | |
return collect($value)->recursive(); | |
} | |
return $value; | |
}); |
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 | |
/** | |
* Plugin Name: Tiny Blocks | |
* Description: Backbone for modular block building | |
* Version: 0.1.0 | |
* Author: Kelly Mears, Tiny Pixel | |
* Author URI: https://tinypixel.dev | |
* License: MIT | |
* Text Domain: tinyblocks | |
* |
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
module.exports = { | |
prefix: '', | |
important: false, | |
separator: ':', | |
theme: { | |
screens: {}, | |
colors: {}, | |
spacing: {}, | |
backgroundColor: {}, | |
backgroundPosition: {}, |
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
// @wordpress | |
import { __ } from '@wordpress/i18n' | |
import { Fragment } from '@wordpress/element' | |
import { PanelBody, RangeControl } from '@wordpress/components' | |
import { MediaUpload } from '@wordpress/editor' | |
// components | |
import { FocalPointTool } from './../tools/FocalPointTool' | |
const BackgroundPanel = props => ( |