Skip to content

Instantly share code, notes, and snippets.

@angellromero
angellromero / owl.carousel.random.js
Created September 20, 2016 19:58
A Random Plugin for Owl Carousel
@angellromero
angellromero / flexgrid.less
Created October 5, 2016 20:20
Flex Grid Mixin
// Uses Flexbox to create grid with container's direct descendant elements
.flex-grid(@columns: 2, @margin: @indent-md) {
@total-margin: (@columns - 1) * @margin;
@first-column-offset: @columns + 1;
.flex();
.flex-wrap(wrap);
> * {
@angellromero
angellromero / wishlist-snippet.js
Created October 19, 2016 19:07
Temp: Wishlist JS Snippet
var WishlistUtil = new Class({
namespace: 'WishlistUtil',
/**
* Default option values
*/
defaults: {
addUrl: '/my-account/saved-lists/add',
createUrl: '/my-account/create-list',
fetchUrl: '/my-account/saved-lists/lists',
@angellromero
angellromero / mobile-assets.html
Last active February 1, 2017 20:16
Mobile Assets
<!-- Example: Mobile Image Reference/Replacement on any image asset throughout the site -->
<img src="desktop-image.jpg" alt="Alt" data-mobile-src="mobile-image.jpg">
<!-- Example: Mobile Only content that would contain live content such as a title and/or description -->
<img src="desktop-image.jpg" alt="Alt" data-mobile-src="mobile-image.jpg" data-title="Title of Image" data-description="Description of image">
@angellromero
angellromero / description.html
Created March 8, 2017 20:30
BC Description
<div id="description">
<h3>R1 Protein 38 Servings</h3>
<h4>Ultra Pure When Isolate/Hydrolysate Formula<</h4>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Architecto laborum libero minima praesentium quasi, quidem totam voluptatibus. Aliquam corporis eos, est id ipsum natus odit quod sed totam, ut vel.</p>
<ul>
<li>Zero</li>
<li>Zero</li>
<li>Zero Sugar*</li>
<li>Zero Sugar*</li>
<li>Zero Sugar*</li>
@angellromero
angellromero / cms.css
Last active March 26, 2017 21:55
CMS Content
/* New CSS rules must be nested under the .cms-content class */
.cms-content p {
margin-bottom: 20px;
}
<script>
var econdaPageName = "Produktdetail";
var emosProps = {
siteid: "babista",
langid: "de",
countryid: "de",
content: "Produktdetail/Mode für Männer/Hemden/Hemden langarm/281113",
pageId: '2f903cfbb6f1db99103885418aa7a0ed'
};
//
// Hero
// --------------------------------------------------
.hero {
display: block;
position: relative;
background: @hero-tiled-background;
}
// Notes
// A first recommendation is to provide some closure surrounding the introduced JS code to protect globl scope.
// Secondly, leverage load/onload detection so that we don't clobber window.onload
// Lastly, let's get this in a file and load asynchourlys through admin content area.
/*
(function(d, t) {
var g = d.createElement(t),
s = d.getElementsByTagName(t)[0];
g.src = 'https://third-party.com/resource.js';
s.parentNode.insertBefore(g, s);
<referenceBlock name="customer-account-navigation-billing-agreements-link" remove="true"/>

<referenceBlock name="customer-account-navigation-reward-link" remove="true"/>

<referenceBlock name="customer-account-navigation-downloadable-products-link" remove="true"/>

<referenceBlock name="customer-account-navigation-magento-invitation-link" remove="true"/>

<referenceBlock name="customer-account-navigation-gift-card-link" remove="true"/>

<referenceBlock name="customer-account-navigation-giftregistry-link" remove="true"/>

<referenceBlock name="customer-account-navigation-checkout-sku-link" remove="true"/>

<referenceBlock name="customer-account-navigation-customer-balance-link" remove="true"/>