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
const IssuePage = () => { | |
const [state, dispatch] = useStore(); | |
useEffect(() => { | |
// load data and save to state | |
}); | |
return ( | |
<PageBuilder | |
blocksMap={{ |
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
/* | |
const gendersByName: { | |
"Ибрагимов": "male" | |
"Ибрагимова": "female" | |
"Иванникова": "female" | |
"Иванов": "male" | |
"Иванова": "female" | |
"Иващенко": undefined | |
"Ивлев": "male" | |
"Ивлева": "female" |
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 React from 'react'; | |
import { connect } from 'react-redux'; | |
import { | |
compose, | |
lifecycle, | |
withState, | |
withPropsOnChange | |
} from 'recompose'; | |
import { CityService } from './CityService'; |
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
"use strict"; | |
/** Plugins: | |
gulp-autoprefixer | |
gulp-csso | |
gulp-if | |
gulp-load-plugins | |
gulp-notify | |
gulp-plumber | |
gulp-sass |
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
/** Rem output with px fallback | |
* desired pixel size / current pixel size = em / rem size = 20px / 16px = 1.25rem | |
*/ | |
@mixin font-size($sizeValue: 1) { | |
font-size: ($sizeValue * 20) * 1px; | |
font-size: $sizeValue * 1.25rem; | |
} |
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
https://codex.wordpress.org/Theme_Unit_Test | |
https://wordpress.org/plugins/show-current-template/ | |
https://wordpress.org/plugins/developer/ |
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 | |
/** | |
* Prints any data like a print_r function | |
* @param mixed ... Any data to be printed | |
*/ | |
function debug () { | |
static $count = 0; | |
$args = func_get_args(); | |
$prefix = '<ol style="font-family: Courier; font-size: 12px; border: 1px solid #dedede; background-color: #efefef; float: left; padding-right: 20px;">'; |
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 $terms_list = wp_get_post_terms( $post->ID, 'year' ); ?> | |
<?php foreach ($terms_list as $term) : ?> | |
<a href="<?= get_term_link( $term, 'year' ); ?>"><?= $term->name ?></a> | |
<?php endforeach; ?> |
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
const Mediator = (() => { | |
"use strict"; | |
let publisher = { | |
subscribers: { | |
any: [] // event type: subscribers | |
}, | |
subscribe (fn, type = 'any') { | |
if (typeof this.subscribers[type] === "undefined") { |
NewerOlder