Skip to content

Instantly share code, notes, and snippets.

@lizkaraffa
lizkaraffa / index.html
Created November 4, 2013 23:45
Add the appropriate CSS within the same media query that will force the “love at first bite” illustration to disappear. I added lines 67-69 in styles.css.
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="styles.css" type="text/css">
<link href="//fonts.googleapis.com/css?family=Nunito:400,300,700" rel="stylesheet" type="text/css">
</head>
<body>
<div class="container">
<div id="intro">
<div class="grid_4">
@lizkaraffa
lizkaraffa / gist:8330140
Last active January 2, 2016 16:29
Here is the challenge: Sort the 'saying2' array, on about line 19, so that the words are listed in length order. The shortest first. Use the 'length' property on the strings in the sort function. So I did it and then this is the error message they're giving me: Bummer! The 'saying2' was 'The,quick,brown,fox,jumped,over,the,lazy,dog's,back' not '…
<!DOCTYPE html>
<html lang="en">
<head>
<title> JavaScript Foundations: Arrays</title>
<style>
html {
background: #FAFAFA;
font-family: sans-serif;
}
</style>
@lizkaraffa
lizkaraffa / gist:8467936
Created January 17, 2014 03:30
I've been studying jQuery from two different sources and I understand the longer syntax structure of source A but I want to get familiar with how to chain things like in source B.
//Source A shows this syntax as the proper way to write all jQuery code.
$(document.ready(function(){
$('thingToInteractWith').event(function(){
$('thingToAffect').effect();
});
});
//Another example below
@lizkaraffa
lizkaraffa / gist:9076599
Last active August 29, 2015 13:56
So originally this was styled all in normal HTML. Then we put it in the following code so that we could use this get_list_view_html function in a few places so we weren't duplicating code. The instructions for the extra credit are: Users might like to add a shirt to the cart directly from the home page or the Shirts Listing page. Add to the func…
/* header include file */
<html>
<head>
<title><?php echo $page_title; ?></title>
<link rel="stylesheet" href="css/style.css" type="text/css">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Oswald:400,700" type="text/css">
<link rel="shortcut icon" href="favicon.ico">
</head>
<body>
@lizkaraffa
lizkaraffa / data.php
Last active August 29, 2015 13:58
Forum Challenge: Reading and Displaying Data (Part 1); Language Used: PHP; Author: Liz Karaffa
<?php
// Gets essay
$text = file_get_contents('http://treehouse-forum-contests.s3.amazonaws.com/visualizing-information/part-one/essays-first-series.txt');
// Removes extra line space and carriage returns, makes essay lowercase and removes all punctuation & numbers
$returns = array(chr(10), chr(13), ",--");
$punctuation = array(".", ",", ":", ";", "--", "?", "!", "'", '"', "{", "}", "_", "*", 1, 2, 3, 4, 5, 6, 7, 8, 9, 0);
$text = strtolower(str_replace($returns, " ", $text));
$text = str_replace($punctuation, "", $text);
@lizkaraffa
lizkaraffa / gist:f10fdc56af18d1866b7d
Created May 20, 2014 22:08
Parent Sectional Page
<?php
/*
* Template Name: Parent Sectional Page
* Description: The template for displaying sectional pages such as the About or Connect pages.
*
* This is the template that displays sectional pages. It will
* pull in the lower level sub-sections and display them all as one page.
*
* @package garden
*/
@lizkaraffa
lizkaraffa / gist:81d0949884c16c9d7b14
Created June 4, 2014 03:54
the template file for the staff grid to be pulled in by the parent sectional page template.
<?php
/**
* Template Name: Staff Page
*
* This is the template that creates a single section
* to be displayed in a Parent Sectional Page.
*
* @package garden
*/
@lizkaraffa
lizkaraffa / front-page.php
Created July 12, 2014 03:09
Front Page of Port LBC
<?php
/**
* Template: Front Page
*
* @package port
*/
get_header(); ?>
<div class="wrapper">
@lizkaraffa
lizkaraffa / overlay.js
Created July 21, 2014 19:51
Overlay functionality
/**
* overlay.js
*
* Handles toggling the whole screen overlay when nav button is clicked.
*/
(function(){
$("#slider-btn").toggle(function() {
$('#page-overlay').css('display','block');
$('.menu-main-menu-container').css('display','block');
<?php
/**
* @package Basis
*/
if ( ! function_exists( 'basis_customize_colors' ) ) :
/**
* Add color theme options via the WordPress Customizer.
*
* @since 1.0.