<?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>ByteStork blog &#187; ByteStork</title>
	<atom:link href="http://blog.bytestork.com/category/bytestork/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.bytestork.com</link>
	<description>Evolving the web</description>
	<lastBuildDate>Mon, 22 Nov 2010 10:18:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.5</generator>
		<item>
		<title>Embedding CSS from JavaScript</title>
		<link>http://blog.bytestork.com/2010/06/10/global-sitemap/</link>
		<comments>http://blog.bytestork.com/2010/06/10/global-sitemap/#comments</comments>
		<pubDate>Thu, 10 Jun 2010 11:52:27 +0000</pubDate>
		<dc:creator>Børge Antonsen</dc:creator>
				<category><![CDATA[ByteStork]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://blog.bytestork.com/?p=16</guid>
		<description><![CDATA[After spending some time in JavaScript (and modifying my CSS a tad), I managed to add a semi-flexible global sitemap (on top). I wanted something that could be easily attached to any site, with adding just a simple script. Also, as I wanted it to work independent of jQuery, Dojo etc, it has to be [...]]]></description>
			<content:encoded><![CDATA[<p>After spending some time in JavaScript (and modifying my CSS a tad), I managed to add a semi-flexible global sitemap (on top).</p>
<p>I wanted something that could be easily attached to any site, with adding just a simple script.<br />
Also, as I wanted it to work independent of jQuery, Dojo etc, it has to be vanilla JS.</p>
<p>Satisfying IE is still a pain in the ass, and it doesn&#8217;t help that one chose not to use jQuery and Dojo for simplifying cross-browser support.</p>
<p>One example is the function I have for putting CSS into the HTML page. I really didn&#8217;t want to add another stylesheet, to reduce the number of page loads.</p>
<p>However, IE didn&#8217;t like the:</p>
<pre class="brush:javascript">styles.appendChild(document.createTextNode(css[key]));
</pre>
<p>Thus I was forced to find some way of making it accept it:</p>
<pre class="brush:javascript">function bytestorkStyles()
{
    // Storing styles
    var css = [];
    css[0] = "div#bytestorkSiteMap { ..stuff here..} \n";
    css[1] = "div#bytestorkSiteMap ul { ..more stuff here...}"
    css[2] = "div#bytestorkSiteMap ul li { ..and so on.. }\n";

    // create style element
    var styles = document.createElement("style");
    styles.setAttribute('type', 'text/css');
    // the usual IE hack fix
    if(styles.styleSheet)
    {
        styles.styleSheet.cssText = '';
        for(key in css)
        {
            styles.styleSheet.cssText += css[key];
        }
    } else{
        for(key in css)
        {
            styles.appendChild(document.createTextNode(css[key]));
        }
    }
    //throw it into the head tag
    document.getElementsByTagName("head")[0].appendChild(styles);
}
</pre>
<p>Maybe not the cleanest code, but it helped me not having to put all the styles into the elements themselves. Perhaps a better solution would be a cacheable CSS file, but it&#8217;s not like this is gonna kill a computer. <img src='http://blog.bytestork.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bytestork.com/2010/06/10/global-sitemap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>No Adobe = Open Source</title>
		<link>http://blog.bytestork.com/2010/06/06/no-adobe/</link>
		<comments>http://blog.bytestork.com/2010/06/06/no-adobe/#comments</comments>
		<pubDate>Sun, 06 Jun 2010 22:16:03 +0000</pubDate>
		<dc:creator>Børge Antonsen</dc:creator>
				<category><![CDATA[ByteStork]]></category>
		<category><![CDATA[Webdesign]]></category>

		<guid isPermaLink="false">http://blog.bytestork.com/?p=9</guid>
		<description><![CDATA[As I&#8217;m no longer at my university, I don&#8217;t have access to computers with Adobe Illustrator and Photoshop anymore. For that reason I&#8217;ve been playing around some with Gimp and Inkscape to find open source solutions to my lack of design skills. As I didn&#8217;t have any good ideas concerning my logo, I drew a [...]]]></description>
			<content:encoded><![CDATA[<p>As I&#8217;m no longer at my university, I don&#8217;t have access to computers with Adobe Illustrator and Photoshop anymore. For that reason I&#8217;ve been playing around some with Gimp and Inkscape to find open source solutions to my lack of design skills.</p>
<p>As I didn&#8217;t have any good ideas concerning my logo, I drew a few storks (without babies) in Inkscape, until I had one which I didn&#8217;t feel intensely ashamed of. Luckily I found a <a href="http://www.pixel2life.com/viewtutorial/76917/draw_volumetric_objects_in_inkscape/" target="_blank">tutorial</a> which explained volumetric objects in Inkscape, and after playing around a bit with it, and putting it all together in Gimp (with the obligatory reflection) it ended up like this:</p>
<p><img class="alignnone" title="ByteStork stork" src="http://www.bytestork.com/bytestork_front.png" alt="" width="424" height="443" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bytestork.com/2010/06/06/no-adobe/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ByteStork</title>
		<link>http://blog.bytestork.com/2010/06/05/bytestork/</link>
		<comments>http://blog.bytestork.com/2010/06/05/bytestork/#comments</comments>
		<pubDate>Sat, 05 Jun 2010 17:00:19 +0000</pubDate>
		<dc:creator>Børge Antonsen</dc:creator>
				<category><![CDATA[ByteStork]]></category>

		<guid isPermaLink="false">http://blog.bytestork.com/?p=4</guid>
		<description><![CDATA[I have established ByteStork.com, and finally have a place to put all my professional stuff...]]></description>
			<content:encoded><![CDATA[<p>I have established ByteStork.com, and finally have a place to put all my professional stuff instead of just leaving it on my harddrive and forgetting about it.</p>
<p>Nothing more to say about it for now, this blog will focus on the web development stuff in my life <img src='http://blog.bytestork.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bytestork.com/2010/06/05/bytestork/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

