--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/.hgignore Tue Jan 13 19:37:21 2009 -0500
@@ -0,0 +1,12 @@
+syntax: glob
+*.pyc
+.DS_Store
+*.log
+*.tmproj
+
+fabfile.py
+deploy*.py
+*.db
+
+site-media/storage/*
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/blog/admin.py Tue Jan 13 19:37:21 2009 -0500
@@ -0,0 +1,29 @@
+from stevelosh.blog.models import Entry, Comment
+from django.contrib import admin
+
+class EntryAdmin(admin.ModelAdmin):
+ fieldsets = [
+ ('Entry', { 'fields': ['title', 'snip', 'body'], }),
+ ('Publishing', { 'fields': ['pub_date', 'published'],
+ 'description': "The entry won't be shown on the site unless the Published box is checked." }),
+ ('Advanced', { 'fields': ['slug',],
+ 'classes': ['collapse'], }),
+ ]
+ list_display = ('title', 'snip', 'pub_date',)
+ search_fields = ('title', 'snip', 'body')
+ list_filter = ('pub_date',)
+ date_hierarchy = 'pub_date'
+ ordering = ('-pub_date',)
+ prepopulated_fields = { 'slug': ('title',) }
+
+class CommentAdmin(admin.ModelAdmin):
+ fields = ('name', 'body', 'submitted', 'entry')
+ list_display = ('entry', 'name', 'submitted', 'body')
+ search_fields = ('name', 'body')
+ list_filter = ('name', 'entry')
+ date_hierarchy = 'submitted'
+ ordering = ('-submitted',)
+
+
+admin.site.register(Entry, EntryAdmin)
+admin.site.register(Comment, CommentAdmin)
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/blog/models.py Tue Jan 13 19:37:21 2009 -0500
@@ -0,0 +1,32 @@
+from django.db import models
+import datetime
+
+class Entry(models.Model):
+ title = models.CharField(max_length=140)
+ snip = models.CharField(max_length=140)
+ slug = models.SlugField()
+ pub_date = models.DateTimeField('Date Published',
+ default=datetime.datetime.now)
+ body = models.TextField()
+ published = models.BooleanField(default=False)
+
+ def get_absolute_url(self):
+ return "/blog/entry/%i/%i/%i/%s/" % (self.pub_date.year,
+ self.pub_date.month, self.pub_date.day, self.slug)
+
+ def __unicode__(self):
+ return u'%s' % (self.title,)
+
+class Comment(models.Model):
+ name = models.CharField('Commenter', blank=False, null=False,
+ max_length=40)
+ body = models.TextField('Comment', blank=False, null=False)
+ submitted = models.DateTimeField(default=datetime.datetime.now)
+ entry = models.ForeignKey(Entry)
+
+ def get_absolute_url(self):
+ return self.entry.get_absolute_url() + "#comment-" + str(self.id)
+
+ def __unicode__(self):
+ return u'%s on %s' % (self.name, self.entry.title)
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/blog/views.py Tue Jan 13 19:37:21 2009 -0500
@@ -0,0 +1,45 @@
+from stevelosh.blog.models import Entry, Comment
+from markdown import markdown
+from django.shortcuts import get_object_or_404, render_to_response
+from django.http import HttpResponseRedirect, HttpResponsePermanentRedirect
+from django.core.urlresolvers import reverse
+
+
+ENTRIES_PER_PAGE = 10
+
+def entry(request, year, month, day, slug):
+ entry = get_object_or_404(Entry, slug=slug, pub_date__year=year,
+ pub_date__month=month, pub_date__day=day,)
+ return render_to_response('blog/entry.html', { 'entry': entry, })
+
+def old_entry(request, year, month, day, slug):
+ return HttpResponsePermanentRedirect(reverse('blog-entry',
+ args=(year, month, day, slug)))
+
+def list(request, page=0):
+ page = int(page)
+ start_index = page * ENTRIES_PER_PAGE
+ end_index = start_index + ENTRIES_PER_PAGE
+ entries = Entry.objects.all().order_by('-pub_date')
+ entries = entries.filter(published=True)[start_index:end_index]
+ return render_to_response('blog/list.html',
+ { 'entries': entries,
+ 'older_page': page+1 if end_index < Entry.objects.count() else None,
+ 'newer_page': page-1 if page != 0 else None } )
+
+def comment(request):
+ fields = request.POST
+ entry = Entry.objects.get(pk=fields['entry-id'])
+
+ if ( fields.has_key('name') and (not fields['name'].strip() == '') and
+ fields.has_key('body') and not fields['body'].strip() == ''):
+ new_comment = Comment(name=fields['name'],
+ body=fields['body'],
+ entry=entry)
+ new_comment.save()
+
+ return HttpResponseRedirect(reverse('stevelosh.blog.views.entry',
+ args=(entry.pub_date.year,
+ entry.pub_date.month,
+ entry.pub_date.day,
+ entry.slug)))
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/manage.py Tue Jan 13 19:37:21 2009 -0500
@@ -0,0 +1,11 @@
+#!/usr/bin/env python
+from django.core.management import execute_manager
+try:
+ import settings # Assumed to be in the same directory.
+except ImportError:
+ import sys
+ sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__)
+ sys.exit(1)
+
+if __name__ == "__main__":
+ execute_manager(settings)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/projects/admin.py Tue Jan 13 19:37:21 2009 -0500
@@ -0,0 +1,36 @@
+from stevelosh.projects.models import Project, ProjectFile, ProjectPhoto, Comment
+from django.contrib import admin
+
+class ProjectAdmin(admin.ModelAdmin):
+ list_display = ('name', 'snip', 'type', 'posted',)
+ search_fields = ('name', 'snip', 'body')
+ list_filter = ('type',)
+ date_hierarchy = 'posted'
+ ordering = ('-posted',)
+ prepopulated_fields = { 'slug': ('name',) }
+
+class ProjectPhotoAdmin(admin.ModelAdmin):
+ fields = ('title', 'description', 'project', 'position', 'photo')
+ list_display = ('project', 'title', 'description', 'height', 'width')
+ search_fields = ('title', 'description',)
+ list_filter = ('project',)
+
+class ProjectFileAdmin(admin.ModelAdmin):
+ fields = ('title', 'description', 'project', 'file',)
+ list_display = ('project', 'title', 'description',)
+ search_fields = ('title', 'description',)
+ list_filter = ('project',)
+
+class CommentAdmin(admin.ModelAdmin):
+ fields = ('name', 'body', 'submitted', 'project')
+ list_display = ('project', 'name', 'submitted', 'body')
+ search_fields = ('name', 'body')
+ list_filter = ('name', 'project')
+ date_hierarchy = 'submitted'
+ ordering = ('-submitted',)
+
+
+admin.site.register(Project, ProjectAdmin)
+admin.site.register(ProjectPhoto, ProjectPhotoAdmin)
+admin.site.register(ProjectFile, ProjectFileAdmin)
+admin.site.register(Comment, CommentAdmin)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/projects/models.py Tue Jan 13 19:37:21 2009 -0500
@@ -0,0 +1,55 @@
+from django.db import models
+import datetime
+
+
+class Project(models.Model):
+ """A model of a project."""
+
+ name = models.CharField(blank=False, max_length=140)
+ snip = models.CharField(blank=False, max_length=140)
+ type = models.CharField(blank=True, max_length=15)
+ body = models.TextField(blank=True)
+ posted = models.DateTimeField(blank=False, default=datetime.datetime.now)
+ slug = models.SlugField()
+
+ def __unicode__(self):
+ return u"%s" % (self.name,)
+
+
+class ProjectFile(models.Model):
+ """A single file for a project."""
+
+ title = models.CharField(blank=False, max_length=140)
+ description = models.TextField(blank=True, null=True)
+ file = models.FileField(upload_to='storage/projects/files')
+ project = models.ForeignKey(Project)
+
+ def __unicode__(self):
+ return u"%s - %s" % (self.project.name, self.title)
+
+
+class ProjectPhoto(models.Model):
+ """A single photograph for a project."""
+
+ title = models.CharField(blank=False, max_length=140)
+ description = models.TextField(blank=True, null=True)
+ height = models.IntegerField(blank=True, null=True)
+ width = models.IntegerField(blank=True, null=True)
+ photo = models.ImageField(upload_to='storage/projects/images',
+ height_field='height', width_field='width')
+ project = models.ForeignKey(Project)
+ position = models.IntegerField(blank=True, null=True)
+
+ def __unicode__(self):
+ return u"%s - %s" % (self.project.name, self.title)
+
+
+class Comment(models.Model):
+ name = models.CharField(blank=False, null=False, max_length=40)
+ body = models.TextField(blank=False, null=False)
+ submitted = models.DateTimeField(default=datetime.datetime.now)
+ project = models.ForeignKey(Project)
+
+ def __unicode__(self):
+ return u'%s on %s' % (self.name, self.entry.title)
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/projects/views.py Tue Jan 13 19:37:21 2009 -0500
@@ -0,0 +1,34 @@
+from stevelosh.projects.models import Project, Comment
+from markdown import markdown
+from django.shortcuts import render_to_response, get_object_or_404
+from django.http import HttpResponseRedirect
+from django.core.urlresolvers import reverse
+
+
+def project(request, slug):
+ project = get_object_or_404(Project, slug=slug)
+ return render_to_response('projects/project.html',
+ { 'project': project, })
+
+def list(request):
+ projects = Project.objects.all().order_by('-posted')
+ return render_to_response('projects/list.html', { 'projects': projects, })
+
+def comment(request):
+ fields = request.POST
+ project = Project.objects.get(pk=fields['project-id'])
+
+ if ( fields.has_key('name') and
+ not fields['name'].strip() == '' and
+ not len(fields['name']) < 3 and
+ fields.has_key('body') and
+ not fields['body'].strip() == '' and
+ not len(fields['body']) < 3 and
+ not len(fields['body']) > 15000):
+ new_comment = Comment(name=fields['name'],
+ body=fields['body'],
+ project=project)
+ new_comment.save()
+
+ return HttpResponseRedirect(reverse('stevelosh.projects.views.project',
+ args=(project.slug,)))
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/settings.py Tue Jan 13 19:37:21 2009 -0500
@@ -0,0 +1,86 @@
+import deploy
+
+DEBUG = deploy.DEBUG
+TEMPLATE_DEBUG = DEBUG
+
+ADMINS = (
+ ('Steve Losh', 'steve@stevelosh.com'),
+)
+
+MANAGERS = ADMINS
+
+DATABASE_ENGINE = deploy.DATABASE_ENGINE
+DATABASE_NAME = deploy.DATABASE_NAME
+DATABASE_USER = deploy.DATABASE_USER
+DATABASE_PASSWORD = deploy.DATABASE_PASSWORD
+DATABASE_HOST = deploy.DATABASE_HOST
+DATABASE_PORT = deploy.DATABASE_PORT
+
+# Local time zone for this installation. Choices can be found here:
+# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
+# although not all choices may be available on all operating systems.
+# If running in a Windows environment this must be set to the same as your
+# system time zone.
+TIME_ZONE = 'America/New_York'
+
+# Language code for this installation. All choices can be found here:
+# http://www.i18nguy.com/unicode/language-identifiers.html
+LANGUAGE_CODE = 'en-us'
+
+SITE_ID = 1
+
+# If you set this to False, Django will make some optimizations so as not
+# to load the internationalization machinery.
+USE_I18N = True
+
+# Base directory.
+BASE_DIR = deploy.BASE_DIR
+
+# Absolute path to the directory that holds media.
+# Example: "/home/media/media.lawrence.com/"
+MEDIA_ROOT = BASE_DIR + 'site-media/'
+
+# URL that handles the media served from MEDIA_ROOT. Make sure to use a
+# trailing slash if there is a path component (optional in other cases).
+# Examples: "http://media.lawrence.com", "http://example.com/media/"
+MEDIA_URL = '/site-media/'
+
+# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
+# trailing slash.
+# Examples: "http://foo.com/media/", "/media/".
+ADMIN_MEDIA_PREFIX = '/media/'
+
+# Make this unique, and don't share it with anybody.
+SECRET_KEY = deploy.SECRET_KEY
+
+# List of callables that know how to import templates from various sources.
+TEMPLATE_LOADERS = (
+ 'django.template.loaders.filesystem.load_template_source',
+ 'django.template.loaders.app_directories.load_template_source',
+)
+
+MIDDLEWARE_CLASSES = (
+ 'django.middleware.common.CommonMiddleware',
+ 'django.contrib.sessions.middleware.SessionMiddleware',
+ 'django.contrib.auth.middleware.AuthenticationMiddleware',
+ 'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware',
+)
+
+ROOT_URLCONF = 'stevelosh.urls'
+
+TEMPLATE_DIRS = (
+ BASE_DIR + 'templates/',
+)
+
+INSTALLED_APPS = (
+ 'django.contrib.auth',
+ 'django.contrib.contenttypes',
+ 'django.contrib.sessions',
+ 'django.contrib.sites',
+ 'django.contrib.admin',
+ 'django.contrib.markup',
+ 'django.contrib.flatpages',
+ 'stevelosh.blog',
+ 'stevelosh.projects',
+ 'stevelosh.thoughts',
+)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/site-media/scripts/jquery.validate.min.js Tue Jan 13 19:37:21 2009 -0500
@@ -0,0 +1,16 @@
+/*
+ * jQuery validation plug-in 1.5
+ *
+ * http://bassistance.de/jquery-plugins/jquery-plugin-validation/
+ * http://docs.jquery.com/Plugins/Validation
+ *
+ * Copyright (c) 2006 - 2008 Jörn Zaefferer
+ *
+ * $Id: jquery.validate.js 5952 2008-11-25 19:12:30Z joern.zaefferer $
+ *
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ */
+(function($){$.extend($.fn,{validate:function(options){if(!this.length){options&&options.debug&&window.console&&console.warn("nothing selected, can't validate, returning nothing");return;}var validator=$.data(this[0],'validator');if(validator){return validator;}validator=new $.validator(options,this[0]);$.data(this[0],'validator',validator);if(validator.settings.onsubmit){this.find("input, button").filter(".cancel").click(function(){validator.cancelSubmit=true;});this.submit(function(event){if(validator.settings.debug)event.preventDefault();function handle(){if(validator.settings.submitHandler){validator.settings.submitHandler.call(validator,validator.currentForm);return false;}return true;}if(validator.cancelSubmit){validator.cancelSubmit=false;return handle();}if(validator.form()){if(validator.pendingRequest){validator.formSubmitted=true;return false;}return handle();}else{validator.focusInvalid();return false;}});}return validator;},valid:function(){if($(this[0]).is('form')){return this.validate().form();}else{var valid=false;var validator=$(this[0].form).validate();this.each(function(){valid|=validator.element(this);});return valid;}},removeAttrs:function(attributes){var result={},$element=this;$.each(attributes.split(/\s/),function(){result[this]=$element.attr(this);$element.removeAttr(this);});return result;},rules:function(command,argument){var element=this[0];if(command){var settings=$.data(element.form,'validator').settings;var staticRules=settings.rules;var existingRules=$.validator.staticRules(element);switch(command){case"add":$.extend(existingRules,$.validator.normalizeRule(argument));staticRules[element.name]=existingRules;if(argument.messages)settings.messages[element.name]=$.extend(settings.messages[element.name],argument.messages);break;case"remove":if(!argument){delete staticRules[element.name];return existingRules;}var filtered={};$.each(argument.split(/\s/),function(index,method){filtered[method]=existingRules[method];delete existingRules[method];});return filtered;}}var data=$.validator.normalizeRules($.extend({},$.validator.metadataRules(element),$.validator.classRules(element),$.validator.attributeRules(element),$.validator.staticRules(element)),element);if(data.required){var param=data.required;delete data.required;data=$.extend({required:param},data);}return data;},push:function(t){return this.setArray(this.add(t).get());}});$.extend($.expr[":"],{blank:function(a){return!$.trim(a.value);},filled:function(a){return!!$.trim(a.value);},unchecked:function(a){return!a.checked;}});$.format=function(source,params){if(arguments.length==1)return function(){var args=$.makeArray(arguments);args.unshift(source);return $.format.apply(this,args);};if(arguments.length>2&¶ms.constructor!=Array){params=$.makeArray(arguments).slice(1);}if(params.constructor!=Array){params=[params];}$.each(params,function(i,n){source=source.replace(new RegExp("\\{"+i+"\\}","g"),n);});return source;};$.validator=function(options,form){this.settings=$.extend({},$.validator.defaults,options);this.currentForm=form;this.init();};$.extend($.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",errorElement:"label",focusInvalid:true,errorContainer:$([]),errorLabelContainer:$([]),onsubmit:true,ignore:[],ignoreTitle:false,onfocusin:function(element){this.lastActive=element;if(this.settings.focusCleanup&&!this.blockFocusCleanup){this.settings.unhighlight&&this.settings.unhighlight.call(this,element,this.settings.errorClass);this.errorsFor(element).hide();}},onfocusout:function(element){if(!this.checkable(element)&&(element.name in this.submitted||!this.optional(element))){this.element(element);}},onkeyup:function(element){if(element.name in this.submitted||element==this.lastElement){this.element(element);}},onclick:function(element){if(element.name in this.submitted)this.element(element);},highlight:function(element,errorClass){$(element).addClass(errorClass);},unhighlight:function(element,errorClass){$(element).removeClass(errorClass);}},setDefaults:function(settings){$.extend($.validator.defaults,settings);},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",dateDE:"Bitte geben Sie ein gültiges Datum ein.",number:"Please enter a valid number.",numberDE:"Bitte geben Sie eine Nummer ein.",digits:"Please enter only digits",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",accept:"Please enter a value with a valid extension.",maxlength:$.format("Please enter no more than {0} characters."),minlength:$.format("Please enter at least {0} characters."),rangelength:$.format("Please enter a value between {0} and {1} characters long."),range:$.format("Please enter a value between {0} and {1}."),max:$.format("Please enter a value less than or equal to {0}."),min:$.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:false,prototype:{init:function(){this.labelContainer=$(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||$(this.currentForm);this.containers=$(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var groups=(this.groups={});$.each(this.settings.groups,function(key,value){$.each(value.split(/\s/),function(index,name){groups[name]=key;});});var rules=this.settings.rules;$.each(rules,function(key,value){rules[key]=$.validator.normalizeRule(value);});function delegate(event){var validator=$.data(this[0].form,"validator");validator.settings["on"+event.type]&&validator.settings["on"+event.type].call(validator,this[0]);}$(this.currentForm).delegate("focusin focusout keyup",":text, :password, :file, select, textarea",delegate).delegate("click",":radio, :checkbox",delegate);if(this.settings.invalidHandler)$(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler);},form:function(){this.checkForm();$.extend(this.submitted,this.errorMap);this.invalid=$.extend({},this.errorMap);if(!this.valid())$(this.currentForm).triggerHandler("invalid-form",[this]);this.showErrors();return this.valid();},checkForm:function(){this.prepareForm();for(var i=0,elements=(this.currentElements=this.elements());elements[i];i++){this.check(elements[i]);}return this.valid();},element:function(element){element=this.clean(element);this.lastElement=element;this.prepareElement(element);this.currentElements=$(element);var result=this.check(element);if(result){delete this.invalid[element.name];}else{this.invalid[element.name]=true;}if(!this.numberOfInvalids()){this.toHide.push(this.containers);}this.showErrors();return result;},showErrors:function(errors){if(errors){$.extend(this.errorMap,errors);this.errorList=[];for(var name in errors){this.errorList.push({message:errors[name],element:this.findByName(name)[0]});}this.successList=$.grep(this.successList,function(element){return!(element.name in errors);});}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors();},resetForm:function(){if($.fn.resetForm)$(this.currentForm).resetForm();this.submitted={};this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass);},numberOfInvalids:function(){return this.objectLength(this.invalid);},objectLength:function(obj){var count=0;for(var i in obj)count++;return count;},hideErrors:function(){this.addWrapper(this.toHide).hide();},valid:function(){return this.size()==0;},size:function(){return this.errorList.length;},focusInvalid:function(){if(this.settings.focusInvalid){try{$(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus();}catch(e){}}},findLastActive:function(){var lastActive=this.lastActive;return lastActive&&$.grep(this.errorList,function(n){return n.element.name==lastActive.name;}).length==1&&lastActive;},elements:function(){var validator=this,rulesCache={};return $([]).add(this.currentForm.elements).filter(":input").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){!this.name&&validator.settings.debug&&window.console&&console.error("%o has no name assigned",this);if(this.name in rulesCache||!validator.objectLength($(this).rules()))return false;rulesCache[this.name]=true;return true;});},clean:function(selector){return $(selector)[0];},errors:function(){return $(this.settings.errorElement+"."+this.settings.errorClass,this.errorContext);},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=$([]);this.toHide=$([]);this.formSubmitted=false;this.currentElements=$([]);},prepareForm:function(){this.reset();this.toHide=this.errors().push(this.containers);},prepareElement:function(element){this.reset();this.toHide=this.errorsFor(element);},check:function(element){element=this.clean(element);if(this.checkable(element)){element=this.findByName(element.name)[0];}var rules=$(element).rules();var dependencyMismatch=false;for(method in rules){var rule={method:method,parameters:rules[method]};try{var result=$.validator.methods[method].call(this,element.value,element,rule.parameters);if(result=="dependency-mismatch"){dependencyMismatch=true;continue;}dependencyMismatch=false;if(result=="pending"){this.toHide=this.toHide.not(this.errorsFor(element));return;}if(!result){this.formatAndAdd(element,rule);return false;}}catch(e){this.settings.debug&&window.console&&console.log("exception occured when checking element "+element.id
++", check the '"+rule.method+"' method");throw e;}}if(dependencyMismatch)return;if(this.objectLength(rules))this.successList.push(element);return true;},customMetaMessage:function(element,method){if(!$.metadata)return;var meta=this.settings.meta?$(element).metadata()[this.settings.meta]:$(element).metadata();return meta&&meta.messages&&meta.messages[method];},customMessage:function(name,method){var m=this.settings.messages[name];return m&&(m.constructor==String?m:m[method]);},findDefined:function(){for(var i=0;i<arguments.length;i++){if(arguments[i]!==undefined)return arguments[i];}return undefined;},defaultMessage:function(element,method){return this.findDefined(this.customMessage(element.name,method),this.customMetaMessage(element,method),!this.settings.ignoreTitle&&element.title||undefined,$.validator.messages[method],"<strong>Warning: No message defined for "+element.name+"</strong>");},formatAndAdd:function(element,rule){var message=this.defaultMessage(element,rule.method);if(typeof message=="function")message=message.call(this,rule.parameters,element);this.errorList.push({message:message,element:element});this.errorMap[element.name]=message;this.submitted[element.name]=message;},addWrapper:function(toToggle){if(this.settings.wrapper)toToggle.push(toToggle.parents(this.settings.wrapper));return toToggle;},defaultShowErrors:function(){for(var i=0;this.errorList[i];i++){var error=this.errorList[i];this.settings.highlight&&this.settings.highlight.call(this,error.element,this.settings.errorClass);this.showLabel(error.element,error.message);}if(this.errorList.length){this.toShow.push(this.containers);}if(this.settings.success){for(var i=0;this.successList[i];i++){this.showLabel(this.successList[i]);}}if(this.settings.unhighlight){for(var i=0,elements=this.validElements();elements[i];i++){this.settings.unhighlight.call(this,elements[i],this.settings.errorClass);}}this.toHide=this.toHide.not(this.toShow);this.hideErrors();this.addWrapper(this.toShow).show();},validElements:function(){return this.currentElements.not(this.invalidElements());},invalidElements:function(){return $(this.errorList).map(function(){return this.element;});},showLabel:function(element,message){var label=this.errorsFor(element);if(label.length){label.removeClass().addClass(this.settings.errorClass);label.attr("generated")&&label.html(message);}else{label=$("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(element),generated:true}).addClass(this.settings.errorClass).html(message||"");if(this.settings.wrapper){label=label.hide().show().wrap("<"+this.settings.wrapper+">").parent();}if(!this.labelContainer.append(label).length)this.settings.errorPlacement?this.settings.errorPlacement(label,$(element)):label.insertAfter(element);}if(!message&&this.settings.success){label.text("");typeof this.settings.success=="string"?label.addClass(this.settings.success):this.settings.success(label);}this.toShow.push(label);},errorsFor:function(element){return this.errors().filter("[@for='"+this.idOrName(element)+"']");},idOrName:function(element){return this.groups[element.name]||(this.checkable(element)?element.name:element.id||element.name);},checkable:function(element){return/radio|checkbox/i.test(element.type);},findByName:function(name){var form=this.currentForm;return $(document.getElementsByName(name)).map(function(index,element){return element.form==form&&element.name==name&&element||null;});},getLength:function(value,element){switch(element.nodeName.toLowerCase()){case'select':return $("option:selected",element).length;case'input':if(this.checkable(element))return this.findByName(element.name).filter(':checked').length;}return value.length;},depend:function(param,element){return this.dependTypes[typeof param]?this.dependTypes[typeof param](param,element):true;},dependTypes:{"boolean":function(param,element){return param;},"string":function(param,element){return!!$(param,element.form).length;},"function":function(param,element){return param(element);}},optional:function(element){return!$.validator.methods.required.call(this,$.trim(element.value),element)&&"dependency-mismatch";},startRequest:function(element){if(!this.pending[element.name]){this.pendingRequest++;this.pending[element.name]=true;}},stopRequest:function(element,valid){this.pendingRequest--;if(this.pendingRequest<0)this.pendingRequest=0;delete this.pending[element.name];if(valid&&this.pendingRequest==0&&this.formSubmitted&&this.form()){$(this.currentForm).submit();}else if(!valid&&this.pendingRequest==0&&this.formSubmitted){$(this.currentForm).triggerHandler("invalid-form",[this]);}},previousValue:function(element){return $.data(element,"previousValue")||$.data(element,"previousValue",previous={old:null,valid:true,message:this.defaultMessage(element,"remote")});}},classRuleSettings:{required:{required:true},email:{email:true},url:{url:true},date:{date:true},dateISO:{dateISO:true},dateDE:{dateDE:true},number:{number:true},numberDE:{numberDE:true},digits:{digits:true},creditcard:{creditcard:true}},addClassRules:function(className,rules){className.constructor==String?this.classRuleSettings[className]=rules:$.extend(this.classRuleSettings,className);},classRules:function(element){var rules={};var classes=$(element).attr('class');classes&&$.each(classes.split(' '),function(){if(this in $.validator.classRuleSettings){$.extend(rules,$.validator.classRuleSettings[this]);}});return rules;},attributeRules:function(element){var rules={};var $element=$(element);for(method in $.validator.methods){var value=$element.attr(method);if(value){rules[method]=value;}}if(rules.maxlength&&/-1|2147483647|524288/.test(rules.maxlength)){delete rules.maxlength;}return rules;},metadataRules:function(element){if(!$.metadata)return{};var meta=$.data(element.form,'validator').settings.meta;return meta?$(element).metadata()[meta]:$(element).metadata();},staticRules:function(element){var rules={};var validator=$.data(element.form,'validator');if(validator.settings.rules){rules=$.validator.normalizeRule(validator.settings.rules[element.name])||{};}return rules;},normalizeRules:function(rules,element){$.each(rules,function(prop,val){if(val===false){delete rules[prop];return;}if(val.param||val.depends){var keepRule=true;switch(typeof val.depends){case"string":keepRule=!!$(val.depends,element.form).length;break;case"function":keepRule=val.depends.call(element,element);break;}if(keepRule){rules[prop]=val.param!==undefined?val.param:true;}else{delete rules[prop];}}});$.each(rules,function(rule,parameter){rules[rule]=$.isFunction(parameter)?parameter(element):parameter;});$.each(['minlength','maxlength','min','max'],function(){if(rules[this]){rules[this]=Number(rules[this]);}});$.each(['rangelength','range'],function(){if(rules[this]){rules[this]=[Number(rules[this][0]),Number(rules[this][1])];}});if($.validator.autoCreateRanges){if(rules.min&&rules.max){rules.range=[rules.min,rules.max];delete rules.min;delete rules.max;}if(rules.minlength&&rules.maxlength){rules.rangelength=[rules.minlength,rules.maxlength];delete rules.minlength;delete rules.maxlength;}}if(rules.messages){delete rules.messages}return rules;},normalizeRule:function(data){if(typeof data=="string"){var transformed={};$.each(data.split(/\s/),function(){transformed[this]=true;});data=transformed;}return data;},addMethod:function(name,method,message){$.validator.methods[name]=method;$.validator.messages[name]=message;if(method.length<3){$.validator.addClassRules(name,$.validator.normalizeRule(name));}},methods:{required:function(value,element,param){if(!this.depend(param,element))return"dependency-mismatch";switch(element.nodeName.toLowerCase()){case'select':var options=$("option:selected",element);return options.length>0&&(element.type=="select-multiple"||($.browser.msie&&!(options[0].attributes['value'].specified)?options[0].text:options[0].value).length>0);case'input':if(this.checkable(element))return this.getLength(value,element)>0;default:return $.trim(value).length>0;}},remote:function(value,element,param){if(this.optional(element))return"dependency-mismatch";var previous=this.previousValue(element);if(!this.settings.messages[element.name])this.settings.messages[element.name]={};this.settings.messages[element.name].remote=typeof previous.message=="function"?previous.message(value):previous.message;param=typeof param=="string"&&{url:param}||param;if(previous.old!==value){previous.old=value;var validator=this;this.startRequest(element);var data={};data[element.name]=value;$.ajax($.extend(true,{url:param,mode:"abort",port:"validate"+element.name,dataType:"json",data:data,success:function(response){if(response){var submitted=validator.formSubmitted;validator.prepareElement(element);validator.formSubmitted=submitted;validator.successList.push(element);validator.showErrors();}else{var errors={};errors[element.name]=response||validator.defaultMessage(element,"remote");validator.showErrors(errors);}previous.valid=response;validator.stopRequest(element,response);}},param));return"pending";}else if(this.pending[element.name]){return"pending";}return previous.valid;},minlength:function(value,element,param){return this.optional(element)||this.getLength(value,element)>=param;},maxlength:function(value,element,param){return this.optional(element)||this.getLength(value,element)<=param;},rangelength:function(value,element,param){var length=this.getLength(value,element);return this.optional(element)||(length>=param[0]&&length<=param[1]);},min:function(value,element,param){return this.optional(element)||value>=param;},max:function(value,element,param){return this.optional(element)||value<=param;},range:function(value,element,param){return this.optional(element)||(value>=param[0]&&value<=param[1]);},email:function(value,element){return this.optional(element)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(value);},url:function(value,element){return this.optional(element)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);},date:function(value,element){return this.optional(element)||!/Invalid|NaN/.test(new Date(value));},dateISO:function(value,element){return this.optional(element)||/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(value);},dateDE:function(value,element){return this.optional(element)||/^\d\d?\.\d\d?\.\d\d\d?\d?$/.test(value);},number:function(value,element){return this.optional(element)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(value);},numberDE:function(value,element){return this.optional(element)||/^-?(?:\d+|\d{1,3}(?:\.\d{3})+)(?:,\d+)?$/.test(value);},digits:function(value,element){return this.optional(element)||/^\d+$/.test(value);},creditcard:function(value,element){if(this.optional(element))return"dependency-mismatch";if(/[^0-9-]+/.test(value))return false;var nCheck=0,nDigit=0,bEven=false;value=value.replace(/\D/g,"");for(n=value.length-1;n>=0;n--){var cDigit=value.charAt(n);var nDigit=parseInt(cDigit,10);if(bEven){if((nDigit*=2)>9)nDigit-=9;}nCheck+=nDigit;bEven=!bEven;}return(nCheck%10)==0;},accept:function(value,element,param){param=typeof param=="string"?param:"png|jpe?g|gif";return this.optional(element)||value.match(new RegExp(".("+param+")$","i"));},equalTo:function(value,element,param){return value==$(param).val();}}});})(jQuery);;(function($){var ajax=$.ajax;var pendingRequests={};$.ajax=function(settings){settings=$.extend(settings,$.extend({},$.ajaxSettings,settings));var port=settings.port;if(settings.mode=="abort"){if(pendingRequests[port]){pendingRequests[port].abort();}return(pendingRequests[port]=ajax.apply(this,arguments));}return ajax.apply(this,arguments);};})(jQuery);;(function($){$.each({focus:'focusin',blur:'focusout'},function(original,fix){$.event.special[fix]={setup:function(){if($.browser.msie)return false;this.addEventListener(original,$.event.special[fix].handler,true);},teardown:function(){if($.browser.msie)return false;this.removeEventListener(original,$.event.special[fix].handler,true);},handler:function(e){arguments[0]=$.event.fix(e);arguments[0].type=fix;return $.event.handle.apply(this,arguments);}};});$.extend($.fn,{delegate:function(type,delegate,handler){return this.bind(type,function(event){var target=$(event.target);if(target.is(delegate)){return handler.apply(target,arguments);}});},triggerEvent:function(type,target){return this.triggerHandler(type,[$.event.fix({type:type,target:target})]);}})})(jQuery);
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/site-media/scripts/validate-comment-form.js Tue Jan 13 19:37:21 2009 -0500
@@ -0,0 +1,32 @@
+$(document).ready(function() {
+ var validator = $("#new-comment-form").validate({
+ errorClass: 'invalid',
+ rules: {
+ name: {
+ required: true,
+ minlength: 3,
+ maxlength: 40
+ },
+ body: {
+ required: true,
+ minlength: 4,
+ maxlength: 15000
+ }
+ },
+ messages: {
+ name: {
+ required: "Please enter your name.",
+ minlength: jQuery.format("It has to be at least {0} letters."),
+ maxlength: jQuery.format("It can't be more than {0} letters."),
+ },
+ body: {
+ required: "Please enter a comment.",
+ minlength: jQuery.format("It has to be at least {0} letters."),
+ maxlength: jQuery.format("It can't be more than {0} letters."),
+ },
+ },
+ errorPlacement: function(error, element) {
+ error.appendTo( element.parent() );
+ },
+ });
+});
\ No newline at end of file
Binary file site-media/scripts/wmd/images/bg-fill.png has changed
Binary file site-media/scripts/wmd/images/bg.png has changed
Binary file site-media/scripts/wmd/images/blockquote.png has changed
Binary file site-media/scripts/wmd/images/bold.png has changed
Binary file site-media/scripts/wmd/images/code.png has changed
Binary file site-media/scripts/wmd/images/h1.png has changed
Binary file site-media/scripts/wmd/images/hr.png has changed
Binary file site-media/scripts/wmd/images/img.png has changed
Binary file site-media/scripts/wmd/images/italic.png has changed
Binary file site-media/scripts/wmd/images/link.png has changed
Binary file site-media/scripts/wmd/images/ol.png has changed
Binary file site-media/scripts/wmd/images/redo.png has changed
Binary file site-media/scripts/wmd/images/separator.png has changed
Binary file site-media/scripts/wmd/images/ul.png has changed
Binary file site-media/scripts/wmd/images/undo.png has changed
Binary file site-media/scripts/wmd/images/wmd-on.png has changed
Binary file site-media/scripts/wmd/images/wmd.png has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/site-media/scripts/wmd/showdown.js Tue Jan 13 19:37:21 2009 -0500
@@ -0,0 +1,421 @@
+var Attacklab=Attacklab||{};
+Attacklab.showdown=Attacklab.showdown||{};
+Attacklab.showdown.converter=function(){
+this.obfuscation;
+var _1;
+var _2;
+var _3;
+var _4=0;
+this.makeHtml=function(_5){
+_1=new Array();
+_2=new Array();
+_3=new Array();
+_5=_5.replace(/~/g,"~T");
+_5=_5.replace(/\$/g,"~D");
+_5=_5.replace(/\r\n/g,"\n");
+_5=_5.replace(/\r/g,"\n");
+_5="\n\n"+_5+"\n\n";
+_5=_6(_5);
+_5=_5.replace(/^[ \t]+$/mg,"");
+_5=_7(_5);
+_5=_8(_5);
+_5=_9(_5);
+_5=_a(_5);
+_5=_5.replace(/~D/g,"$$");
+_5=_5.replace(/~T/g,"~");
+return _5;
+};
+var _8=function(_b){
+var _b=_b.replace(/^[ ]{0,3}\[(.+)\]:[ \t]*\n?[ \t]*<?(\S+?)>?[ \t]*\n?[ \t]*(?:(\n*)["(](.+?)[")][ \t]*)?(?:\n+|\Z)/gm,function(_c,m1,m2,m3,m4){
+m1=m1.toLowerCase();
+_1[m1]=_11(m2);
+if(m3){
+return m3+m4;
+}else{
+if(m4){
+_2[m1]=m4.replace(/"/g,""");
+}
+}
+return "";
+});
+return _b;
+};
+var _7=function(_12){
+_12=_12.replace(/\n/g,"\n\n");
+var _13="p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del";
+var _14="p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math";
+_12=_12.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del)\b[^\r]*?\n<\/\2>[ \t]*(?=\n+))/gm,_15);
+_12=_12.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math)\b[^\r]*?.*<\/\2>[ \t]*(?=\n+)\n)/gm,_15);
+_12=_12.replace(/(\n[ ]{0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,_15);
+_12=_12.replace(/(\n\n[ ]{0,3}<!(--[^\r]*?--\s*)+>[ \t]*(?=\n{2,}))/g,_15);
+_12=_12.replace(/(?:\n\n)([ ]{0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,_15);
+_12=_12.replace(/\n\n/g,"\n");
+return _12;
+};
+var _15=function(_16,m1){
+var _18=m1;
+_18=_18.replace(/\n\n/g,"\n");
+_18=_18.replace(/^\n/,"");
+_18=_18.replace(/\n+$/g,"");
+_18="\n\n~K"+(_3.push(_18)-1)+"K\n\n";
+return _18;
+};
+var _9=function(_19){
+_19=_1a(_19);
+var key=_1c("<hr />");
+_19=_19.replace(/^[ ]{0,2}([ ]?\*[ ]?){3,}[ \t]*$/gm,key);
+_19=_19.replace(/^[ ]{0,2}([ ]?\-[ ]?){3,}[ \t]*$/gm,key);
+_19=_19.replace(/^[ ]{0,2}([ ]?\_[ ]?){3,}[ \t]*$/gm,key);
+_19=_1d(_19);
+_19=_1e(_19);
+_19=_1f(_19);
+_19=_7(_19);
+_19=_20(_19);
+return _19;
+};
+var _21=function(_22){
+_22=_23(_22);
+_22=_24(_22);
+_22=_25(_22);
+_22=_26(_22);
+_22=_27(_22);
+_22=_28(_22);
+_22=_11(_22);
+_22=_29(_22);
+_22=_22.replace(/ +\n/g," <br />\n");
+return _22;
+};
+var _24=function(_2a){
+var _2b=/(<[a-z\/!$]("[^"]*"|'[^']*'|[^'">])*>|<!(--.*?--\s*)+>)/gi;
+_2a=_2a.replace(_2b,function(_2c){
+var tag=_2c.replace(/(.)<\/?code>(?=.)/g,"$1`");
+tag=_2e(tag,"\\`*_");
+return tag;
+});
+return _2a;
+};
+var _27=function(_2f){
+_2f=_2f.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g,_30);
+_2f=_2f.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\]\([ \t]*()<?(.*?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g,_30);
+_2f=_2f.replace(/(\[([^\[\]]+)\])()()()()()/g,_30);
+return _2f;
+};
+var _30=function(_31,m1,m2,m3,m4,m5,m6,m7){
+if(m7==undefined){
+m7="";
+}
+var _39=m1;
+var _3a=m2;
+var _3b=m3.toLowerCase();
+var url=m4;
+var _3d=m7;
+if(url==""){
+if(_3b==""){
+_3b=_3a.toLowerCase().replace(/ ?\n/g," ");
+}
+url="#"+_3b;
+if(_1[_3b]!=undefined){
+url=_1[_3b];
+if(_2[_3b]!=undefined){
+_3d=_2[_3b];
+}
+}else{
+if(_39.search(/\(\s*\)$/m)>-1){
+url="";
+}else{
+return _39;
+}
+}
+}
+url=_2e(url,"*_");
+var _3e="<a href=\""+url+"\"";
+if(_3d!=""){
+_3d=_3d.replace(/"/g,""");
+_3d=_2e(_3d,"*_");
+_3e+=" title=\""+_3d+"\"";
+}
+_3e+=">"+_3a+"</a>";
+return _3e;
+};
+var _26=function(_3f){
+_3f=_3f.replace(/(!\[(.*?)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g,_40);
+_3f=_3f.replace(/(!\[(.*?)\]\s?\([ \t]*()<?(\S+?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g,_40);
+return _3f;
+};
+var _40=function(_41,m1,m2,m3,m4,m5,m6,m7){
+var _49=m1;
+var _4a=m2;
+var _4b=m3.toLowerCase();
+var url=m4;
+var _4d=m7;
+if(!_4d){
+_4d="";
+}
+if(url==""){
+if(_4b==""){
+_4b=_4a.toLowerCase().replace(/ ?\n/g," ");
+}
+url="#"+_4b;
+if(_1[_4b]!=undefined){
+url=_1[_4b];
+if(_2[_4b]!=undefined){
+_4d=_2[_4b];
+}
+}else{
+return _49;
+}
+}
+_4a=_4a.replace(/"/g,""");
+url=_2e(url,"*_");
+var _4e="<img src=\""+url+"\" alt=\""+_4a+"\"";
+_4d=_4d.replace(/"/g,""");
+_4d=_2e(_4d,"*_");
+_4e+=" title=\""+_4d+"\"";
+_4e+=" />";
+return _4e;
+};
+var _1a=function(_4f){
+_4f=_4f.replace(/^(.+)[ \t]*\n=+[ \t]*\n+/gm,function(_50,m1){
+return _1c("<h1>"+_21(m1)+"</h1>");
+});
+_4f=_4f.replace(/^(.+)[ \t]*\n-+[ \t]*\n+/gm,function(_52,m1){
+return _1c("<h2>"+_21(m1)+"</h2>");
+});
+_4f=_4f.replace(/^(\#{1,6})[ \t]*(.+?)[ \t]*\#*\n+/gm,function(_54,m1,m2){
+var _57=m1.length;
+return _1c("<h"+_57+">"+_21(m2)+"</h"+_57+">");
+});
+return _4f;
+};
+var _58;
+var _1d=function(_59){
+_59+="~0";
+var _5a=/^(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm;
+if(_4){
+_59=_59.replace(_5a,function(_5b,m1,m2){
+var _5e=m1;
+var _5f=(m2.search(/[*+-]/g)>-1)?"ul":"ol";
+_5e=_5e.replace(/\n{2,}/g,"\n\n\n");
+var _60=_58(_5e);
+_60=_60.replace(/\s+$/,"");
+_60="<"+_5f+">"+_60+"</"+_5f+">\n";
+return _60;
+});
+}else{
+_5a=/(\n\n|^\n?)(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/g;
+_59=_59.replace(_5a,function(_61,m1,m2,m3){
+var _65=m1;
+var _66=m2;
+var _67=(m3.search(/[*+-]/g)>-1)?"ul":"ol";
+var _66=_66.replace(/\n{2,}/g,"\n\n\n");
+var _68=_58(_66);
+_68=_65+"<"+_67+">\n"+_68+"</"+_67+">\n";
+return _68;
+});
+}
+_59=_59.replace(/~0/,"");
+return _59;
+};
+_58=function(_69){
+_4++;
+_69=_69.replace(/\n{2,}$/,"\n");
+_69+="~0";
+_69=_69.replace(/(\n)?(^[ \t]*)([*+-]|\d+[.])[ \t]+([^\r]+?(\n{1,2}))(?=\n*(~0|\2([*+-]|\d+[.])[ \t]+))/gm,function(_6a,m1,m2,m3,m4){
+var _6f=m4;
+var _70=m1;
+var _71=m2;
+if(_70||(_6f.search(/\n{2,}/)>-1)){
+_6f=_9(_72(_6f));
+}else{
+_6f=_1d(_72(_6f));
+_6f=_6f.replace(/\n$/,"");
+_6f=_21(_6f);
+}
+return "<li>"+_6f+"</li>\n";
+});
+_69=_69.replace(/~0/g,"");
+_4--;
+return _69;
+};
+var _1e=function(_73){
+_73+="~0";
+_73=_73.replace(/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=~0))/g,function(_74,m1,m2){
+var _77=m1;
+var _78=m2;
+_77=_79(_72(_77));
+_77=_6(_77);
+_77=_77.replace(/^\n+/g,"");
+_77=_77.replace(/\n+$/g,"");
+_77="<pre><code>"+_77+"\n</code></pre>";
+return _1c(_77)+_78;
+});
+_73=_73.replace(/~0/,"");
+return _73;
+};
+var _1c=function(_7a){
+_7a=_7a.replace(/(^\n+|\n+$)/g,"");
+return "\n\n~K"+(_3.push(_7a)-1)+"K\n\n";
+};
+var _23=function(_7b){
+_7b=_7b.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(_7c,m1,m2,m3,m4){
+var c=m3;
+c=c.replace(/^([ \t]*)/g,"");
+c=c.replace(/[ \t]*$/g,"");
+c=_79(c);
+return m1+"<code>"+c+"</code>";
+});
+return _7b;
+};
+var _79=function(_82){
+_82=_82.replace(/&/g,"&");
+_82=_82.replace(/</g,"<");
+_82=_82.replace(/>/g,">");
+_82=_2e(_82,"*_{}[]\\",false);
+return _82;
+};
+var _29=function(_83){
+_83=_83.replace(/(\*\*|__)(?=\S)([^\r]*?\S[*_]*)\1/g,"<strong>$2</strong>");
+_83=_83.replace(/(\*|_)(?=\S)([^\r]*?\S)\1/g,"<em>$2</em>");
+return _83;
+};
+this.hidetable;
+var _1f=function(_84){
+_84=_84.replace(/((^[ \t]*>[ \t]?.+\n(.+\n)*\n*)+)/gm,function(_85,m1){
+var bq=m1;
+bq=bq.replace(/^[ \t]*>[ \t]?/gm,"~0");
+bq=bq.replace(/~0/g,"");
+bq=bq.replace(/^[ \t]+$/gm,"");
+bq=_9(bq);
+bq=bq.replace(/(^|\n)/g,"$1 ");
+bq=bq.replace(/(\s*<pre>[^\r]+?<\/pre>)/gm,function(_88,m1){
+var pre=m1;
+pre=pre.replace(/^ /mg,"~0");
+pre=pre.replace(/~0/g,"");
+return pre;
+});
+return _1c("<blockquote>\n"+bq+"\n</blockquote>");
+});
+return _84;
+};
+var _20=function(_8b){
+_8b=_8b.replace(/^\n+/g,"");
+_8b=_8b.replace(/\n+$/g,"");
+var _8c=_8b.split(/\n{2,}/g);
+var _8d=new Array();
+var end=_8c.length;
+for(var i=0;i<end;i++){
+var str=_8c[i];
+if(str.search(/~K(\d+)K/g)>=0){
+_8d.push(str);
+}else{
+if(str.search(/\S/)>=0){
+str=_21(str);
+str=str.replace(/^([ \t]*)/g,"<p>");
+str+="</p>";
+_8d.push(str);
+}
+}
+}
+end=_8d.length;
+for(var i=0;i<end;i++){
+while(_8d[i].search(/~K(\d+)K/)>=0){
+var _91=_3[RegExp.$1];
+_91=_91.replace(/\$/g,"$$$$");
+_8d[i]=_8d[i].replace(/~K\d+K/,_91);
+}
+}
+return _8d.join("\n\n");
+};
+var _11=function(_92){
+_92=_92.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g,"&");
+_92=_92.replace(/<(?![a-z\/?\$!])/gi,"<");
+return _92;
+};
+var _25=function(_93){
+_93=_93.replace(/\\(\\)/g,_94);
+_93=_93.replace(/\\([`*_{}\[\]()>#+-.!])/g,_94);
+return _93;
+};
+var _28=function(_95){
+_95=_95.replace(/<((https?|ftp|dict):[^'">\s]+)>/gi,"<a href=\"$1\">$1</a>");
+_95=_95.replace(/<(?:mailto:)?([-.\w]+\@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,function(_96,m1){
+return _98(_a(m1));
+});
+return _95;
+};
+var _98=function(_99){
+function char2hex(ch){
+var _9b="0123456789ABCDEF";
+var dec=ch.charCodeAt(0);
+return (_9b.charAt(dec>>4)+_9b.charAt(dec&15));
+}
+var _9d=[function(ch){
+return "&#"+ch.charCodeAt(0)+";";
+},function(ch){
+return "&#x"+char2hex(ch)+";";
+},function(ch){
+return ch;
+}];
+_99="mailto:"+_99;
+_99=_99.replace(/./g,function(ch){
+if(ch=="@"){
+ch=_9d[Math.floor(Math.random()*2)](ch);
+}else{
+if(ch!=":"){
+var r=Math.random();
+ch=(r>0.9?_9d[2](ch):r>0.45?_9d[1](ch):_9d[0](ch));
+}
+}
+return ch;
+});
+_99="<a href=\""+_99+"\">"+_99+"</a>";
+_99=_99.replace(/">.+:/g,"\">");
+return _99;
+};
+var _a=function(_a3){
+_a3=_a3.replace(/~E(\d+)E/g,function(_a4,m1){
+var _a6=parseInt(m1);
+return String.fromCharCode(_a6);
+});
+return _a3;
+};
+var _72=function(_a7){
+_a7=_a7.replace(/^(\t|[ ]{1,4})/gm,"~0");
+_a7=_a7.replace(/~0/g,"");
+return _a7;
+};
+var _6=function(_a8){
+_a8=_a8.replace(/\t(?=\t)/g," ");
+_a8=_a8.replace(/\t/g,"~A~B");
+_a8=_a8.replace(/~B(.+?)~A/g,function(_a9,m1,m2){
+var _ac=m1;
+var _ad=4-_ac.length%4;
+for(var i=0;i<_ad;i++){
+_ac+=" ";
+}
+return _ac;
+});
+_a8=_a8.replace(/~A/g," ");
+_a8=_a8.replace(/~B/g,"");
+return _a8;
+};
+var _2e=function(_af,_b0,_b1){
+var _b2="(["+_b0.replace(/([\[\]\\])/g,"\\$1")+"])";
+if(_b1){
+_b2="\\\\"+_b2;
+}
+var _b3=new RegExp(_b2,"g");
+_af=_af.replace(_b3,_94);
+return _af;
+};
+var _94=function(_b4,m1){
+var _b6=m1.charCodeAt(0);
+return "~E"+_b6+"E";
+};
+this.obfuscation;
+};
+var Showdown=Attacklab.showdown;
+if(Attacklab.fileLoaded){
+Attacklab.fileLoaded("showdown.js");
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/site-media/scripts/wmd/wmd-base.js Tue Jan 13 19:37:21 2009 -0500
@@ -0,0 +1,1799 @@
+var Attacklab=Attacklab||{};
+Attacklab.wmdBase=function(){
+var _1=top;
+var _2=_1["Attacklab"];
+var _3=_1["document"];
+var _4=_1["RegExp"];
+var _5=_1["navigator"];
+_2.Util={};
+_2.Position={};
+_2.Command={};
+var _6=_2.Util;
+var _7=_2.Position;
+var _8=_2.Command;
+_2.Util.IE=(_5.userAgent.indexOf("MSIE")!=-1);
+_2.Util.oldIE=(_5.userAgent.indexOf("MSIE 6.")!=-1||_5.userAgent.indexOf("MSIE 5.")!=-1);
+_2.Util.newIE=!_2.Util.oldIE&&(_5.userAgent.indexOf("MSIE")!=-1);
+_6.makeElement=function(_9,_a){
+var _b=_3.createElement(_9);
+if(!_a){
+var _c=_b.style;
+_c.margin="0";
+_c.padding="0";
+_c.clear="none";
+_c.cssFloat="none";
+_c.textAlign="left";
+_c.position="relative";
+_c.lineHeight="1em";
+_c.border="none";
+_c.color="black";
+_c.backgroundRepeat="no-repeat";
+_c.backgroundImage="none";
+_c.minWidth=_c.minHeight="0";
+_c.maxWidth=_c.maxHeight="90000px";
+}
+return _b;
+};
+_6.getStyle=function(_d,_e){
+var _f=function(_10){
+return _10.replace(/-(\S)/g,function(_11,_12){
+return _12.toUpperCase();
+});
+};
+if(_d.currentStyle){
+_e=_f(_e);
+return _d.currentStyle[_e];
+}else{
+if(_1.getComputedStyle){
+return _3.defaultView.getComputedStyle(_d,null).getPropertyValue(_e);
+}
+}
+return "";
+};
+_6.getElementsByClass=function(_13,_14,_15){
+var _16=[];
+if(_14==null){
+_14=_3;
+}
+if(_15==null){
+_15="*";
+}
+var _17=_14.getElementsByTagName(_15);
+var _18=_17.length;
+var _19=new _4("(^|\\s)"+_13+"(\\s|$)");
+for(var i=0,j=0;i<_18;i++){
+if(_19.test(_17[i].className.toLowerCase())){
+_16[j]=_17[i];
+j++;
+}
+}
+return _16;
+};
+_6.addEvent=function(_1c,_1d,_1e){
+if(_1c.attachEvent){
+_1c.attachEvent("on"+_1d,_1e);
+}else{
+_1c.addEventListener(_1d,_1e,false);
+}
+};
+_6.removeEvent=function(_1f,_20,_21){
+if(_1f.detachEvent){
+_1f.detachEvent("on"+_20,_21);
+}else{
+_1f.removeEventListener(_20,_21,false);
+}
+};
+_6.regexToString=function(_22){
+var _23={};
+var _24=_22.toString();
+_23.expression=_24.replace(/\/([gim]*)$/,"");
+_23.flags=_4.$1;
+_23.expression=_23.expression.replace(/(^\/|\/$)/g,"");
+return _23;
+};
+_6.stringToRegex=function(_25){
+return new _4(_25.expression,_25.flags);
+};
+_6.elementOk=function(_26){
+if(!_26||!_26.parentNode){
+return false;
+}
+if(_6.getStyle(_26,"display")=="none"){
+return false;
+}
+return true;
+};
+_6.skin=function(_27,_28,_29,_2a){
+var _2b;
+var _2c=(_5.userAgent.indexOf("MSIE")!=-1);
+if(_2c){
+_6.fillers=[];
+}
+var _2d=_29/2;
+for(var _2e=0;_2e<4;_2e++){
+var _2f=_6.makeElement("div");
+_2b=_2f.style;
+_2b.overflow="hidden";
+_2b.padding="0";
+_2b.margin="0";
+_2b.lineHeight="0px";
+_2b.height=_2d+"px";
+_2b.width="50%";
+_2b.maxHeight=_2d+"px";
+_2b.position="absolute";
+if(_2e&1){
+_2b.top="0";
+}else{
+_2b.bottom=-_29+"px";
+}
+_2b.zIndex="-1000";
+if(_2e&2){
+_2b.left="0";
+}else{
+_2b.marginLeft="50%";
+}
+if(_2c){
+var _30=_6.makeElement("span");
+_2b=_30.style;
+_2b.height="100%";
+_2b.width=_2a;
+_2b.filter="progid:DXImageTransform.Microsoft."+"AlphaImageLoader(src='"+_2.basePath+"images/bg.png')";
+_2b.position="absolute";
+if(_2e&1){
+_2b.top="0";
+}else{
+_2b.bottom="0";
+}
+if(_2e&2){
+_2b.left="0";
+}else{
+_2b.right="0";
+}
+_2f.appendChild(_30);
+}else{
+_2b.backgroundImage="url("+_28+")";
+_2b.backgroundPosition=(_2e&2?"left":"right")+" "+(_2e&1?"top":"bottom");
+}
+_27.appendChild(_2f);
+}
+var _31=function(_32){
+var _33=_6.makeElement("div");
+if(_6.fillers){
+_6.fillers.push(_33);
+}
+_2b=_33.style;
+_2b.overflow="hidden";
+_2b.padding="0";
+_2b.margin="0";
+_2b.marginTop=_2d+"px";
+_2b.lineHeight="0px";
+_2b.height="100%";
+_2b.width="50%";
+_2b.position="absolute";
+_2b.zIndex="-1000";
+if(_2c){
+var _34=_6.makeElement("span");
+_2b=_34.style;
+_2b.height="100%";
+_2b.width=_2a;
+_2b.filter="progid:DXImageTransform.Microsoft."+"AlphaImageLoader(src='"+_2.basePath+"images/bg-fill.png',sizingMethod='scale')";
+_2b.position="absolute";
+_33.appendChild(_34);
+if(_32){
+_2b.left="0";
+}
+if(!_32){
+_2b.right="0";
+}
+}
+if(!_2c){
+_2b.backgroundImage="url("+_2.basePath+"images/bg-fill.png)";
+_2b.backgroundRepeat="repeat-y";
+if(_32){
+_2b.backgroundPosition="left top";
+}
+if(!_32){
+_2b.backgroundPosition="right top";
+}
+}
+if(!_32){
+_33.style.marginLeft="50%";
+}
+return _33;
+};
+_27.appendChild(_31(true));
+_27.appendChild(_31(false));
+};
+_6.setImage=function(_35,_36,_37,_38){
+_36=_2.basePath+_36;
+if(_5.userAgent.indexOf("MSIE")!=-1){
+var _39=_35.firstChild;
+var _3a=_39.style;
+_3a.filter="progid:DXImageTransform.Microsoft."+"AlphaImageLoader(src='"+_36+"')";
+}else{
+_35.src=_36;
+}
+return _35;
+};
+_6.createImage=function(_3b,_3c,_3d){
+_3b=_2.basePath+_3b;
+if(_5.userAgent.indexOf("MSIE")!=-1){
+var _3e=_6.makeElement("span");
+var _3f=_3e.style;
+_3f.display="inline-block";
+_3f.height="1px";
+_3f.width="1px";
+_3e.unselectable="on";
+var _40=_6.makeElement("span");
+_3f=_40.style;
+_3f.display="inline-block";
+_3f.height="1px";
+_3f.width="1px";
+_3f.filter="progid:DXImageTransform.Microsoft."+"AlphaImageLoader(src='"+_3b+"')";
+_40.unselectable="on";
+_3e.appendChild(_40);
+}else{
+var _3e=_6.makeElement("img");
+_3e.style.display="inline";
+_3e.src=_3b;
+}
+_3e.style.border="none";
+_3e.border="0";
+if(_3c&&_3d){
+_3e.style.width=_3c+"px";
+_3e.style.height=_3d+"px";
+}
+return _3e;
+};
+_6.prompt=function(_41,_42,_43){
+var _44;
+var _45,_46,_47;
+var _48=function(_49){
+var _4a=(_49.charCode||_49.keyCode);
+if(_4a==27){
+_4b(true);
+}
+};
+var _4b=function(_4c){
+_6.removeEvent(_3.body,"keydown",_48);
+var _4d=_47.value;
+if(_4c){
+_4d=null;
+}
+_45.parentNode.removeChild(_45);
+_46.parentNode.removeChild(_46);
+_43(_4d);
+return false;
+};
+if(_42==undefined){
+_42="";
+}
+var _4e=function(){
+_46=_6.makeElement("div");
+_44=_46.style;
+_3.body.appendChild(_46);
+_44.position="absolute";
+_44.top="0";
+_44.left="0";
+_44.backgroundColor="#000";
+_44.zIndex="1000";
+var _4f=/konqueror/.test(_5.userAgent.toLowerCase());
+if(_4f){
+_44.backgroundColor="transparent";
+}else{
+_44.opacity="0.5";
+_44.filter="alpha(opacity=50)";
+}
+var _50=_7.getPageSize();
+_44.width="100%";
+_44.height=_50[1]+"px";
+};
+var _51=function(){
+_45=_3.createElement("div");
+_45.style.border="3px solid #333";
+_45.style.backgroundColor="#ccc";
+_45.style.padding="10px;";
+_45.style.borderTop="3px solid white";
+_45.style.borderLeft="3px solid white";
+_45.style.position="fixed";
+_45.style.width="400px";
+_45.style.zIndex="1001";
+var _52=_6.makeElement("div");
+_44=_52.style;
+_44.fontSize="14px";
+_44.fontFamily="Helvetica, Arial, Verdana, sans-serif";
+_44.padding="5px";
+_52.innerHTML=_41;
+_45.appendChild(_52);
+var _53=_6.makeElement("form");
+_53.onsubmit=function(){
+return _4b();
+};
+_44=_53.style;
+_44.padding="0";
+_44.margin="0";
+_44.cssFloat="left";
+_44.width="100%";
+_44.textAlign="center";
+_44.position="relative";
+_45.appendChild(_53);
+_47=_3.createElement("input");
+_47.value=_42;
+_44=_47.style;
+_44.display="block";
+_44.width="80%";
+_44.marginLeft=_44.marginRight="auto";
+_44.backgroundColor="white";
+_44.color="black";
+_53.appendChild(_47);
+var _54=_3.createElement("input");
+_54.type="button";
+_54.onclick=function(){
+return _4b();
+};
+_54.value="OK";
+_44=_54.style;
+_44.margin="10px";
+_44.display="inline";
+_44.width="7em";
+var _55=_3.createElement("input");
+_55.type="button";
+_55.onclick=function(){
+return _4b(true);
+};
+_55.value="Cancel";
+_44=_55.style;
+_44.margin="10px";
+_44.display="inline";
+_44.width="7em";
+if(/mac/.test(_5.platform.toLowerCase())){
+_53.appendChild(_55);
+_53.appendChild(_54);
+}else{
+_53.appendChild(_54);
+_53.appendChild(_55);
+}
+_6.addEvent(_3.body,"keydown",_48);
+_45.style.top="50%";
+_45.style.left="50%";
+_45.style.display="block";
+if(_2.Util.oldIE){
+var _56=_7.getPageSize();
+_45.style.position="absolute";
+_45.style.top=_3.documentElement.scrollTop+200+"px";
+_45.style.left="50%";
+}
+_3.body.appendChild(_45);
+_45.style.marginTop=-(_7.getHeight(_45)/2)+"px";
+_45.style.marginLeft=-(_7.getWidth(_45)/2)+"px";
+};
+_4e();
+_1.setTimeout(function(){
+_51();
+var _57=_42.length;
+if(_47.selectionStart!=undefined){
+_47.selectionStart=0;
+_47.selectionEnd=_57;
+}else{
+if(_47.createTextRange){
+var _58=_47.createTextRange();
+_58.collapse(false);
+_58.moveStart("character",-_57);
+_58.moveEnd("character",_57);
+_58.select();
+}
+}
+_47.focus();
+},0);
+};
+_6.objectsEqual=function(_59,_5a){
+for(var _5b in _59){
+if(_59[_5b]!=_5a[_5b]){
+return false;
+}
+}
+for(_5b in _5a){
+if(_59[_5b]!=_5a[_5b]){
+return false;
+}
+}
+return true;
+};
+_6.cloneObject=function(_5c){
+var _5d={};
+for(var _5e in _5c){
+_5d[_5e]=_5c[_5e];
+}
+return _5d;
+};
+_6.escapeUnderscores=function(_5f){
+_5f=_5f.replace(/(\S)(_+)(\S)/g,function(_60,_61,_62,_63){
+_62=_62.replace(/_/g,"_");
+return _61+_62+_63;
+});
+return _5f;
+};
+_7.getPageSize=function(){
+var _64,_65;
+var _66,_67;
+if(_1.innerHeight&&_1.scrollMaxY){
+_64=_3.body.scrollWidth;
+_65=_1.innerHeight+_1.scrollMaxY;
+}else{
+if(_3.body.scrollHeight>_3.body.offsetHeight){
+_64=_3.body.scrollWidth;
+_65=_3.body.scrollHeight;
+}else{
+_64=_3.body.offsetWidth;
+_65=_3.body.offsetHeight;
+}
+}
+var _68,_69;
+if(self.innerHeight){
+_68=self.innerWidth;
+_69=self.innerHeight;
+}else{
+if(_3.documentElement&&_3.documentElement.clientHeight){
+_68=_3.documentElement.clientWidth;
+_69=_3.documentElement.clientHeight;
+}else{
+if(_3.body){
+_68=_3.body.clientWidth;
+_69=_3.body.clientHeight;
+}
+}
+}
+if(_65<_69){
+_67=_69;
+}else{
+_67=_65;
+}
+if(_64<_68){
+_66=_68;
+}else{
+_66=_64;
+}
+var _6a=[_66,_67,_68,_69];
+return _6a;
+};
+_7.getPixelVal=function(_6b){
+if(_6b&&/^(-?\d+(\.\d*)?)px$/.test(_6b)){
+return _4.$1;
+}
+return undefined;
+};
+_7.getTop=function(_6c,_6d){
+var _6e=_6c.offsetTop;
+if(!_6d){
+while(_6c=_6c.offsetParent){
+_6e+=_6c.offsetTop;
+}
+}
+return _6e;
+};
+_7.setTop=function(_6f,_70,_71){
+var _72=_7.getPixelVal(_6f.style.top);
+if(_72==undefined){
+_6f.style.top=_70+"px";
+_72=_70;
+}
+var _73=_7.getTop(_6f,_71)-_72;
+_6f.style.top=(_70-_73)+"px";
+};
+_7.getLeft=function(_74,_75){
+var _76=_74.offsetLeft;
+if(!_75){
+while(_74=_74.offsetParent){
+_76+=_74.offsetLeft;
+}
+}
+return _76;
+};
+_7.setLeft=function(_77,_78,_79){
+var _7a=_7.getPixelVal(_77.style.left);
+if(_7a==undefined){
+_77.style.left=_78+"px";
+_7a=_78;
+}
+var _7b=_7.getLeft(_77,_79)-_7a;
+_77.style.left=(_78-_7b)+"px";
+};
+_7.getHeight=function(_7c){
+var _7d=_7c.offsetHeight;
+if(!_7d){
+_7d=_7c.scrollHeight;
+}
+return _7d;
+};
+_7.setHeight=function(_7e,_7f){
+var _80=_7.getPixelVal(_7e.style.height);
+if(_80==undefined){
+_7e.style.height=_7f+"px";
+_80=_7f;
+}
+var _81=_7.getHeight(_7e)-_80;
+if(_81>_7f){
+_81=_7f;
+}
+_7e.style.height=(_7f-_81)+"px";
+};
+_7.getWidth=function(_82){
+var _83=_82.offsetWidth;
+if(!_83){
+_83=_82.scrollWidth;
+}
+return _83;
+};
+_7.setWidth=function(_84,_85){
+var _86=_7.getPixelVal(_84.style.width);
+if(_86==undefined){
+_84.style.width=_85+"px";
+_86=_85;
+}
+var _87=_7.getWidth(_84)-_86;
+if(_87>_85){
+_87=_85;
+}
+_84.style.width=(_85-_87)+"px";
+};
+_7.getWindowHeight=function(){
+if(_1.innerHeight){
+return _1.innerHeight;
+}else{
+if(_3.documentElement&&_3.documentElement.clientHeight){
+return _3.documentElement.clientHeight;
+}else{
+if(_3.body){
+return _3.body.clientHeight;
+}
+}
+}
+};
+_2.inputPoller=function(_88,_89,_8a){
+var _8b=this;
+var _8c;
+var _8d;
+var _8e,_8f;
+this.tick=function(){
+if(!_6.elementOk(_88)){
+return;
+}
+if(_88.selectionStart||_88.selectionStart==0){
+var _90=_88.selectionStart;
+var _91=_88.selectionEnd;
+if(_90!=_8c||_91!=_8d){
+_8c=_90;
+_8d=_91;
+if(_8e!=_88.value){
+_8e=_88.value;
+return true;
+}
+}
+}
+return false;
+};
+var _92=function(){
+if(_6.getStyle(_88,"display")=="none"){
+return;
+}
+if(_8b.tick()){
+_89();
+}
+};
+var _93=function(){
+if(_8a==undefined){
+_8a=500;
+}
+_8f=_1.setInterval(_92,_8a);
+};
+this.destroy=function(){
+_1.clearInterval(_8f);
+};
+_93();
+};
+_2.undoManager=function(_94,_95){
+var _96=this;
+var _97=[];
+var _98=0;
+var _99="none";
+var _9a;
+var _9b;
+var _9c;
+var _9d;
+var _9e=function(_9f,_a0){
+if(_99!=_9f){
+_99=_9f;
+if(!_a0){
+_a1();
+}
+}
+if(!_2.Util.IE||_99!="moving"){
+_9c=_1.setTimeout(_a2,1);
+}else{
+_9d=null;
+}
+};
+var _a2=function(){
+_9d=new _2.textareaState(_94);
+_9b.tick();
+_9c=undefined;
+};
+this.setCommandMode=function(){
+_99="command";
+_a1();
+_9c=_1.setTimeout(_a2,0);
+};
+this.canUndo=function(){
+return _98>1;
+};
+this.canRedo=function(){
+if(_97[_98+1]){
+return true;
+}
+return false;
+};
+this.undo=function(){
+if(_96.canUndo()){
+if(_9a){
+_9a.restore();
+_9a=null;
+}else{
+_97[_98]=new _2.textareaState(_94);
+_97[--_98].restore();
+if(_95){
+_95();
+}
+}
+}
+_99="none";
+_94.focus();
+_a2();
+};
+this.redo=function(){
+if(_96.canRedo()){
+_97[++_98].restore();
+if(_95){
+_95();
+}
+}
+_99="none";
+_94.focus();
+_a2();
+};
+var _a1=function(){
+var _a3=_9d||new _2.textareaState(_94);
+if(!_a3){
+return false;
+}
+if(_99=="moving"){
+if(!_9a){
+_9a=_a3;
+}
+return;
+}
+if(_9a){
+if(_97[_98-1].text!=_9a.text){
+_97[_98++]=_9a;
+}
+_9a=null;
+}
+_97[_98++]=_a3;
+_97[_98+1]=null;
+if(_95){
+_95();
+}
+};
+var _a4=function(_a5){
+var _a6=false;
+if(_a5.ctrlKey||_a5.metaKey){
+var _a7=(_a5.charCode||_a5.keyCode)|96;
+var _a8=String.fromCharCode(_a7);
+switch(_a8){
+case "y":
+_96.redo();
+_a6=true;
+break;
+case "z":
+if(!_a5.shiftKey){
+_96.undo();
+}else{
+_96.redo();
+}
+_a6=true;
+break;
+}
+}
+if(_a6){
+if(_a5.preventDefault){
+_a5.preventDefault();
+}
+if(_1.event){
+_1.event.returnValue=false;
+}
+return;
+}
+};
+var _a9=function(_aa){
+if(!_aa.ctrlKey&&!_aa.metaKey){
+var _ab=_aa.keyCode;
+if((_ab>=33&&_ab<=40)||(_ab>=63232&&_ab<=63235)){
+_9e("moving");
+}else{
+if(_ab==8||_ab==46||_ab==127){
+_9e("deleting");
+}else{
+if(_ab==13){
+_9e("newlines");
+}else{
+if(_ab==27){
+_9e("escape");
+}else{
+if((_ab<16||_ab>20)&&_ab!=91){
+_9e("typing");
+}
+}
+}
+}
+}
+}
+};
+var _ac=function(){
+_6.addEvent(_94,"keypress",function(_ad){
+if((_ad.ctrlKey||_ad.metaKey)&&(_ad.keyCode==89||_ad.keyCode==90)){
+_ad.preventDefault();
+}
+});
+var _ae=function(){
+if(_2.Util.IE||(_9d&&_9d.text!=_94.value)){
+if(_9c==undefined){
+_99="paste";
+_a1();
+_a2();
+}
+}
+};
+_9b=new _2.inputPoller(_94,_ae,100);
+_6.addEvent(_94,"keydown",_a4);
+_6.addEvent(_94,"keydown",_a9);
+_6.addEvent(_94,"mousedown",function(){
+_9e("moving");
+});
+_94.onpaste=_ae;
+_94.ondrop=_ae;
+};
+var _af=function(){
+_ac();
+_a2();
+_a1();
+};
+this.destroy=function(){
+if(_9b){
+_9b.destroy();
+}
+};
+_af();
+};
+_2.editor=function(_b0,_b1){
+if(!_b1){
+_b1=function(){
+};
+}
+var _b2=28;
+var _b3=4076;
+var _b4=0;
+var _b5,_b6;
+var _b7=this;
+var _b8,_b9;
+var _ba,_bb,_bc;
+var _bd,_be,_bf;
+var _c0=[];
+var _c1=function(_c2){
+if(_bd){
+_bd.setCommandMode();
+}
+var _c3=new _2.textareaState(_b0);
+if(!_c3){
+return;
+}
+var _c4=_c3.getChunks();
+var _c5=function(){
+_b0.focus();
+if(_c4){
+_c3.setChunks(_c4);
+}
+_c3.restore();
+_b1();
+};
+var _c6=_c2(_c4,_c5);
+if(!_c6){
+_c5();
+}
+};
+var _c7=function(_c8){
+_b0.focus();
+if(_c8.textOp){
+_c1(_c8.textOp);
+}
+if(_c8.execute){
+_c8.execute(_b7);
+}
+};
+var _c9=function(_ca,_cb){
+var _cc=_ca.style;
+if(_cb){
+_cc.opacity="1.0";
+_cc.KHTMLOpacity="1.0";
+if(_2.Util.newIE){
+_cc.filter="";
+}
+if(_2.Util.oldIE){
+_cc.filter="chroma(color=fuchsia)";
+}
+_cc.cursor="pointer";
+_ca.onmouseover=function(){
+_cc.backgroundColor="lightblue";
+_cc.border="1px solid blue";
+};
+_ca.onmouseout=function(){
+_cc.backgroundColor="";
+_cc.border="1px solid transparent";
+if(_2.Util.oldIE){
+_cc.borderColor="fuchsia";
+_cc.filter="chroma(color=fuchsia)"+_cc.filter;
+}
+};
+}else{
+_cc.opacity="0.4";
+_cc.KHTMLOpacity="0.4";
+if(_2.Util.oldIE){
+_cc.filter="chroma(color=fuchsia) alpha(opacity=40)";
+}
+if(_2.Util.newIE){
+_cc.filter="alpha(opacity=40)";
+}
+_cc.cursor="";
+_cc.backgroundColor="";
+if(_ca.onmouseout){
+_ca.onmouseout();
+}
+_ca.onmouseover=_ca.onmouseout=null;
+}
+};
+var _cd=function(_ce){
+_ce&&_c0.push(_ce);
+};
+var _cf=function(){
+_c0.push("|");
+};
+var _d0=function(){
+var _d1=_6.createImage("images/separator.png",20,20);
+_d1.style.padding="4px";
+_d1.style.paddingTop="0px";
+_b9.appendChild(_d1);
+};
+var _d2=function(_d3){
+if(_d3.image){
+var _d4=_6.createImage(_d3.image,16,16);
+_d4.border=0;
+if(_d3.description){
+var _d5=_d3.description;
+if(_d3.key){
+var _d6=" Ctrl+";
+_d5+=_d6+_d3.key.toUpperCase();
+}
+_d4.title=_d5;
+}
+_c9(_d4,true);
+var _d7=_d4.style;
+_d7.margin="0px";
+_d7.padding="1px";
+_d7.marginTop="7px";
+_d7.marginBottom="5px";
+_d4.onmouseout();
+var _d8=_d4;
+_d8.onclick=function(){
+if(_d8.onmouseout){
+_d8.onmouseout();
+}
+_c7(_d3);
+return false;
+};
+_b9.appendChild(_d8);
+return _d8;
+}
+return;
+};
+var _d9=function(){
+for(var _da in _c0){
+if(_c0[_da]=="|"){
+_d0();
+}else{
+_d2(_c0[_da]);
+}
+}
+};
+var _db=function(){
+if(_bd){
+_c9(_be,_bd.canUndo());
+_c9(_bf,_bd.canRedo());
+}
+};
+var _dc=function(){
+if(_b0.offsetParent){
+_ba=_6.makeElement("div");
+var _dd=_ba.style;
+_dd.visibility="hidden";
+_dd.top=_dd.left=_dd.width="0px";
+_dd.display="inline";
+_dd.cssFloat="left";
+_dd.overflow="visible";
+_dd.opacity="0.999";
+_b8.style.position="absolute";
+_ba.appendChild(_b8);
+_b0.style.marginTop="";
+var _de=_7.getTop(_b0);
+_b0.style.marginTop="0";
+var _df=_7.getTop(_b0);
+_b4=_de-_df;
+_e0();
+_b0.parentNode.insertBefore(_ba,_b0);
+_e1();
+_6.skin(_b8,_2.basePath+"images/bg.png",_b2,_b3);
+_dd.visibility="visible";
+return true;
+}
+return false;
+};
+var _e2=function(){
+var _e3=_2.wmd_env.buttons.split(/\s+/);
+for(var _e4 in _e3){
+switch(_e3[_e4]){
+case "|":
+_cf();
+break;
+case "bold":
+_cd(_8.bold);
+break;
+case "italic":
+_cd(_8.italic);
+break;
+case "link":
+_cd(_8.link);
+break;
+}
+if(_2.full){
+switch(_e3[_e4]){
+case "blockquote":
+_cd(_8.blockquote);
+break;
+case "code":
+_cd(_8.code);
+break;
+case "image":
+_cd(_8.img);
+break;
+case "ol":
+_cd(_8.ol);
+break;
+case "ul":
+_cd(_8.ul);
+break;
+case "heading":
+_cd(_8.h1);
+break;
+case "hr":
+_cd(_8.hr);
+break;
+}
+}
+}
+return;
+};
+var _e5=function(){
+if(/\?noundo/.test(_3.location.href)){
+_2.nativeUndo=true;
+}
+if(!_2.nativeUndo){
+_bd=new _2.undoManager(_b0,function(){
+_b1();
+_db();
+});
+}
+var _e6=_b0.parentNode;
+_b8=_6.makeElement("div");
+_b8.style.display="block";
+_b8.style.zIndex=100;
+if(!_2.full){
+_b8.title+="\n(Free Version)";
+}
+_b8.unselectable="on";
+_b8.onclick=function(){
+_b0.focus();
+};
+_b9=_6.makeElement("span");
+var _e7=_b9.style;
+_e7.height="auto";
+_e7.paddingBottom="2px";
+_e7.lineHeight="0";
+_e7.paddingLeft="15px";
+_e7.paddingRight="65px";
+_e7.display="block";
+_e7.position="absolute";
+_b9.unselectable="on";
+_b8.appendChild(_b9);
+_cd(_8.autoindent);
+var _e8=_6.createImage("images/bg.png");
+var _e9=_6.createImage("images/bg-fill.png");
+_e2();
+_d9();
+if(_bd){
+_d0();
+_be=_d2(_8.undo);
+_bf=_d2(_8.redo);
+var _ea=_5.platform.toLowerCase();
+if(/win/.test(_ea)){
+_be.title+=" - Ctrl+Z";
+_bf.title+=" - Ctrl+Y";
+}else{
+if(/mac/.test(_ea)){
+_be.title+=" - Ctrl+Z";
+_bf.title+=" - Ctrl+Shift+Z";
+}else{
+_be.title+=" - Ctrl+Z";
+_bf.title+=" - Ctrl+Shift+Z";
+}
+}
+}
+var _eb="keydown";
+if(_5.userAgent.indexOf("Opera")!=-1){
+_eb="keypress";
+}
+_6.addEvent(_b0,_eb,function(_ec){
+var _ed=false;
+if(_ec.ctrlKey||_ec.metaKey){
+var _ee=(_ec.charCode||_ec.keyCode);
+var _ef=String.fromCharCode(_ee).toLowerCase();
+for(var _f0 in _c0){
+var _f1=_c0[_f0];
+if(_f1.key&&_ef==_f1.key||_f1.keyCode&&_ec.keyCode==_f1.keyCode){
+_c7(_f1);
+_ed=true;
+}
+}
+}
+if(_ed){
+if(_ec.preventDefault){
+_ec.preventDefault();
+}
+if(_1.event){
+_1.event.returnValue=false;
+}
+}
+});
+_6.addEvent(_b0,"keyup",function(_f2){
+if(_f2.shiftKey&&!_f2.ctrlKey&&!_f2.metaKey){
+var _f3=(_f2.charCode||_f2.keyCode);
+switch(_f3){
+case 13:
+_c7(_8.autoindent);
+break;
+}
+}
+});
+if(!_dc()){
+_bc=_1.setInterval(function(){
+if(_dc()){
+_1.clearInterval(_bc);
+}
+},100);
+}
+_6.addEvent(_1,"resize",_e1);
+_bb=_1.setInterval(_e1,100);
+if(_b0.form){
+var _f4=_b0.form.onsubmit;
+_b0.form.onsubmit=function(){
+_f5();
+if(_f4){
+return _f4.apply(this,arguments);
+}
+};
+}
+_db();
+};
+var _f5=function(){
+if(_2.showdown){
+var _f6=new _2.showdown.converter();
+}
+var _f7=_b0.value;
+var _f8=function(){
+_b0.value=_f7;
+};
+_f7=_6.escapeUnderscores(_f7);
+if(!/markdown/.test(_2.wmd_env.output.toLowerCase())){
+if(_f6){
+_b0.value=_f6.makeHtml(_f7);
+_1.setTimeout(_f8,0);
+}
+}
+return true;
+};
+var _e0=function(){
+var _f9=_6.makeElement("div");
+var _fa=_f9.style;
+_fa.paddingRight="15px";
+_fa.height="100%";
+_fa.display="block";
+_fa.position="absolute";
+_fa.right="0";
+_f9.unselectable="on";
+var _fb=_6.makeElement("a");
+_fa=_fb.style;
+_fa.position="absolute";
+_fa.right="10px";
+_fa.top="5px";
+_fa.display="inline";
+_fa.width="50px";
+_fa.height="25px";
+_fb.href="http://www.wmd-editor.com/";
+_fb.target="_blank";
+_fb.title="WMD: The Wysiwym Markdown Editor";
+var _fc=_6.createImage("images/wmd.png");
+var _fd=_6.createImage("images/wmd-on.png");
+_fb.appendChild(_fc);
+_fb.onmouseover=function(){
+_6.setImage(_fc,"images/wmd-on.png");
+_fb.style.cursor="pointer";
+};
+_fb.onmouseout=function(){
+_6.setImage(_fc,"images/wmd.png");
+};
+_b8.appendChild(_fb);
+};
+var _e1=function(){
+if(!_6.elementOk(_b0)){
+_b8.style.display="none";
+return;
+}
+if(_b8.style.display=="none"){
+_b8.style.display="block";
+}
+var _fe=_7.getWidth(_b0);
+var _ff=_7.getHeight(_b0);
+var _100=_7.getLeft(_b0);
+if(_b8.style.width==_fe+"px"&&_b5==_ff&&_b6==_100){
+if(_7.getTop(_b8)<_7.getTop(_b0)){
+return;
+}
+}
+_b5=_ff;
+_b6=_100;
+var _101=100;
+_b8.style.width=Math.max(_fe,_101)+"px";
+var root=_b8.offsetParent;
+var _103=_7.getHeight(_b9);
+var _104=_103-_b2+"px";
+_b8.style.height=_104;
+if(_6.fillers){
+_6.fillers[0].style.height=_6.fillers[1].style.height=_104;
+}
+var _105=3;
+_b0.style.marginTop=_103+_105+_b4+"px";
+var _106=_7.getTop(_b0);
+var _100=_7.getLeft(_b0);
+_7.setTop(root,_106-_103-_105);
+_7.setLeft(root,_100);
+_b8.style.opacity=_b8.style.opacity||0.999;
+return;
+};
+this.undo=function(){
+if(_bd){
+_bd.undo();
+}
+};
+this.redo=function(){
+if(_bd){
+_bd.redo();
+}
+};
+var init=function(){
+_e5();
+};
+this.destroy=function(){
+if(_bd){
+_bd.destroy();
+}
+if(_ba.parentNode){
+_ba.parentNode.removeChild(_ba);
+}
+if(_b0){
+_b0.style.marginTop="";
+}
+_1.clearInterval(_bb);
+_1.clearInterval(_bc);
+};
+init();
+};
+_2.textareaState=function(_108){
+var _109=this;
+var _10a=function(_10b){
+if(_6.getStyle(_108,"display")=="none"){
+return;
+}
+var _10c=_5.userAgent.indexOf("Opera")!=-1;
+if(_10b.selectionStart!=undefined&&!_10c){
+_10b.focus();
+_10b.selectionStart=_109.start;
+_10b.selectionEnd=_109.end;
+_10b.scrollTop=_109.scrollTop;
+}else{
+if(_3.selection){
+if(_3.activeElement&&_3.activeElement!=_108){
+return;
+}
+_10b.focus();
+var _10d=_10b.createTextRange();
+_10d.moveStart("character",-_10b.value.length);
+_10d.moveEnd("character",-_10b.value.length);
+_10d.moveEnd("character",_109.end);
+_10d.moveStart("character",_109.start);
+_10d.select();
+}
+}
+};
+this.init=function(_10e){
+if(_10e){
+_108=_10e;
+}
+if(_6.getStyle(_108,"display")=="none"){
+return;
+}
+_10f(_108);
+_109.scrollTop=_108.scrollTop;
+if(!_109.text&&_108.selectionStart||_108.selectionStart=="0"){
+_109.text=_108.value;
+}
+};
+var _110=function(_111){
+_111=_111.replace(/\r\n/g,"\n");
+_111=_111.replace(/\r/g,"\n");
+return _111;
+};
+var _10f=function(){
+if(_108.selectionStart||_108.selectionStart=="0"){
+_109.start=_108.selectionStart;
+_109.end=_108.selectionEnd;
+}else{
+if(_3.selection){
+_109.text=_110(_108.value);
+var _112=_3.selection.createRange();
+var _113=_110(_112.text);
+var _114="\x07";
+var _115=_114+_113+_114;
+_112.text=_115;
+var _116=_110(_108.value);
+_112.moveStart("character",-_115.length);
+_112.text=_113;
+_109.start=_116.indexOf(_114);
+_109.end=_116.lastIndexOf(_114)-_114.length;
+var _117=_109.text.length-_110(_108.value).length;
+if(_117){
+_112.moveStart("character",-_113.length);
+while(_117--){
+_113+="\n";
+_109.end+=1;
+}
+_112.text=_113;
+}
+_10a(_108);
+}
+}
+return _109;
+};
+this.restore=function(_118){
+if(!_118){
+_118=_108;
+}
+if(_109.text!=undefined&&_109.text!=_118.value){
+_118.value=_109.text;
+}
+_10a(_118,_109);
+_118.scrollTop=_109.scrollTop;
+};
+this.getChunks=function(){
+var _119=new _2.Chunks();
+_119.before=_110(_109.text.substring(0,_109.start));
+_119.startTag="";
+_119.selection=_110(_109.text.substring(_109.start,_109.end));
+_119.endTag="";
+_119.after=_110(_109.text.substring(_109.end));
+_119.scrollTop=_109.scrollTop;
+return _119;
+};
+this.setChunks=function(_11a){
+_11a.before=_11a.before+_11a.startTag;
+_11a.after=_11a.endTag+_11a.after;
+var _11b=_5.userAgent.indexOf("Opera")!=-1;
+if(_11b){
+_11a.before=_11a.before.replace(/\n/g,"\r\n");
+_11a.selection=_11a.selection.replace(/\n/g,"\r\n");
+_11a.after=_11a.after.replace(/\n/g,"\r\n");
+}
+_109.start=_11a.before.length;
+_109.end=_11a.before.length+_11a.selection.length;
+_109.text=_11a.before+_11a.selection+_11a.after;
+_109.scrollTop=_11a.scrollTop;
+};
+this.init();
+};
+_2.Chunks=function(){
+};
+_2.Chunks.prototype.findTags=function(_11c,_11d){
+var _11e,_11f;
+var _120=this;
+if(_11c){
+_11f=_6.regexToString(_11c);
+_11e=new _4(_11f.expression+"$",_11f.flags);
+this.before=this.before.replace(_11e,function(_121){
+_120.startTag=_120.startTag+_121;
+return "";
+});
+_11e=new _4("^"+_11f.expression,_11f.flags);
+this.selection=this.selection.replace(_11e,function(_122){
+_120.startTag=_120.startTag+_122;
+return "";
+});
+}
+if(_11d){
+_11f=_6.regexToString(_11d);
+_11e=new _4(_11f.expression+"$",_11f.flags);
+this.selection=this.selection.replace(_11e,function(_123){
+_120.endTag=_123+_120.endTag;
+return "";
+});
+_11e=new _4("^"+_11f.expression,_11f.flags);
+this.after=this.after.replace(_11e,function(_124){
+_120.endTag=_124+_120.endTag;
+return "";
+});
+}
+};
+_2.Chunks.prototype.trimWhitespace=function(_125){
+this.selection=this.selection.replace(/^(\s*)/,"");
+if(!_125){
+this.before+=_4.$1;
+}
+this.selection=this.selection.replace(/(\s*)$/,"");
+if(!_125){
+this.after=_4.$1+this.after;
+}
+};
+_2.Chunks.prototype.skipLines=function(_126,_127,_128){
+if(_126==undefined){
+_126=1;
+}
+if(_127==undefined){
+_127=1;
+}
+_126++;
+_127++;
+var _129,_12a;
+this.selection=this.selection.replace(/(^\n*)/,"");
+this.startTag=this.startTag+_4.$1;
+this.selection=this.selection.replace(/(\n*$)/,"");
+this.endTag=this.endTag+_4.$1;
+this.startTag=this.startTag.replace(/(^\n*)/,"");
+this.before=this.before+_4.$1;
+this.endTag=this.endTag.replace(/(\n*$)/,"");
+this.after=this.after+_4.$1;
+if(this.before){
+_129=_12a="";
+while(_126--){
+_129+="\\n?";
+_12a+="\n";
+}
+if(_128){
+_129="\\n*";
+}
+this.before=this.before.replace(new _4(_129+"$",""),_12a);
+}
+if(this.after){
+_129=_12a="";
+while(_127--){
+_129+="\\n?";
+_12a+="\n";
+}
+if(_128){
+_129="\\n*";
+}
+this.after=this.after.replace(new _4(_129,""),_12a);
+}
+};
+_8.prefixes="(?:\\s{4,}|\\s*>|\\s*-\\s+|\\s*\\d+\\.|=|\\+|-|_|\\*|#|\\s*\\[[^\n]]+\\]:)";
+_8.unwrap=function(_12b){
+var _12c=new _4("([^\\n])\\n(?!(\\n|"+_8.prefixes+"))","g");
+_12b.selection=_12b.selection.replace(_12c,"$1 $2");
+};
+_8.wrap=function(_12d,len){
+_8.unwrap(_12d);
+var _12f=new _4("(.{1,"+len+"})( +|$\\n?)","gm");
+_12d.selection=_12d.selection.replace(_12f,function(_130,line){
+if(new _4("^"+_8.prefixes,"").test(_130)){
+return _130;
+}
+return line+"\n";
+});
+_12d.selection=_12d.selection.replace(/\s+$/,"");
+};
+_8.doBold=function(_132){
+return _8.doBorI(_132,2,"strong text");
+};
+_8.doItalic=function(_133){
+return _8.doBorI(_133,1,"emphasized text");
+};
+_8.doBorI=function(_134,_135,_136){
+_134.trimWhitespace();
+_134.selection=_134.selection.replace(/\n{2,}/g,"\n");
+_134.before.search(/(\**$)/);
+var _137=_4.$1;
+_134.after.search(/(^\**)/);
+var _138=_4.$1;
+var _139=Math.min(_137.length,_138.length);
+if((_139>=_135)&&(_139!=2||_135!=1)){
+_134.before=_134.before.replace(_4("[*]{"+_135+"}$",""),"");
+_134.after=_134.after.replace(_4("^[*]{"+_135+"}",""),"");
+return;
+}
+if(!_134.selection&&_138){
+_134.after=_134.after.replace(/^([*_]*)/,"");
+_134.before=_134.before.replace(/(\s?)$/,"");
+var _13a=_4.$1;
+_134.before=_134.before+_138+_13a;
+return;
+}
+if(!_134.selection&&!_138){
+_134.selection=_136;
+}
+var _13b=_135<=1?"*":"**";
+_134.before=_134.before+_13b;
+_134.after=_13b+_134.after;
+};
+_8.stripLinkDefs=function(_13c,_13d){
+_13c=_13c.replace(/^[ ]{0,3}\[(\d+)\]:[ \t]*\n?[ \t]*<?(\S+?)>?[ \t]*\n?[ \t]*(?:(\n*)["(](.+?)[")][ \t]*)?(?:\n+|$)/gm,function(_13e,id,_140,_141,_142){
+_13d[id]=_13e.replace(/\s*$/,"");
+if(_141){
+_13d[id]=_13e.replace(/["(](.+?)[")]$/,"");
+return _141+_142;
+}
+return "";
+});
+return _13c;
+};
+_8.addLinkDef=function(_143,_144){
+var _145=0;
+var _146={};
+_143.before=_8.stripLinkDefs(_143.before,_146);
+_143.selection=_8.stripLinkDefs(_143.selection,_146);
+_143.after=_8.stripLinkDefs(_143.after,_146);
+var _147="";
+var _148=/(\[(?:\[[^\]]*\]|[^\[\]])*\][ ]?(?:\n[ ]*)?\[)(\d+)(\])/g;
+var _149=function(def){
+_145++;
+def=def.replace(/^[ ]{0,3}\[(\d+)\]:/," ["+_145+"]:");
+_147+="\n"+def;
+};
+var _14b=function(_14c,_14d,id,end){
+if(_146[id]){
+_149(_146[id]);
+return _14d+_145+end;
+}
+return _14c;
+};
+_143.before=_143.before.replace(_148,_14b);
+if(_144){
+_149(_144);
+}else{
+_143.selection=_143.selection.replace(_148,_14b);
+}
+var _150=_145;
+_143.after=_143.after.replace(_148,_14b);
+if(_143.after){
+_143.after=_143.after.replace(/\n*$/,"");
+}
+if(!_143.after){
+_143.selection=_143.selection.replace(/\n*$/,"");
+}
+_143.after+="\n\n"+_147;
+return _150;
+};
+_8.doLinkOrImage=function(_151,_152,_153){
+_151.trimWhitespace();
+_151.findTags(/\s*!?\[/,/\][ ]?(?:\n[ ]*)?(\[.*?\])?/);
+if(_151.endTag.length>1){
+_151.startTag=_151.startTag.replace(/!?\[/,"");
+_151.endTag="";
+_8.addLinkDef(_151,null);
+}else{
+if(/\n\n/.test(_151.selection)){
+_8.addLinkDef(_151,null);
+return;
+}
+var _154;
+var _155=function(_156){
+if(_156!=null){
+_151.startTag=_151.endTag="";
+var _157=" [999]: "+_156;
+var num=_8.addLinkDef(_151,_157);
+_151.startTag=_152?"![":"[";
+_151.endTag="]["+num+"]";
+if(!_151.selection){
+if(_152){
+_151.selection="alt text";
+}else{
+_151.selection="link text";
+}
+}
+}
+_153();
+};
+if(_152){
+_154=_6.prompt("<p style='margin-top: 0px'><b>Enter the image URL.</b></p><p>You can also add a title, which will be displayed as a tool tip.</p><p>Example:<br />http://wmd-editor.com/images/cloud1.jpg \"Optional title\"</p>","http://",_155);
+}else{
+_154=_6.prompt("<p style='margin-top: 0px'><b>Enter the web address.</b></p><p>You can also add a title, which will be displayed as a tool tip.</p><p>Example:<br />http://wmd-editor.com/ \"Optional title\"</p>","http://",_155);
+}
+return true;
+}
+};
+_8.bold={};
+_8.bold.description="Strong <strong>";
+_8.bold.image="images/bold.png";
+_8.bold.key="b";
+_8.bold.textOp=_8.doBold;
+_8.italic={};
+_8.italic.description="Emphasis <em>";
+_8.italic.image="images/italic.png";
+_8.italic.key="i";
+_8.italic.textOp=_8.doItalic;
+_8.link={};
+_8.link.description="Hyperlink <a>";
+_8.link.image="images/link.png";
+_8.link.key="l";
+_8.link.textOp=function(_159,_15a){
+return _8.doLinkOrImage(_159,false,_15a);
+};
+_8.undo={};
+_8.undo.description="Undo";
+_8.undo.image="images/undo.png";
+_8.undo.execute=function(_15b){
+_15b.undo();
+};
+_8.redo={};
+_8.redo.description="Redo";
+_8.redo.image="images/redo.png";
+_8.redo.execute=function(_15c){
+_15c.redo();
+};
+_6.findPanes=function(_15d){
+_15d.preview=_15d.preview||_6.getElementsByClass("wmd-preview",null,"div")[0];
+_15d.output=_15d.output||_6.getElementsByClass("wmd-output",null,"textarea")[0];
+_15d.output=_15d.output||_6.getElementsByClass("wmd-output",null,"div")[0];
+if(!_15d.input){
+var _15e=-1;
+var _15f=_3.getElementsByTagName("textarea");
+for(var _160=0;_160<_15f.length;_160++){
+var _161=_15f[_160];
+if(_161!=_15d.output&&!/wmd-ignore/.test(_161.className.toLowerCase())){
+_15d.input=_161;
+break;
+}
+}
+}
+return _15d;
+};
+_6.makeAPI=function(){
+_2.wmd={};
+_2.wmd.editor=_2.editor;
+_2.wmd.previewManager=_2.previewManager;
+};
+_6.startEditor=function(){
+if(_2.wmd_env.autostart==false){
+_2.editorInit();
+_6.makeAPI();
+return;
+}
+var _162={};
+var _163,_164;
+var _165=function(){
+try{
+var _166=_6.cloneObject(_162);
+_6.findPanes(_162);
+if(!_6.objectsEqual(_166,_162)&&_162.input){
+if(!_163){
+_2.editorInit();
+var _167;
+if(_2.previewManager!=undefined){
+_164=new _2.previewManager(_162);
+_167=_164.refresh;
+}
+_163=new _2.editor(_162.input,_167);
+}else{
+if(_164){
+_164.refresh(true);
+}
+}
+}
+}
+catch(e){
+}
+};
+_6.addEvent(_1,"load",_165);
+var _168=_1.setInterval(_165,100);
+};
+_2.previewManager=function(_169){
+var _16a=this;
+var _16b,_16c;
+var _16d,_16e;
+var _16f,_170;
+var _171=3000;
+var _172="delayed";
+var _173=function(_174,_175){
+_6.addEvent(_174,"input",_175);
+_174.onpaste=_175;
+_174.ondrop=_175;
+_6.addEvent(_1,"keypress",_175);
+_6.addEvent(_174,"keypress",_175);
+_6.addEvent(_174,"keydown",_175);
+_16c=new _2.inputPoller(_174,_175);
+};
+var _176=function(){
+var _177=0;
+if(_1.innerHeight){
+_177=_1.pageYOffset;
+}else{
+if(_3.documentElement&&_3.documentElement.scrollTop){
+_177=_3.documentElement.scrollTop;
+}else{
+if(_3.body){
+_177=_3.body.scrollTop;
+}
+}
+}
+return _177;
+};
+var _178=function(){
+if(!_169.preview&&!_169.output){
+return;
+}
+var text=_169.input.value;
+if(text&&text==_16f){
+return;
+}else{
+_16f=text;
+}
+var _17a=new Date().getTime();
+if(!_16b&&_2.showdown){
+_16b=new _2.showdown.converter();
+}
+text=_6.escapeUnderscores(text);
+if(_16b){
+text=_16b.makeHtml(text);
+}
+var _17b=new Date().getTime();
+_16e=_17b-_17a;
+_17c(text);
+_170=text;
+};
+var _17d=function(){
+if(_16d){
+_1.clearTimeout(_16d);
+_16d=undefined;
+}
+if(_172!="manual"){
+var _17e=0;
+if(_172=="delayed"){
+_17e=_16e;
+}
+if(_17e>_171){
+_17e=_171;
+}
+_16d=_1.setTimeout(_178,_17e);
+}
+};
+var _17f;
+var _180;
+var _181=function(_182){
+if(_182.scrollHeight<=_182.clientHeight){
+return 1;
+}
+return _182.scrollTop/(_182.scrollHeight-_182.clientHeight);
+};
+var _183=function(_184,_185){
+_184.scrollTop=(_184.scrollHeight-_184.clientHeight)*_185;
+};
+var _186=function(){
+if(_169.preview){
+_17f=_181(_169.preview);
+}
+if(_169.output){
+_180=_181(_169.output);
+}
+};
+var _187=function(){
+if(_169.preview){
+_169.preview.scrollTop=_169.preview.scrollTop;
+_183(_169.preview,_17f);
+}
+if(_169.output){
+_183(_169.output,_180);
+}
+};
+this.refresh=function(_188){
+if(_188){
+_16f="";
+_178();
+}else{
+_17d();
+}
+};
+this.processingTime=function(){
+return _16e;
+};
+this.output=function(){
+return _170;
+};
+this.setUpdateMode=function(_189){
+_172=_189;
+_16a.refresh();
+};
+var _18a=true;
+var _17c=function(text){
+_186();
+var _18c=_7.getTop(_169.input)-_176();
+if(_169.output){
+if(_169.output.value!=undefined){
+_169.output.value=text;
+_169.output.readOnly=true;
+}else{
+var _18d=text.replace(/&/g,"&");
+_18d=_18d.replace(/</g,"<");
+_169.output.innerHTML="<pre><code>"+_18d+"</code></pre>";
+}
+}
+if(_169.preview){
+_169.preview.innerHTML=text;
+}
+_187();
+if(_18a){
+_18a=false;
+return;
+}
+var _18e=_7.getTop(_169.input)-_176();
+if(_5.userAgent.indexOf("MSIE")!=-1){
+_1.setTimeout(function(){
+_1.scrollBy(0,_18e-_18c);
+},0);
+}else{
+_1.scrollBy(0,_18e-_18c);
+}
+};
+var init=function(){
+_173(_169.input,_17d);
+_178();
+if(_169.preview){
+_169.preview.scrollTop=0;
+}
+if(_169.output){
+_169.output.scrollTop=0;
+}
+};
+this.destroy=function(){
+if(_16c){
+_16c.destroy();
+}
+};
+init();
+};
+};
+if(Attacklab.fileLoaded){
+Attacklab.fileLoaded("wmd-base.js");
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/site-media/scripts/wmd/wmd-plus.js Tue Jan 13 19:37:21 2009 -0500
@@ -0,0 +1,311 @@
+var Attacklab=Attacklab||{};
+Attacklab.wmdPlus=function(){
+this.symboltable;
+var _1=top;
+var _2=_1["Attacklab"];
+var _3=_1["document"];
+var _4=_1["RegExp"];
+var _5=_1["navigator"];
+var _6=_2.Util;
+var _7=_2.Position;
+var _8=_2.Command;
+_8.doAutoindent=function(_9){
+_9.before=_9.before.replace(/(\n|^)[ ]{0,3}([*+-]|\d+[.])[ \t]*\n$/,"\n\n");
+_9.before=_9.before.replace(/(\n|^)[ ]{0,3}>[ \t]*\n$/,"\n\n");
+_9.before=_9.before.replace(/(\n|^)[ \t]+\n$/,"\n\n");
+if(/(\n|^)[ ]{0,3}([*+-]|\d+[.])[ \t]+.*\n$/.test(_9.before)){
+if(_8.doList){
+_8.doList(_9);
+}
+}
+if(/(\n|^)[ ]{0,3}>[ \t]+.*\n$/.test(_9.before)){
+if(_8.doBlockquote){
+_8.doBlockquote(_9);
+}
+}
+if(/(\n|^)(\t|[ ]{4,}).*\n$/.test(_9.before)){
+if(_8.doCode){
+_8.doCode(_9);
+}
+}
+};
+_8.doBlockquote=function(_a){
+_a.selection=_a.selection.replace(/^(\n*)([^\r]+?)(\n*)$/,function(_b,_c,_d,_e){
+_a.before+=_c;
+_a.after=_e+_a.after;
+return _d;
+});
+_a.before=_a.before.replace(/(>[ \t]*)$/,function(_f,_10){
+_a.selection=_10+_a.selection;
+return "";
+});
+_a.selection=_a.selection.replace(/^(\s|>)+$/,"");
+_a.selection=_a.selection||"Blockquote";
+if(_a.before){
+_a.before=_a.before.replace(/\n?$/,"\n");
+}
+if(_a.after){
+_a.after=_a.after.replace(/^\n?/,"\n");
+}
+_a.before=_a.before.replace(/(((\n|^)(\n[ \t]*)*>(.+\n)*.*)+(\n[ \t]*)*$)/,function(_11){
+_a.startTag=_11;
+return "";
+});
+_a.after=_a.after.replace(/^(((\n|^)(\n[ \t]*)*>(.+\n)*.*)+(\n[ \t]*)*)/,function(_12){
+_a.endTag=_12;
+return "";
+});
+var _13=function(_14){
+var _15=_14?"> ":"";
+if(_a.startTag){
+_a.startTag=_a.startTag.replace(/\n((>|\s)*)\n$/,function(_16,_17){
+return "\n"+_17.replace(/^[ ]{0,3}>?[ \t]*$/gm,_15)+"\n";
+});
+}
+if(_a.endTag){
+_a.endTag=_a.endTag.replace(/^\n((>|\s)*)\n/,function(_18,_19){
+return "\n"+_19.replace(/^[ ]{0,3}>?[ \t]*$/gm,_15)+"\n";
+});
+}
+};
+if(/^(?![ ]{0,3}>)/m.test(_a.selection)){
+_8.wrap(_a,_2.wmd_env.lineLength-2);
+_a.selection=_a.selection.replace(/^/gm,"> ");
+_13(true);
+_a.skipLines();
+}else{
+_a.selection=_a.selection.replace(/^[ ]{0,3}> ?/gm,"");
+_8.unwrap(_a);
+_13(false);
+if(!/^(\n|^)[ ]{0,3}>/.test(_a.selection)){
+if(_a.startTag){
+_a.startTag=_a.startTag.replace(/\n{0,2}$/,"\n\n");
+}
+}
+if(!/(\n|^)[ ]{0,3}>.*$/.test(_a.selection)){
+if(_a.endTag){
+_a.endTag=_a.endTag.replace(/^\n{0,2}/,"\n\n");
+}
+}
+}
+if(!/\n/.test(_a.selection)){
+_a.selection=_a.selection.replace(/^(> *)/,function(_1a,_1b){
+_a.startTag+=_1b;
+return "";
+});
+}
+};
+_8.doCode=function(_1c){
+var _1d=/\S[ ]*$/.test(_1c.before);
+var _1e=/^[ ]*\S/.test(_1c.after);
+if((!_1e&&!_1d)||/\n/.test(_1c.selection)){
+_1c.before=_1c.before.replace(/[ ]{4}$/,function(_1f){
+_1c.selection=_1f+_1c.selection;
+return "";
+});
+var _20=1;
+var _21=1;
+if(/\n(\t|[ ]{4,}).*\n$/.test(_1c.before)){
+_20=0;
+}
+if(/^\n(\t|[ ]{4,})/.test(_1c.after)){
+_21=0;
+}
+_1c.skipLines(_20,_21);
+if(!_1c.selection){
+_1c.startTag=" ";
+_1c.selection="print(\"code sample\");";
+return;
+}
+if(/^[ ]{0,3}\S/m.test(_1c.selection)){
+_1c.selection=_1c.selection.replace(/^/gm," ");
+}else{
+_1c.selection=_1c.selection.replace(/^[ ]{4}/gm,"");
+}
+}else{
+_1c.trimWhitespace();
+_1c.findTags(/`/,/`/);
+if(!_1c.startTag&&!_1c.endTag){
+_1c.startTag=_1c.endTag="`";
+if(!_1c.selection){
+_1c.selection="print(\"code sample\");";
+}
+}else{
+if(_1c.endTag&&!_1c.startTag){
+_1c.before+=_1c.endTag;
+_1c.endTag="";
+}else{
+_1c.startTag=_1c.endTag="";
+}
+}
+}
+};
+_8.autoindent={};
+_8.autoindent.textOp=_8.doAutoindent;
+_8.blockquote={};
+_8.blockquote.description="Blockquote <blockquote>";
+_8.blockquote.image="images/blockquote.png";
+_8.blockquote.key=".";
+_8.blockquote.keyCode=190;
+_8.blockquote.textOp=function(_22){
+return _8.doBlockquote(_22);
+};
+_8.code={};
+_8.code.description="Code Sample <pre><code>";
+_8.code.image="images/code.png";
+_8.code.key="k";
+_8.code.textOp=_8.doCode;
+_8.img={};
+_8.img.description="Image <img>";
+_8.img.image="images/img.png";
+_8.img.key="g";
+_8.img.textOp=function(_23,_24){
+return _8.doLinkOrImage(_23,true,_24);
+};
+_8.doList=function(_25,_26){
+var _27=/(([ ]{0,3}([*+-]|\d+[.])[ \t]+.*)(\n.+|\n{2,}([*+-].*|\d+[.])[ \t]+.*|\n{2,}[ \t]+\S.*)*)\n*/;
+var _28="";
+var _29=1;
+var _2a=function(){
+if(_26){
+var _2b=" "+_29+". ";
+_29++;
+return _2b;
+}
+var _2c=_28||"-";
+return " "+_2c+" ";
+};
+var _2d=function(_2e){
+if(_26==undefined){
+_26=/^\s*\d/.test(_2e);
+}
+_2e=_2e.replace(/^[ ]{0,3}([*+-]|\d+[.])\s/gm,function(_2f){
+return _2a();
+});
+return _2e;
+};
+var _30=function(){
+_31=_6.regexToString(_27);
+_31.expression="^\n*"+_31.expression;
+var _32=_6.stringToRegex(_31);
+_25.after=_25.after.replace(_32,_2d);
+};
+_25.findTags(/(\n|^)*[ ]{0,3}([*+-]|\d+[.])\s+/,null);
+var _33=/^\n/;
+if(_25.before&&!/\n$/.test(_25.before)&&!_33.test(_25.startTag)){
+_25.before+=_25.startTag;
+_25.startTag="";
+}
+if(_25.startTag){
+var _34=/\d+[.]/.test(_25.startTag);
+_25.startTag="";
+_25.selection=_25.selection.replace(/\n[ ]{4}/g,"\n");
+_8.unwrap(_25);
+_25.skipLines();
+if(_34){
+_30();
+}
+if(_26==_34){
+return;
+}
+}
+var _35=1;
+var _31=_6.regexToString(_27);
+_31.expression="(\\n|^)"+_31.expression+"$";
+var _36=_6.stringToRegex(_31);
+_25.before=_25.before.replace(_36,function(_37){
+if(/^\s*([*+-])/.test(_37)){
+_28=_4.$1;
+}
+_35=/[^\n]\n\n[^\n]/.test(_37)?1:0;
+return _2d(_37);
+});
+if(!_25.selection){
+_25.selection="List item";
+}
+var _38=_2a();
+var _39=1;
+_31=_6.regexToString(_27);
+_31.expression="^\n*"+_31.expression;
+_36=_6.stringToRegex(_31);
+_25.after=_25.after.replace(_36,function(_3a){
+_39=/[^\n]\n\n[^\n]/.test(_3a)?1:0;
+return _2d(_3a);
+});
+_25.trimWhitespace(true);
+_25.skipLines(_35,_39,true);
+_25.startTag=_38;
+var _3b=_38.replace(/./g," ");
+_8.wrap(_25,_2.wmd_env.lineLength-_3b.length);
+_25.selection=_25.selection.replace(/\n/g,"\n"+_3b);
+};
+_8.doHeading=function(_3c){
+_3c.selection=_3c.selection.replace(/\s+/g," ");
+_3c.selection=_3c.selection.replace(/(^\s+|\s+$)/g,"");
+var _3d=0;
+_3c.findTags(/#+[ ]*/,/[ ]*#+/);
+if(/#+/.test(_3c.startTag)){
+_3d=_4.lastMatch.length;
+}
+_3c.startTag=_3c.endTag="";
+_3c.findTags(null,/\s?(-+|=+)/);
+if(/=+/.test(_3c.endTag)){
+_3d=1;
+}
+if(/-+/.test(_3c.endTag)){
+_3d=2;
+}
+_3c.startTag=_3c.endTag="";
+_3c.skipLines(1,1);
+if(!_3c.selection){
+_3c.startTag="## ";
+_3c.selection="Heading";
+_3c.endTag=" ##";
+return;
+}
+var _3e=_3d==0?2:_3d-1;
+if(_3e){
+var _3f=_3e>=2?"-":"=";
+var _40=_3c.selection.length;
+if(_40>_2.wmd_env.lineLength){
+_40=_2.wmd_env.lineLength;
+}
+_3c.endTag="\n";
+while(_40--){
+_3c.endTag+=_3f;
+}
+}
+};
+_8.ol={};
+_8.ol.description="Numbered List <ol>";
+_8.ol.image="images/ol.png";
+_8.ol.key="o";
+_8.ol.textOp=function(_41){
+_8.doList(_41,true);
+};
+_8.ul={};
+_8.ul.description="Bulleted List <ul>";
+_8.ul.image="images/ul.png";
+_8.ul.key="u";
+_8.ul.textOp=function(_42){
+_8.doList(_42,false);
+};
+_8.h1={};
+_8.h1.description="Heading <h1>/<h2>";
+_8.h1.image="images/h1.png";
+_8.h1.key="h";
+_8.h1.textOp=_8.doHeading;
+_8.hr={};
+_8.hr.description="Horizontal Rule <hr>";
+_8.hr.image="images/hr.png";
+_8.hr.key="r";
+_8.hr.textOp=function(_43){
+_43.startTag="----------\n";
+_43.selection="";
+_43.skipLines(2,1,true);
+};
+};
+if(Attacklab.fileLoaded){
+Attacklab.fileLoaded("wmd-plus.js");
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/site-media/scripts/wmd/wmd.js Tue Jan 13 19:37:21 2009 -0500
@@ -0,0 +1,73 @@
+var Attacklab=Attacklab||{};
+Attacklab.wmd_env={};
+Attacklab.account_options={};
+Attacklab.wmd_defaults={version:1,output:"HTML",lineLength:40,delayLoad:false};
+if(!Attacklab.wmd){
+Attacklab.wmd=function(){
+Attacklab.loadEnv=function(){
+var _1=function(_2){
+if(!_2){
+return;
+}
+for(var _3 in _2){
+Attacklab.wmd_env[_3]=_2[_3];
+}
+};
+_1(Attacklab.wmd_defaults);
+_1(Attacklab.account_options);
+_1(top["wmd_options"]);
+Attacklab.full=true;
+var _4="bold italic | link blockquote code image | ol ul heading hr";
+Attacklab.wmd_env.buttons=Attacklab.wmd_env.buttons||_4;
+};
+Attacklab.loadEnv();
+var _5=["showdown.js","wmd-base.js","wmd-plus.js"];
+var _6=function(_7){
+};
+Attacklab.fileLoaded=function(_8){
+arguments.callee.count=arguments.callee.count||0;
+if(++arguments.callee.count>=_5.length){
+var go=function(){
+Attacklab.wmdBase();
+Attacklab.Util.startEditor();
+};
+if(Attacklab.wmd_env.delayLoad){
+window.setTimeout(go,0);
+}else{
+go();
+}
+}
+};
+Attacklab.editorInit=function(){
+Attacklab.wmdPlus();
+};
+var _a=function(_b,_c){
+var _d=Attacklab.basePath+_b;
+if(_c){
+_d+="?nocache="+(new Date()).getTime();
+}
+var _e=document.createElement("script");
+_e.src=_d;
+top.document.documentElement.firstChild.appendChild(_e);
+};
+var _f=function(_10){
+var _11=RegExp("(.*)"+_10+"(\\?(.+))?$","g");
+var _12=document.getElementsByTagName("script");
+for(var i=0;i<_12.length;i++){
+if(_11.test(_12[i].src)){
+var _14=RegExp.$1;
+if(/wmd-editor.com/.test(_12[i].src)){
+return null;
+}
+return _14;
+}
+}
+};
+Attacklab.basePath=_f("wmd.js")||"http://static.wmd-editor.com/v2/";
+for(var f,i=0;f=_5[i];i++){
+_a(f,false);
+}
+};
+Attacklab.wmd();
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/site-media/style/blog.css Tue Jan 13 19:37:21 2009 -0500
@@ -0,0 +1,112 @@
+div#blog-entry-date {
+ margin: 0em;
+ margin-bottom: 2em;
+ color: #666;
+}
+
+h1#blog-entry-title {
+ margin-bottom: 0.1em;
+}
+
+div.blog-list-entry {
+ border-bottom: 1px solid #eee;
+ padding-bottom: 0.5em;
+ padding-top: 0.5em;
+}
+
+h2.blog-list-entry-title {
+ display: inline;
+}
+
+p.blog-list-entry-snip {
+ display: inline;
+ padding-left: 1em;
+ color: #666;
+}
+
+h2#blog-list-older, h2#blog-list-newer {
+ display: inline;
+}
+
+h2#blog-list-newer {
+ float: right;
+}
+
+
+
+
+div#blog-entry {
+ margin-bottom: 1.5em;
+}
+
+div#blog-entry-comments {
+ margin-top: 1.5em;
+ margin-bottom: 1.5em;
+}
+
+div#blog-entry-new-comment {
+ margin-top: 1.5em;
+}
+
+div.blog-entry-comment-body {
+ margin-left: 2em;
+}
+
+div.wmd-preview {
+ margin-left: 2em;
+}
+
+div.blog-entry-comment-body h1, .wmd-preview h1 {
+ font-size: 1.4em;
+}
+
+div.blog-entry-comment-body h2, .wmd-preview h2 {
+ font-size: 1.2em;
+}
+
+form#blog-new-comment-form textarea {
+ width: 100%;
+}
+
+input#blog-new-comment-name {
+ width: 40%;
+ margin-right: 1em;
+}
+
+input#blog-new-comment-submit {
+ margin-top: 1em;
+}
+
+p#blog-new-comment-body-area {
+ margin-bottom: 0em;
+}
+
+p#blog-new-comment-instructions {
+ margin-top: 0em;
+}
+
+span#blog-new-comment-invalid-body {
+ float: right;
+}
+
+#blog-new-comment-name-area label.invalid {
+ display: inline;
+}
+
+#blog-new-comment-body-area label.invalid {
+ float: right;
+}
+
+.blog-photo-inline-left {
+ float: left;
+ margin-right: 1.5em;
+}
+
+.blog-photo-inline-right {
+ float: right;
+ margin-left: 1.5em;
+}
+
+h2 + p .blog-photo-inline-left {
+ margin-top: 1em;
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/site-media/style/blueprint/ie.css Tue Jan 13 19:37:21 2009 -0500
@@ -0,0 +1,26 @@
+/* -----------------------------------------------------------------------
+
+
+ Blueprint CSS Framework 0.8
+ http://blueprintcss.org
+
+ * Copyright (c) 2007-Present. See LICENSE for more info.
+ * See README for instructions on how to use Blueprint.
+ * For credits and origins, see AUTHORS.
+ * This is a compressed file. See the sources in the 'src' directory.
+
+----------------------------------------------------------------------- */
+
+/* ie.css */
+body {text-align:center;}
+.container {text-align:left;}
+* html .column, * html div.span-1, * html div.span-2, * html div.span-3, * html div.span-4, * html div.span-5, * html div.span-6, * html div.span-7, * html div.span-8, * html div.span-9, * html div.span-10, * html div.span-11, * html div.span-12, * html div.span-13, * html div.span-14, * html div.span-15, * html div.span-16, * html div.span-17, * html div.span-18, * html div.span-19, * html div.span-20, * html div.span-21, * html div.span-22, * html div.span-23, * html div.span-24 {overflow-x:hidden;}
+* html legend {margin:-18px -8px 16px 0;padding:0;}
+ol {margin-left:2em;}
+sup {vertical-align:text-top;}
+sub {vertical-align:text-bottom;}
+html>body p code {*white-space:normal;}
+hr {margin:-8px auto 11px;}
+.clearfix, .container {display:inline-block;}
+* html .clearfix, * html .container {height:1%;}
+fieldset {padding-top:0;}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/site-media/style/blueprint/print.css Tue Jan 13 19:37:21 2009 -0500
@@ -0,0 +1,30 @@
+/* -----------------------------------------------------------------------
+
+
+ Blueprint CSS Framework 0.8
+ http://blueprintcss.org
+
+ * Copyright (c) 2007-Present. See LICENSE for more info.
+ * See README for instructions on how to use Blueprint.
+ * For credits and origins, see AUTHORS.
+ * This is a compressed file. See the sources in the 'src' directory.
+
+----------------------------------------------------------------------- */
+
+/* print.css */
+body {line-height:1.5;font-family:"Helvetica Neue", Arial, Helvetica, sans-serif;color:#000;background:none;font-size:10pt;}
+.container {background:none;}
+hr {background:#ccc;color:#ccc;width:100%;height:2px;margin:2em 0;padding:0;border:none;}
+hr.space {background:#fff;color:#fff;}
+h1, h2, h3, h4, h5, h6 {font-family:"Helvetica Neue", Arial, "Lucida Grande", sans-serif;}
+code {font:.9em "Courier New", Monaco, Courier, monospace;}
+img {float:left;margin:1.5em 1.5em 1.5em 0;}
+a img {border:none;}
+p img.top {margin-top:0;}
+blockquote {margin:1.5em;padding:1em;font-style:italic;font-size:.9em;}
+.small {font-size:.9em;}
+.large {font-size:1.1em;}
+.quiet {color:#999;}
+.hide {display:none;}
+a:link, a:visited {background:transparent;font-weight:700;text-decoration:underline;}
+a:link:after, a:visited:after {content:" (" attr(href) ") ";font-size:90%;}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/site-media/style/blueprint/screen.css Tue Jan 13 19:37:21 2009 -0500
@@ -0,0 +1,251 @@
+/* -----------------------------------------------------------------------
+
+
+ Blueprint CSS Framework 0.8
+ http://blueprintcss.org
+
+ * Copyright (c) 2007-Present. See LICENSE for more info.
+ * See README for instructions on how to use Blueprint.
+ * For credits and origins, see AUTHORS.
+ * This is a compressed file. See the sources in the 'src' directory.
+
+----------------------------------------------------------------------- */
+
+/* reset.css */
+html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, code, del, dfn, em, img, q, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {margin:0;padding:0;border:0;font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;}
+body {line-height:1.5;}
+table {border-collapse:separate;border-spacing:0;}
+caption, th, td {text-align:left;font-weight:normal;}
+table, td, th {vertical-align:middle;}
+blockquote:before, blockquote:after, q:before, q:after {content:"";}
+blockquote, q {quotes:"" "";}
+a img {border:none;}
+
+/* typography.css */
+body {font-size:75%;color:#222;background:#fff;font-family:"Helvetica Neue", Arial, Helvetica, sans-serif;}
+h1, h2, h3, h4, h5, h6 {font-weight:normal;color:#111;}
+h1 {font-size:3em;line-height:1;margin-bottom:0.5em;}
+h2 {font-size:2em;margin-bottom:0.75em;}
+h3 {font-size:1.5em;line-height:1;margin-bottom:1em;}
+h4 {font-size:1.2em;line-height:1.25;margin-bottom:1.25em;}
+h5 {font-size:1em;font-weight:bold;margin-bottom:1.5em;}
+h6 {font-size:1em;font-weight:bold;}
+h1 img, h2 img, h3 img, h4 img, h5 img, h6 img {margin:0;}
+p {margin:0 0 1.5em;}
+p img.left {float:left;margin:1.5em 1.5em 1.5em 0;padding:0;}
+p img.right {float:right;margin:1.5em 0 1.5em 1.5em;}
+a:focus, a:hover {color:#000;}
+a {color:#009;text-decoration:underline;}
+blockquote {margin:1.5em;color:#666;font-style:italic;}
+strong {font-weight:bold;}
+em, dfn {font-style:italic;}
+dfn {font-weight:bold;}
+sup, sub {line-height:0;}
+abbr, acronym {border-bottom:1px dotted #666;}
+address {margin:0 0 1.5em;font-style:italic;}
+del {color:#666;}
+pre {margin:1.5em 0;white-space:pre;}
+pre, code, tt {font:1em 'lucida console', monospace;line-height:1.5;}
+li ul, li ol {margin:0 1.5em;}
+ul, ol {margin:0 1.5em 1.5em 1.5em;}
+ul {list-style-type:disc;}
+ol {list-style-type:decimal;}
+dl {margin:0 0 1.5em 0;}
+dl dt {font-weight:bold;}
+dd {margin-left:1.5em;}
+table {margin-bottom:1.4em;width:100%;}
+th {font-weight:bold;}
+thead th {background:#c3d9ff;}
+th, td, caption {padding:4px 10px 4px 5px;}
+tr.even td {background:#e5ecf9;}
+tfoot {font-style:italic;}
+caption {background:#eee;}
+.small {font-size:.8em;margin-bottom:1.875em;line-height:1.875em;}
+.large {font-size:1.2em;line-height:2.5em;margin-bottom:1.25em;}
+.hide {display:none;}
+.quiet {color:#666;}
+.loud {color:#000;}
+.highlight {background:#ff0;}
+.added {background:#060;color:#fff;}
+.removed {background:#900;color:#fff;}
+.first {margin-left:0;padding-left:0;}
+.last {margin-right:0;padding-right:0;}
+.top {margin-top:0;padding-top:0;}
+.bottom {margin-bottom:0;padding-bottom:0;}
+
+/* grid.css */
+.container {width:950px;margin:0 auto;}
+.showgrid {background:url(src/grid.png);}
+.column, div.span-1, div.span-2, div.span-3, div.span-4, div.span-5, div.span-6, div.span-7, div.span-8, div.span-9, div.span-10, div.span-11, div.span-12, div.span-13, div.span-14, div.span-15, div.span-16, div.span-17, div.span-18, div.span-19, div.span-20, div.span-21, div.span-22, div.span-23, div.span-24 {float:left;margin-right:10px;}
+.last, div.last {margin-right:0;}
+.span-1 {width:30px;}
+.span-2 {width:70px;}
+.span-3 {width:110px;}
+.span-4 {width:150px;}
+.span-5 {width:190px;}
+.span-6 {width:230px;}
+.span-7 {width:270px;}
+.span-8 {width:310px;}
+.span-9 {width:350px;}
+.span-10 {width:390px;}
+.span-11 {width:430px;}
+.span-12 {width:470px;}
+.span-13 {width:510px;}
+.span-14 {width:550px;}
+.span-15 {width:590px;}
+.span-16 {width:630px;}
+.span-17 {width:670px;}
+.span-18 {width:710px;}
+.span-19 {width:750px;}
+.span-20 {width:790px;}
+.span-21 {width:830px;}
+.span-22 {width:870px;}
+.span-23 {width:910px;}
+.span-24, div.span-24 {width:950px;margin:0;}
+input.span-1, textarea.span-1, select.span-1 {width:30px!important;}
+input.span-2, textarea.span-2, select.span-2 {width:50px!important;}
+input.span-3, textarea.span-3, select.span-3 {width:90px!important;}
+input.span-4, textarea.span-4, select.span-4 {width:130px!important;}
+input.span-5, textarea.span-5, select.span-5 {width:170px!important;}
+input.span-6, textarea.span-6, select.span-6 {width:210px!important;}
+input.span-7, textarea.span-7, select.span-7 {width:250px!important;}
+input.span-8, textarea.span-8, select.span-8 {width:290px!important;}
+input.span-9, textarea.span-9, select.span-9 {width:330px!important;}
+input.span-10, textarea.span-10, select.span-10 {width:370px!important;}
+input.span-11, textarea.span-11, select.span-11 {width:410px!important;}
+input.span-12, textarea.span-12, select.span-12 {width:450px!important;}
+input.span-13, textarea.span-13, select.span-13 {width:490px!important;}
+input.span-14, textarea.span-14, select.span-14 {width:530px!important;}
+input.span-15, textarea.span-15, select.span-15 {width:570px!important;}
+input.span-16, textarea.span-16, select.span-16 {width:610px!important;}
+input.span-17, textarea.span-17, select.span-17 {width:650px!important;}
+input.span-18, textarea.span-18, select.span-18 {width:690px!important;}
+input.span-19, textarea.span-19, select.span-19 {width:730px!important;}
+input.span-20, textarea.span-20, select.span-20 {width:770px!important;}
+input.span-21, textarea.span-21, select.span-21 {width:810px!important;}
+input.span-22, textarea.span-22, select.span-22 {width:850px!important;}
+input.span-23, textarea.span-23, select.span-23 {width:890px!important;}
+input.span-24, textarea.span-24, select.span-24 {width:940px!important;}
+.append-1 {padding-right:40px;}
+.append-2 {padding-right:80px;}
+.append-3 {padding-right:120px;}
+.append-4 {padding-right:160px;}
+.append-5 {padding-right:200px;}
+.append-6 {padding-right:240px;}
+.append-7 {padding-right:280px;}
+.append-8 {padding-right:320px;}
+.append-9 {padding-right:360px;}
+.append-10 {padding-right:400px;}
+.append-11 {padding-right:440px;}
+.append-12 {padding-right:480px;}
+.append-13 {padding-right:520px;}
+.append-14 {padding-right:560px;}
+.append-15 {padding-right:600px;}
+.append-16 {padding-right:640px;}
+.append-17 {padding-right:680px;}
+.append-18 {padding-right:720px;}
+.append-19 {padding-right:760px;}
+.append-20 {padding-right:800px;}
+.append-21 {padding-right:840px;}
+.append-22 {padding-right:880px;}
+.append-23 {padding-right:920px;}
+.prepend-1 {padding-left:40px;}
+.prepend-2 {padding-left:80px;}
+.prepend-3 {padding-left:120px;}
+.prepend-4 {padding-left:160px;}
+.prepend-5 {padding-left:200px;}
+.prepend-6 {padding-left:240px;}
+.prepend-7 {padding-left:280px;}
+.prepend-8 {padding-left:320px;}
+.prepend-9 {padding-left:360px;}
+.prepend-10 {padding-left:400px;}
+.prepend-11 {padding-left:440px;}
+.prepend-12 {padding-left:480px;}
+.prepend-13 {padding-left:520px;}
+.prepend-14 {padding-left:560px;}
+.prepend-15 {padding-left:600px;}
+.prepend-16 {padding-left:640px;}
+.prepend-17 {padding-left:680px;}
+.prepend-18 {padding-left:720px;}
+.prepend-19 {padding-left:760px;}
+.prepend-20 {padding-left:800px;}
+.prepend-21 {padding-left:840px;}
+.prepend-22 {padding-left:880px;}
+.prepend-23 {padding-left:920px;}
+div.border {padding-right:4px;margin-right:5px;border-right:1px solid #eee;}
+div.colborder {padding-right:24px;margin-right:25px;border-right:1px solid #eee;}
+.pull-1 {margin-left:-40px;}
+.pull-2 {margin-left:-80px;}
+.pull-3 {margin-left:-120px;}
+.pull-4 {margin-left:-160px;}
+.pull-5 {margin-left:-200px;}
+.pull-6 {margin-left:-240px;}
+.pull-7 {margin-left:-280px;}
+.pull-8 {margin-left:-320px;}
+.pull-9 {margin-left:-360px;}
+.pull-10 {margin-left:-400px;}
+.pull-11 {margin-left:-440px;}
+.pull-12 {margin-left:-480px;}
+.pull-13 {margin-left:-520px;}
+.pull-14 {margin-left:-560px;}
+.pull-15 {margin-left:-600px;}
+.pull-16 {margin-left:-640px;}
+.pull-17 {margin-left:-680px;}
+.pull-18 {margin-left:-720px;}
+.pull-19 {margin-left:-760px;}
+.pull-20 {margin-left:-800px;}
+.pull-21 {margin-left:-840px;}
+.pull-22 {margin-left:-880px;}
+.pull-23 {margin-left:-920px;}
+.pull-24 {margin-left:-960px;}
+.pull-1, .pull-2, .pull-3, .pull-4, .pull-5, .pull-6, .pull-7, .pull-8, .pull-9, .pull-10, .pull-11, .pull-12, .pull-13, .pull-14, .pull-15, .pull-16, .pull-17, .pull-18, .pull-19, .pull-20, .pull-21, .pull-22, .pull-23, .pull-24 {float:left;position:relative;}
+.push-1 {margin:0 -40px 1.5em 40px;}
+.push-2 {margin:0 -80px 1.5em 80px;}
+.push-3 {margin:0 -120px 1.5em 120px;}
+.push-4 {margin:0 -160px 1.5em 160px;}
+.push-5 {margin:0 -200px 1.5em 200px;}
+.push-6 {margin:0 -240px 1.5em 240px;}
+.push-7 {margin:0 -280px 1.5em 280px;}
+.push-8 {margin:0 -320px 1.5em 320px;}
+.push-9 {margin:0 -360px 1.5em 360px;}
+.push-10 {margin:0 -400px 1.5em 400px;}
+.push-11 {margin:0 -440px 1.5em 440px;}
+.push-12 {margin:0 -480px 1.5em 480px;}
+.push-13 {margin:0 -520px 1.5em 520px;}
+.push-14 {margin:0 -560px 1.5em 560px;}
+.push-15 {margin:0 -600px 1.5em 600px;}
+.push-16 {margin:0 -640px 1.5em 640px;}
+.push-17 {margin:0 -680px 1.5em 680px;}
+.push-18 {margin:0 -720px 1.5em 720px;}
+.push-19 {margin:0 -760px 1.5em 760px;}
+.push-20 {margin:0 -800px 1.5em 800px;}
+.push-21 {margin:0 -840px 1.5em 840px;}
+.push-22 {margin:0 -880px 1.5em 880px;}
+.push-23 {margin:0 -920px 1.5em 920px;}
+.push-24 {margin:0 -960px 1.5em 960px;}
+.push-1, .push-2, .push-3, .push-4, .push-5, .push-6, .push-7, .push-8, .push-9, .push-10, .push-11, .push-12, .push-13, .push-14, .push-15, .push-16, .push-17, .push-18, .push-19, .push-20, .push-21, .push-22, .push-23, .push-24 {float:right;position:relative;}
+.prepend-top {margin-top:1.5em;}
+.append-bottom {margin-bottom:1.5em;}
+.box {padding:1.5em;margin-bottom:1.5em;background:#E5ECF9;}
+hr {background:#ddd;color:#ddd;clear:both;float:none;width:100%;height:.1em;margin:0 0 1.45em;border:none;}
+hr.space {background:#fff;color:#fff;}
+.clearfix:after, .container:after {content:"\0020";display:block;height:0;clear:both;visibility:hidden;overflow:hidden;}
+.clearfix, .container {display:block;}
+.clear {clear:both;}
+
+/* forms.css */
+label {font-weight:bold;}
+fieldset {padding:1.4em;margin:0 0 1.5em 0;border:1px solid #ccc;}
+legend {font-weight:bold;font-size:1.2em;}
+input.text, input.title, textarea, select {margin:0.5em 0;border:1px solid #bbb;}
+input.text:focus, input.title:focus, textarea:focus, select:focus {border:1px solid #666;}
+input.text, input.title {width:300px;padding:5px;}
+input.title {font-size:1.5em;}
+textarea {width:390px;height:250px;padding:5px;}
+.error, .notice, .success {padding:.8em;margin-bottom:1em;border:2px solid #ddd;}
+.error {background:#FBE3E4;color:#8a1f11;border-color:#FBC2C4;}
+.notice {background:#FFF6BF;color:#514721;border-color:#FFD324;}
+.success {background:#E6EFC2;color:#264409;border-color:#C6D880;}
+.error a {color:#8a1f11;}
+.notice a {color:#514721;}
+.success a {color:#264409;}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/site-media/style/comments.css Tue Jan 13 19:37:21 2009 -0500
@@ -0,0 +1,3 @@
+form#new-comment-form textarea {
+ width: 100%;
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/site-media/style/projects.css Tue Jan 13 19:37:21 2009 -0500
@@ -0,0 +1,86 @@
+div.projects-list-entry {
+ border-bottom: 1px solid #eee;
+ padding-bottom: 0.5em;
+ padding-top: 0.5em;
+}
+
+h2.projects-list-entry-title {
+ display: inline;
+}
+
+p.projects-list-entry-snip {
+ display: inline;
+ padding-left: 1em;
+ color: #666;
+}
+
+
+
+div#projects-project-date {
+ margin: 0em;
+ margin-bottom: 2em;
+ color: #666;
+}
+
+h1#projects-project-name {
+ margin-bottom: 0.1em;
+}
+
+div#projects-project {
+ margin-bottom: 1.5em;
+}
+
+
+div#projects-project-comments {
+ margin-top: 1.5em;
+ margin-bottom: 1.5em;
+}
+
+div#projects-project-new-comment {
+ margin-top: 1.5em;
+}
+
+div.projects-project-comment-body {
+ margin-left: 2em;
+}
+
+div.wmd-preview {
+ margin-left: 2em;
+}
+
+div.projects-project-comment-body h1, .wmd-preview h1 {
+ font-size: 1.4em;
+}
+
+div.projects-project-comment-body h2, .wmd-preview h2 {
+ font-size: 1.2em;
+}
+
+input#projects-new-comment-name {
+ width: 40%;
+ margin-right: 1em;
+}
+
+input#projects-new-comment-submit {
+ margin-top: 1em;
+}
+
+p#projects-new-comment-body-area {
+ margin-bottom: 0em;
+}
+
+p#projects-new-comment-instructions {
+ margin-top: 0em;
+}
+
+span#projects-new-comment-invalid-body {
+ float: right;
+}
+
+#projects-new-comment-name-area label.invalid {
+ display: inline;
+}
+
+#projects-new-comment-body-area label.invalid {
+ float: right;
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/site-media/style/splash.css Tue Jan 13 19:37:21 2009 -0500
@@ -0,0 +1,12 @@
+div.splash-list-entry {
+ border-bottom: 1px solid #eee;
+ padding-bottom: 0.5em;
+ padding-top: 0.5em;
+ text-align: right;
+}
+
+#splash-list h2 {
+ display: inline;
+ color: #666;
+ font-weight: normal;
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/site-media/style/stevelosh.css Tue Jan 13 19:37:21 2009 -0500
@@ -0,0 +1,103 @@
+body.stevelosh {
+ color: #111;
+}
+
+div#wrapper {
+ margin-bottom: 5em;
+}
+
+p, ol, ul, code {
+ font-size: 1.2em;
+}
+
+input, textarea {
+ font-size: 1.0em;
+ margin: 0em;
+}
+
+ol, ul {
+ padding-left: 2em;
+}
+
+pre, blockquote {
+ margin-left: 2em;
+ padding: 1em;
+ background-color: #f9f9f9;
+ border: 1px solid #eee;
+}
+
+a:link, a:visited, a:active {
+ color: #900;
+ text-decoration: none;
+}
+
+a:hover {
+ text-decoration: underline;
+}
+
+#wrapper {
+ border: 1px solid white;
+}
+
+div#header {
+ margin-bottom: 3em;
+}
+
+div#header h1 {
+ font-size: 7em;
+ line-height: 1em;
+ display: inline;
+ font-weight: normal;
+ letter-spacing: -4px;
+}
+
+h1#site-logo {
+ color: black;
+}
+
+h1#site-heading {
+ color: #666;
+}
+
+h1 {
+ font-weight: bold;
+ line-height: 1.2em;
+}
+
+h2 {
+ margin-bottom: 0.25em;
+ font-weight: bold;
+}
+
+h1 a:link, h1 a:visited, h1 a:active, h2 a:link, h2 a:visited, h2 a:active {
+ color: black;
+ text-decoration: none;
+}
+
+h1 a:hover, h2 a:hover {
+ color: #900;
+}
+
+div#sidebar div.sidebar-item {
+ border-bottom: 1px solid #eee;
+ padding-bottom: 0.5em;
+ padding-top: 0.5em;
+}
+
+div#sidebar h2 {
+ display: inline;
+}
+
+p.form-label {
+ color: #666;
+ margin-bottom: 0em;
+}
+
+label.invalid {
+ font-size: 1em;
+ font-weight: normal;
+}
+
+.invalid {
+ color: #F00;
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/site-media/style/thoughts.css Tue Jan 13 19:37:21 2009 -0500
@@ -0,0 +1,36 @@
+div.thought-content {
+ border-bottom: 1px solid #eee;
+ margin-bottom: 3.5em;
+}
+
+div.thought p:last-child {
+ margin-bottom: 1em;
+}
+
+.thought h2 {
+ display: inline;
+ font-size: 1.5em;
+}
+
+.thought h2 a:link, .thought h2 a:visited, .thought h2 a:active {
+ border-bottom: 1px dotted #666;
+}
+
+.thought h2 a:hover {
+ border-bottom: 1px dotted #900;
+}
+
+.thought-type {
+ text-align: right;
+}
+
+.thought-type h2 {
+ color: #666;
+ font-weight: normal;
+}
+
+.colborder-left {
+ padding-left: 25px;
+ margin-left: 14px;
+ border-left: 1px solid #eee;
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/templates/404.html Tue Jan 13 19:37:21 2009 -0500
@@ -0,0 +1,12 @@
+{% extends "base.html" %}
+
+{% block title %}Not Found{% endblock %}
+
+{% block header %}/ not found{% endblock %}
+
+{% block content %}
+ <h1>Not Found</h1>
+ <p>Sorry, we couldn't find whatever you're looking for.</p>
+ <p>If you followed a bookmark or link here, it might be out of date because I recently redesigned the site. Check the links on the right to find what you're looking for.</p>
+ <p>If you still can't find it, <a href="mailto:steve@stevelosh.com">email me</a>.</p>
+{% endblock %}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/templates/base.html Tue Jan 13 19:37:21 2009 -0500
@@ -0,0 +1,77 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>Steve Losh / {% block title %}{% endblock %}</title>
+
+ <link rel="stylesheet" href="/site-media/style/blueprint/screen.css"
+ type="text/css" media="screen, projection"/>
+ <link rel="stylesheet" href="/site-media/style/blueprint/print.css"
+ type="text/css" media="print"/>
+ <!--[if IE]>
+ <link rel="stylesheet" href="/site-media/style/blueprint/ie.css"
+ type="text/css" media="screen, projection">
+ <![endif]-->
+ <link rel="stylesheet" href="/site-media/style/stevelosh.css"
+ type="text/css"/>
+ <link rel="stylesheet" href="/site-media/style/comments.css"
+ type="text/css"/>
+
+ {% block style %}{% endblock %}
+
+ <script type="text/javascript"
+ src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js">
+ </script>
+ <script src="/mint/?js" type="text/javascript"></script>
+
+ {% block script %}{% endblock %}
+</head>
+
+<body class="stevelosh">
+ <div id="wrapper" class="container">
+ <div id="header" class="span-24">
+ <h1 id="site-logo"><a href="/">steve losh</a></h1>
+ <h1 id="site-heading">
+ {% block header %}{% endblock %}
+ </h1>
+ </div>
+
+ <div id="content" class="span-17 colborder">
+ {% block content %}{% endblock %}
+ </div>
+
+ <div id="sidebar" class="span-6 last">
+ <div class="sidebar-item">
+ <h2><a href="{% url blog-list-newest %}">
+ Blog
+ </a></h2>
+ </div>
+
+ <div class="sidebar-item">
+ <h2><a href="{% url project-list %}">
+ Projects
+ </a></h2>
+ </div>
+
+ <div class="sidebar-item">
+ <h2><a href="{% url thoughts-list-newest %}">
+ Thoughts
+ </a></h2>
+ </div>
+
+ <div class="sidebar-item">
+ <h2><a href="/about/">
+ About
+ </a></h2>
+ </div>
+
+ <div class="sidebar-item">
+ <h2><a href="/rss/">
+ RSS
+ </a></h2>
+ </div>
+ </div>
+ </div>
+</body>
+
+</html>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/templates/blog/base.html Tue Jan 13 19:37:21 2009 -0500
@@ -0,0 +1,10 @@
+{% extends "base.html" %}
+
+{% block title %}Blog{% endblock %}
+
+{% block style %}
+ <link rel="stylesheet" href="/site-media/style/blog.css"
+ type="text/css"/>
+{% endblock %}
+
+{% block header %}/ blog{% endblock %}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/templates/blog/entry.html Tue Jan 13 19:37:21 2009 -0500
@@ -0,0 +1,86 @@
+{% extends "blog/base.html" %}
+{% load markup %}
+
+{% block title %}{{ entry.title }}{% endblock %}
+
+{% block script %}
+ <script type="text/javascript"
+ src="/site-media/scripts/jquery.validate.min.js">
+ </script>
+ <script type="text/javascript"
+ src="/site-media/scripts/validate-comment-form.js">
+ </script>
+{% endblock %}
+
+{% block content %}
+ <div id="blog-entry">
+ <h1 id="blog-entry-title">
+ <a href="{% url stevelosh.blog.views.entry entry.pub_date.year, entry.pub_date.month, entry.pub_date.day, entry.slug %}">
+ {{ entry.title }}
+ </a>
+ </h1>
+ <div id="blog-entry-date">
+ <p>
+ Posted
+ on {{ entry.pub_date.date|date:"F j, Y" }}
+ at {{ entry.pub_date.time|time:"g:i A" }}
+ </p>
+ </div>
+ <div id="blog-entry-body" class="content">
+ {{ entry.body|markdown }}
+ </div>
+ </div>
+ <hr />
+ {% ifnotequal entry.comment_set.count 0 %}
+ <div id="blog-entry-comments">
+ <h1>Comments</h1>
+ {% for comment in entry.comment_set.all|dictsort:"submitted" %}
+ <div class="blog-entry-comment">
+ <h2>{{ comment.name }} said:</h2>
+ <div class="blog-entry-comment-body">
+ {{ comment.body|markdown:"safe" }}
+ </div>
+ </div>
+ {% endfor %}
+ </div>
+ <hr />
+ {% endifnotequal %}
+ <div id="blog-entry-new-comment">
+ <h1>Add your comment:</h1>
+ <form id="new-comment-form" method="post"
+ action="{% url stevelosh.blog.views.comment %}">
+ <p class="form-label">
+ What's your name?
+ </p>
+ <p id="blog-new-comment-name-area">
+ <input type="hidden" name="entry-id"
+ value="{{ entry.id }}" />
+ <input id="blog-new-comment-name" name="name"
+ maxlength="40" type="text" />
+ </p>
+ <p id="blog-new-comment-body-area">
+ <textarea id="blog-new-comment-body" rows="" cols=""
+ name="body"></textarea>
+ </p>
+ <p id="blog-new-comment-instructions">
+ You can use <a href="http://daringfireball.net/projects/markdown/syntax">Markdown</a>.
+ </p>
+ <h2>You're going to say:</h2>
+ <div class="wmd-preview"></div>
+ <p>
+ <input id="blog-new-comment-submit" name="submit"
+ type="submit" value="Comment" />
+ </p>
+ </form>
+ </div>
+
+ <script type="text/javascript">
+ wmd_options = {
+ output: "Markdown",
+ buttons: "bold italic | link blockquote code | ol ul heading hr"
+ };
+ </script>
+ <script type="text/javascript"
+ src="/site-media/scripts/wmd/wmd.js"></script>
+
+{% endblock %}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/templates/blog/list.html Tue Jan 13 19:37:21 2009 -0500
@@ -0,0 +1,41 @@
+{% extends "blog/base.html" %}
+
+{% block content %}
+ <div id="blog-list">
+ {% for entry in entries %}
+ <div class="blog-list-entry">
+ <h2 class="blog-list-entry-title">
+ <a href="{% url stevelosh.blog.views.entry entry.pub_date.year, entry.pub_date.month, entry.pub_date.day, entry.slug %}">
+ {{ entry.title }}
+ </a>
+ </h2>
+ <p class="blog-list-entry-snip">{{ entry.snip }}</p>
+ </div>
+ {% endfor %}
+
+ {% ifnotequal newer_page older_page %}
+ <div class="blog-list-entry">
+ {% ifnotequal newer_page None %}
+ {% ifequal newer_page 0 %}
+ {% url blog-list-newest as new_page %}
+ {% else %}
+ {% url blog-list-page newer_page as new_page %}
+ {% endifequal %}
+
+ <h2 id="blog-list-newer"><a href="{{ new_page }}">
+ Newer »
+ </a></h2>
+ {% endifnotequal %}
+ {% ifnotequal older_page None %}
+ <h2 id="blog-list-older">
+ <a href="{% url blog-list-page older_page %}">
+ « Older
+ </a>
+ </h2>
+ {% else %}
+ <h2 id="blog-list-older"> </h2>
+ {% endifnotequal %}
+ </div>
+ {% endifnotequal %}
+ </div>
+{% endblock %}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/templates/flatpages/default.html Tue Jan 13 19:37:21 2009 -0500
@@ -0,0 +1,12 @@
+{% extends "base.html" %}
+{% load markup %}
+
+{% block title %}{{ flatpage.title }}{% endblock %}
+
+{% block header %}/ {{ flatpage.title|lower }}{% endblock %}
+
+{% block content %}
+ <div id="flatpage-content">
+ {{ flatpage.content|markdown }}
+ </div>
+{% endblock %}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/templates/flatpages/splash.html Tue Jan 13 19:37:21 2009 -0500
@@ -0,0 +1,26 @@
+{% extends "flatpages/default.html" %}
+
+{% block style %}
+ <link rel="stylesheet" href="/site-media/style/splash.css"
+ type="text/css"/>
+{% endblock %}
+
+{% block content %}
+ <div id="splash-list">
+ <div class="splash-list-entry">
+ <h2>I like writing. »</h2>
+ </div>
+ <div class="splash-list-entry">
+ <h2>Things I've made. »</h2>
+ </div>
+ <div class="splash-list-entry">
+ <h2>Too small to blog, too big to tweet. »</h2>
+ </div>
+ <div class="splash-list-entry">
+ <h2>Who am I and what is this site? »</h2>
+ </div>
+ <div class="splash-list-entry">
+ <h2>Stay up to date. »</h2>
+ </div>
+ </div>
+{% endblock %}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/templates/projects/base.html Tue Jan 13 19:37:21 2009 -0500
@@ -0,0 +1,10 @@
+{% extends "base.html" %}
+
+{% block title %}Projects{% endblock %}
+
+{% block style %}
+ <link rel="stylesheet" href="/site-media/style/projects.css"
+ type="text/css"/>
+{% endblock %}
+
+{% block header %}/ projects{% endblock %}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/templates/projects/list.html Tue Jan 13 19:37:21 2009 -0500
@@ -0,0 +1,16 @@
+{% extends "projects/base.html" %}
+
+{% block content %}
+ <div id="projects-list">
+ {% for project in projects %}
+ <div class="projects-list-entry">
+ <h2 class="projects-list-entry-title">
+ <a href="{% url stevelosh.projects.views.project project.slug %}">
+ {{ project.name }}
+ </a>
+ </h2>
+ <p class="projects-list-entry-snip">{{ project.snip }}</p>
+ </div>
+ {% endfor %}
+ </div>
+{% endblock %}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/templates/projects/project.html Tue Jan 13 19:37:21 2009 -0500
@@ -0,0 +1,86 @@
+{% extends "projects/base.html" %}
+{% load markup %}
+
+{% block title %}{{ project.name }}{% endblock %}
+
+{% block script %}
+ <script type="text/javascript"
+ src="/site-media/scripts/jquery.validate.min.js">
+ </script>
+ <script type="text/javascript"
+ src="/site-media/scripts/validate-comment-form.js">
+ </script>
+{% endblock %}
+
+{% block content %}
+ <div id="projects-project">
+ <h1 id="projects-project-name">
+ <a href="{% url stevelosh.projects.views.project project.slug %}">
+ {{ project.name }}
+ </a>
+ </h1>
+ <div id="projects-project-date">
+ <p>
+ Posted
+ on {{ project.posted.date|date:"F j, Y" }}
+ at {{ project.posted.time|time:"g:i A" }}
+ </p>
+ </div>
+ <div id="projects-project-body" class="content">
+ {{ project.body|markdown:"safe" }}
+ </div>
+ </div>
+ <hr />
+ {% ifnotequal project.comment_set.count 0 %}
+ <div id="projects-project-comments">
+ <h1>Comments</h1>
+ {% for comment in project.comment_set.all|dictsort:"submitted" %}
+ <div class="projects-project-comment">
+ <h2>{{ comment.name }} said:</h2>
+ <div class="projects-project-comment-body">
+ {{ comment.body|markdown:"safe" }}
+ </div>
+ </div>
+ {% endfor %}
+ </div>
+ <hr />
+ {% endifnotequal %}
+ <div id="projects-project-new-comment">
+ <h1>Add your comment:</h1>
+ <form id="new-comment-form" method="post"
+ action="{% url stevelosh.projects.views.comment %}">
+ <p class="form-label">
+ What's your name?
+ </p>
+ <p id="projects-new-comment-name-area">
+ <input type="hidden" name="project-id"
+ value="{{ project.id }}" />
+ <input id="projects-new-comment-name" name="name"
+ maxlength="40" type="text" />
+ </p>
+ <p id="projects-new-comment-body-area">
+ <textarea id="projects-new-comment-body" rows="" cols=""
+ name="body"></textarea>
+ </p>
+ <p id="projects-new-comment-instructions">
+ You can use <a href="http://daringfireball.net/projects/markdown/syntax">Markdown</a>.
+ </p>
+ <h2>You're going to say:</h2>
+ <div class="wmd-preview"></div>
+ <p>
+ <input id="projects-new-comment-submit" name="submit"
+ type="submit" value="Comment" />
+ </p>
+ </form>
+ </div>
+
+ <script type="text/javascript">
+ wmd_options = {
+ output: "Markdown",
+ buttons: "bold italic | link blockquote code | ol ul heading hr"
+ };
+ </script>
+ <script type="text/javascript"
+ src="/site-media/scripts/wmd/wmd.js"></script>
+
+{% endblock %}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/templates/thoughts/list.html Tue Jan 13 19:37:21 2009 -0500
@@ -0,0 +1,76 @@
+{% extends "base.html" %}
+{% load markup %}
+
+{% block title %}Thoughts{% endblock %}
+
+{% block style %}
+ <link rel="stylesheet" href="/site-media/style/thoughts.css"
+ type="text/css"/>
+{% endblock %}
+
+{% block header %}/ thoughts{% endblock %}
+
+{% block content %}
+ <div id="thoughts-list">
+ {% for thought in thoughts %}
+ <div class="thought">
+ {% ifequal thought.type 'text' %}
+ <div class="thought-type span-2">
+ <h2>text</h2>
+ </div>
+ <div class="thought-content text-thought colborder-left span-14 last">
+ {% ifnotequal thought.title None %}
+ <h2>{{ thought.title }}</h2>
+ {% endifnotequal %}
+ {{ thought.body|markdown:"safe" }}
+ </div>
+ {% endifequal %}
+ {% ifequal thought.type 'link' %}
+ <div class="thought-type span-2">
+ <h2>link</h2>
+ </div>
+ <div class="thought-content link-thought colborder-left span-14 last">
+ <h2><a href="{{ thought.url }}">
+ {% if thought.name %}
+ {{ thought.name }}
+ {% else %}
+ {{ thought.url }}
+ {% endif %}
+ </a></h2>
+ {% if thought.description %}
+ {{ thought.description|markdown:"safe" }}
+ {% endif %}
+ </div>
+ {% endifequal %}
+ </div>
+ {% endfor %}
+
+ {% ifnotequal newer_page older_page %}
+ <div class="thought thought-navigation">
+ {% ifnotequal newer_page None %}
+ {% ifequal newer_page 0 %}
+ {% url thoughts-list-newest as new_page %}
+ {% else %}
+ {% url thoughts-list-page newer_page as new_page %}
+ {% endifequal %}
+ <span id="thought-list-newer">
+ <h2><a href="{{ new_page }}">
+ Newer »
+ </a></h2>
+ </span>
+ {% endifnotequal %}
+ {% ifnotequal older_page None %}
+ <span id="thought-list-older">
+ <h2><a href="{% url thoughts-list-page older_page %}">
+ « Older
+ </a></h2>
+ </span>
+ {% else %}
+ <span id="thought-list-older">
+ <h2> </h2>
+ </span>
+ {% endifnotequal %}
+ </div>
+ {% endifnotequal %}
+ </div>
+{% endblock %}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/thoughts/admin.py Tue Jan 13 19:37:21 2009 -0500
@@ -0,0 +1,20 @@
+from stevelosh.thoughts.models import TextThought, LinkThought
+from django.contrib import admin
+
+class TextAdmin(admin.ModelAdmin):
+ list_display = ('posted', 'title', 'body',)
+ search_fields = ('title', 'body',)
+ list_filter = ('posted',)
+ date_hierarchy = 'posted'
+ ordering = ('-posted',)
+
+class LinkAdmin(admin.ModelAdmin):
+ list_display = ('url', 'name', 'posted', 'description',)
+ search_fields = ('name', 'url', 'description',)
+ list_filter = ('posted',)
+ date_hierarchy = 'posted'
+ ordering = ('-posted',)
+
+
+admin.site.register(TextThought, TextAdmin)
+admin.site.register(LinkThought, LinkAdmin)
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/thoughts/import.py Tue Jan 13 19:37:21 2009 -0500
@@ -0,0 +1,66 @@
+#!/usr/local/bin/python2.5
+
+import sys, os
+sys.path.append('/home/sjl/webapps/stevelosh')
+os.environ['DJANGO_SETTINGS_MODULE'] = 'stevelosh.settings'
+
+import simplejson, urllib, urllib2
+from stevelosh.thoughts.models import TextThought, LinkThought
+from datetime import datetime
+
+
+TUMBLR_API_URL = r'http://stevelosh.tumblr.com/api/read/json'
+
+def parse_tumblr_json(data):
+ tumblr_prefix = r'var tumblr_api_read = '
+ if data.startswith(tumblr_prefix):
+ data = data.strip()
+ data = data[len(tumblr_prefix):-1]
+ else:
+ return None
+ return simplejson.loads(data)
+
+def fetch_tumblr_data(type):
+ parameters = {'type': type, 'filter': 'none'}
+ url_parameters = urllib.urlencode(parameters)
+ full_api_url = TUMBLR_API_URL + '?' + url_parameters
+ response = urllib2.urlopen(full_api_url)
+ return parse_tumblr_json(response.read())
+
+def update_text_thoughts():
+ recent_thoughts = fetch_tumblr_data('regular')
+ for thought in recent_thoughts['posts']:
+ tumblr_id = thought['id']
+ try:
+ TextThought.objects.get(tumblr_id=tumblr_id)
+ except TextThought.DoesNotExist:
+ title = thought['regular-title'] \
+ if thought['regular-title'] != "" else None
+ new_thought = TextThought(
+ tumblr_id=tumblr_id,
+ title=title,
+ body=thought['regular-body'],
+ posted=datetime.fromtimestamp(thought['unix-timestamp']) )
+ new_thought.save()
+
+def update_link_thoughts():
+ recent_thoughts = fetch_tumblr_data('link')
+ for thought in recent_thoughts['posts']:
+ tumblr_id = thought['id']
+ try:
+ LinkThought.objects.get(tumblr_id=tumblr_id)
+ except LinkThought.DoesNotExist:
+ name = thought['link-text'] \
+ if thought['link-text'] != "" else None
+ description = thought['link-description'] \
+ if thought['link-description'] != "" else None
+ new_thought = LinkThought(
+ tumblr_id=tumblr_id,
+ name=name,
+ description=description,
+ url=thought['link-url'],
+ posted=datetime.fromtimestamp(thought['unix-timestamp']) )
+ new_thought.save()
+
+update_text_thoughts()
+update_link_thoughts()
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/thoughts/models.py Tue Jan 13 19:37:21 2009 -0500
@@ -0,0 +1,24 @@
+from django.db import models
+import datetime
+
+class TextThought(models.Model):
+ title = models.CharField(blank=True, null=True, max_length=1000)
+ posted = models.DateTimeField()
+ body = models.TextField()
+ tumblr_id = models.IntegerField(blank=False, null=False)
+ type = models.CharField(default='text', max_length=100)
+
+ def __unicode__(self):
+ return u'%s' % (self.body[:20],)
+
+class LinkThought(models.Model):
+ name = models.CharField(blank=True, null=True, max_length=1000)
+ posted = models.DateTimeField()
+ url = models.URLField(blank=False, verify_exists=False)
+ description = models.TextField(blank=True, null=True)
+ tumblr_id = models.IntegerField(blank=False, null=False)
+ type = models.CharField(default='link', max_length=100)
+
+ def __unicode__(self):
+ return u'%s' % (self.url,)
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/thoughts/views.py Tue Jan 13 19:37:21 2009 -0500
@@ -0,0 +1,23 @@
+from stevelosh.thoughts.models import TextThought, LinkThought
+from django.shortcuts import render_to_response
+import operator
+
+ENTRIES_PER_PAGE = 10
+
+def list(request, page=0):
+ page = int(page)
+ start_index = page * ENTRIES_PER_PAGE
+ end_index = start_index + ENTRIES_PER_PAGE
+ total_count = TextThought.objects.count() + LinkThought.objects.count()
+
+ thoughts = []
+ thoughts += TextThought.objects.all().order_by('-posted')
+ thoughts += LinkThought.objects.all().order_by('-posted')
+ thoughts.sort(key=operator.attrgetter('posted'))
+ thoughts.reverse()
+ thoughts = thoughts[start_index:end_index]
+
+ return render_to_response('thoughts/list.html',
+ { 'thoughts': thoughts,
+ 'older_page': page+1 if end_index < total_count else None,
+ 'newer_page': page-1 if page != 0 else None } )
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/urls.py Tue Jan 13 19:37:21 2009 -0500
@@ -0,0 +1,29 @@
+from django.conf.urls.defaults import *
+from django.contrib import admin
+from django.conf import settings
+
+
+admin.autodiscover()
+
+urlpatterns = patterns('',
+ (r'^admin/(.*)', admin.site.root),
+ url(r'^blog/$', 'stevelosh.blog.views.list', name='blog-list-newest'),
+ url(r'^blog/page/(\d+)/$', 'stevelosh.blog.views.list', name='blog-list-page'),
+ url(r'^blog/comment/$', 'stevelosh.blog.views.comment'),
+ url(r'^blog/entry/(\d+)/(\d+)/(\d+)/(.*)/$',
+ 'stevelosh.blog.views.entry', name='blog-entry'),
+ url(r'^blog/(\d+)/(\d+)/(\d+)/(.*).html/$',
+ 'stevelosh.blog.views.old_entry', name='blog-old-entry'),
+ url(r'^projects/$', 'stevelosh.projects.views.list', name='project-list'),
+ url(r'^projects/comment/$', 'stevelosh.projects.views.comment'),
+ url(r'^projects/(.*)/$', 'stevelosh.projects.views.project'),
+ url(r'^thoughts/$', 'stevelosh.thoughts.views.list', name='thoughts-list-newest'),
+ url(r'^thoughts/page/(\d+)/$', 'stevelosh.thoughts.views.list', name='thoughts-list-page'),
+)
+
+
+if settings.DEBUG:
+ urlpatterns += patterns('',
+ (r'^site-media/(?P<path>.*)$', 'django.views.static.serve',
+ {'document_root': settings.MEDIA_ROOT}),
+ )
\ No newline at end of file