Skip to content

Instantly share code, notes, and snippets.

View jpetto's full-sized avatar
🪐

Jonathan Petto (they/them) jpetto

🪐
View GitHub Profile
@jpetto
jpetto / awsm.html
Created January 29, 2014 21:57
ASWM - HTML starter template
<!DOCTYPE html>
<html>
<head>
<title>ASWM - Starter Template</title>
<!-- stylesheets here -->
</head>
<body>
<!-- javascripts go here -->
@jpetto
jpetto / banner-builder.html
Created January 30, 2014 15:59
ASWM - Banner Builder starter template
<!DOCTYPE html>
<html>
<head>
<title>JavaScript Review - Banner Builder</title>
<link href='http://fonts.googleapis.com/css?family=Cutive' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="http://cdnjs.cloudflare.com/ajax/libs/pure/0.3.0/pure-min.css">
<style type="text/css">
.pure-form input[type="color"] {
padding: 0.2em 0.3em;
@jpetto
jpetto / gist:8928835
Created February 11, 2014 03:30
ASWM - HW 1 - Helper code
;(function() {
'use strict';
// get a reference to the element with the id 'mountain-image'
var mountain_image = document.querySelector('#mountain-image');
// get a reference to the element with the id 'mountain'
// TODO 1
// add a click event listener to the mountain_image element
@jpetto
jpetto / index.html
Last active August 29, 2015 13:56
ASWM: HW - Jokes starter
<!DOCTYPE html>
<html>
<head>
<title>Jokes...jokes</title>
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.4.2/base-min.css">
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.4.2/buttons-min.css">
<style type="text/css">
html, body {
background: #ccc;
@jpetto
jpetto / gist:9124867
Created February 20, 2014 22:45
CW: Theme Switcher - starter JS
;(function($) {
'use strict';
var $body = $('body');
var $theme_list = $('#theme-list');
var $theme_bar = $('#theme-bar');
var themes = ['risky', 'rooftop', 'specter'];
var current_theme = themes[0];
@jpetto
jpetto / 0_reuse_code.js
Created March 5, 2014 23:00
Here are some things you can do with Gists in GistBox. Clutter!
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@jpetto
jpetto / index.html
Last active August 29, 2015 13:58
ASWM CW: Underscore templates walkthrough
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Underscore Template Demo</title>
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/pure/0.4.2/pure-min.css">
<style type="text/css">
#todo-list {
margin-right: 40px;
}
@jpetto
jpetto / gist:10331995
Last active August 29, 2015 13:58
ASWM: Backbone Model/View - basic example
// make/get a reference to our namespace
var MyApp = window.MyApp || {};
// create our VideoGame model with defaults
MyApp.VideoGame = Backbone.Model.extend({
defaults: {
title: 'Coming soon...',
publisher: '',
release_year: '',
box_art: 'placeholder.jpg',
@jpetto
jpetto / index.html
Last active August 29, 2015 13:58
ASWM: CW/HW - Basic Backbone Todo List
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Basic Backbone Todo List</title>
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/pure/0.4.2/pure-min.css">
<style type="text/css">
#app-title {
text-align: center;
border-bottom: 3px solid #000;
@jpetto
jpetto / index.html
Created May 1, 2014 21:15
ASWM SP2014: Final starter
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>NY Times API Demo</title>
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.4.2/pure-min.css">
<style type="text/css">
html, body {
background: #94bbd4;