<?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>The Professional Portfolio of Stacey Lane</title>
	<atom:link href="http://stacigh.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://stacigh.com</link>
	<description>Front End Web Designer</description>
	<lastBuildDate>Tue, 31 Jan 2012 23:37:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Simple Vector Hearts</title>
		<link>http://stacigh.com/2012/01/simple-vector-hearts/</link>
		<comments>http://stacigh.com/2012/01/simple-vector-hearts/#comments</comments>
		<pubDate>Tue, 31 Jan 2012 23:19:15 +0000</pubDate>
		<dc:creator>Stacey</dc:creator>
				<category><![CDATA[Illustrator]]></category>

		<guid isPermaLink="false">http://stacigh.com/?p=366</guid>
		<description><![CDATA[Another vector heart tutorial? Well, yes! And just in time for Valentine&#8217;s Day! But it&#8217;s only because there seems to be a lack of really quick and simple heart illustration techniques. Of course, the best way is to draw your heart by hand, but I digress. Here is just one of the many ways (but [...]]]></description>
			<content:encoded><![CDATA[<p>Another vector heart tutorial? Well, yes! And just in time for Valentine&#8217;s Day! But it&#8217;s only because there seems to be a lack of really quick and simple heart illustration techniques. Of course, the best way is to draw your heart by hand, but I digress. Here is just one of the many ways (but probably the most simple that I&#8217;ve ever put into practice) you can draw a heart in Illustrator.<br />
<span id="more-366"></span></p>
<h4>Step 1</h4>
<p>The first thing you need to do is create a perfect elipse. Mine is 100px x 100px but it can be any size you like.<br />
<div id="attachment_369" class="wp-caption alignnone" style="width: 590px"><a href="http://stacigh.com/wp-content/uploads/2012/01/stacigh.com-illustrator-heart-tut-step-01.png"><img src="http://stacigh.com/wp-content/uploads/2012/01/stacigh.com-illustrator-heart-tut-step-01.png" alt="Step 1 - Create perfect elipse" title="Step 1 - Create perfect elipse" width="580" height="349" class="size-full wp-image-369" /></a><p class="wp-caption-text">Step 1 - Create perfect elipse</p></div></p>
<h4>Step 2</h4>
<p>Next you will need to use the direct selection tool by pressing A (it&#8217;s the white arrow beneath the select tool). Grab the bottom most anchor of the circle and drag down while holding shift. The further you drag it, the more elongated and thin your heart will be.<br />
<div id="attachment_370" class="wp-caption alignnone" style="width: 590px"><a href="http://stacigh.com/wp-content/uploads/2012/01/stacigh.com-illustrator-heart-tut-step-02.png"><img src="http://stacigh.com/wp-content/uploads/2012/01/stacigh.com-illustrator-heart-tut-step-02.png" alt="Step 2 - Extend bottom anchor of elipse" title="Step 2 - Extend bottom anchor of elipse" width="580" height="470" class="size-full wp-image-370" /></a><p class="wp-caption-text">Step 2 - Extend bottom anchor of elipse</p></div></p>
<h4>Step 3</h4>
<p>Once you have your egg shape, you will need to convert that bottom anchor. Press Shift+C to use the convert point tool (it&#8217;s nested under the pen tool) and click on the bottom anchor.<br />
<div id="attachment_372" class="wp-caption alignnone" style="width: 590px"><a href="http://stacigh.com/wp-content/uploads/2012/01/stacigh.com-illustrator-heart-tut-step-04.png"><img src="http://stacigh.com/wp-content/uploads/2012/01/stacigh.com-illustrator-heart-tut-step-04.png" alt="Step 3 - Convert bottom anchor" title="Step 3 - Convert bottom anchor" width="580" height="394" class="size-full wp-image-372" /></a><p class="wp-caption-text">Step 3 - Convert bottom anchor</p></div></p>
<h4>Step 4</h4>
<p>Next you will need to rotate your shape. While your shape is selected, press R to pull up the rotate tool. Hold Option/Alt and click the bottom anchor point. This will bring up a dialog box. Check the preview box so you can see how far your shape will rotate. Enter an angle in the box (it can be positive or negative). Once satisfied, click OK.<br />
<div id="attachment_373" class="wp-caption alignnone" style="width: 590px"><a href="http://stacigh.com/wp-content/uploads/2012/01/stacigh.com-illustrator-heart-tut-step-05.png"><img src="http://stacigh.com/wp-content/uploads/2012/01/stacigh.com-illustrator-heart-tut-step-05.png" alt="Step 4 - Rotate around bottom anchor" title="Step 4 - Rotate around bottom anchor" width="580" height="423" class="size-full wp-image-373" /></a><p class="wp-caption-text">Step 4 - Rotate around bottom anchor</p></div></p>
<h4>Step 5</h4>
<p>Select both halves of the heart and use the pathfinder tool to unite the shapes. You now have a perfect heart!<br />
<div id="attachment_374" class="wp-caption alignnone" style="width: 590px"><a href="http://stacigh.com/wp-content/uploads/2012/01/stacigh.com-illustrator-heart-tut-step-06.png"><img src="http://stacigh.com/wp-content/uploads/2012/01/stacigh.com-illustrator-heart-tut-step-06.png" alt="Step 5 - Use pathfinder tool to unite shapes" title="Step 5 - Use pathfinder tool to unite shapes" width="580" height="385" class="size-full wp-image-374" /></a><p class="wp-caption-text">Step 5 - Use pathfinder tool to unite shapes</p></div></p>
<h4>Step 6</h4>
<p>At this point, you may need to tweak your heart just a bit. Switch to outline mode (CMD/CTRL+Y) and zoom in to the bottom anchor point. If you didn&#8217;t rotate exactly around the bottom anchor, you may have three points at the bottom of your heart. If this is the case, select the top anchor point (in the middle of the heart) with the direct selection tool. Delete the point. You will now be left with an open path. Select the remaining two anchor points with the direct selection tool. Press CMD/CTRL+J to join the path.<br />
<div id="attachment_379" class="wp-caption alignnone" style="width: 590px"><a href="http://stacigh.com/wp-content/uploads/2012/01/stacigh.com-illustrator-heart-tut-step-05b.png"><img src="http://stacigh.com/wp-content/uploads/2012/01/stacigh.com-illustrator-heart-tut-step-05b.png" alt="Step 6 - Clean up" title="Step 6 - Clean up" width="580" height="1000" class="size-full wp-image-379" /></a><p class="wp-caption-text">Step 6 - Clean up</p></div></p>
<p><h7>Step 7</h7><br />
But what if you want the heart perfectly oriented at a 90 degree angle? Simple! Create a guide, either vertically or horizontally. Line the bottom anchor of your heart with the guide. It may help to switch to outline mode (CMD/CTRL+Y). Once you have lined up the bottom anchor, use the rotate tool (R) to rotate your heart around that bottom anchor. Tweak the number until the center point of the heart comes in contact with your guide. Click OK.<br />
<div id="attachment_375" class="wp-caption alignnone" style="width: 590px"><a href="http://stacigh.com/wp-content/uploads/2012/01/stacigh.com-illustrator-heart-tut-step-07.png"><img src="http://stacigh.com/wp-content/uploads/2012/01/stacigh.com-illustrator-heart-tut-step-07.png" alt="Step 7 - Create guide, align bottom point with guide, rotate around bottom point until top point intersects with line" title="Step 7 - Create guide, align bottom point with guide, rotate around bottom point until top point intersects with line" width="580" height="431" class="size-full wp-image-375" /></a><p class="wp-caption-text">Step 7 - Create guide, align bottom point with guide, rotate around bottom point until top point intersects with line</p></div></p>
<h4>Step 8</h4>
<p>That&#8217;s it! All that&#8217;s left is for you to design to your hearts (pun!) content! As an added bonus, feel free to download the vector file!</p>
<a class="button " href="http://stacigh.com/wp-content/plugins/download-monitor/download.php?id=3" title="Simple Vector Hearts"><span>Download This Tutorial - 84.28 kB</span></a> 
]]></content:encoded>
			<wfw:commentRss>http://stacigh.com/2012/01/simple-vector-hearts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Removing Border from IE7 &amp; Opera Submit Buttons</title>
		<link>http://stacigh.com/2011/12/removing-border-from-ie7-submit-buttons/</link>
		<comments>http://stacigh.com/2011/12/removing-border-from-ie7-submit-buttons/#comments</comments>
		<pubDate>Fri, 02 Dec 2011 00:19:14 +0000</pubDate>
		<dc:creator>Stacey</dc:creator>
				<category><![CDATA[Snippets]]></category>

		<guid isPermaLink="false">http://stacigh.com/?p=345</guid>
		<description><![CDATA[It may not be the absolute best way to do it, but it&#8217;s quick, doesn&#8217;t require javascript and, most importantly, it works. Insert the following code BEFORE your submit button: &#60;input type=&#34;submit&#34; value=&#34;&#34; style=&#34;height:0;overflow:auto;position:absolute;left:-9999px;&#34; /&#62; This works on HTML5 doctypes. Taken from Stack Overflow.]]></description>
			<content:encoded><![CDATA[<p>It may not be the absolute best way to do it, but it&#8217;s quick, doesn&#8217;t require javascript and, most importantly, it works.</p>
<p>Insert the following code BEFORE your submit button:</p>
<pre class="wp-code-highlight prettyprint linenums:1">
&lt;input type=&quot;submit&quot; value=&quot;&quot; style=&quot;height:0;overflow:auto;position:absolute;left:-9999px;&quot; /&gt;
</pre>
<p>This works on HTML5 doctypes. Taken from <a href="http://stackoverflow.com/a/3365781/1009075" title="Any way to remove IEs black border around submit button in active forms? | Stack Overflow" target="_blank">Stack Overflow</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://stacigh.com/2011/12/removing-border-from-ie7-submit-buttons/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GREP Fractions in InDesign</title>
		<link>http://stacigh.com/2011/11/grep-fractions-in-indesign/</link>
		<comments>http://stacigh.com/2011/11/grep-fractions-in-indesign/#comments</comments>
		<pubDate>Tue, 22 Nov 2011 20:05:30 +0000</pubDate>
		<dc:creator>Stacey</dc:creator>
				<category><![CDATA[InDesign]]></category>
		<category><![CDATA[fractions]]></category>
		<category><![CDATA[grep]]></category>
		<category><![CDATA[indesign]]></category>
		<category><![CDATA[workflow]]></category>

		<guid isPermaLink="false">http://stacigh.com/?p=315</guid>
		<description><![CDATA[InDesign&#8217;s GREP feature is awesome. If you haven&#8217;t used it yet, could be cutting your production time down to, well, fractions. And, speaking of fractions, one of the most awesome ways to use GREP is to create custom fractions! This tutorial will have you creating custom fractions in no time. To begin, setup your [Basic [...]]]></description>
			<content:encoded><![CDATA[<p>InDesign&#8217;s GREP feature is awesome. If you haven&#8217;t used it yet, could be cutting your production time down to, well, fractions. And, speaking of fractions, one of the most awesome ways to use GREP is to create custom fractions! This tutorial will have you creating custom fractions in no time.<br />
<span id="more-315"></span><br />
To begin, setup your [Basic Paragraph] style. I used the Caecilia typeface set at 10pt font with 18pt leading. Once you have your basic paragraph style setup, you will need to type in some fraction text. I&#8217;ve setup my styles to include mixed fractions as well (2-1/2, etc).</p>
<p><div id="attachment_327" class="wp-caption alignnone" style="width: 590px"><a href="http://stacigh.com/wp-content/uploads/2011/11/grep-fractions-numerator.png"><img src="http://stacigh.com/wp-content/uploads/2011/11/grep-fractions-numerator.png" alt="GREP Fractions - Numerator Character Style" title="GREP Fractions - Numerator Character Style" width="580" height="348" class="size-full wp-image-327" /></a><p class="wp-caption-text">GREP Fractions - Numerator Character Style</p></div><br />
Create a new character style called &#8220;Numerator&#8221;. Scale this character horizontally and vertically by 55% then shift the baseline to 4pt. If you set your type larger than 10pt, you will need to increase the baseline shift to compensate for the extra height.</p>
<p><div id="attachment_329" class="wp-caption alignnone" style="width: 590px"><a href="http://stacigh.com/wp-content/uploads/2011/11/grep-fractions-denominator.png"><img src="http://stacigh.com/wp-content/uploads/2011/11/grep-fractions-denominator.png" alt="GREP Fractions - Denominator Character Style" title="GREP Fractions - Denominator Character Style" width="580" height="348" class="size-full wp-image-329" /></a><p class="wp-caption-text">GREP Fractions - Denominator Character Style</p></div><br />
Next, create another new character style called &#8220;Denominator&#8221;. This character style is essentially the same as the Numerator character style but without the baseline shift.</p>
<p><div id="attachment_330" class="wp-caption alignnone" style="width: 590px"><a href="http://stacigh.com/wp-content/uploads/2011/11/grep-fractions-hidden-character-all.png"><img src="http://stacigh.com/wp-content/uploads/2011/11/grep-fractions-hidden-character-all.png" alt="GREP Fractions - Hidden Character Style" title="GREP Fractions - Hidden Character Style" width="580" height="800" class="size-full wp-image-330" /></a><p class="wp-caption-text">GREP Fractions - Hidden Character Style</p></div><br />
Our last character style is a Hidden Character. This will be used to hide the dashes between the whole numbers and the fractions. Set the type size at .1pt, scale the type horizontally and vertically by 1% and set the character color to match the background color.</p>
<h4>Making it Work</h4>
<p>The first thing we need to do is create a fraction slash and copy it to the clipboard for later use. You can create a fraction slash by locating the fraction slash character in the glyphs panel (unicode character 2044) and double clicking it. This will insert it into your document. Select the character and copy it (make sure there are no spaces).</p>
<p><div id="attachment_333" class="wp-caption alignnone" style="width: 590px"><a href="http://stacigh.com/wp-content/uploads/2011/11/grep-fractions-find-change-flyout.png"><img src="http://stacigh.com/wp-content/uploads/2011/11/grep-fractions-find-change-flyout.png" alt="GREP Find/Change Flyout Menu" title="GREP Find/Change Flyout Menu" width="580" height="443" class="size-full wp-image-333" /></a><p class="wp-caption-text">GREP Find/Change Flyout Menu</p></div><br />
Press CTRL/CMD+F to pull up the Find/Change menu. At the top of the menu, make sure you are in the GREP section. In the &#8220;replace with&#8221; box, paste your fraction slash (ensure there are no spaces). In the &#8220;find what&#8221; box, you will need to perform a Positive Lookbehind and a Positive Lookahead. This will tell InDesign to find all instances of the forward slash that have a digit in front and a digit behind it and to ignore everything else. To do this, click the @ icon next to the find box to open a flyout menu. Hover your mouse over &#8220;Match&#8221; and select &#8220;Positive Lookbehind.&#8221; This will auto generate the following text in your find field:(?&lt;=)</p>
<p>After the = but before the ) type \d. \d is the wildcard character for any digit. After the ), type a forward slash. After your forward slash, go back to the flyout menu. This time, choose &#8220;Positive Lookahead&#8221; from the Match menu. This will generate the following text: (?=)</p>
<p><div id="attachment_334" class="wp-caption alignnone" style="width: 590px"><a href="http://stacigh.com/wp-content/uploads/2011/11/grep-fractions-find-change-expression.png"><img src="http://stacigh.com/wp-content/uploads/2011/11/grep-fractions-find-change-expression.png" alt="GREP Find/Change Finished Expression" title="GREP Find/Change Finished Expression" width="580" height="436" class="size-full wp-image-334" /></a><p class="wp-caption-text">GREP Find/Change Finished Expression</p></div><br />
Again, after the = but before the ), type \d. Your expression should now read:(?&lt;=\d)/(?=\d)</p>
<p>Click Change All.</p>
<p>Just a couple of quick notes: First, dates that are formatted in numerical form with forward slashes will be affected by this. A great way to circumvent this is to use en-dashes. However, in text, dates should always be spelled out [Chicago Manual of Style Section 9.36]. Second, since this is a GREP find/change, you will need to do this step again if you add new text or make any changes to your document after this step. It&#8217;s not ideal but it works. If anyone knows of a better way to do achieve this result, please leave a comment below.</p>
<h4>GREP In Your Paragraphs</h4>
<p>The first thing we will need to do is replace all occurrences of the forward slash to a fraction slash. We will need to copy the fraction slash to the clipboard again (make sure there are no spaces when you copy the character).</p>
<p><div id="attachment_335" class="wp-caption alignnone" style="width: 590px"><a href="http://stacigh.com/wp-content/uploads/2011/11/grep-fractions-paragraph-style-numerator.png"><img src="http://stacigh.com/wp-content/uploads/2011/11/grep-fractions-paragraph-style-numerator.png" alt="Numerator GREP Expression" title="Numerator GREP Expression" width="580" height="515" class="size-full wp-image-335" /></a><p class="wp-caption-text">Numerator GREP Expression</p></div><br />
Go back to the paragraph style you setup earlier and double click it to open the Paragraph Style Options dialog. From the list on the left, choose GREP Style. Click on &#8220;New Grep Style.&#8221; Our goal is to apply the &#8220;Numerator&#8221; character style to the numerator text, the &#8220;Denominator&#8221; character style to the denominators and the &#8220;Hidden Character&#8221; character style to the dashes in between the whole number and fraction. First, select &#8220;Numerator&#8221; from the &#8220;apply style&#8221; drop down menu. In the &#8220;to text&#8221; field, making sure you use the fraction slash instead of the forward slash, type: \d+(?=/)</p>
<p><div id="attachment_336" class="wp-caption alignnone" style="width: 590px"><a href="http://stacigh.com/wp-content/uploads/2011/11/grep-fractions-paragraph-style-denominator.png"><img src="http://stacigh.com/wp-content/uploads/2011/11/grep-fractions-paragraph-style-denominator.png" alt="Denominator GREP Expression" title="Denominator GREP Expression" width="580" height="504" class="size-full wp-image-336" /></a><p class="wp-caption-text">Denominator GREP Expression</p></div><br />
Create another Grep style. This time, apply the &#8220;Denominator&#8221; style to the following text, again using the fraction slash instead of the forward slash: (?&lt;=/)\d+</p>
<p><div id="attachment_337" class="wp-caption alignnone" style="width: 590px"><a href="http://stacigh.com/wp-content/uploads/2011/11/grep-fractions-paragraph-style-hidden-character.png"><img src="http://stacigh.com/wp-content/uploads/2011/11/grep-fractions-paragraph-style-hidden-character.png" alt="Hidden Character GREP Expression" title="Hidden Character GREP Expression" width="580" height="509" class="size-full wp-image-337" /></a><p class="wp-caption-text">Hidden Character GREP Expression</p></div><br />
Last, we need to hide the hyphens. Create a new Grep style and apply the &#8220;Hidden Character&#8221; style to the following text: (?&lt;=\d)-(?=\d)</p>
<p>Click OK. That&#8217;s all there is to it! Of course, if you find you do this a lot, you could always get the <a href="http://bit.ly/u8azEf" title="Proper Fraction Plugin" target="_blank">Proper Fraction</a> plugin! It does cost a bit of money but there is also a free version of this plugin. The downside to the free version is that you have to manually select each fraction to change it. I find that GREP is much simpler and much faster than this option.</p>
]]></content:encoded>
			<wfw:commentRss>http://stacigh.com/2011/11/grep-fractions-in-indesign/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Displaying Elements at Specific Hours and Minutes with PHP</title>
		<link>http://stacigh.com/2011/11/displaying-elements-at-specific-hours-and-minutes-with-php/</link>
		<comments>http://stacigh.com/2011/11/displaying-elements-at-specific-hours-and-minutes-with-php/#comments</comments>
		<pubDate>Mon, 07 Nov 2011 20:56:29 +0000</pubDate>
		<dc:creator>Stacey</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://stacigh.com/?p=294</guid>
		<description><![CDATA[For one reason or another, you may discover you have the need to display a link or another type of page element within a specific range of time. It&#8217;s relatively easy to do and takes only moments to implement if you know a little about PHP. We will be building the notification bar in the [...]]]></description>
			<content:encoded><![CDATA[<p>For one reason or another, you may discover you have the need to display a link or another type of page element within a specific range of time. It&#8217;s relatively easy to do and takes only moments to implement if you know a little about PHP. We will be building the notification bar in the above preview. Let&#8217;s begin!<br />
<span id="more-294"></span></p>
<h4>The PHP</h4>
<pre class="wp-code-highlight prettyprint linenums:1">
&lt;?php 

	    date_default_timezone_set(&quot;America/Los_Angeles&quot;); // Set the default time zone. Ideally, you want this in your header.
		// For a list of supported timezones visit:  http://www.php.net/manual/en/timezones.php 

		// Variables
		$h = date('G'); // G will display the hour using the 24 hour clock (0-23).
		$m = date('i'); // i will display the minutes in 01, 02 (etc) format.
		$d = date('l'); // l will display the day of the week in Sunday, Monday (etc) format.

		// The first broadcast starts at 45 past the hour.
		// This variable returns the difference in minutes until broadcast time
		$startMinute = 45 - date ('i'); // Start Time - Current Time = Minutes left

		// If it's Friday and the hour is greater than or equal to 13 and less than or equal than 15
		// variable $toggleBar echos &quot;radio-online&quot; else, it echos &quot;radio-offline&quot;
		// This is used to toggle the container that will hold our buttons.
		if ($d == 'Friday' &amp;&amp; $h &gt;= 13 &amp;&amp; $h &lt;= 15) {
			$toggleBar = 'radio-online';
		} else {
			$toggleBar = 'radio-offline';
		}	

		// Broadcast 1 - Displays Friday's between 13:40 and 13:59
		if ($d == 'Friday' &amp;&amp; $h == 13 &amp;&amp; $m &gt;= 40 &amp;&amp; $m &lt;= 59) {
			$toggleBroadcast1 = 'radio-online';
		} else {
			$toggleBroadcast1 = 'radio-offline';
		}

		// Broadcast 2 - Displays Fridays between 14:00 and 15:00
		if ($d == 'Friday' &amp;&amp; $h &gt;= 14 &amp;&amp; $h &lt;= 15) {
			$toggleBroadcast2 = 'radio-online';
		} else {
			$toggleBroadcast2 = 'radio-offline';
		}

		// Removes &quot;In&quot; from &quot;Streaming Live In&quot; on the Countdown
		// The countdown is displayed Fridays from 13:00 - 13:45.
		if ($d == 'Friday' &amp;&amp; $h == 13 &amp;&amp; $m &lt; 45 ) {
			$streaming = 'radio-online';
		} else {
			$streaming = 'radio-offline';
		}
    ?&gt;
</pre>
<p>There&#8217;s a lot going on here. Let&#8217;s break it down. First, we&#8217;ve set the default timezone to PST via PHP. Ideally you should place this code in the header of your website so that it will work across every page on your site. </p>
<p>Next, we find the current hour in the 24 hour clock format, the current minute, current day and store them all in variables ($h for hour, $m for minute and $d for day). </p>
<p>Next, we define the start time by creating a new variable and having PHP do a little math. The broadcast in our example starts at 1:45pm. Since the countdown begins at 1pm, we only need to worry about minutes. We take the broadcast minutes (45) and subtract the current minute and store that value in a variable. </p>
<p>After we define our variables, we need to declare a few if/else statements to toggle the class names. The first if statement is used to display the whole thing. The PHP will watch for three things: Is it Friday and is the hour greater or equal to 13 and is the hour less than or equal to 15? If yes, it will echo &#8220;radio-online&#8221; wherever the variable $toggleBar is written in our HTML code.</p>
<p>The if statements for the broadcast buttons are very similar to the container toggle. For the first broadcast button, PHP is watching for the date to be Friday, the hour to be 13, the minute to be greater than or equal to 40 and the minute to be less than or equal to 59. If all of these things are true, it will display the button. If not, it will not display the button. The same goes for broadcast 2, except it is not looking for a minute range but an hour range.</p>
<p>The last if/else statement we need is just a minor one to fix a grammatical error that will occur once the countdown is over. It will remove &#8220;In&#8221; from &#8220;Streaming Live In&#8221; above the countdown. Here the PHP is looking for the day to be equal to Friday, the hour to be equal to 13 and the minute to be less than 45.</p>
<h4>The HTML Code</h4>
<pre class="wp-code-highlight prettyprint linenums:1">
&lt;div id=&quot;wrapper&quot; class=&quot;&lt;?php echo $toggleBar ?&gt; container_16&quot;&gt;

    &lt;div id=&quot;countdown&quot; class=&quot;grid_8&quot;&gt;
        &lt;p&gt;Streaming Live &lt;span class=&quot;&lt;?php echo $streaming; ?&gt;&quot;&gt;In&lt;/span&gt;&lt;/p&gt;
        &lt;h6&gt;&lt;?php 

		// Echos the total number of minutes left in the countdown, else &quot;Online! LIsten Now!&quot;
		if ($d == 'Friday' &amp;&amp; $h == 13 &amp;&amp; $m &lt; 45 &amp;&amp; $startMinute &gt; 1) {
			echo &quot;$startMinute Minutes! Stay Tuned!&quot;;
		} else {
			echo &quot;Online! Listen now!&quot;;
		}	

		?&gt;&lt;span&gt;Broadcast begins at 1:45pm&lt;/span&gt;&lt;/h6&gt;
    &lt;/div&gt;&lt;!-- /countdown --&gt;

    &lt;div id=&quot;buttons&quot; class=&quot;grid_8&quot;&gt;
        &lt;p&gt;&lt;a class=&quot;&lt;?php echo $toggleBroadcast1; ?&gt; right&quot; href=&quot;#&quot; title=&quot;Listen Live - Click to Launch Player&quot; target=&quot;_blank&quot;&gt;Launch Player&lt;/a&gt;&lt;/p&gt;

        &lt;p&gt;&lt;a class=&quot;&lt;?php echo $toggleBroadcast2; ?&gt; right&quot; href=&quot;#&quot; title=&quot;Listen Live - Click to Launch Player&quot; target=&quot;_blank&quot;&gt;Launch Player&lt;/a&gt;&lt;/p&gt;
    &lt;/div&gt;&lt;!-- /buttons --&gt;

&lt;/div&gt;&lt;!-- /wrapper --&gt;
</pre>
<p>The HTML for this is pretty straight forward. Basically, we&#8217;re defining a container that will dynamically toggle between a certain block of time. Once it&#8217;s toggled, it will display a countdown timer until the broadcast goes live. This will enable the user to see that a broadcast is about to happen and they can choose to launch the player early. When the time comes, the countdown timer will go away and tell the user the broadcast is live. A button will also be displayed so the user may launch the broadcast.</p>
<p>There is a splash of php code in here. First, we&#8217;re telling the div#wrapper that it will have a dynamic class as defined by the PHP variable $toggleBar. If the conditions are met, the variable will echo &#8220;radio-online.&#8221; If they are not met, the variable will echo &#8220;radio-offline.&#8221;</p>
<p>The variable $streaming is waiting for the minute the broadcast goes online at 45 past the hour. When this happens, the PHP script echos out &#8220;radio-offline&#8221; for the span class.</p>
<p>The block of PHP in the H6 tag is searching for four things. Is it Friday? Is the hour 13? Is the minute less than 45? Is there more than 1 minute left until broadcast? If yes, the countdown displays. If no, it displays &#8220;Online! Listen Now!&#8221;</p>
<p>Last, there are two variables being echoed in the div#buttons anchor tags. These are waiting for the conditions to be as defined in the PHP script. Once this happens, the variable will echo &#8220;radio-online&#8221; instead of &#8220;radio-online.&#8221;</p>
<h4>The CSS</h4>
<pre class="wp-code-highlight prettyprint linenums:1">
/*` 960 Grid System Framework (Full framework availalbe at 960.gs)
------------------------------------------------------------------- */
.container_16 {
	margin-left: auto;
	margin-right: auto;
	width: 960px;
}
.grid_8 {
        display: inline;
	float: left;
	margin-left: 10px;
	margin-right: 10px;
	width: 460px;
}

/*` Globals
------------------------------------------------------------------- */
body {
	font-family: &quot;Open Sans&quot;, Arial, Helvetica, sans-serif;
	color: #666;
}

header {
	margin: 50px;
}
header h1 {
	margin-bottom: 5px;
}
header span {
	margin: 0;
}

p {
	font-size: 14px;
}

/*` Container Styles
------------------------------------------------------------------- */
#wrapper {
	height: 76px;
	background-image: -webkit-gradient(linear, center top, center bottom, from(white), to(#eee));
	background-image: -webkit-linear-gradient(top, white, #eee);
	background-image: -moz-linear-gradient(top, white, #eee);
	background-image: -o-linear-gradient(top, white, #eee);
	background-image: -ms-linear-gradient(top, white, #eee);
	background-image: linear-gradient(top, white, #eee);
	-webkit-box-shadow: inset 0 -1px 0 white;
	-moz-box-shadow: inset 0 -1px 0 white;
	box-shadow: inset 0 -1px 0 white;
	border: 1px solid #d1d1d1;
	-webkit-border-radius: 5px;
	-moz-border-radius: 5px;
	-ms-border-radius: 5px;
	-o-border-radius: 5px;
	color: #999;
	position: relative;
}
#countdown {
	margin-top: 20px;
}
#countdown h6 {
	font-size: 21px;
	font-weight: 300;
	color: #1ea2eb;
	margin: 0;
}
#countdown h6 span {
	font-size: 14px;
	color: #999;
}
#countdown p {
	text-transform: uppercase;
	font-weight: 700;
	margin: 0;
}
#buttons {
	margin-top: 12px;
}

/*` Radio-Online!
------------------------------------------------------------------- */

/* Buttons */
a.radio-online {
	background: #78cdfc; /* Old browsers */
	background-image: -moz-linear-gradient(top, #78cdfc 0%, #44ade2 50%, #268dc1 50%, #116b9d 100%); /* FF3.6+ */
	background-image: -ms-linear-gradient(top, #78cdfc 0%, #44ade2 50%, #268dc1 50%, #116b9d 100%); /* IE10 */
	background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#78cdfc), color-stop(50%,#44ade2), color-stop(50%,#268dc1), color-stop(100%,#116b9d)); /* Chrome,Safari4+ */
	background-image: -webkit-linear-gradient(top, #78cdfc 0%,#44ade2 50%,#268dc1 50%,#116b9d 100%); /* Chrome10+,Safari5.1+ */
	background-image: -o-linear-gradient(top, #78cdfc 0%,#44ade2 50%,#268dc1 50%,#116b9d 100%); /* Opera 11.10+ */
	background-image: -ms-linear-gradient(top, #78cdfc 0%,#44ade2 50%,#268dc1 50%,#116b9d 100%); /* IE10+ */
	background-image: linear-gradient(top, #78cdfc 0%,#44ade2 50%,#268dc1 50%,#116b9d 100%); /* W3C */
	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#78cdfc', endColorstr='#116b9d',GradientType=0 ); /* IE6-9 */
	border: 1px solid #0c5984;
	-webkit-border-radius: 5px;
	-moz-border-radius: 5px;
	-ms-border-radius: 5px;
	-o-border-radius: 5px;
	border-radius: 5px;
	text-shadow: 0px 1px 0px #072f50;
	-webkit-box-shadow: 0px 3px 2px #b2b2b2, inset 0px 1px 0px #fff;
	-moz-box-shadow: 0px 3px 2px #b2b2b2, inset 0px 1px 0px #fff;
	-ms-box-shadow: 0px 3px 2px #b2b2b2, inset 0px 1px 0px #fff;
	-o-box-shadow: 0px 3px 2px #b2b2b2, inset 0px 1px 0px #fff;
	box-shadow: 0px 3px 2px #b2b2b2, inset 0px 1px 0px #fff;
	font-size: 16px;
	font-weight: 700;
	color: #fff;
	text-decoration: none;
	text-align: center;
	height: 27px;
	padding: 15px 20px 6px;
	float: right;
}
a.radio-online:hover {
	background-image: -webkit-gradient(linear, center top, center bottom, from(#545454), to(black));
	background-image: -webkit-linear-gradient(top, #545454, black);
	background-image: -moz-linear-gradient(top, #545454, black);
	background-image: -o-linear-gradient(top, #545454, black);
	background-image: -ms-linear-gradient(top, #545454, black);
	background-image: linear-gradient(top, #545454, black);
	border: 1px solid #000;
	text-shadow: 0px 1px 0px #000;
	-moz-box-shadow: 0px 3px 2px #b2b2b2, inset 0px 1px 0px rgba(255,255,255,0.8);
	-webkit-box-shadow: 0px 3px 2px #b2b2b2, inset 0px 1px 0px rgba(255,255,255,0.8)
	box-shadow: 0px 3px 2px #b2b2b2, inset 0px 1px 0px rgba(255,255,255,0.8);
}

/* Block/Inline Elements */
div.radio-online {
	display: block;
}
span.radio-online {
	display: inline;
}

/*` Radio-Offline
------------------------------------------------------------------- */
.radio-offline {
	display: none;
}
</pre>
<p>Most of this code is making the containers and buttons pretty. The meat and potatoes of the css is the Sections marked Radio-Online and Radio-Offline. Basically, when the broadcast is live, everything is displayed. When it&#8217;s not, nothing is displayed. </p>
<p>&nbsp;</p>
<h4>Download the Files</h4>
<a class="button " href="http://stacigh.com/wp-content/plugins/download-monitor/download.php?id=2" title="Display Elements with PHP"><span>Download This Tutorial - 4.23 kB</span></a> 
]]></content:encoded>
			<wfw:commentRss>http://stacigh.com/2011/11/displaying-elements-at-specific-hours-and-minutes-with-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS3 &amp; jQuery Expanding/Collapsing Inline Inputs</title>
		<link>http://stacigh.com/2011/10/css3-jquery-expandingcollapsing-inline-inputs/</link>
		<comments>http://stacigh.com/2011/10/css3-jquery-expandingcollapsing-inline-inputs/#comments</comments>
		<pubDate>Tue, 25 Oct 2011 20:12:49 +0000</pubDate>
		<dc:creator>Stacey</dc:creator>
				<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://stacigh.com/?p=249</guid>
		<description><![CDATA[Recently I was tasked with creating a newsletter sign-up box that was simple, elegant and, above all else, usable. I decided to use jQuery combined with CSS3 to create really sleek expanding and collapsing inputs upon interaction. It&#8217;s pretty straight forward and simple. Let&#8217;s break it down. Take a look at what we will be [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I was tasked with creating a newsletter sign-up box that was simple, elegant and, above all else, usable. I decided to use jQuery combined with CSS3 to create really sleek expanding and collapsing inputs upon interaction. It&#8217;s pretty straight forward and simple. Let&#8217;s break it down.</p>
<p>Take a look at what we will be creating:<br />
<a href="http://bit.ly/uyAnv6" target="_blank" title="View Demo">View the Demo</a><br />
<span id="more-249"></span></p>
<h4>The HTML Code</h4>
<pre class="wp-code-highlight prettyprint linenums:1">
&lt;div id=&quot;wrapper-newsletter&quot;&gt;
    &lt;h4&gt;Receive Updates&lt;/h4&gt;
    &lt;p&gt;To recieve notifications when our site is updated, enter your email address and name below!&lt;/p&gt;

    &lt;form name=&quot;newsletter&quot; action=&quot;&quot; method=&quot;&quot;&gt;
        &lt;label for=&quot;newsletter-name&quot;&gt;Name&lt;/label&gt;
        &lt;label for=&quot;newsletter-surname&quot;&gt;Surname&lt;/label&gt;
        &lt;label for=&quot;newsletter-email&quot;&gt;Email&lt;/label&gt;
        &lt;input type=&quot;text&quot; class=&quot;resting-state&quot; name=&quot;newsletter-name&quot; value=&quot;Name&quot; /&gt;
        &lt;input type=&quot;text&quot; class=&quot;resting-state&quot; name=&quot;newsletter-surname&quot; value=&quot;Surname&quot; /&gt;
        &lt;input type=&quot;text&quot; class=&quot;resting-state&quot; name=&quot;newsletter-email&quot; value=&quot;Email&quot; /&gt;
        &lt;input type=&quot;submit&quot; class=&quot;button-submit&quot; name=&quot;newsletter-sumbit&quot; value=&quot;Subscribe&quot; /&gt;
    &lt;/form&gt;

&lt;/div&gt;&lt;!-- div#wrapper-newsletter --&gt;
</pre>
<p>The first step is to setup the basic HTML form. I&#8217;ve contained everything here inside a div with the id of wrapper-newsletter. Inside the div I gave it a basic heading tag and paragraph explaining what this form is all about. The form itself is made up of three labels, a submit button and three inputs with values, which display what to type in the boxes. We will be targeting the inputs with jQuery to clear as soon as a user clicks into the input. The reason I have left the labels in the form is for SEO purposes. With the CSS, we will be moving these off the screen as they won&#8217;t be needed for the end user. I have also set the class for all inputs to be &#8220;resting-state.&#8221;</p>
<p>&nbsp;</p>
<h4>The CSS</h4>
<pre class="wp-code-highlight prettyprint linenums:1">
/* CSS5 &amp; jQuery Expanding &amp; Collapsing Inline Inputs by Stacey Lane */

/* GLOBALS */
body {
    font-family: sans-serif;
    font-weight: 300;
    color: #666;
}
h1 {
   font-size: 21px;
   margin-bottom: 15px;
}

/* NEWSLETTER BOX STYLES */
#wrapper-newsletter {
    background: #ffffff; /* Old browsers */
    background: -moz-linear-gradient(top, #ffffff 0%, #eeeeee 100%); /* FF3.6+ */
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#eeeeee)); /* Chrome,Safari4+ */
    background: -webkit-linear-gradient(top, #ffffff 0%,#eeeeee 100%); /* Chrome10+,Safari5.1+ */
    background: -o-linear-gradient(top, #ffffff 0%,#eeeeee 100%); /* Opera11.10+ */
    background: -ms-linear-gradient(top, #ffffff 0%,#eeeeee 100%); /* IE10+ */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#eeeeee',GradientType=0 ); /* IE6-9 */
    background: linear-gradient(top, #ffffff 0%,#eeeeee 100%); /* W3C */
    border: 1px solid #ededed;
    border-radius: 5px;
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    min-height: 100px;
    width: 438px; /* Width + Padding + Border = 460 */
    padding: 10px;
    position: relative;
}

/* TEXT STYLES */
#wrapper-newsletter h4 {
    font-size: 21px;
    font-weight: 300;
    margin: 0 0 5px 0;
    color: #555;
}
#wrapper-newsletter p {
    margin-bottom: 10px;
}
#wrapper-newsletter label {
    display: block;
    float: left;
    text-indent: -9999px; /* this removes the element from the screen but keeps it in the markup for SEO purposes. This trick only works on block elements. Since form elements are defaulted to display as inline elements, we need to switch it to block. They are floated so they do not create any white space once they are moved off screen. */
}

/* BUTTON STYLES */
#wrapper-newsletter .button-submit {
    background: #333;
    color: #fff;
    text-decoration: none !important;
    font-size: 12px;
    font-weight: bold;
    border-radius: 5px;
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    border: 1px solid #000;
    padding: 4px 15px 5px;  /* This is to center the text in the button. If you adjust the fonts, you may need to adjust this to center the text again */
    position: absolute; /* Positioning the button keeps it from moving ever so slightly when the inputs transition to their new widths */
    bottom: 10px; /* This is the same as the amount of bottom padding in #wrapper-newsletter */
    right: 10px; /* Again, same as the amount of right side padding in #wrapper-newsletter */
}
#wrapper-newsletter .button-submit:hover {
    background: #1ea2eb;
    border: 1px solid #0096e8;
}

/* INPUT STYLES */

#wrapper-newsletter input[type=text] {
    height: 24px; /* Height + Border = 26px */
    border-radius: 5px;
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    background-color: #f8f8f8;
    border: 1px solid #ccc;
    color: #999;
    font-family: 'Open Sans', sans-serif;
    padding-left: 7px;
    -webkit-transition: all 0.3s ease; /* Required so the inputs resize in a smooth motion rather than popping to the new size */
    -moz-transition:    all 0.3s ease;
    -ms-transition:     all 0.3s ease;
    -o-transition:      all 0.3s ease;
}
#wrapper-newsletter input[type=text]:focus {
    width: 180px; /* This is the width you would like the input to expand to. Don't forget, it's 2px wider because of the border.*/
    outline: none;
    border: 1px solid #1ea2eb;
}
#wrapper-newsletter input[type=text].resting-state {
    width: 102px !important; /* This is the widths of all the inputs at their resting/untouched state */
}
#wrapper-newsletter input[type=text].shrunken-state {
    width: 63px; /* When an input is selected, the other inputs are passed this class name via jQuery. This will reduce the width of the non-focused inputs to allow more room for the focused input to expand without cascading the button to the next line */
}

/* GETTING FF TO BEHAVE */
@-moz-document url-prefix() {
    #wrapper-newsletter .button-submit {
        padding: 3px 10px 4px;
    }
}
</pre>
<p>First I&#8217;ve styled the parent div (#wrapper-newsletter) with some basic styles which include a gradient background, border, rounded corners, height, width and padding. I have also set the position to relative. This is important later. Next I&#8217;ve defined how an H4 and P tag display.</p>
<p>Since labels display inline, we need to switch them to display as block. This is because only block elements can be positioned offscreen using the text-indent selector. I have also set the label to float left. This is important because it will create no additional white space between the paragraph tag and the form.</p>
<p>We&#8217;ll skip over the form elements for just a moment and move on to the button. I&#8217;ve styled the button by giving it a background and border with rounded corners, as well as declaring how the type will display. You&#8217;ll notice that I have also set the position to absolute; 10px from the bottom right. This is why we set the position of the parent div to relative. Since the button is on the right side of the inputs and the inputs are going to be moving, it&#8217;s important that we anchor this puppy absolutely so that it doesn&#8217;t shift around during the animations. Another bonus about positioning it absolutely is that it will put the kibosh on any clipping that could happen in the event that the browser renders a line break in the animation process. I&#8217;ve finished styling the button by giving it different background and border colors on hover.</p>
<p>Alright! Time for the inputs! I&#8217;ve set the height to display at the same size of the button. In this case, it&#8217;s 26px total (24px for the height and 2px for the border). I&#8217;ve also set the background color, border color, text color, size and family as well as added some padding to the left so the text is indented slightly into the input. Last, I&#8217;ve set the transition using the CSS3 transition properties. I&#8217;ve done this for each browser type. Basically, when something happens to this input it will take .3 seconds to transition, use an ease effect for the transition and apply that transition to all properties that have been changed. In our case, it will be width but it could include, background color, border, height, font style, you name it.</p>
<p>Next we will set a width in the event that the input is clicked. I&#8217;ve set this to 180px. I&#8217;ve also removed the outline (which is a default action that the browser displays when the input is selected) and instead I&#8217;ve chosen to apply a simple border to the input. In addition to setting the :focus pseudo selector, we will need to create two new classes that we&#8217;ll use in tandem with the jQuery. The first class is &#8220;resting-state.&#8221; This will be used when the page loads and after the user has interacted with the form. The second class is &#8220;shrunken-state.&#8221; This will be used when one input has a focus. This class will be applied to the inputs that are not focused.</p>
<p>Last, to get this to display correctly in Firefox, we need to adjust the padding slightly so the button does not overlap the inputs.</p>
<p>&nbsp;</p>
<h4>The jQuery</h4>
<pre class="wp-code-highlight prettyprint linenums:1">
// CSS5 &amp; jQuery Expanding &amp; Collapsing Inline Inputs by Stacey Lane
$(document).ready(function() {
    $('#wrapper-newsletter input[type=text]').addClass(&quot;shrunken-state&quot;);
    //Every input starts out with the class &quot;resting-state&quot; as defined in the HTML. This line adds a second class, shrunken-state.

    $('#wrapper-newsletter input[type=text]').focus(function() {
        //When an input is focused,

        $('#wrapper-newsletter input[type=text]').removeClass('resting-state');
        //Remove class .resting-state from all inputs

        $(this).removeClass(&quot;shrunken-state&quot;);
        //and remove class .shrunken-state from the focused input. This leaves the focused input with no class so that #wrapper-newsletter input[type=text]:focus works correctly. It resizes it to the correct dimensions based upon the css :focus pseudo-selector and css3 transitions as defined in #wrapper-newsletter input[type=text]. It also enables the other inputs to shrink down to the value defined in .shrunken-state

        if (this.value == this.defaultValue) {
            this.value = '';
        }
        // on focus, if this objects value is the default value, then remove the default value and display nothing

        if (this.value != this.defaultValue) {
            this.select();
        }
        // on focus, if this objects value is not the default value, select the value
    });

    $('#wrapper-newsletter input[type=text]').blur(function() {
        //When an input loses focus,

        $('#wrapper-newsletter input[type=text]').addClass('resting-state');
        //add class .resting-state (this is added because we previously removed it from the focused input. If we do not add it back to the blurred input, the input remains the size defined in .shrunken-state), then:

        $(this).addClass(&quot;shrunken-state&quot;);
        //add class .shrunken-state. This reduces the input width to accomodate the increase width of the focused input.

        if (this.value == '') {
            //on blur, if the value is nothing then:

            this.value = (this.defaultValue ? this.defaultValue : '');
            //put it back to the default value. If there is text, leave the text entered.
        }
    });
});
</pre>
<p>The gist of the jQuery is that we want to apply the class &#8220;shrunken-state&#8221; to all inputs in addition to the class &#8220;resting-state&#8221; that we defined in the HTML. On focus, we want to remove the class &#8220;resting-state&#8221; from all inputs as well as remove the class &#8220;shrunken-state&#8221; from the focused input. Additionally, we want the jQuery to check the default value of the focused input. If the text in the box is the default value, we want jQuery to remove the value so the user may type without hitting the backspace key. If the text is different, we want jQuery to select the text (in some browsers, the cursor will be placed after the text). Once we&#8217;ve clicked out of the focused input into a different input, we want to add &#8220;shrunken-state&#8221; to the now blurred input and remove &#8220;shrunken-state&#8221; from the new focused input. Additionally, jQuery should check the now blurred input to see if anything was entered. If nothing was entered, jQuery will display the default text. Review the commented code above to see what each line of jQuery code does.</p>
<p>&nbsp;</p>
<h4>Download the Files</h4>
<a class="button " href="http://stacigh.com/wp-content/plugins/download-monitor/download.php?id=1" title="CSS3/JQ Inline Inputs"><span>Download This Tutorial - 3.3 kB</span></a> 
]]></content:encoded>
			<wfw:commentRss>http://stacigh.com/2011/10/css3-jquery-expandingcollapsing-inline-inputs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

