My new site :)

June 2, 2011

This is my latest attempt at design work and I think (or hope) it turned out pretty decent. I’m more impressed with the JavaScript code I wrote to validate my contact form and the WordPress plugin and JavaScript code to do this:

Copy Code

<html>
	<head>
		<title>Showing Off Code Block</title>
	</head>
	<body>
		<p>Long line of text below so it stretches past the edge of the page</p>
		<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris tincidunt felis a neque tempor a lobortis mi pulvinar. Nam eget dictum ipsum. Morbi vel tortor odio.</p>
	</body>
</html>

The above uses a custom plugin called “Code Snippets” which lets me write and save pieces of code. I then use Wordress’s Shortcode API to call in each snippet. The code is coloured using prettify and custom JavaScript takes care of the copy code popup.

Overall I think it’s a pretty decent setup and I’m going to enjoy writing more posts about neat pieces of code I either write myself or find on the web.

Leave a Reply