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
{ | |
"name": "sergey-test", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"start": "sergey", | |
"dev": "sergey --watch" | |
}, | |
"keywords": [], |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Our lil' website</title> | |
</head> | |
<body> | |
<sergey-import src="header" /> |
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
<header> | |
<nav> | |
<a href="/">Home</a> | |
</nav> | |
</header> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Our lil' website</title> | |
</head> | |
<body> | |
<header> | |
<nav> |
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
class Thyme { | |
constructor(raw) { | |
if (!raw) raw = this.format(this.offset(new Date())) | |
this.normalise(raw.toString().replace(/\//g, '-')) | |
} | |
offset(d) { | |
return new Date(d.getTime() + (d.getTimezoneOffset() * 60000)) | |
} |
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
import PropTypes from 'prop-types'; | |
import React from 'react'; | |
import ImmutablePropTypes from 'react-immutable-proptypes'; | |
import { Map } from 'immutable'; | |
function valueToString(value) { | |
return value ? value.map(v => v.trim()).filter(v => v).join(',').replace(/,([^\s]|$)/g, ', $1') : ''; | |
} | |
export default class CheckboxControl extends React.Component { |
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
response.replace( /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, "" ) |
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
(function InfiniteScroll(TRIGGER_WRAPPER, POSTS_WRAPPER) { | |
var triggerSelector = TRIGGER_WRAPPER + ' a'; | |
var trigger = document.querySelector(triggerSelector); | |
var observer = new IntersectionObserver(function(entries) { | |
if (entries[0].isIntersecting) { | |
entries[0].target.click(); | |
} | |
}); | |
function attachHandlers() { |
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
<?php | |
/** | |
* ACF options page | |
*/ | |
function namespace_acf_settings() { | |
function_exists( 'acf_add_options_page' ) && acf_add_options_page( | |
array( | |
'menu_slug' => 'site-options', |