Skip to content

Instantly share code, notes, and snippets.

View allanwhite's full-sized avatar

Allan White allanwhite

View GitHub Profile
@allanwhite
allanwhite / social-share-images.js
Last active December 5, 2020 02:55
Comprehensive social share image properties - based on Sprout Social's guide.
[
{
"platform": "Facebook Image Sizes",
"id": "facebook",
"brandColor": "3b5998",
"sizes": [
{
"title": "Profile Picture",
"face": true,
"width": 180,
@allanwhite
allanwhite / G+ metadata
Last active May 6, 2024 05:18
A Jade snippet for spitting out Open Graph meta tags based on a simple array. Note: various social networks have different requirements about images, etc.
- var site = {title: 'site name', url: 'http:site.com', image: '/images/thumbnail-site-square.jpg', favicon: '/favicon.ico', description: 'Site Description'}
each val, key in site // Open Graph metadata
meta(property='og:'+'#{key}', content='#{val}')
@allanwhite
allanwhite / hubspot-form-example-min.js
Last active May 6, 2024 05:19
An example Hubspot form embed - top won't work in Statamic, bottom will. Seems like it must be minified.
hbspt.forms.create({portalId:"1695915",formId:"c5cbd91e-27da-4cb2-8bee-7ef37300c145",goToWebinarWebinarKey:"7245946950768380939",target:"#hsFormContainer",onFormSubmit:function(e){window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"GAEvent",eventCategory:"Webinar - See CCMS Live",eventAction:"Form Submission",eventLabel:"Registration",eventValue:"2"})},css:""});
// functions includes mixins for now
/// Return black or white with alpha
/// @access public
/// @param {Opacity} $opacity, 0-1
/// @return - black or white with alpha, like rgba(0,0,0,0.4);
@function black($opacity) {
@return rgba(0,0,0,$opacity);
}
@function white($opacity) {
/* as of Dec 2017 */
@import url("https://fonts.googleapis.com/css?family=Source+Serif+Pro:400");@media print, screen and (min-width: 40em){.reveal,.reveal.tiny,.reveal.small,.reveal.large{right:auto;left:auto;margin:0 auto}}/*! normalize-scss | MIT/GPLv2 License | bit.ly/normalize-scss */html{font-family:sans-serif;line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,footer,header,nav,section{display:block}h1{font-size:2em;margin:0.67em 0}figcaption,figure{display:block}figure{margin:1em 40px}hr{box-sizing:content-box;height:0;overflow:visible}main{display:block}pre{font-family:monospace, monospace;font-size:1em}a{background-color:transparent;-webkit-text-decoration-skip:objects}a:active,a:hover{outline-width:0}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:inherit}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em}dfn{font-style:italic}mark{background-color:#f
@allanwhite
allanwhite / SassMeister-input-HTML.html
Created February 18, 2016 01:35
Generated by SassMeister.com.
<div class="flex flex-center">
<img class="client" src="https://catalyze.io/assets/img/customer-logos/zipnosis-logo.png" alt="logo"/>
<img class="client" src="https://catalyze.io/assets/img/customer-logos/zipnosis-logo.png" alt="logo"/>
<img class="client" src="https://catalyze.io/assets/img/customer-logos/zipnosis-logo.png" alt="logo"/>
<img class="client" src="https://catalyze.io/assets/img/customer-logos/zipnosis-logo.png" alt="logo"/>
<img class="client" src="https://catalyze.io/assets/img/customer-logos/zipnosis-logo.png" alt="logo"/>
<img class="client" src="https://catalyze.io/assets/img/customer-logos/zipnosis-logo.png" alt="logo"/>
</div>
@allanwhite
allanwhite / share.html
Last active May 6, 2024 05:19
Lean Share Icons (a partial for Statamic CMS)
<h2 class="subhead">Share this!</h2>
<p class="icons"><!-- there's some styling for icons here; lots of ways to solve this. See font-awesome for icons -->
<a href="https://twitter.com/intent/tweet?text={{ site_name }}: {{ title|truncate:100 }}&url={{ permalink }}&related={{ twitteruser }}" target="_blank"><i class="icon-twitter"></i> </a>
<a href="http://www.facebook.com/sharer.php?s=100
&p[url]={{ permalink }}
{{ if image_featured_thumb }}&p[images][0]={{ image_featured_thumb }}{{ endif }}
&p[title]={{ site_name }}: {{ title }}
&p[summary]={{ summary|truncate:200 }}"><i class="icon-facebook"></i> </a>
<a href="https://plus.google.com/share?url={{ permalink }}"><i class="icon-google-plus"></i></a>
<a href="http://www.linkedin.com/shareArticle?mini=true&url={{ permalink }}&title={{ title }}|{{ site_name }}&summary={{ summary|truncate:100 }}" title="_blank"><i class="icon-linkedin"></i> </a>
@allanwhite
allanwhite / HSQ-brand-colors-2015.markdown
Last active May 6, 2024 05:19
HSQ Brand colors, 2015

HSQ Brand colors, 2015

Current as of Dec. 29 2014. These colors are going to drive the new healthsparq.com, which will be launched in early 2015.

A Pen by Allan White on CodePen.

License.

@allanwhite
allanwhite / Iterate text layer, save to png
Last active May 6, 2024 05:19
This is a Photoshop .jsx script that will iterate & change a number in a text layer, and save-to-web files in a preset path.
function sfwPNG24(saveFile){
var pngOpts = new ExportOptionsSaveForWeb;
pngOpts.format = SaveDocumentType.PNG
pngOpts.PNG8 = false;
pngOpts.transparency = true;
pngOpts.interlaced = false;
pngOpts.quality = 100;
activeDocument.exportDocument(new File(saveFile),ExportType.SAVEFORWEB,pngOpts);
}