Skip to content

Instantly share code, notes, and snippets.

View StuartStephens's full-sized avatar

Stuart Stephens StuartStephens

View GitHub Profile
@StuartStephens
StuartStephens / loading-spinner.css
Last active February 11, 2019 21:03
Loading animations
.sp {
width: 1rem;
float: right;
height: 1rem;
margin-left: 1rem;
clear: both;
margin: .5rem auto;
}
/* Spinner Circle Rotation */
.sp-circle {
@StuartStephens
StuartStephens / AJAX form submission.js
Last active April 10, 2019 14:19
Form Handling & Submission
// https://github.com/dwyl/learn-to-send-email-via-google-script-html-no-server
// https://developers.google.com/apps-script/reference/mail/mail-app
// https://developers.google.com/apps-script/guides/services/quotas
$("#hire-me-to-speak").submit(function(e) {
e.preventDefault();
// Toggle loading spinner
$(this).find('[type="submit"]').children().toggleClass('dn').blur();
var $form = $(this);
@StuartStephens
StuartStephens / smoothscroll.js
Last active March 2, 2019 18:39
Pure JS SmoothScroll
$(".js-smoothscroll").click(function() {
$([document.documentElement, document.body]).animate({
scrollTop: $("#elementtoScrollToID").offset().top
}, 2000);
});
@StuartStephens
StuartStephens / button-usage
Last active April 10, 2019 14:49
Forms Basics, Components, and Styling
{{ partial "button" (dict "text" "" "type" "" "value" "" "id" "" "class" "js-submit" "disabled" "false" "spinner" "false")}}
@StuartStephens
StuartStephens / .gitignore
Created December 8, 2018 18:08
Example .gitignore for Victor Hugo
node_modules/
dist/
site/data/webpack.json
**/styleguide
*sg-*
@StuartStephens
StuartStephens / sample-blog.md
Created August 21, 2018 23:05
This is my sample markdown post. The goal is to show off text & different text elements in a realistic way.
title Sample
date 2018-08-21 08:52:29 -0400
draft false
menu
main
parent
blog

This is my sample markdown post. The goal is to show off text & different text elements in a realistic way.

/**
* Outline all classes.
*/
[class] {
outline: 5px solid lightgrey;
}
/**
* Outline all BEM Elements.
*/