Skip to content

Instantly share code, notes, and snippets.

@fisherds
fisherds / style_tag_example.html
Created October 9, 2014 19:46
Showing one option for including CSS on a page
<!DOCTYPE html>
<html>
<head>
<style>
h1 {
color: green;
}
</style>
</head>
<body>
@fisherds
fisherds / css_selectors_practice.html
Last active August 29, 2015 14:07
Some HTML that we'll use to practice CSS selectors
<body>
<h1>Family Tree</h1>
<ul class="top-level">
<li>Fictional
<ul id="fictional-list">
<li>Simpsons
<ul class="family-members">
<li>Homer</li>
<li>Lisa</li>
<li>Bart</li>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Selectors</title>
<style>
body {
font: 1em "Comic Sans MS", san-serif;
}
.top-level {
@fisherds
fisherds / h1_color_question.html
Last active August 29, 2015 14:07
What color is the h1 below? Red, Blue, Black, or White?
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Simple Example</title>
<style>
body {
font: 2em "Comic Sans MS", san-serif; // A nice font
color: red;
}
@fisherds
fisherds / specificity_question_with_p_colors.html
Created October 12, 2014 04:27
What color are the letters in the Hello World text below?
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>P Colors (all real colors)</title>
<style>
body {
color: PaleGoldenRod;
}
h1 {
@fisherds
fisherds / color_converter.js
Created October 22, 2014 02:15
Code to handle a lot of the details of color conversion
/** namespace. */
var rh = rh || {};
rh.color = rh.color || {};
rh.color.rgb_to_hex_mode = true;
rh.color.redValue = 181;
rh.color.greenValue = 9;
rh.color.blueValue = 57;
rh.color.hexString = "#b50939";
@fisherds
fisherds / main_jsBasics.py
Created October 26, 2014 03:48
Lines necessary to add the JavaScript Basics links.
js_track.append(("JavaScript Basics - Coffee Counter", False, "/static/JavaScriptBasics/CoffeeCounter/coffee.html"))
js_track.append(("JavaScript Basics - Color Converter Lab", False, "/static/JavaScriptBasics/ColorConverter/color_converter.html"))
@fisherds
fisherds / coffee_cdns.html
Created October 26, 2014 03:57
Here are the two JavaScript files we need to load from html
<!-- DONE: Add jQuery CDN script -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<!-- DONE: Add js/coffee.js script -->
<script type="text/javascript" src="js/coffee.js"></script>
@fisherds
fisherds / main_jsObjectLinks.py
Created October 29, 2014 02:42
Links we need to add to main.py for the JavaScript Objects unit
@fisherds
fisherds / play.html
Created October 30, 2014 03:23
Adding the scripts necessary for the Dice Without Friends JavaScript
<script src="dwf_play_main.js"></script>
<script src="Die.js"></script>
<script src="DiceRound.js"></script>
<script src="DiceRoundController.js"></script>
<script src="DiceGameController.js"></script>