Skip to content

Instantly share code, notes, and snippets.

Xavian Ang xavianaxw

Block or report user

Report or block xavianaxw

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@xavianaxw
xavianaxw / get-query-param.html
Created Jul 17, 2019
Hubspot | Passing classes to menu item from Dashboard
View get-query-param.html
{# Helpers: getQueryParam #}
{# Returns the query value by handle #}
{# Parameters #}
{# url | URL | Required #}
{# parameter | Parameter name | Required #}
{# How to import this macro to my module #}
{# {% from 'NOW_002_Website/helpers/get-query-param.html' import getQueryParam %} #}
@xavianaxw
xavianaxw / defer-css.js
Created May 2, 2019
Script to defer CSS if non-critical to improve PageSpeed
View defer-css.js
// List of css file(s) to be deferred
var deferred_css = [
"example-1.css",
"example-2.css",
];
function insertCss(value, index) {
var link = document.createElement('link');
link.rel = 'stylesheet';
link.href = value;
@xavianaxw
xavianaxw / slugify.html
Created Apr 24, 2019
Slugify | Converting text into slug for Hubspot
View slugify.html
{# Helpers: slugify #}
{# Returns the slug version of a string #}
{# Parameters #}
{# string | String to convert into a slug | Required #}
{# How to import this macro to my module #}
{# {% from 'NOW_002_Website/helpers/slugify.html' import slugify %} #}
{# How to use this macro #}
You can’t perform that action at this time.