<?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>J&#38;C Group</title>
	<atom:link href="http://jandcgroup.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://jandcgroup.com</link>
	<description>web development</description>
	<lastBuildDate>Fri, 16 Dec 2011 19:05:47 +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>To Do: Efficient, Future-Friendly Front End Strategy</title>
		<link>http://jandcgroup.com/2011/12/16/efficient-future-friendly-front-end-strategy/</link>
		<comments>http://jandcgroup.com/2011/12/16/efficient-future-friendly-front-end-strategy/#comments</comments>
		<pubDate>Fri, 16 Dec 2011 17:57:58 +0000</pubDate>
		<dc:creator>adria</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://jandcgroup.com/?p=500</guid>
		<description><![CDATA[Here&#8217;s a list of links of stuff I need to look into and implement. Fluid layout, responsive design, grid layouts, efficient CSS, mobile first strategy, reusable jquery tools. Object Oriented CSS stubbornella.org Object Oriented CSS on Github http://net.tutsplus.com/tutorials/html-css-techniques/object-oriented-css-what-how-and-why/ https://github.com/stubbornella/oocss/wiki CSS &#8230; <a href="http://jandcgroup.com/2011/12/16/efficient-future-friendly-front-end-strategy/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a list of links of stuff I need to look into and implement.  </p>
<p>Fluid layout, responsive design, grid layouts, efficient CSS, mobile first strategy, reusable jquery tools.</p>
<h2>Object Oriented CSS</h2>
<p><a href="http://stubbornella.org/">stubbornella.org</a><br />
<a href="https://github.com/stubbornella/oocss">Object Oriented CSS on Github</a><br />
<a href="http://net.tutsplus.com/tutorials/html-css-techniques/object-oriented-css-what-how-and-why/">http://net.tutsplus.com/tutorials/html-css-techniques/object-oriented-css-what-how-and-why/</a><br />
<a href="https://github.com/stubbornella/oocss/wiki">https://github.com/stubbornella/oocss/wiki</a><br />
<a href="http://csslint.net/">CSS Lint</a><br />
<a href="http://lesscss.org/">LESS</a> and <a href="http://sass-lang.com/">SASS</a></p>
<h2>CSS Grids</h2>
<p><a href="http://www.1kbgrid.com/">http://www.1kbgrid.com/</a><br />
<a href="http://cssgrid.net/">http://cssgrid.net/</a><br />
<a href="http://www.52framework.com/">http://www.52framework.com/</a></p>
<h2>Responsive Web Design</h2>
<p><a href="http://www.abookapart.com/products/mobile-first">http://www.abookapart.com/products/mobile-first</a><br />
<a href="http://www.abookapart.com/products/responsive-web-design">http://www.abookapart.com/products/responsive-web-design</a><br />
<a href="http://designmodo.com/responsive-design-examples/">http://designmodo.com/responsive-design-examples/</a><br />
<a href="http://www.alistapart.com/articles/responsive-web-design/">http://www.alistapart.com/articles/responsive-web-design/</a></p>
<h2>JQuery Tools Library</h2>
<p><a href="http://flowplayer.org/tools/">http://flowplayer.org/tools/</a><br />
<a href="http://jquerymobile.com">http://jquerymobile.com</a></p>
<h2>Microformats</h2>
<p><a href="http://microformats.org/wiki">http://microformats.org/wiki</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jandcgroup.com/2011/12/16/efficient-future-friendly-front-end-strategy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>An Event Apart SF 2011 &#8211; Resources and Sound Bites &#8211; Part 2</title>
		<link>http://jandcgroup.com/2011/12/14/an-event-apart-sf-2011-resources-and-sound-bites-part-2/</link>
		<comments>http://jandcgroup.com/2011/12/14/an-event-apart-sf-2011-resources-and-sound-bites-part-2/#comments</comments>
		<pubDate>Wed, 14 Dec 2011 17:46:07 +0000</pubDate>
		<dc:creator>adria</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://jandcgroup.com/?p=493</guid>
		<description><![CDATA[all presentations: http://aneventapart.com/2011/sanfrancisco/slides/ Using Flexible Boxes &#8211; Eric Meyer, author, CSS: The Definitive Guide, 3rd Ed. flexible boxes are sort of like tables, but behave much better and do cooler things. starting with: a list with list items (boxes of &#8230; <a href="http://jandcgroup.com/2011/12/14/an-event-apart-sf-2011-resources-and-sound-bites-part-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>all presentations: <a href="http://aneventapart.com/2011/sanfrancisco/slides/">http://aneventapart.com/2011/sanfrancisco/slides/</a></p>
<h2>Using Flexible Boxes &#8211; Eric Meyer, author, CSS: The Definitive Guide, 3rd Ed.</h2>
<p>flexible boxes are sort of like tables, but behave much better and do cooler things.</p>
<p>starting with:  a list with list items (boxes of content, should align side by side).<br />
on ol:<br />
using display:box on the parent element makes all of its child elements also have display:box;<br />
box-orient:horizontal;<br />
box-pack:center /* only supported in webkit */</p>
<p>on li:<br />
set a background color, then all the elements will match in height.<br />
box-flex:1; /* sets flexible boxes. */</p>
<p>each box will get the same amount added (or subtracted) to it to fit the containing space.</p>
<p>for flex to be applied:  you take the amount of space left over, and divide by the total number of box flex numbers, and apply the designated amount to each box.  (could have box-flex:2 etc. which would get that box 2 parts assigned.)</p>
<p>box-ordinal-group:  2.  could make a bunch of boxes 2, then give another one say class &#8220;sticky&#8221;  of box-ordinal-group: 1, then it will always stay at the beginning of the list of boxes.</p>
<p>You can turn your whole page into a flex box, and use ordinal groups to rearrange content for mobile, etc.  (put nav at the bottom, for example).  </p>
<p>what to do with browsers that don&#8217;t support flexible boxes?<br />
float it.  This doesn&#8217;t solve all the problems though, for example equal height is not possible, or ordinal groups.</p>
<p>2011 flexible box specification has lots of new stuff</p>
<h2>Our Best Practices are Killing Us &#8211; Nicole Sullivan, co-author, Even Faster Websites</h2>
<p><a href="http://stubbornella.org">stubbornella.org</a><br />
<a href="https://github.com/stubbornella/oocss">Object Oriented CSS on Github</a></p>
<p>use grep to find problems with css.<br />
use <a href="http://csslint.net/">CSS Lint</a> to find errors and duplication</p>
<h3>usecases</h3>
<p>facebook css was 1.9MB.  Facebook blue was declared 261 times.  548 unique colors (whaaa?).  color: was declared 6498 times.  </p>
<p>salesforce: over 5000 padding declarations.  </p>
<p>Duplication is a serious problem esp. with font size, floating, padding</p>
<p>alexa top 1000 consumer site study &#8211;<br />
worst examples:  518 !important<br />
733 floated elements &#8211; look at a grid based layout system!<br />
889 font-size declarations</p>
<h3>Myths</h3>
<h4>Using px is bad</h4>
<p>using px is ok.  only ie6 doesn&#8217;t support page zoom, which is the only reason not to use px.  Using em&#8217;s turns into a mess because of nesting.  It is hard to predict results, so it causes bugs.  If you don&#8217;t support ie6, there is really no reason not to use px font sizes.  Only use em&#8217;s or percentages on body and leaf nodes (if you must use them at all), no where in between.  </p>
<h4>Less markup is good</h4>
<p>Less markup is good, but don&#8217;t go so far that doing so causes bugs.  Surrounding a list by a div is ok, if it solves problems.  </p>
<h4>Semantic Markup is essential</h4>
<p>css is too tightly coupled with the content.  can semantics be taken too far?  classes and id&#8217;s are not read by anybody besides other developers.  So let&#8217;s make them work for us.  For CSS, more is not better. Do not repeat yourself!</p>
<p>CSS pattern abstraction:  &#8220;<a href="http://www.stubbornella.org/content/2010/06/25/the-media-object-saves-hundreds-of-lines-of-code/">the media block</a>&#8220;.  (image on the left, some content on the right)<br />
what we know:<br />
can be nested<br />
optional right button<br />
must clearfix</p>
<p>don&#8217;t know:<br />
image width, decoration<br />
right content is unknown<br />
width is unknown</p>
<p>separate structure from chrome</p>
<h4>Is performance the most important thing</h4>
<p>No.  More important is repetition, duplication, legacy code.</p>
<p>Choose semantic elements: headings, lists, paragraphs<br />
Abstract the css as much as possible from style and content.<br />
<a href="http://net.tutsplus.com/tutorials/html-css-techniques/object-oriented-css-what-how-and-why/">http://net.tutsplus.com/tutorials/html-css-techniques/object-oriented-css-what-how-and-why/</a><br />
<a href="https://github.com/stubbornella/oocss/wiki">https://github.com/stubbornella/oocss/wiki</a></p>
<h4>Too many classes is bad</h4>
<p>Uses more classes is actually faster and avoids duplication than using descendent selectors only.  Using a class is more specific than using elements.</p>
<p>Specificity grows over time.  Difficult to tell which rules take precedence.</p>
<p>Over time &#8211; specificity and duplication grows.  </p>
<p>Use semantically correct headings in html, add class names to each one in css so you can apply visual semantics.  (h1, .h1 {blah}).  </p>
<p>Avoid descendent selectors whenever you can.  Because those elements might not always be in that same situation.  Make &#8220;reusable lego pieces&#8221;.  Add class directly to elements you want to change, not parent nodes.  </p>
<p>There are two main principles [in object-oriented CSS]: the first is to separate the structure from the skin and the second is to separate the container from the content.</p>
<p><a href="http://gregdoolittle.com/blog/2011/12/13/notes-from-nicole-sullivan%E2%80%99s-talk-%E2%80%9Cour-best-practices-are-killing-us%E2%80%9D-at-aea2011sf/">greg&#8217;s notes on this talk</a></p>
<h2>Idea to Interface &#8211; Aarron Walter, author, Designing for Emotion</h2>
<p><a href="http://gregdoolittle.com/blog/2011/12/13/notes-from-aarron-walter%E2%80%99s-talk-%E2%80%9Cidea-to-interface%E2%80%9D-at-aea2011sf/">greg&#8217;s notes</a>.  i failed.</p>
<h2>Smoke Gets In Your Eyes (css3 animations) &#8211;  Andy Clarke, author, Hardboiled Web Design</h2>
<p>css animation fits better with semantic meaningful markup than other ways of web animation.</p>
<p>css3 animation demo studio<a href="https://developer.mozilla.org/en-US/demos/tag/tech:css3/">https://developer.mozilla.org/en-US/demos/tag/tech:css3/</a></p>
<p><a href="http://animatable.com/">http://animatable.com/</a><br />
<a href="http://animatable.com/demos/madmanimation/">http://animatable.com/demos/madmanimation/</a></p>
<p>transitions are basic animations.</p>
<p>@keyframes create more advanced animation effects.</p>
<p>@keyframes fade {<br />
     0% {opacity:0;}<br />
     25% {opacity:.5;}<br />
     100% {opacity:1;}<br />
}</p>
<p>.lamp {<br />
     animation-name: fade;<br />
     animation-duration: 6s;<br />
     animation-delay:1500ms;<br />
     animation-iteration-count: 1;<br />
     transform: rotate(5deg);<br />
}</p>
<h3>css3 transforms</h3>
<p>apply transforms and combine with keyframe animations to create effects.<br />
translate (move)<br />
rotate<br />
scale<br />
skew<br />
<a href="http://gregdoolittle.com/blog/2011/12/13/notes-from-andy-clarke%E2%80%99s-talk-%E2%80%9Csmoke-gets-in-your-eyes%E2%80%9D-at-aea2011sf/"><br />
greg&#8217;s notes (have more code samples)</a></p>
<h2>A Content Strategy Roadmap &#8211; <a href="http://aneventapart.com/speakers/kristinahalvorson/">Kristina Halvorson</a>, author, Content Strategy for the Web</h2>
<p><a href="http://www.scoop.it/t/an-event-apart-content-strategy-resources">content strategy resources</a></p>
<p>Content First &#8211; we can all agree on that.  Content Always</p>
<p>Content isn&#8217;t copy.  Content first is not copy first. </p>
<p>What we need is &#8220;content strategy&#8221; in the project framework<br />
Content strategy plans for the creation, delivery and governance of useful, usable content.</p>
<p>what,why,how,when, for whom, with what, where, how often, what next</p>
<p>content components: substance, structure<br />
people components: workflow, governance</p>
<p>how will your content serve your business and your users?</p>
<p>get away from the &#8220;launch it and leave it&#8221; strategy</p>
<p>it should enter a content lifecycle that goes around and around until the content is DELETED: >strategy>plan>create>maintain>audit></p>
<h4>Discovery</h4>
<p>content audit:  what do you have, what is it, where is it, what is it for.  Also a good chance to update your meta title, desc. and keywords.  A good person to do this task is the copywriter or &#8220;content wrangler&#8221;.  </p>
<p>content ROT (redundant, outdated, trivial).  REMOVE IT.<br />
content readability, stakeholder agendas, legal requirements, style guides, metadata integrity, workflow and timelines, content owners</p>
<h4>Define</h4>
<p>content requirements<br />
pair our business objectives with what the user expects and desires<br />
content wrangler works with UX to create a &#8220;core message&#8221; that should guide the content requirements.  Bring the copywriter in at the beginning of the content strategy process!</p>
<p>short and simple styleguide to demonstrate the copy voice matches the personality of the &#8220;core message&#8221;.  This can be one page long.  </p>
<p>editorial calendar &#8211; start this early and make it realistic based on the facts of the resources available.</p>
<p>make &#8220;page tables&#8221;  which are templates for people to deliver content.  Templates would include: key message, objective, priority, maintenance, source material.  This will make it easier for content creators to give you what you want, and keep with the content objectives at all times.</p>
<h4>Develop</h4>
<p>html, qa, content upload, seo implementation, authoring conventions, data model, system integration</p>
<p>content inventory, upload, styleguide, seo guidelines, error messages, metadata, training materials, content qa plan</p>
<h4>After Deployment. Maintain and Care</h4>
<p>Maintain and care for the content, audit it, revisit, revise, keeping it with your core message</p>
<h3>responsive content</h3>
<p>Structure content to be modular for use across different devices.  Think of your content objective, not the form that it lives in.  Always keep with your core message, prioritize the content.</p>
<h2>The Secret Lives of Links &#8211; Jared Spool, Founding Principal, User Interface Engineering</h2>
<p>oops I got tired.<br />
links.  make them go where people want, make them look good but still like links, use trigger words to help people go where they want (hint: a trigger word is what they would put in the search bar).<br />
Avoid back button and pogosticking (back and forth between the information hierarchy)</p>
]]></content:encoded>
			<wfw:commentRss>http://jandcgroup.com/2011/12/14/an-event-apart-sf-2011-resources-and-sound-bites-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>An Event Apart SF 2011 &#8211; Resources and Sound Bites &#8211; Part 1</title>
		<link>http://jandcgroup.com/2011/12/12/an-event-apart-sf-2011-resources-and-sound-bites-part-1/</link>
		<comments>http://jandcgroup.com/2011/12/12/an-event-apart-sf-2011-resources-and-sound-bites-part-1/#comments</comments>
		<pubDate>Tue, 13 Dec 2011 01:27:49 +0000</pubDate>
		<dc:creator>adria</dc:creator>
				<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://jandcgroup.com/?p=461</guid>
		<description><![CDATA[All presentations: http://aneventapart.com/2011/sanfrancisco/slides/ Content First! &#8211; Jeffrey Zeldman, author, Designing With Web Standards, 3rd Ed. Good Design Begins With Content http://www.readability.com/ Progressive Enhancement &#8211; Add Layers of Experience http://easy-readers.net/books/adaptive-web-design/ Responsive Web Design http://www.abookapart.com/products/responsive-web-design http://designmodo.com/responsive-design-examples/ http://www.alistapart.com/articles/responsive-web-design/ http://10k.aneventapart.com/ http://futurefriend.ly &#8220;Mobile First&#8221; Approach &#8230; <a href="http://jandcgroup.com/2011/12/12/an-event-apart-sf-2011-resources-and-sound-bites-part-1/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>All presentations: <a href="http://aneventapart.com/2011/sanfrancisco/slides/">http://aneventapart.com/2011/sanfrancisco/slides/</a></p>
<h2>Content First! &#8211; Jeffrey Zeldman, author, Designing With Web Standards, 3rd Ed.</h2>
<p>Good Design Begins With Content<br />
<a href="http://www.readability.com/">http://www.readability.com/</a></p>
<p>Progressive Enhancement &#8211; Add Layers of Experience<br />
<a href="http://easy-readers.net/books/adaptive-web-design/">http://easy-readers.net/books/adaptive-web-design/</a></p>
<p>Responsive Web Design<br />
<a href="http://www.abookapart.com/products/responsive-web-design">http://www.abookapart.com/products/responsive-web-design</a><br />
<a href="http://designmodo.com/responsive-design-examples/">http://designmodo.com/responsive-design-examples/</a><br />
<a href="http://www.alistapart.com/articles/responsive-web-design/">http://www.alistapart.com/articles/responsive-web-design/</a><br />
<a href="http://10k.aneventapart.com/">http://10k.aneventapart.com/</a><br />
<a href="http://futurefriend.ly">http://futurefriend.ly</a></p>
<p>&#8220;Mobile First&#8221; Approach &#8211; Design for mobile first, then go up.  Do we need all that crap?</p>
<h2>With Great Power Comes Great Responsibility &#8211; Elliot Jay Stocks, author, Sexy Web Design</h2>
<p><a href="http://nizoapp.com">nizoapp.com</a><br />
<a href="http://benthebodyguard.com">benthebodyguard.com</a><br />
<a href="http://www.nikebetterworld.com/">http://www.nikebetterworld.com/</a></p>
<p>awesome design inspiration: <a href="http://siteinspire.com/">http://siteinspire.com/</a></p>
<p>Distraction of the &#8216;Real&#8217;<br />
Am I using an effect that makes something on the page look real.  If so, why?<br />
It&#8217;s about considering the context.  </p>
<p>Typography is (Almost) Everything</p>
<p>More fonts is not better<br />
Learn from print design<br />
<a href="http://8faces.com/">http://8faces.com/</a></p>
<p><a href="http://www.alistapart.com/articles/settingtypeontheweb">http://www.alistapart.com/articles/settingtypeontheweb</a><br />
<a href="http://baselinecss.com/grid.html">http://baselinecss.com/</a><br />
Tim Brown: More Perfect Typography<br />
<a href="http://typecastapp.com">Typecastapp.com</a></p>
<p>Working from the typography outwards.  Good typography and layout is important.  All the fancy stuff can be added later (shadows, border radius, glossy), it&#8217;s not as important.<br />
<a href="http://ilovetypography.com/sayonara-2010"><br />
ilovetypography.com/sayonara-2010</a></p>
<p>Use your powerful tools wisely.</p>
<h2>HTML5 Design Principles &#8211; Jeremy Keith, author, HTML5 For Web Designers</h2>
<p>all his resources and principles: <a href="http://principles.adactio.com/">principles.adactio.com</a></p>
<p>design principles: how<br />
design goals: why<br />
design patterns: what</p>
<p>rough consensus and running code &#8211; get it out, iterate</p>
<p>degrade gracefully &#8211; HTML5 form inputs is good example of this<br />
rewards the newer browsers without hurting the older ones<br />
being able to push the web forward without hurting the existing web</p>
<p>dark patterns &#8211; user interfaces designed to trick people<br />
<a href="http://wiki.darkpatterns.org/Home">http://wiki.darkpatterns.org/Home</a><br />
<a href="http://www.alistapart.com/articles/dark-patterns-deception-vs.-honesty-in-ui-design/">http://www.alistapart.com/articles/dark-patterns-deception-vs.-honesty-in-ui-design/</a><br />
<a href="http://www.slideshare.net/harrybr/ux-brighton-dark-patterns">http://www.slideshare.net/harrybr/ux-brighton-dark-patterns</a></p>
<h2>Mobile Web Design Moves &#8211; Luke Wroblewski, author, Web Form Design</h2>
<h3>mobile growth story</h3>
<p>There are more smart phones than pcs.<br />
mobile web usage is surpassing pc web usage (esp. email, twitter, facebook, yelp)<br />
mobile web usage is higher than native app usage<br />
prediction: mobile phone will overtake pcs as the most common way to access the web by 2013</p>
<p>84% of people say they use smart phones at home<br />
80% during misc. times<br />
74% waiting in lines<br />
64% at work</p>
<p>what are they doing?<br />
micro-tasking<br />
local<br />
bored</p>
<p>what are the constraints?<br />
battery life, intermittent connection, small screen, limited time</p>
<h3>mobile web design moves</h3>
<p>core mobile behaviors:<br />
lookup/find<br />
explore/play<br />
check in/status<br />
edit/create</p>
<p>focus your design on optimizing for the activity<br />
content first, navigation second<br />
put the most important stuff (most visited content) on your mobile site, get rid of the rest.  Get rid of it period.  </p>
<p>Put navigation at the bottom of a content page, for them to &#8220;pivot and explore&#8221;.  Top nav is just an anchor link to shoot to bottom of page.  Get rid of chunky nav at the top, let them get right to the content.</p>
<p>On mobile, the bottom part of the screen is easier to access and navigate.</p>
<p>Use HTML5 forms to make data input as easy and error proof as possible<br />
use input masks (hinting), autocorrect/autovalidate<br />
use as few input fields as possible (only one field for phone, not 3)</p>
<p>use other ways to navigate (swipe to paginate, pull down to reveal, tap to save, etc.)</p>
<p>NUI &#8211; natural user interface<br />
the content IS the UI<br />
enable direct manipulation of content and objects<br />
reduce distance between user and content</p>
<p><a href="http://www.abookapart.com/products/mobile-first">http://www.abookapart.com/products/mobile-first</a><br />
Touch Gesture Reference Guide: <a href="lukew.com/touch">lukew.com/touch</a></p>
<h2>The Dimensions of a Good Experience &#8211; Alexa Andrzejewski, founder, Foodspotting</h2>
<p>Taking lessons from urban design</p>
<p>what makes a user experience good?<br />
does it leave an impression on the senses?  Is it memorable?<br />
How is the form a reflection of the values?<br />
Use the language of design to tell the story you want to tell.<br />
Have a clear sense of structure to orient the user</p>
<p>What is the #1 thing you want people to do on their first visit, (second, third).  Reveal (unfold) experience based on what the user needs to do.  this also helps people understand the purpose of the site.</p>
<p>Fit &#8211; design anticipates and assists user behaviors</p>
<p>What kinds of decisions are you asking users to make?  Is it too many? too few?  Are people paralyzed by choices?  </p>
<p>Certainty &#8211; Give users feedback throughout their interaction.  Make people feel safe and know what is happening, especially when they are giving out sensitive information.</p>
<h2>The Responsive Designer’s Workflow &#8211; Ethan Marcotte, co-author, Designing With Web Standards 3rd Edition</h2>
<p><a href="http://www.ethanmarcotte.com/">http://www.ethanmarcotte.com/</a></p>
<h3>What makes a design responsive?</h3>
<p>Flexible/fluid grids<br />
Flexible images and media<br />
CSS media queries<br />
Only valuable content &#8211; content first<br />
Design across a set of user experiences<br />
Make a comittment to your content and make it accessible regardless of context</p>
<p>Boston Globe &#8211; new responsive web site (he worked on it) bostonglobe.com</p>
<p>design is the method of putting form and content together.  Design is a process, not the end result.</p>
<p>design and development have to work more together, for responsive web design.  Ask more questions.  Interactive design review (verify your work live, get prototyping early).  Vet your assumptions of the static design.  How well does the layout adapt?  Does it still feel usable?  Do any elements need additional design direction?  (this is a process of moving back and forth between css/html and photoshop).</p>
<p>building for mobile first allows you to build a consensus early on about what content is really important.</p>
<p>fluid grid method:<br />
target px / context px = result %<br />
target is the pixel width of the column<br />
context is the total value of the grid</p>
<p>633px / 960px = .659375%<br />
.column {float:left;width:.659375%}</p>
<p>flexible image<br />
img {max-width:100%}</p>
<p>screen size break points for media queries (there are a lot more than this, but these are common):<br />
320px<br />
480px<br />
768px<br />
900px</p>
<p>Since we can&#8217;t keep up with all the screen sizes, we should use responsive designs &#8211; flexible grid is the doing the heavy lifting.  Media queries does fine tuning.  </p>
]]></content:encoded>
			<wfw:commentRss>http://jandcgroup.com/2011/12/12/an-event-apart-sf-2011-resources-and-sound-bites-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dynamic Height Cross Domain Iframe postMessage Javascript</title>
		<link>http://jandcgroup.com/2011/10/17/dynamic-height-cross-domain-iframe-postmessage-javascript/</link>
		<comments>http://jandcgroup.com/2011/10/17/dynamic-height-cross-domain-iframe-postmessage-javascript/#comments</comments>
		<pubDate>Mon, 17 Oct 2011 18:13:51 +0000</pubDate>
		<dc:creator>adria</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://jandcgroup.com/?p=444</guid>
		<description><![CDATA[The task at hand was to embed a 3 page form from another domain as an iframe onto my domain. It is possible to do cross domain communication using the javascript method postMessage (not supported below ie8). The challenge was &#8230; <a href="http://jandcgroup.com/2011/10/17/dynamic-height-cross-domain-iframe-postmessage-javascript/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The task at hand was to embed a 3 page form from another domain as an iframe onto my domain.  It is possible to do cross domain communication using the javascript method postMessage (not supported below ie8). The challenge was that each page of the form was a different height, so the iframe had to adjust height each time the new page of the form loaded into the iframe.  I tried several different solutions and had trouble with all of them.  They were either buggy or didn&#8217;t work at all.  I finally came across a simple solution that worked, and adjusted it to my needs. </p>
<p>Here&#8217;s the original example I found <a href="http://hublog.hubmed.org/archives/001623.html">Setting the height of a cross-domain iframe using postMessage</a>:</p>
<p>This code goes on the page that will be in the iframe:</p>
<pre name="code" class="js">

function postSize(e){
  var target = parent.postMessage ? parent : (parent.document.postMessage ? parent.document : undefined);
  if (typeof target != "undefined" &#038;&#038; document.body.scrollHeight)
    target.postMessage(document.getElementById("foo").scrollHeight, "*");
}
window.addEventListener("load", postSize, false);
</pre>
<p>The id &#8220;foo&#8221; should be a div that is wrapped around the content for which you want to measure the height.  In my example I used mainCol, which was the div that contained the form.</p>
<p>This code goes on the parent page (your domain), that will have the iframe embedded.</p>
<pre name="code" class="js">

function receiveSize(e){
  if (e.origin === "http://www.example.com") // for security: set this to the domain of the iframe - use e.uri if you need more specificity
    document.getElementById("bar").style.height = e.data + "px";
}
window.addEventListener("message", receiveSize, false);
</pre>
<p>In this example the id &#8220;bar&#8221; should be the id you give you your iframe. </p>
<p>I changed a few things.  First of all, addEventListener throws an error in ie, so you have to use attachEvent instead:</p>
<pre name="code" class="js">
 if (window.addEventListener){
					window.addEventListener("load", postSize, false);
				} else {
					window.attachEvent("load", postSize);//for ie
				}
</pre>
<p>I also attached the height by setting the height attribute, rather than the style attribute.  Additionally, I added 20px onto the calculated height to add some buffer, because I found the iframe to cut off the content a bit at the bottom.</p>
<pre name="code" class="js">
  $("#iframe").attr('height', e.data);//receive and set the height sent from the postMessage
				   var b = $("#iframe").height() + 20; //adds a bit of height so the iframe doesn't get cut off
				   $("#iframe").attr('height', b); //set the height
</pre>
<p>Here was my final code.  This went on the 2nd and 3rd pages of the form (on another domain, embedded in the iframe on my domain).</p>
<pre name="code" class="js">
			function postSize(e){
			  var target = parent.postMessage ? parent : (parent.document.postMessage ? parent.document : undefined);
			  if (typeof target != "undefined" &#038;&#038; document.body.offsetHeight)
				target.postMessage(document.getElementById("mainCol").offsetHeight, "*");  //change this star to your domain for more security
			}
			 if (window.addEventListener){
					window.addEventListener("load", postSize, false);
				} else {
					window.attachEvent("load", postSize);//for ie
				}
</pre>
<p>This went on the page with the iframe, on my domain:</p>
<pre name="code" class="js">
          $(function() {
	  	 var ua = $.browser;
		  if ( ua.msie &#038;&#038; ua.version.slice(0,3) == ("7.0") || ua.msie &#038;&#038; ua.version.slice(0,3) == ("6.0")) {
			  var b = $("#iframe").remove().empty();//remove iframe for ie6/7 users and replace with a new iframe with scrolling=yes so they can see all the content
				 var c = '<iframe src="http://www.theotherdomain.com" id="iframe" width="928" scrolling="yes" frameborder="0" height="550" style="margin-bottom:30px;"/></iframe>'
				 $('#iframe_holder').append(c);
		  }//postMessage doesn't work below ie8

  })

			function receiveSize(e){
				  if (e.origin === "http://www.theotherdomain.com") // for security: set this to the domain of the iframe - use e.uri if you need more specificity
				   $("#iframe").attr('height', e.data);//receive and set the height sent from the postMessage
				   var b = $("#iframe").height() + 20; //adds a bit of height so the iframe doesn't get cut off
				   $("#iframe").attr('height', b); //set the height

				}

			 if (window.addEventListener){
					window.addEventListener("message", receiveSize,false);
				} else {
					window.attachEvent("onmessage", receiveSize);//for ie
				}
</pre>
<p>And here was my iframe:</p>
<pre name="code" class="html">
	 <iframe src="https://www.theotherdomain.com" id="iframe" width="928" scrolling="no" frameborder="0" height="550" style="margin-bottom:30px;"/></iframe>
<div id="iframe_holder"></div>

<!--for ie6/7 users-->
</pre>
]]></content:encoded>
			<wfw:commentRss>http://jandcgroup.com/2011/10/17/dynamic-height-cross-domain-iframe-postmessage-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exclude custom post types from wordpress search &#8211; do not use exclude_from_search</title>
		<link>http://jandcgroup.com/2011/09/14/exclude-custom-post-types-from-wordpress-search-do-not-use-exclude_from_search/</link>
		<comments>http://jandcgroup.com/2011/09/14/exclude-custom-post-types-from-wordpress-search-do-not-use-exclude_from_search/#comments</comments>
		<pubDate>Wed, 14 Sep 2011 17:39:57 +0000</pubDate>
		<dc:creator>adria</dc:creator>
				<category><![CDATA[Thesis]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://jandcgroup.com/?p=436</guid>
		<description><![CDATA[I recently started using custom post types to create different types of articles I wanted to display on another site (not my main blog) via a feed. I created a custom post type called &#8220;articles&#8221;. These post types should not &#8230; <a href="http://jandcgroup.com/2011/09/14/exclude-custom-post-types-from-wordpress-search-do-not-use-exclude_from_search/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I recently started using custom post types to create different types of articles I wanted to display on another site (not my main blog) via a feed.  I created a custom post type called &#8220;articles&#8221;.  These post types should not show up on my blog, nor should they be searchable via the wordpress search. According to the <a href="http://codex.wordpress.org/Function_Reference/register_post_type">spec of registering and defining a custom post type</a>, I should use &#8216;exclude_from_search&#8217; => true, like so:</p>
<pre name="code" class="php">
/*custom post type */
add_action('init', 'article_register');

function article_register() {
    $args = array(
        'label' => __('Credit.com Articles'),
        'singular_label' => __('Credit.com Article'),
        'new_item' => __('New Article'),
        'add_new_item' => __('Add New Article'),
        'edit_item' => __('Edit Article'),
        'taxonomies' => array('product'),
        'public' => true,
        'show_ui' => true,
        'capability_type' => 'post',
        'rewrite' => array( 'slug' => 'articles', 'with_front' => false),
        'hierarchical' => false,
        'exclude_from_search' => true,
        'menu_position' => 5,
        'supports' => array('title', 'editor','revisions')
       );  

    register_post_type( 'articles' , $args );
}
</pre>
<p>This worked fine and dandy on my wordpress blog, hiding the custom post types as it should.  But I wanted to access these posts via a feed, and suddenly all the posts disappeared after I added the  &#8216;exclude_from_search&#8217; => true.  I think this is a <a href="http://core.trac.wordpress.org/ticket/17592#comment:3">bug in wordpress</a>.</p>
<p>So to get around this I removed &#8216;exclude_from_search&#8217; => true.  Instead I made a search loop function that excludes the custom post types.  That way, the posts are excluded from the search, but are still available for me to pull in a feed.</p>
<p>If you don&#8217;t use thesis theme, all you have to do is <a href="http://moonpixel.com/wordpress-exclude-from-search-results/">slightly modify your search.php</a> by adding this code after the start of your loop (replace &#8216;post&#8217; with the name of your custom post type)</p>
<pre name="code" class="php">

<?php if (get_post_type() == 'post') continue; ?>
</pre>
<p>With thesis there is no search.php, so I instead started with a function written by Thesis expert godhammer:</p>
<pre name="code" class="php">
/*
Custom Search API Loop
*/

$godhammer_search_and_destroy = new godhammer_api_loop;
	class godhammer_api_loop extends thesis_custom_loop {
		function search() {
			if(is_search()) 	{
	thesis_archive_intro();
			$paged = $this->get_paged_param();
			while (have_posts()) {
            the_post();
            thesis_hook_before_post_box();
            echo "\t\t\t
<div class=\"post_box top api-seek\" id=\"post-" .
                 get_the_ID() . "\">\n";
			thesis_hook_post_box_top();
            thesis_headline_area();
            echo "\t\t\t\t
<div class=\"format_text\">\n";
         //   thesis_post_content();
echo get_the_excerpt();
            echo "\t\t\t\t</div>

\n";
            thesis_hook_post_box_bottom();
            echo "\t\t\t</div>

\n";
            thesis_hook_after_post_box();
        }
        wp_reset_query();
		}
    else 	{
        thesis_loop::search();
		}
	}
// PAGINATION RELATED
	    private function preserve_query_params($new_params = array()) 	{
        global $wp_query;
        return(array_merge($wp_query->query, $new_params));
	}
		private function get_paged_param() {
		if(is_front_page()) {
			$paged = (get_query_var('page') ? get_query_var('page') : 1);
	}
        else 	{
            $paged = (get_query_var('paged') ? get_query_var('paged') : 1);
	}
        return($paged);
	}
// END PRIVATE FUNCTIONS
	}
// END SEARCH LOOP API
</pre>
<p>I then modified this for my purposes by adding the exclude custom post type bit, plus some styling stuff for the search results to make it look like my current search results page.  My final result was:</p>
<pre name="code" class="php">
/*
Custom Search API Loop
*/
$godhammer_search_and_destroy = new godhammer_api_loop;
	class godhammer_api_loop extends thesis_custom_loop {
		function search() {
			if(is_search()) 	{
	thesis_archive_intro();
			$paged = $this->get_paged_param();
			while (have_posts()) {
            the_post();

			if (get_post_type() == 'content' || get_post_type() == 'articles') continue;
            thesis_hook_before_post_box();
            echo "\t\t\t
<div class=\"post_box top api-seek hentry\" id=\"post-" .
                 get_the_ID() . "\">\n";
			thesis_hook_post_box_top();
            //thesis_headline_area();?>
<div class="headline_area">
<h2 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
</div>

            <img style="float:left" src="<?php echo catch_that_image() ?>" /><?php
            echo "\t\t\t\t
<div class=\"format_text\">\n";?>

<?php echo bm_better_excerpt(147, ' ... ');?> 
<p class="byline_meta"><?php thesis_author(); ?> on <abbr class="published" title="<?php echo get_the_time('Y-m-d'); ?>"><?php echo get_the_time(get_option('date_format')); ?></abbr>
			

<?php
            echo "\t\t\t\t</div>

\n";
            thesis_hook_post_box_bottom();
            echo "\t\t\t</div>

\n";
            thesis_hook_after_post_box();
        }
        wp_reset_query();
		}
    else 	{
        thesis_loop::search();
		}
	}
// PAGINATION RELATED
	    private function preserve_query_params($new_params = array()) 	{
        global $wp_query;
        return(array_merge($wp_query->query, $new_params));
	}
		private function get_paged_param() {
		if(is_front_page()) {
			$paged = (get_query_var('page') ? get_query_var('page') : 1);
	}
        else 	{
            $paged = (get_query_var('paged') ? get_query_var('paged') : 1);
	}
        return($paged);
	}
// END PRIVATE FUNCTIONS
	}
// END SEARCH LOOP API
</pre>
]]></content:encoded>
			<wfw:commentRss>http://jandcgroup.com/2011/09/14/exclude-custom-post-types-from-wordpress-search-do-not-use-exclude_from_search/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS Resources from Wordcamp SF 2011</title>
		<link>http://jandcgroup.com/2011/08/26/css-resources-from-wordcamp-sf-2011/</link>
		<comments>http://jandcgroup.com/2011/08/26/css-resources-from-wordcamp-sf-2011/#comments</comments>
		<pubDate>Fri, 26 Aug 2011 22:45:07 +0000</pubDate>
		<dc:creator>adria</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[css3]]></category>

		<guid isPermaLink="false">http://jandcgroup.com/?p=433</guid>
		<description><![CDATA[A couple weeks ago I attended wordcamp sf, and got to hear some css heavy weights like Estelle Weyl and Chris Coyier present. Here&#8217;s a link dump of some their presentations as well as some resources they recommended: http://css-tricks.com/conferences/ConvergeSE2011Pseudos.pdf (Chris &#8230; <a href="http://jandcgroup.com/2011/08/26/css-resources-from-wordcamp-sf-2011/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A couple weeks ago I attended wordcamp sf, and got to hear some css heavy weights like <a href="http://www.standardista.com/">Estelle Weyl </a>and <a href="http://css-tricks.com/">Chris Coyier</a> present. Here&#8217;s a link dump of some their presentations as well as some resources they recommended:</p>
<p><a href="http://css-tricks.com/conferences/ConvergeSE2011Pseudos.pdf">http://css-tricks.com/conferences/ConvergeSE2011Pseudos.pdf</a> (Chris Coyier&#8217;s hilarious presentation on :after and :before)<br />
<a href="http://iestelle.com/wordcampsf"><br />
http://iestelle.com/wordcampsf</a> (Estelle&#8217;s super awesome presentation, great overview and demo of almost everything css3 can do)</p>
<p><a href="http://jsbin.com/super-css-super-challenge/">http://jsbin.com/super-css-super-challenge/</a></p>
<p><a href="http://css-tricks.com/9516-pseudo-element-roundup/">http://css-tricks.com/9516-pseudo-element-roundup/</a></p>
<p><a href="http://westciv.com/tools">http://westciv.com/tools</a></p>
<p><a href="http://www.standardista.com/css3/css3-transform-property-and-the-various-transform-functions">http://www.standardista.com/css3/css3-transform-property-and-the-various-transform-functions</a></p>
<p><a href="http://css-tricks.com/examples/ShapesOfCSS/">http://css-tricks.com/examples/ShapesOfCSS/</a></p>
<p><a href="http://nicolasgallagher.com/pure-css-gui-icons/">http://nicolasgallagher.com/pure-css-gui-icons/</a></p>
<p><a href="http://www.slideshare.net/saracannon/responsive-web-design-wordcamp-san-francisco">http://www.slideshare.net/saracannon/responsive-web-design-wordcamp-san-francisco</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jandcgroup.com/2011/08/26/css-resources-from-wordcamp-sf-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Color Numbers in Ordered List with CSS Counter() and :Before Pseudo-Element</title>
		<link>http://jandcgroup.com/2011/08/19/color-numbers-in-ordered-list-with-css-counter-and-before-pseudo-element/</link>
		<comments>http://jandcgroup.com/2011/08/19/color-numbers-in-ordered-list-with-css-counter-and-before-pseudo-element/#comments</comments>
		<pubDate>Fri, 19 Aug 2011 18:13:20 +0000</pubDate>
		<dc:creator>adria</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[:before]]></category>
		<category><![CDATA[color numbers]]></category>
		<category><![CDATA[counter]]></category>

		<guid isPermaLink="false">http://jandcgroup.com/?p=430</guid>
		<description><![CDATA[I&#8217;m going to show you how to make an ordered list where the numbers are a different color than the text. This is commonly done with background images. But there is a way better way to do it, assuming you &#8230; <a href="http://jandcgroup.com/2011/08/19/color-numbers-in-ordered-list-with-css-counter-and-before-pseudo-element/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m going to show you how to make an ordered list where the numbers are a different color than the text.  This is commonly done with background images.  But there is a way better way to do it, assuming you don&#8217;t have to support browsers older than ie8.  What we are going to do is create an ordered list with list-style-type:none.  This will remove the numbers.  Then we are going to replace the numbers with the css property, counter, and the :before pseudo element.  The counter property is super awesome and under-utilized.  <a href="http://www.impressivewebs.com/css-counter-increment/">Here is a great tutorial on it</a>. I recommend looking at that first if you are not familiar with counter.  </p>
<p>So we are adding numbers before the list items using :before.  Since this is a pseudo element, we can actually apply a color style to it (or any other style for that matter), which is separate from the color style applied to the li element itself.</p>
<pre name="code" class="css">
 ol {
		list-style-type:none;
		counter-reset:list;
	}

li {
		color:#333;
	}

li:before {
		counter-increment: list 1;
		content:counter(list) ".";
		color:#9dce32;
		padding-right:10px;
	}
</pre>
<pre name="code" class="html">
<ol>
<li>hello this is the first thing in the list</li>
<li>this is the second thing on the list</li>
<li>and one more just for fun</li>
</ol>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://jandcgroup.com/2011/08/19/color-numbers-in-ordered-list-with-css-counter-and-before-pseudo-element/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Show The Full Content of Multi-Page/Paginated Posts in the Feed WordPress  (content after nextpage tag)</title>
		<link>http://jandcgroup.com/2011/08/17/how-to-show-the-full-content-of-multi-pagepaginated-posts-in-the-feed-wordpress-content-after-nextpage-tag/</link>
		<comments>http://jandcgroup.com/2011/08/17/how-to-show-the-full-content-of-multi-pagepaginated-posts-in-the-feed-wordpress-content-after-nextpage-tag/#comments</comments>
		<pubDate>Wed, 17 Aug 2011 16:44:10 +0000</pubDate>
		<dc:creator>adria</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[multi-page posts]]></category>
		<category><![CDATA[paginated posts]]></category>

		<guid isPermaLink="false">http://jandcgroup.com/?p=427</guid>
		<description><![CDATA[When you are using the full content feed option in wordpress, if your posts are paginated using the nextpage tag, only the first part of the content before the nextpage tag shows up in the feed. In order to force &#8230; <a href="http://jandcgroup.com/2011/08/17/how-to-show-the-full-content-of-multi-pagepaginated-posts-in-the-feed-wordpress-content-after-nextpage-tag/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>When you are using the full content feed option in wordpress, if your posts are paginated using the nextpage tag, only the first part of the content before the nextpage tag shows up in the feed.  In order to force the full content of the post to show up in the feed, place this code in your functions.php or custom_functions.php  (or as a plugin in your plugins in directory):</p>
<pre name="code" class="php">

<?php
/*
Plugin Name: Full Text Feeds
Plugin URI: http://simonwheatley.co.uk/wordpress/full-text-feeds
Description: Fixes a bug in WP's feeds whereby they are only served with the first page.
Version: 1.1
Author: Simon Wheatley
Author URI: http://simonwheatley.co.uk/
*/

function ftf_full_text_for_feeds( $content ) {
	if ( ! is_feed() )
		return $content;
	global $post;
	$content = $post->post_content;
	return $content;
}

add_filter( 'the_content', 'ftf_full_text_for_feeds', -100 );

?>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://jandcgroup.com/2011/08/17/how-to-show-the-full-content-of-multi-pagepaginated-posts-in-the-feed-wordpress-content-after-nextpage-tag/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Make An American Flag with CSS3 Gradients</title>
		<link>http://jandcgroup.com/2011/08/03/how-to-make-an-american-flag-with-css3-gradients/</link>
		<comments>http://jandcgroup.com/2011/08/03/how-to-make-an-american-flag-with-css3-gradients/#comments</comments>
		<pubDate>Thu, 04 Aug 2011 03:09:15 +0000</pubDate>
		<dc:creator>adria</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[gradients]]></category>

		<guid isPermaLink="false">http://jandcgroup.com/?p=411</guid>
		<description><![CDATA[I recently came across Lea Verou&#8217;s CSS3 gradient pattern gallery, and was inspired to try my hand at making a css3 gradient pattern. I decided to make an American flag. This is not strictly a background pattern, since it requires &#8230; <a href="http://jandcgroup.com/2011/08/03/how-to-make-an-american-flag-with-css3-gradients/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I recently came across <a href="http://leaverou.me/2011/04/css3-patterns-gallery-and-a-new-pattern/">Lea Verou&#8217;s CSS3 gradient pattern gallery</a>, and was inspired to try my hand at making a css3 gradient pattern.  I decided to make an American flag.  This is not strictly a background pattern, since it requires two elements.  Rather than mess around with a bunch of different vendor specific declarations, mine only works in firefox.  I&#8217;ve tested it in firefox 5.0.1.  </p>
<p>The first element is the flag, which creates the 13 horizontal red and white stripes:</p>
<pre name="code" class="css">
#flag {
				margin:0;
				padding:0;
				width:2000px;
				height:840px;
				background-color: #ffffff;
				background-image:-moz-linear-gradient(-90deg, #e0162b 50%, transparent 50%);
				background-size:310px;
				}
</pre>
<p>The next element is the blue square with 50 white stars.  I must admit the stars were gnarly to make so I copied <a href="http://leaverou.me/css3patterns/#stars"> NIcolas Gallagher&#8217;s stars</a> and adjusted accordingly.</p>
<pre name="code" class="css">
	#stars {
			margin:0 0 0 -1px;
			padding:0;
			width:560px;
			height:456px;
			background:
		    -moz-linear-gradient(126deg, #0052a5 4%,   transparent 4%) -70px 48px,
		     -moz-linear-gradient( 54deg, #0052a5 4%,   transparent 4%) 30px 48px,
		     -moz-linear-gradient( 18deg, #ffffff 8.5%, transparent 8.5%) 30px 48px,
		     -moz-linear-gradient(162deg, #ffffff 8.5%, transparent 8.5%) -70px 48px,
		     -moz-linear-gradient(234deg, #ffffff 7.5%, transparent 7.5%) -70px 28px,
		     -moz-linear-gradient(-54deg, #ffffff 7.5%, transparent 7.5%) 30px 28px,
			 -moz-linear-gradient(126deg, #0052a5 4%,   transparent 4%) -20px 98px,
		     -moz-linear-gradient( 54deg, #0052a5 4%,   transparent 4%) 80px 98px,
		     -moz-linear-gradient( 18deg, #ffffff 8.5%, transparent 8.5%) 80px 98px,
		    -moz-linear-gradient(162deg, #ffffff 8.5%, transparent 8.5%) -20px 98px,
		     -moz-linear-gradient(234deg, #ffffff 7.5%, transparent 7.5%) -20px 78px,
		     -moz-linear-gradient(-54deg, #ffffff 7.5%, transparent 7.5%) 80px 78px;
			background-color:#0052a5;
			background-size:100px 100px;
		}
</pre>
<p><a href="http://jandcgroup.com/adriamooney/playpen/css3-american-flag.html"><br />
Here&#8217;s my demo of the American flag</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jandcgroup.com/2011/08/03/how-to-make-an-american-flag-with-css3-gradients/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Automatically Add Categories to Posts in WordPress</title>
		<link>http://jandcgroup.com/2011/08/03/how-to-automatically-add-categories-to-posts-in-wordpress/</link>
		<comments>http://jandcgroup.com/2011/08/03/how-to-automatically-add-categories-to-posts-in-wordpress/#comments</comments>
		<pubDate>Wed, 03 Aug 2011 17:43:44 +0000</pubDate>
		<dc:creator>adria</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[automatic categories]]></category>
		<category><![CDATA[wordpress categories]]></category>

		<guid isPermaLink="false">http://jandcgroup.com/?p=402</guid>
		<description><![CDATA[I had a need to create a category feed that included almost every post, except for a few exceptions. Rather than having to manually check a category each time you post, why not have that category automatically get checked? I &#8230; <a href="http://jandcgroup.com/2011/08/03/how-to-automatically-add-categories-to-posts-in-wordpress/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I had a need to create a category feed that included almost every post, except for a few exceptions.  Rather than having to manually check a category each time you post, why not have that category automatically get checked?  </p>
<p>I used <a href="http://codex.wordpress.org/Function_Reference/wp_set_object_terms">wp_set_object_terms</a>, which creates the term and taxonomy relationship if it doesn&#8217;t already exist.  This is used to assign the category to the post.  I used the parameter &#8220;true&#8221; to keep any other categories that were there in tact.</p>
<p>I also use <a href="http://codex.wordpress.org/Class_Reference/wpdb">wpdb</a> to interface with the database.  The $wpdb object can be used to read data from any table in the WordPress database.</p>
<p>My first task was to assign category with ID 9547 to all posts UNLESS the post was also in the category with slug &#8216;bundle&#8217;. This was accomplished like so:</p>
<pre name="code" class="php">
function add_category_automatically1($post_ID) {
	global $wpdb;
		if(!in_category('bundle')){
			$cat = array(9547);
			wp_set_object_terms($post_ID, $cat, 'category', true);
		}
}
add_action('publish_post', 'add_category_automatically1');
</pre>
<p>This was simple enough.  Using the action &#8216;publish_post&#8217;, the category is automatically assigned when I publish the post. I also wanted to prevent posts from getting category 9547 if they were by 2 specific authors, with author ID&#8217;s 29 and 30.  This was a bit more difficult.  In order to access the author of the post, I had to pull the author ID (post_author) for the current post from the posts table in the database.  Using <a href="http://codex.wordpress.org/Class_Reference/wpdb">$wpdb->get_results</a>, &#8216;Generic, mulitple row results can be pulled from the database with get_results. The function returns the entire query result as an array.&#8217;  Based on this example from the codex:</p>
<pre name="code" class="php">
$fivesdrafts = $wpdb->get_results("SELECT ID, post_title FROM $wpdb->posts
	WHERE post_status = 'draft' AND post_author = 5");

foreach ($fivesdrafts as $fivesdraft) {
	echo $fivesdraft->post_title;
}
</pre>
<p>I created my own that got the post_author for the posts, looped through them, and then assigned the category 9547 to each post except those by author 29 or 30, like so:</p>
<pre name="code" class="php">
function add_category_automatically2($post_ID) {
	global $wpdb;
	$postsWeWants = $wpdb->get_results("SELECT ID, post_author FROM $wpdb->posts where ID = $post_ID");
	foreach ($postsWeWants as $postsWeWant) {
		if(($postsWeWant->post_author != 30) &#038;&#038; ($postsWeWant->post_author != 29)){
			$cat = array(9547);
			wp_set_object_terms($post_ID, $cat, 'category', true);
		}
	}
}
add_action('publish_post', 'add_category_automatically2');
</pre>
<p>Then I put them both together, to get one function that would assign category 9547 to every post UNLESS it was also in category slug &#8216;bundle&#8217;, or by authors 29 or 30.  Here is the final function:</p>
<pre name="code" class="php">
function add_category_automatically($post_ID) {
	global $wpdb;
	$postsWeWants = $wpdb->get_results("SELECT ID, post_author FROM $wpdb->posts where ID = $post_ID");
	foreach ($postsWeWants as $postsWeWant) {
		if(($postsWeWant->post_author != 30) &#038;&#038; ($postsWeWant->post_author != 29) &#038;&#038; !in_category('bundle')){
			$cat = array(9547,9742);
			wp_set_object_terms($post_ID, $cat, 'category', true);
		}
	}
}
add_action('publish_post', 'add_category_automatically');
</pre>
]]></content:encoded>
			<wfw:commentRss>http://jandcgroup.com/2011/08/03/how-to-automatically-add-categories-to-posts-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

