<?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>Sam Nabi &#187; Web Design</title>
	<atom:link href="http://samnabi.com/topic/web-design/feed/" rel="self" type="application/rss+xml" />
	<link>http://samnabi.com</link>
	<description></description>
	<lastBuildDate>Thu, 17 May 2012 23:05:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Refining reddit</title>
		<link>http://samnabi.com/web-design/refining-reddit/</link>
		<comments>http://samnabi.com/web-design/refining-reddit/#comments</comments>
		<pubDate>Tue, 17 Apr 2012 01:44:24 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://samnabi.com/?p=594</guid>
		<description><![CDATA[Reddit is a fascinating blend of news aggregator, niche forums, and social network. I went from curious to hooked in a matter of days, and the website quickly climbed to the coveted top spot on the &#8220;most visited&#8221; list of my browser&#8217;s start page. ...]]></description>
			<content:encoded><![CDATA[<p><a href="http://reddit.com">Reddit</a> is a fascinating blend of news aggregator, niche forums, and social network. I went from curious to hooked in a matter of days, and the website quickly climbed to the coveted top spot on the &#8220;most visited&#8221; list of my browser&#8217;s start page.</p>
<p>But for a website that I spend so much time on, boy is it ugly.</p>
<p><a href="http://www.google.ca/url?sa=t&amp;rct=j&amp;q=reddit%20enhancement%20suite&amp;source=web&amp;cd=1&amp;ved=0CCoQFjAA&amp;url=http%3A%2F%2Fredditenhancementsuite.com%2F&amp;ei=n8eMT9ycHubd0QHOgfHZCQ&amp;usg=AFQjCNE0J1Lq2faxo9tREHVquNL2HQ4gzg">Reddit Enhancement Suite</a> is a popular browser add-on that offers fine-grained customization of your reddit experience. But my problem was the opposite. I didn&#8217;t want more knobs and twiddly bits &#8211; I wanted to get to the content as quickly as possible, and make posts and comments easy to read and navigate.</p>
<p>I didn&#8217;t want to get caught up in the karma game. I didn&#8217;t care about custom banners or flair. I wanted to read, respond, and vote with as few distractions as possible.</p>
<p>So I made a CSS theme for reddit that strips out the extraneous details, makes content king, and facilitates reading. If you&#8217;re a redditor, <a href="userstyles.org/styles/64228">please do install it</a> and let me know what you think in the comments. These are a few of the key features:</p>
<ul>
<li>The header area sticks to the top of the page as you scroll, so you have easy access to all your subreddits and your inbox</li>
<li>Vote counts are hidden &#8211; the post&#8217;s position on the page is a good enough indicator of its popularity</li>
<li>The content area is narrower, so you don&#8217;t have lines that stretch across the entire screen</li>
<li>The softer colour scheme is easier on your eyes</li>
</ul>
<p>P.S.: Two other browser add-ons have significantly added to my pleasure of using reddit: <a href="https://chrome.google.com/webstore/detail/nonjdcjchghhkdoolnlbekcfllmednbl">Hover Zoom</a> and <a href="https://chrome.google.com/webstore/detail/phhpajlkjeoakfmckfnogpnfeidgbhil">Reddit Hover Text</a>. I suggest you install them if you browse reddit at all; it cuts down significantly ont he amount of clicking you have to do.</p>
<p><strong>tl;dr:</strong> I made a minimalist reddit theme. Download it <a href="userstyles.org/styles/64228">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://samnabi.com/web-design/refining-reddit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windowpane menus with CSS</title>
		<link>http://samnabi.com/web-design/windowpane-menus-with-css/</link>
		<comments>http://samnabi.com/web-design/windowpane-menus-with-css/#comments</comments>
		<pubDate>Mon, 21 Mar 2011 03:05:00 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://samnabi.com/?p=353</guid>
		<description><![CDATA[I&#8217;ve got a handful of web projects on the go, but none of them are ready for the limelight yet. I wanted to unveil some of them by now, since I feel like I&#8217;ve been posting a lot about politics lately. Instead, I&#8217;ll show ...]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve got a handful of web projects on the go, but none of them are ready for the limelight yet. I wanted to unveil some of them by now, since I feel like I&#8217;ve been posting a lot about politics lately. Instead, I&#8217;ll show you a neat way to create a menu using a single background image.</p>
<p>It&#8217;s actually very simple. The <strong>&lt;ul&gt;</strong> element has a background image. The <strong>&lt;li&gt;</strong> elements have a transparent background, and a solid border that blocks the background image from showing through. Finally, the <strong>&lt;a&gt;</strong> element has a semi-transparent png that is removed on hover to make the background image shine through brighter.</p>
<p>No need to splice images in Photoshop &#8211; you can achieve the same effect with some super clean code and a little creativity!</p>
<p>Take a look at the <a href="http://demo.samnabi.com/windowpanenavbar/index.php">demo</a> to see the final product. You can also <a href="http://demo.samnabi.com/windowpanenavbar/windowpanenavbar.zip">download the source files (including images)</a>.</p>
<p>The HTML structure is as simple as can be:</p>
<pre><code class="html">&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;#&quot; class=&quot;selected&quot;&gt;Tickets&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Showtimes&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Tour Info&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Merch&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Contact&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</code></pre>
<p>And this is the CSS:</p>
<pre><code class="css">ul {
	display: block;
	float: left;
	background: white url(navbg.jpg) no-repeat;
	list-style: none;
	margin: 0;
	padding: 0;
}
ul li {
	float: left;
	border-left: 10px solid white; /* Blocks the background image from showing through the cracks */
}
ul li a {
	background: transparent url(overlay.png) repeat; /* Semi-transparent PNG lets the background image show through. */
	color: #fff;
	display: block;
	line-height: 20px;
	padding: 0 10px 2px;
	text-decoration: none;
	padding-top: 100px;
}
ul li a:hover, ul li a.selected {
	background: transparent;
}</code></pre>
<p>Admittedly there are limitations with this method. First, the area around the menu must be a solid colour (unless you use a border-image, which doesn&#8217;t have enough browser support yet). Also, the entire menu needs to be floated, so you might have to do some clearing to make it work with your layout.</p>
<p>As always, if you can make this code better or know someone else who has, please let me know in the comments!</p>
]]></content:encoded>
			<wfw:commentRss>http://samnabi.com/web-design/windowpane-menus-with-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>3D box effect with CSS</title>
		<link>http://samnabi.com/web-design/3d-box-effect-with-css/</link>
		<comments>http://samnabi.com/web-design/3d-box-effect-with-css/#comments</comments>
		<pubDate>Tue, 25 Jan 2011 09:27:45 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://samnabi.com/?p=281</guid>
		<description><![CDATA[(For the impatient, here&#8217;s the link to the live demo with source files.) While we wait (and wait&#8230; and wait&#8230;) for CSS3 to be implemented across all the major browsers, I thought I&#8217;d post my method for creating a 3D box effect using plain ...]]></description>
			<content:encoded><![CDATA[<p>(For the impatient, here&#8217;s the link to the <a href="http://demo.samnabi.com/3D-css-box">live demo with source files</a>.)</p>
<p>While we wait (and wait&#8230; and wait&#8230;) for CSS3 to be implemented across all the major browsers, I thought I&#8217;d post my method for creating a 3D box effect using plain old CSS2 and less than 300 bytes of images. Of course, the border-image property will eventually make this method obsolete, but who knows when that will be?</p>
<p>First, a caveat: with this method, you need to specify a fixed width and size the images accordingly. A fluid width version wouldn&#8217;t be too hard to do, but it would involve some nested divs and more images.</p>
<p>Take a look at the screenshot above. The box is made up of 3 divs (I know, I&#8217;m cringing too, but I couldn&#8217;t find a simpler way of doing it without relying too much on images). Here&#8217;s the html:</p>
<pre><code class="html">&lt;div class="box-top"&gt; &lt;/div&gt;
    &lt;div class="box-content"&gt;
    	&lt;h1&gt;Content Title&lt;/h1&gt;
    	&lt;p&gt;Content goes here.&lt;/p&gt;
    &lt;/div&gt;
&lt;div class="box-bottom"&gt; &lt;/div&gt;</code></pre>
<p>These are the only two images you need (source files <a href="http://demo.samnabi.com/3D-css-box">here</a>):</p>
<p><a href="http://samnabi.com/wp-content/uploads/2011/01/image-files.gif"><img class="aligncenter size-full wp-image-283" title="image-files" src="http://samnabi.com/wp-content/uploads/2011/01/image-files.gif" alt="" width="366" height="60" /></a></p>
<p>And now for the CSS to pull it all together:</p>
<pre><code class="css">.box-content {
	width: 180px;
	background-color: #FEFF91;
	margin: 0;
	padding: 1px 10px; /* Top and bottom values cannot be zero */
	border-left: 20px solid #D8D97C;
}
.box-top, .box-bottom {
	height: 20px;
	width: 220px;
	background: #FEFF91 url(box-top.gif) no-repeat;
	margin: 0;
	padding: 0;
}
.box-bottom {
	background-image: url(box-bottom.gif);
}
h1 {
	margin: -15px 0 0 0;
}</code></pre>
<p>Easy! If you want to see a live demo and download the source files check it out here: <a href="http://demo.samnabi.com/3D-css-box">http://demo.samnabi.com/3D-css-box</a>. It&#8217;s really easy to change the colours of the images with the paint bucket tool in Photoshop (or even Microsoft Paint, whatever).</p>
]]></content:encoded>
			<wfw:commentRss>http://samnabi.com/web-design/3d-box-effect-with-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Generate the JSON code for those new Bandcamp embeddable players with my handy little app.</title>
		<link>http://samnabi.com/music/generate-the-json-code-for-those-new-bandcamp-embeddable-players-with-my-handy-little-app/</link>
		<comments>http://samnabi.com/music/generate-the-json-code-for-those-new-bandcamp-embeddable-players-with-my-handy-little-app/#comments</comments>
		<pubDate>Tue, 07 Dec 2010 20:44:27 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Music]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://samnabi.com/?p=234</guid>
		<description><![CDATA[If you&#8217;re a tech-savvy musician and haven&#8217;t heard of Bandcamp, you&#8217;re missing out. One of their many phenomenal features that was recently released is the ability to have complete pixel-perfect control over the layout of your embedded media players (like the one you can ...]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re a tech-savvy musician and haven&#8217;t heard of <a href="http://bandcamp.com">Bandcamp</a>, you&#8217;re missing out. One of their many phenomenal features that was recently released is the ability to have complete pixel-perfect control over the layout of your embedded media players (like the one you can see in the sidebar to the left).</p>
<p>To create the settings for these custom layouts, you need to muck around in JSON (which is not very fun). So I put together a little app that lets you customize your player through a form, and then copy the code that it generates &#8211; easy as pie. Check it out:</p>
<p><a href="http://demo.samnabi.com/bcembed"><strong>http://demo.samnabi.com/bcembed</strong></a></p>
<p>Leave bug reports and feature requests in the comments below. I hope this is useful for some people!</p>
<p><em>Note: There are still a couple features to add, namely support for text colour and tracklist row height. I&#8217;ll get to those after I&#8217;m done my research report &#8211; this app is a result of me procrastinating on that!</em></p>
]]></content:encoded>
			<wfw:commentRss>http://samnabi.com/music/generate-the-json-code-for-those-new-bandcamp-embeddable-players-with-my-handy-little-app/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Highlight the current category for single posts in WordPress</title>
		<link>http://samnabi.com/web-design/highlight-the-current-category-for-single-posts-in-wordpress/</link>
		<comments>http://samnabi.com/web-design/highlight-the-current-category-for-single-posts-in-wordpress/#comments</comments>
		<pubDate>Wed, 03 Nov 2010 22:59:20 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://samnabi.com/wordpress/?p=138</guid>
		<description><![CDATA[When you browse a category in WordPress, a current-cat class is added to the category&#8217;s list item in the wp_list_categories menu. This is really useful for styling your menu so readers have a visual cue of where they are in your blog. But when ...]]></description>
			<content:encoded><![CDATA[<p>When you browse a category in WordPress, a <code>current-cat</code> class is added to the category&#8217;s list item in the <code>wp_list_categories</code> menu. This is really useful for styling your menu so readers have a visual cue of where they are in your blog.</p>
<p>But when viewing an individual post, the <code>current-cat</code> class doesn&#8217;t get generated. To generate it when your visitors are reading a single post, insert the following code in your theme&#8217;s <em>functions.php</em> file.</p>
<pre><code class="php">// Generate the current-cat class when viewing single posts
class singlePostCurrentCat {
  function wp_list_categories ($text) {
    global $post;
      if (is_singular()) {
        $categories = wp_get_post_categories($post-&gt;ID);
        foreach ($categories as $category_id) {
          $category = get_category($category_id);
          $text = preg_replace(
            "/class=\"(.*)\"&gt;&lt;a ([^&lt;&gt;]*)&gt;$category-&gt;name&lt;\/a&gt;/",
            ' class="$1 current-cat"&gt;&lt;a $2&gt;' . $category-&gt;name . '&lt;/a&gt;',
          $text);
        }
      }
    return $text;
  }
}
add_filter('wp_list_categories', array('singlePostCurrentCat','wp_list_categories'));
</code></pre>
<p>(Adapted from Kahi&#8217;s <a title="Highlight Used Categories plugin" href="http://kahi.cz/wordpress/highlight-used-categories-plugin/">Highlight Used Categories</a> plugin.)</p>
]]></content:encoded>
			<wfw:commentRss>http://samnabi.com/web-design/highlight-the-current-category-for-single-posts-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>I&#8217;m setting up a proper blog.</title>
		<link>http://samnabi.com/web-design/im-setting-up-a-proper-blog/</link>
		<comments>http://samnabi.com/web-design/im-setting-up-a-proper-blog/#comments</comments>
		<pubDate>Fri, 01 May 2009 22:42:59 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://samnabi.wordpress.com/2009/05/01/im-setting-up-a-proper-blog/</guid>
		<description><![CDATA[Hey hey! I&#8217;m trying to get all my social networks in line and playing nice with each other, so I only have to post a blog once and it&#8217;ll go everywhere. I&#8217;ve got my Twitter, Myspace status and Facebook status all synced together, and ...]]></description>
			<content:encoded><![CDATA[<p>Hey hey! I&#8217;m trying to get all my social networks in line and playing nice with each other, so I only have to post a blog once and it&#8217;ll go everywhere. I&#8217;ve got my Twitter, Myspace status and Facebook status all synced together, and I&#8217;m trying to do the same for blog posts.</p>
<p>Anyway, bear with me as the next few blog posts I make will probably be me trying to figure this whole situation out.</p>
<p>- Sam</p>
]]></content:encoded>
			<wfw:commentRss>http://samnabi.com/web-design/im-setting-up-a-proper-blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why do I stay up so late?</title>
		<link>http://samnabi.com/life/why-do-i-stay-up-so-late/</link>
		<comments>http://samnabi.com/life/why-do-i-stay-up-so-late/#comments</comments>
		<pubDate>Thu, 27 Jul 2006 03:08:58 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://acousticsam.wordpress.com/2006/07/26/why-do-i-stay-up-so-late/</guid>
		<description><![CDATA[What value is there in spending countless hours in front of the computer monitor? What outcomes does it have in my subconscious mind? Are there psychological factors at play which tie me into the realm of the Internet? I think I am fascinated with ...]]></description>
			<content:encoded><![CDATA[<p>What value is there in spending countless hours in front of the computer monitor? What outcomes does it have in my subconscious mind? Are there psychological factors at play which tie me into the realm of the Internet? I think I am fascinated with the wealth of information and opportunities for self-expression that the Internet has to offer. There is so much to explore, and it&#8217;s so vast that I will never be able to satisfy my desire to learn more. I think that the reason I started getting into web design is that it fulfilled a creative desire for me, but even more so, that I could reach out to a community with the click of a mouse. I wanted to understand more about he inner workings of the Internet, and I think I chose web design because it lets me get down and dirty with the source, but it&#8217;s not such an overwhelmingly complicated task that I&#8217;d have to devote my entire life to it. I love the creative side of things, and the various forums that I can go to for help, and to help others, builds a sense of community. I am obsessed with the web browsing experience and what I can do to make mine better and more fulfilling. I recently downloaded Opera and Flock, two browsers that stray off the beaten path that I walk with Firefox and Internet Explorer. I now find myself using IE a lot more, now that I have downloaded the IE7 beta. Its visual experience is superb and it&#8217;s very easy to use. My previous bias against the browser has softened a bit with the introduction of IE7. Flock, in my opinion, is the best browser out there for teens. The built-in blogging tools and photo uploading tools are amazing. This integration into the browser makes things so much more streamlined, in the goal of optimizing time. But the more useful features I find, the more time I seem to be spending on my computer. It&#8217;s hypnotic, really. There is no end. there are no limitations. On the Internet, I can mask my identity, change who I am, play through countless roles, and experience so many different things. It&#8217;s a wealth of knowledge and interactivity, which at the same time stimulates my imagination and makes me zone out into a state of subconsciousness. Sometimes, I look around, and the moment I tear my gaze from the monitor, everything seems so much more real. That&#8217;s the thing about the Internet. It seems interactive, but you&#8217;re only using 2 of your five senses. I should really spend less time surfing the net, and more time out doing stuff. Stuff that will stimulate both my mind and my body. The Internet is like a black hole, sucking the vast majority of teens into itself via myspace and youtube. It&#8217;s dangerous. As the saying goes, go out and smell the roses. (Is that really a saying? I thought it was, but now I&#8217;m not too sure.)</p>
]]></content:encoded>
			<wfw:commentRss>http://samnabi.com/life/why-do-i-stay-up-so-late/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

