<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Don't Click On Me &#187; code</title>
	<atom:link href="http://dontclickonme.com/tag/code/feed/" rel="self" type="application/rss+xml" />
	<link>http://dontclickonme.com</link>
	<description>My Personal Hub...</description>
	<lastBuildDate>Thu, 07 Jan 2010 19:08:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>A premature UberLog announcement</title>
		<link>http://dontclickonme.com/2009/01/a-premature-uberlog-announcement/</link>
		<comments>http://dontclickonme.com/2009/01/a-premature-uberlog-announcement/#comments</comments>
		<pubDate>Sat, 17 Jan 2009 17:00:18 +0000</pubDate>
		<dc:creator>Felix</dc:creator>
				<category><![CDATA[Software Updates]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[diary]]></category>
		<category><![CDATA[gui]]></category>
		<category><![CDATA[log]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[wxPython]]></category>

		<guid isPermaLink="false">http://dontclickonme.com/?p=123</guid>
		<description><![CDATA[Uberlog is a project by Felix Farquharson and Sam Cater, it&#8217;s a personal journal/logging application. And is not fully complete. It has the basic functionality and it works without a GUI  (see the trunk version). A GUI is nearing completion and should be done after a good couple of hours work (see lp:uberlog/gui).
This project is [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://launchpad.net/uberlog">Uberlog</a> is a project by Felix Farquharson and Sam Cater, it&#8217;s a personal journal/logging application. And is not fully complete. It has the basic functionality and it works without a GUI  (see the trunk version). A GUI is nearing completion and should be done after a good couple of hours work (see lp:uberlog/gui).</p>
<p>This project is primarily to make sure Sam and me are set up for IRME (a new take on IRC, that will hopefully make it more accessable by using an Instant Messenger style frontend) which is a project we are planning to start after this is finished.</p>
<p>Currently all code has to be checked out from the bzr repository.</p>
]]></content:encoded>
			<wfw:commentRss>http://dontclickonme.com/2009/01/a-premature-uberlog-announcement/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web Development with The Gimp and Blueprint CSS &#8211; Part 3</title>
		<link>http://dontclickonme.com/2009/01/web-development-with-the-gimp-and-blueprint-css-part-3/</link>
		<comments>http://dontclickonme.com/2009/01/web-development-with-the-gimp-and-blueprint-css-part-3/#comments</comments>
		<pubDate>Thu, 15 Jan 2009 17:00:48 +0000</pubDate>
		<dc:creator>Felix</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[blueprint]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[gimp]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[simple]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[walkthrough]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://dontclickonme.com/?p=86</guid>
		<description><![CDATA[First things first, buckle your seatbelts, this is going to be a long one. It concludes the three part tutorial (Part 1, Part 2). We&#8217;re going to write the code to make the design happen, this includes putting in some dummy text, and at the end, we will have a working design, that could be [...]]]></description>
			<content:encoded><![CDATA[<p>First things first, buckle your seatbelts, this is going to be a long one. It concludes the three part tutorial (<a href="http://dontclickonme.com/2009/01/web-development-with-the-gimp-and-blueprint-css/">Part 1</a>, <a href="http://dontclickonme.com/2009/01/web-development-with-the-gimp-and-blueprint-css-part-2/">Part 2</a>). We&#8217;re going to write the code to make the design happen, this includes putting in some dummy text, and at the end, we will have a working design, that could be converted into a WordPress theme. (future tutorial?).</p>
<p>Anyway, first we are going to fill out the index.html file with some standard HTML and the code needed to call blueprint into action, (there will be a download later on in the post if you can&#8217;t be bothered to fill out the file yourself):</p>
<pre>&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Our Design&lt;/title&gt;

&lt;<span class="start-tag">link</span><span class="attribute-name"> rel</span>=<span class="attribute-value">"stylesheet" </span><span class="attribute-name">href</span>=<span class="attribute-value">"blueprint/screen.css" </span><span class="attribute-name">type</span>=<span class="attribute-value">"text/css" </span><span class="attribute-name">media</span>=<span class="attribute-value">"screen, projection"</span>&gt;
&lt;<span class="start-tag">link</span><span class="attribute-name"> rel</span>=<span class="attribute-value">"stylesheet" </span><span class="attribute-name">href</span>=<span class="attribute-value">"blueprint/print.css" </span><span class="attribute-name">type</span>=<span class="attribute-value">"text/css" </span><span class="attribute-name">media</span>=<span class="attribute-value">"print"</span>&gt;
<span class="comment">&lt;!--[if IE]&gt;&lt;link rel="stylesheet" href="blueprint/ie.css" type="text/css" media="screen, projection"&gt;&lt;![endif]--&gt;</span>

&lt;!-- this needs to be after the framework --&gt;
&lt;link rel="stylesheet" href="style.css" type="text/css" media="screen" /&gt;

&lt;/head&gt;
&lt;body&gt;
&lt;<span class="start-tag">div</span><span class="attribute-name"> class</span>=<span class="attribute-value">"container"</span>&gt;

&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
<span id="more-86"></span></pre>
<p>I&#8217;m going to describe the important lines to you:</p>
<ul>
<li>On the 4th line we have a link to our custom stylesheet, it&#8217;s currently empty, so it will have no effect on the page yet.</li>
<li>On the 6th, 7th and 8th lines we have the standard blueprint call, and one line that fixes the framework for IE.</li>
<li>On the 12th and 14th lines we have the main div class that holds all of the blueprint columns etc. This can be changed to &lt;div class=&#8221;container showgrid&#8221;&gt; to make it show the grid in the background, which is very useful for laying out custom web layouts.</li>
<li>All of the rest is standard HTML and should make some sense.</li>
</ul>
<p>We are now going to put in the columns to blueprint, so within the &lt;div class=&#8221;container&#8221;&gt; and the &lt;/div&gt; tags we add:</p>
<pre>&lt;div id="header" class="prepend-2 span-22"&gt;
&lt;/div&gt;

&lt;div id="bg" class="span-24"&gt;
&lt;div id="content" class="prepend-2 span-14 append-1"&gt;
&lt;/div&gt;
&lt;div id="sidebar" class="span-5 append-2 last"&gt;
&lt;/div&gt;
&lt;/div&gt;

&lt;div id="footer" class="span-24"&gt;
&lt;/div&gt;</pre>
<p>All of these &lt;div&gt; tags have an id and a class value, this allows us to separate the styles out, all of the classes we use are part of blueprint and all of the id tags will refer to custom code we will write in the end. The key thing to remember is that there are always 24 columns.</p>
<p>The class=&#8221;span-24&#8243; or similar shows how wide the column should be, and there is also an example that columns can be nested within others to keep them together. Spacing can be added easily with the prepend or append values in the class variable (?).</p>
<p>We add some dummy content to this:</p>
<pre>&lt;div id="header" class="prepend-2 span-22"&gt;
&lt;h1&gt;Our Website&lt;/h1&gt;
&lt;p&gt;And this is what we do&lt;/p&gt;
&lt;/div&gt;

&lt;div id="bg" class="span-24"&gt;
&lt;div id="content" class="prepend-2 span-14 append-1"&gt;
&lt;h2&gt;Content&lt;/h2&gt;
&lt;p&gt;this is a paragraph. Not a very long one but still, it's here...&lt;/p&gt;
&lt;h3&gt;Sub-content&lt;/h3&gt;
&lt;p&gt;This is a paragraph belonging to the sub content, no stealing.&lt;/p&gt;
&lt;/div&gt;
&lt;div id="sidebar" class="span-5 append-2 last"&gt;
&lt;h3&gt;links&lt;/h3&gt;
&lt;p&gt;hello&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;

&lt;div id="footer" class="span-24"&gt;
&lt;/div&gt;</pre>
<p>Now when we load our index in a web browser it should show some text roughly laid out as we want, but there are no heights added to anything so it will look squashed and may not show well until we write in out own code. It should look like this:</p>
<p><a href="http://dontclickonme.com/wp-content/uploads/2009/01/screenshot.png"><img class="aligncenter size-medium wp-image-103" title="screenshot" src="http://dontclickonme.com/wp-content/uploads/2009/01/screenshot-300x97.png" alt="screenshot" width="300" height="97" /></a></p>
<p>Notice how Blueprint has automatically set some sensible text defaults, i&#8217;m not going to change them, but it&#8217;s easy to do in your custom css file.</p>
<p>Now we can start to put something into out custom stylesheet, style.css. Put in the following code:</p>
<pre>body{
background-color:#ccc;
}

#header {
background:#fff url(img/header.png) 0 0 no-repeat;
height:150px;
min-height:150px;
}

#bg {
background:#fff url(img/content.png) 0 0 repeat-y;
}

#footer {
background:#0f1b1c url(img/footer.png) 0 0 no-repeat;
height:30px;
min-height:30px;
}

#copyright{
text-align:center;
}</pre>
<p>Now if we reload the page we have:</p>
<pre><a href="http://dontclickonme.com/wp-content/uploads/2009/01/screenshot-1.png"><img class="aligncenter size-medium wp-image-104" title="screenshot-1" src="http://dontclickonme.com/wp-content/uploads/2009/01/screenshot-1-300x99.png" alt="screenshot-1" width="300" height="99" /></a></pre>
<p>Next we&#8217;re going to make all the text appear where we want it and change some colours and finer points, also we&#8217;re going to add the code to make the copyright notice show&#8230;</p>
<p>So we have added:</p>
<pre>#title {
padding-top:30px;
}

#title h1, #title p {
color:#fff;
}</pre>
<p>To the CSS file and:</p>
<pre>&lt;div id="copyright" class="span-24"&gt;
&amp;copy All of us
&lt;/div&gt;</pre>
<p>To the main index.html file, inside the div id=&#8221;bg&#8221; tags and after the sidebar.</p>
<p>The css at the top positions the title and makes the h1 and p aspects of the title white. The HTML adds another column containing our copyright notice (we have already aligned this to the center).</p>
<p>There we have it (sorry about my cursor being in the screenshot):</p>
<p><a href="http://dontclickonme.com/wp-content/uploads/2009/01/screenshot-2.png"><img class="aligncenter size-medium wp-image-108" title="screenshot-2" src="http://dontclickonme.com/wp-content/uploads/2009/01/screenshot-2-300x131.png" alt="screenshot-2" width="300" height="131" /></a></p>
<p>Finished&#8230; You can download as a <a href="http://dontclickonme.com/wp-content/uploads/2009/01/website.zip">ZIP</a> or as a <a href="http://dontclickonme.com/wp-content/uploads/2009/01/websitetar.gz">.tar.gz</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://dontclickonme.com/2009/01/web-development-with-the-gimp-and-blueprint-css-part-3/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Snippets library</title>
		<link>http://dontclickonme.com/2008/11/snippets-library/</link>
		<comments>http://dontclickonme.com/2008/11/snippets-library/#comments</comments>
		<pubDate>Sun, 02 Nov 2008 23:24:57 +0000</pubDate>
		<dc:creator>Felix</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[Django]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[Snippet]]></category>
		<category><![CDATA[weekend]]></category>

		<guid isPermaLink="false">http://dontclickonme.com/?p=29</guid>
		<description><![CDATA[It isn&#8217;t very full at the moment. But i have written it over the weekend in any spare time i have had using Django and I aim to put all the peices of code in there that don&#8217;t really deserve their own sourceforge/launchpad project. The URL is http://code.dontclickonme.com/. I will update the links in this [...]]]></description>
			<content:encoded><![CDATA[<p>It isn&#8217;t very full at the moment. But i have written it over the weekend in any spare time i have had using Django and I aim to put all the peices of code in there that don&#8217;t really deserve their own sourceforge/launchpad project. The URL is <a href="http://code.dontclickonme.com/">http://code.dontclickonme.com/</a>. I will update the links in this blog to point to the Snippets library rather than the plain text files that they usually are sometime soon.</p>
<p>I think it really shows what you can do with Django, and how quickly you can make somthing functional using it.</p>
<p>If you are at all intrested in the code for the Library itself. Leave a comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://dontclickonme.com/2008/11/snippets-library/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
