Tag Archives: template

Tempo: A Tiny JSON Templating Engine

Tempo is a 4kb JavaScript library that renders JSON into an HTML template. Your script can take something like this…

<ol id="tweets">
 <li data-template>
  <img src="{{profile_image_url}}" />

…and populate it with JSON data from the Twitter API, which you could load with a couple lines of jQuery. It works with browser as far back as IE6 and doesn’t require any dependencies.

It seems like a friendlier way to deal with JSON data, and it offers the advantage of any templating system: you can separate the logic and data from the presentation.

HTML5 Boilerplate

HTML5 Boilerplate is a default template that you can use as a starting point to build HTML5-ready web designs around. It has a few neat features, like:

  • Full cross-browser compatibility…even with IE6. It uses some scripts to add support to those uncool browsers. You can use the new HTML5 elements today. Even the video element.
  • @font-face
  • Server configuration templates (available for Apache, NGINX, and other servers) to add caching and compression.
  • Mobile optimizations
  • Print stylesheet
  • IE6 pngfix is included
  • Plenty of utility classes like .no-js and .clearfix

It’s definitely worth checking out for future reference. The reset stylesheet is fairly similar to the one I tend to use, and the HTML seems fairly well-optimized, with the scripts loading in the footer and everything.

WordPress Category Templates + Custom Taxonomies

Here’s a part of WordPress that many people overlook: Category Templates. It’s actually quite easy to set up your theme so that it adapts to the content being displayed, allowing you to set up “departments” or “sub sites” that are styled differently.

This isn’t anything new, but I recently had an interesting realization. This concept would be a lot more powerful when coupled with Custom Taxonomies, which have been a part of WordPress since version 2.8 or so.

Continue reading →

Full Posts or Excerpts? How About Both?

Should you display full posts on your WordPress blog’s index, or excerpts? Normally I fall into the camp that says you shouldn’t display ten full posts on your main page, since you end up with more duplicate content, and it takes longer to scroll through the posts.

How about having the best of both options? Have one full post, and the rest can be excerpts.

To set this up, find the Loop in your theme’s index.php file. It should look something like this:

Continue reading →

Web Resources Depot Admin Template

Web Resources Depot has released a free Admin Template for use in web apps. It’s a three-column design with a row of tabs, for navigation, along the top. With some modifications, it would work well for a web application, if you were developing one.

Personally, I would use the design during development, and swap it out with a unique theme when all the coding work is done. But if you’re trying to put together a web app, and you don’t have any design know-how, and don’t want to hire a designer, you could conceivably use this. I’d just recommend customizing it a bit, so it doesn’t look like you have the exact same template as someone else.

Admin Template

You can view a live demo of the template, and download it here.

How to Feature Your Best Posts in Your Sidebar

Looking for a way to feature some of your better posts? Here’s a method I’ve been using for a few months (visible on the index and the screencap to the right).

The five most recent posts that I’ve marked as “Featured” will appear in the list, along with a “view all” option that takes the clicker to a custom date-based archive.

How does it work? It’s done with multiple loops and categories.

Continue reading →