A mostly reasonable approach to JavaScript
This file contains 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
/* | |
SH - Base CSS | |
** import SH brand fonts | |
** apply class names to each font | |
** apply class names to header sizes | |
** apply class names to colors used | |
*/ |
This file contains 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
<link rel="import" href="../topeka-elements/theme.html"> | |
<link rel="import" href="../topeka-elements/topeka-resources.html"> | |
<link rel="import" href="../topeka-elements/topeka-app.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; |
This file contains 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 Fields | |
add_action( 'woocommerce_product_after_variable_attributes', 'variable_fields', 10, 2 ); | |
//JS to add fields for new variations | |
add_action( 'woocommerce_product_after_variable_attributes_js', 'variable_fields_js' ); | |
//Save variation fields | |
add_action( 'woocommerce_process_product_meta_variable', 'variable_fields_process', 10, 1 ); | |
function variable_fields( $loop, $variation_data ) { | |
?> | |
<tr> |
This file contains 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
<form> | |
<fieldset> | |
<legend>Convert your color:</legend> | |
<ol class="fieldsList column1"> | |
<li> | |
<label for="f_hex_value">HEX value (e.g. #f00, #812dd3, ba3, F924A4, red)</label> | |
</li> | |
<li> | |
<input type="text" name="f_hex_value" value="" id="f_hex_value"> | |
</li> |
This file contains 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 | |
// 1 - Tie our validation function to the 'gform_validation' hook | |
add_filter('gform_validation_47', 'validate_vin'); | |
function validate_vin($validation_result) { | |
// 2 - Get the form object from the validation result | |
$form = $validation_result["form"]; | |
// 3 - Get the current page being validated |
This file contains 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
## EXPIRES CACHING ## | |
<IfModule mod_expires.c> | |
ExpiresActive On | |
ExpiresByType image/jpg “access 1 year” | |
ExpiresByType image/jpeg “access 1 year” | |
ExpiresByType image/gif “access 1 year” | |
ExpiresByType image/png “access 1 year” | |
ExpiresByType text/css “access 1 month” | |
ExpiresByType application/pdf “access 1 month” | |
ExpiresByType text/x-javascript “access 1 month” |
This file contains 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
body { | |
padding-top: 50px; | |
} | |
.thumbnail { | |
position:relative; | |
overflow:hidden; | |
} | |
.caption { |
NewerOlder