Skip to content

Instantly share code, notes, and snippets.

View spingary's full-sized avatar

Gary Wong spingary

View GitHub Profile
@spingary
spingary / cf_custom_css.txt
Last active February 9, 2023 15:16
Carbon Fields Admin CSS
.cf-container__fields > .cf-field:not(.cf-html) {
padding: 20px 60px!important;
}
.block-editor .cf-field.cf-html {
padding: 20px 40px 10px;
border-top: 10px solid #ccc!important;
background-color: lightyellow;
}
.cf-field.cf-html h4 {
font-size: 24px!important;
@spingary
spingary / gears-1.markdown
Created October 25, 2019 14:16
Gears - 1
@spingary
spingary / hubspot_cos_bookmarklet.js
Last active March 14, 2018 14:04
Hubspot COS Helper Bookmarklet
javascript: (function() {
var link = document.createElement("link");
link.href = "https://rawgit.com/spingary/060fcc7924ccdd21cc1b/raw/hubspot_cos_help_styles.css";
link.type = "text/css";
link.rel = "stylesheet";
var linkb = link.cloneNode(true);
document.getElementsByTagName("head")[0].appendChild(link);
var frame = window.frames['design-manager-iframe'];
var contents = jQuery(frame).contents();
jQuery('head',contents).append(linkb);
@spingary
spingary / hubspot_cos_help_styles.css
Last active August 19, 2017 02:58
Hubspot COS Helper Styles
.tabs-container>.hs-tabs ul li.tab a.tab-target {
padding: 10px 15px;
}
.tabs-container>.hs-tabs ul li.tab.file-tab .tab-label {
font-size: 11px;
white-space: normal;
width: 100%;
line-height: 1;
}
.extra-tabs-drop ul.dropdown-items .pre-icon:before,
@spingary
spingary / store-locator.js
Last active August 29, 2015 14:22
Store Locator Javascript for Hubspot COS Hackathon 2
{% raw %}
<script id="infowindow-description-template" type="text/x-handlebars-template">
<div class="loc-name">{{Name}}</div>
<div>{{StreetAddress}}</div>
<div>{{City}}{{#if State}},{{/if}} {{State}} {{Zip}}</div>
<div>{{Features-Products}}</div>
<div>{{Features-Service}}</div>
<div>{{Features-Stations}}</div>
<div>{{PhoneNumber}}</div>
</script>
@spingary
spingary / hubspot-jinja-blog-topics-work
Created November 14, 2014 05:29
Hubspot Jinja - example use of set, length, split in a blog template
{% set topicarray=(request.path | split('/topic/')) %}
{% if topicarray|length == 2 %}
{% set topic=topicarray|last %}
{% if topic == 'following-jesus' %}
<div class="podcast-topic-desc row-fluid">
<div class="span5"><img src="http://cdn2.hubspot.net/hub/320254/file-2083433070-jpg/images/LIVEIT_SERMON_SERIES/podcast-cat-following.jpg?t=1415895975667" alt="Following Jesus"></div>
<div class="span7">
<h3>Following Jesus: The Ultimate Adventure</h3>
<p>Jesus called each of his disciples to &quot;Follow Me!&quot; To eat, drink, walk, travel,
and live with HIM! He calls us to be his disciples and to follow him as well. This series