- jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
- Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
- AngularJS - Conventions based MVC framework for HTML5 apps.
- Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
- lawnchair - Key/value store adapter for indexdb, localStorage
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
document.addEventListener('DOMContentLoaded', function() { | |
/** | |
* Refrence to object element that has svg as data attribute | |
**/ | |
const obj = document.querySelector('object'); | |
const svg = obj.contentDocument.querySelector("svg"); | |
svg.style.fill = "red" // change fill color to red | |
}, false); |
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
function flatten_array( arr ){ | |
/** | |
* Checks if _arr is an array | |
* @param Array|Mixed _arr variable to check | |
* @return Bool whether _arr is an array | |
*/ | |
const is_array = ( _arr ) => { | |
return typeof _arr === "object" && typeof _arr.concat === "function"; | |
}; | |
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
'post_image_variants' => '[{\"vid\":\"variant-1415709668089-1002\",\"label\":\"Full Center\",\"group\":{\"margin_left\":\"0\",\"margin_right\":\"0\",\"col\":\"18\",\"row\":\"54\",\"left\":\"0\",\"float\":\"none\",\"height\":\"270\",\"width_cls\":\"c18\",\"left_cls\":\"ml0\",\"clear_cls\":\"\"},\"image\":{\"order\":\"0\",\"col\":\"24\",\"top\":\"0\",\"left\":\"0\",\"row\":\"40\",\"clear\":\"true\",\"height\":\"200\",\"width_cls\":\"c24\",\"left_cls\":\"ml0\",\"clear_cls\":\"clr\",\"top_cls\":\"mt0\"},\"caption\":{\"show\":\"1\",\"order\":\"1\",\"col\":\"24\",\"top\":\"0\",\"left\":\"0\",\"row\":\"10\",\"clear\":\"true\",\"height\":\"50\",\"width_cls\":\"c24\",\"left_cls\":\"ml0\",\"clear_cls\":\"clr\",\"top_cls\":\"mt0\"}},{\"vid\":\"variant-1415709681741-1955\",\"label\":\"Full Left\",\"group\":{\"margin_left\":\"-3\",\"margin_right\":\"0\",\"col\":\"18\",\"row\":\"54\",\"left\":\"0\",\"float\":\"none\",\"height\":\"270\",\"width_cls\":\"c21\",\"left_cls\":\"ml0\",\"clear_cls\":\"\"},\"image\":{\"order\":\"0 |
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
/*global ugalleries */ | |
/* @ TODO: need to add [+] button and make sure it triggers the appropriate event.. | |
//Adding [+] control | |
var $upfrontObjectContent = this.$el.find('.upfront-object-content'); | |
if(this.$el.find('a.add-gallery-item').length < 1) { | |
$('<b class="upfront-entity_meta add_item upfront-ui"><a href="#" class="upfront-icon-button a.add-gallery-item add-item"></a></b>').insertBefore($upfrontObjectContent); | |
} | |
*/ |
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 | |
$header = upfront_create_region( | |
array( | |
"name" => "header", | |
"title" => "Header", | |
"type" => "wide", | |
"scope" => "local", | |
"position" => 1, | |
"allow_sidebar" => true | |
), |
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 | |
$header = upfront_create_region( | |
array( | |
"name" => "header", | |
"title" => "Header", | |
"type" => "wide", | |
"scope" => "local" | |
), | |
array( | |
"row" => 24, |
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 $typography = '{}'; | |
$layout_style = ''; | |
$theme_fonts = ''; | |
$theme_colors = ''; | |
$layout_properties = '[{\"name\":\"layout_style\",\"value\":\"#usearch #usearch-archive-search .upfront-object-content{\\n width:630px;\\n}\\ninput.search-field{\\n width:530px;\\n height:50px;\\n float:left;\\n padding:0;\\n border:none;\\n line-height:50px;\\n padding-left:22px;\\n}\\nbutton.search-button{\\n float:left;\\n border:none;\\n height:50px;\\n width:50px;\\n width:;\\n text-indent:9999px;\\n overflow:hidden;\\n\\n}\"}]'; |
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 $typography = '{}'; | |
$layout_style = '#usearch #usearch-archive-search .upfront-object-content{ | |
width:630px; | |
} | |
input.search-field{ | |
width:530px; | |
height:50px; | |
float:left; | |
padding:0; | |
border:none; |
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 | |
include_once get_template_directory() . '/library/class_upfront_debug.php'; | |
include_once get_template_directory() . '/library/class_upfront_server.php'; | |
include_once get_template_directory() . '/library/class_upfront_theme.php'; | |
class Uf_fixer extends Upfront_ChildTheme { | |
public function initialize() { | |
$this->add_actions_filters(); | |
$this->populate_pages(); |
NewerOlder