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 Component from './reactive'; | |
| export default class Counter extends Component { | |
| constructor() { | |
| super(); | |
| this.state = {counter: 0}; | |
| } | |
| render() { | |
| this.__root && document.body.removeChild(this.__root); | |
| let counterBox = document.createElement('div'); |
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
| var css = ` | |
| body { | |
| background-color: #fa0; | |
| } | |
| `; | |
| var sheet = new File([css], 'style.css', {type: 'text/css'}); | |
| var styleReader = new FileReader(); | |
| styleReader.onload = function (e) { |
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
| // ... | |
| add_action('login_enqueue_scripts', function () { | |
| ?> | |
| <style type="text/css"> | |
| #login h1 a, .login h1 a { | |
| background-image: url(<?php echo get_stylesheet_directory_uri(); ?>/images/site-login-logo.png); | |
| height:65px; | |
| width:320px; | |
| background-size: 320px 65px; | |
| background-repeat: no-repeat; |
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 | |
| add_action('pre_get_posts', function ($query) { | |
| if (is_author()) { | |
| $term = get_term_by('name', 'CATEGORY NAME', 'category'); | |
| $query->set('cat', $term->term_id;); | |
| } | |
| }); | |
| ?> |