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 | |
| // Return the page id by slug | |
| // ------------------------------------------------------------- | |
| function get_ID_by_slug( $page_slug ) { | |
| $page = get_page_by_path( $page_slug ); | |
| if ( $page ) { | |
| return $page->ID; | |
| } else { | |
| return null; |
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
| =font-scale($sizes, $namespace: "copy", $micro_class: true) | |
| @each $scale in $sizes | |
| $current-breakpoint: nth($scale,1) | |
| $current-font-size: nth($scale,2) | |
| $base-size: $current-font-size !default | |
| @if $current-breakpoint > 0 | |
| +mq-min($current-breakpoint) | |
| .#{$namespace} | |
| font-size: $current-font-size | |
| @if $micro_class == true |
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 supportsWoff2() { | |
| "use strict"; | |
| /*global FontFace*/ | |
| // Source: https://github.com/filamentgroup/woff2-feature-test | |
| if (!window.FontFace) { | |
| return false; | |
| } else { | |
| var f = new FontFace('t', 'url("data:application/font-woff2,") format("woff2")', {}); | |
| f.load(); | |
| return f.status === 'loading'; |
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
| // Middleware | |
| var middleware = require('./middleware/components.js'); | |
| app.use(middleware); | |
| // Require the core Styleguide | |
| var Styleguide = require('../app/node_modules/styleguide/layout'); | |
| var styleguideProps = this.props; | |
| // Json for all components | |
| app.get('/components.json', function(req, res) { |
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'; | |
| var glob = require('glob'); | |
| var objectAssign = require('react/lib/Object.assign'); | |
| var defaults = { | |
| folder: './app/node_modules/components/', | |
| extension: '.jsx' | |
| }; |
OlderNewer