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
| export function isValidEmail(email: string): boolean { | |
| const re = /\S+@\S+\.\S+/; | |
| const emailTest = re.test(email); | |
| return emailTest; | |
| } | |
| export function isSecurePassword(password: string): boolean { | |
| // TODO: remove this once we are past testing data | |
| if (password.includes('testing')) return 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
| {% comment %} | |
| Custom template for testing styles applied to RTE content. | |
| Remove before deploying to production/publishing your theme. | |
| {% endcomment %} | |
| <style> | |
| /* Styleguide styles */ | |
| .docs-title { | |
| opacity: 0.5; | |
| font-style: italic; |
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
| /** | |
| * Styles for the login screen | |
| */ | |
| function _login() { | |
| wp_enqueue_style( 'login', get_template_directory_uri() . '/assets/css/login.css' ); | |
| } | |
| add_action( 'login_enqueue_scripts', '_login' ); |
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($) { | |
| $(document).ready(function() { | |
| /** | |
| * Open all external links in a new window/tab | |
| */ | |
| $('a').each(function() { | |
| var a = new RegExp('/' + window.location.host + '/'); | |
| if(!a.test(this.href)) { |
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 | |
| /** | |
| * Post type to manage a list of frequently asked questions. | |
| * | |
| * @package rho | |
| */ | |
| if (__FILE__ == $_SERVER['SCRIPT_FILENAME']) { die(); } | |
| if ( ! class_exists( 'FAQ_Post_Type' ) ) : |
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
| // -------------------------------------------------- | |
| // Sprite along with retina version. | |
| // -------------------------------------------------- | |
| @mixin sprite($xpos, $ypos, $width: 600px, $height: 600px) { | |
| background-image: url(../img/sprite.png); | |
| background-position: $xpos $ypos; | |
| background-repeat: no-repeat; | |
| // Solution for retina graphics. | |
| // Variation of: http://37signals.com/svn/posts/3271-easy-retina-ready-images-using-scss | |
| @media (min--moz-device-pixel-ratio: 1.3), |
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
| /** | |
| * Display the most recent post in the "featured" category and | |
| * keep if from showing in the default loop on the same page. | |
| */ | |
| function jkc_featured_post() { | |
| $featured_query = new WP_Query( array( | |
| 'category_name' => 'featured', | |
| 'posts_per_page' => '1', | |
| 'orderby' => 'modified' | |
| ) ); |
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^="ratio-"], [class*=" ratio-"] { | |
| height: 0; | |
| } | |
| .ratio-21x9 { | |
| padding-bottom: 42.86%; | |
| } | |
| .ratio-16x9 { | |
| padding-bottom: 56.25%; | |
| } | |
| .ratio-4x3 { |
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
| .vcenter-wrap { | |
| display: table; | |
| height: 100%; | |
| } | |
| .vcenter { | |
| display: table-cell; | |
| vertical-align: middle; | |
| } |
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
| $categories = get_the_category(); | |
| $separator = ', '; | |
| $output = ''; | |
| if ($categories) { | |
| foreach($categories as $category) { | |
| $output .= $category->cat_name . $separator; | |
| } | |
| echo trim($output, $separator); | |
| } |