Skip to content

Instantly share code, notes, and snippets.

View aphoenix's full-sized avatar

Andrew aphoenix

View GitHub Profile
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xml:lang="<?php print $language->language ?>"
lang="<?php print $language->language ?>">
<?php include 'includes/html-header.php'; ?>
<body>
<?php include 'includes/header.php'; ?>
<?php include 'includes/page-main.php'; ?>
<?php include 'includes/footer.php'; ?>
<?php print $closure; ?>
<h2>See our work</h2>
We have worked with a wide variety of different clients. We have accommodated non-profit organizations, academic institutions, local entrepreneurs, national corporations, personal projects, bloggers, artists, weddings, conferences and more. <strong>Take a look at some of our work.</strong>
<div class="scrollable">
<div class="items">
<div class="panel" id="nonprofit"><h3>Non-profit: Diabetes in Motion</h3>
<p><a href="http://www.diabetesinmotion.ca">Diabetes in Motion</a> is a non-profit organization that presents self-management programs for persons with diabetes. This is a basic presence site which includes our email package.
@aphoenix
aphoenix / gist:885577
Created March 24, 2011 18:27
Links Before
<div class="locations">
<a href="#">
Mississauga Location
</a>
<span class="horizNavSeparator"></span>
<span class="moreLinks">|</span>
<span class="horizNavSeparator"></span>
<a href="#">
West Toronto Location
</a>
@aphoenix
aphoenix / phpdoingitwrong
Created June 23, 2011 18:44
An example of bad ways to do php.
/// THIS IS WRONG
<?php ?>
<?php if ( ! dynamic_sidebar( 'primary-widget-area' ) ) : ?>
<?php get_search_form(); ?>
<?php _e( 'Archives', 'twentyten' ); ?>
<?php wp_get_archives( 'type=monthly' ); ?>
<?php ?>
/// THIS IS OKAY
$parentpost = $post;
while ($parentpost->post_parent) {
$parentpost = $parentpost->post_parent;
}
$slug = $parentpost->post_name;
body_class($slug);
@aphoenix
aphoenix / gist:1113914
Created July 29, 2011 14:30
The HTML that is generated by fancyTitle does not seem to get the behaviour for #fancyplay
function fancyTitle(title, currentArray, currentIndex, currentOpts) {
return '<div id="fancydescription">' + (title && title.length ? '<span>' + title + '&nbsp;</span>' : '' ) + '</div><div id="fancycount">Image ' + (currentIndex + 1) + ' of ' + currentArray.length + '</div><div id="fancycontrols"><a href="#" id="fancyplay">Play</a> <a href="#" id="fancypause"> Pause</a></div><div style="clear:both;"></div>';
}
$('.fancybox').fancybox({
'titleFormat' : fancyTitle,
'cyclic' : true,
'overlayColor' : '#000',
'overlayOpacity' : 0.5
});
@aphoenix
aphoenix / IEregexproblems.js
Created August 2, 2011 16:49
IE is a pain in the butt.
$("#pocodesubmit").click(function(event) {
event.preventDefault();
var postalcode = $('#areaField').val().toUpperCase().replace(/ /g,'');
var regexObj = { canada : /^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ]()?\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i};
var regexp = new RegExp(regexObj.canada);
if (!regexp.test(postalcode)) { // This one triggers properly in IE.
$('.title').html('Please Enter a Postal Code');
} else { // This one does not trigger properly in IE.
alert('sending');
var thesearch = 'txt_search='+postalcode;
@aphoenix
aphoenix / checklist_site_launch.txt
Created September 23, 2011 17:58 — forked from tonious/checklist_site_launch.txt
New Site Checklist
Design Phase =================================================================
Client Management ------------------------------------------------------------
[ ] Have we received a design brief from the client?
[ ] Have we received sample content from the client?
[ ] Have we quoted the client?
[ ] Has the client signed off on the quote?
Infrastructure ---------------------------------------------------------------
@aphoenix
aphoenix / models.py
Created November 6, 2011 23:56
Some Models
class Book(models.Model):
""" Book Model - an item in the lending library """
title = models.CharField(max_length=200)
author = models.CharField(max_length=100)
genre = models.CharField(max_length=20, blank=True)
def __unicode__(self):
return self.title
@aphoenix
aphoenix / stupid.html
Created December 6, 2011 18:55
Actually this is what I was working with
<div class="ul">
<div class="li">
List item 1
</div>
<div class="li">
List item 2
</div>
<div class="li">
List item 3
</div>