New Year, New Website
Originally published on January 21, 2019. Tools and plans reflect that time.
Web technologies keep evolving. As web and product designers, part of our job is to keep learning so we can deliver better experiences for users. The learning never stops — and that’s what makes the work worth doing.
With that in mind, I try to use side projects like this website as a continual experiment — a testing ground for learning and trying new designs, frameworks, and methods.
This year, I jumped on the new year, new website bandwagon to redesign my personal blog from the ground up. It was about time, and I’m glad I took the leap.
The exercise let me improve the look and feel with a fresh interface. It also gave me an excuse to explore new CSS and JavaScript frameworks — knowledge I can apply elsewhere in my work, including product updates coming to Veritonic.
Content Above the Fold
One of my main goals for this redesign was to bring more content above the fold. On most screens, the main header of the old website took up about 80% of the view height. Since posts were stacked vertically, the remaining 20% held only the top half of the first post’s feature image.
That meant first-time visitors effectively didn’t see any content.
To fix this, I reduced the height of the header and created rows and columns of three posts across to fill the bottom 60% of the view height above the fold.
Now, non-mobile visitors can see the feature images, titles, and previews of the latest three posts and engage with them before having to scroll.
A Unified Navigation Component
I also updated the navigation with a design that combines navigation, tags, page titles, and breadcrumbs into a single component.
On the home page (or Latest Posts page), the links after the slash mark are dynamically populated with post tags. Clicking into a tag filters the posts by that tag.
On post pages, the post title is displayed after the slash, and the Latest Posts link stays persistent for easy access back to the home page.
Building With Tailwind CSS
Using TailwindCSS, a new utility-based CSS framework, I was able to build the entire site with less than 50 lines of custom unminified CSS.
With utility classes, TailwindCSS makes rapid prototyping and near-infinite customization straightforward. There’s little need to constantly override classes the way you often do with Bootstrap.
For example, the pill-style tag buttons at the top of this page would be styled like this with vanilla HTML and CSS:
<style>
.tag {
display: inline-block;
background-color: #dae1e7;
border-radius: 9999px;
font-weight: 600;
margin-right: .5rem;
padding: .25rem .75rem;
color: #3d4852;
font-size: .875rem;
text-decoration: none;
}
.tag:hover {
background-color: #b8c2cc;
}
</style>
<a href="/tags/design/" class="tag">design</a>
With Tailwind, those styles condense into a set of utility classes, producing the same result:
<a href="/tags/design/" class="inline-block bg-gray-400 hover:bg-gray-500 rounded-full px-3 py-1 text-sm font-semibold text-gray-800 mr-2 no-underline">design</a>
That makes it easy to prototype ideas without spending time writing new CSS. And when you start to reuse similar patterns, Tailwind lets you build custom components from existing utility classes using the @apply directive:
<style>
.tag {
@apply inline-block bg-gray-400 hover:bg-gray-500 rounded-full px-3 py-1 text-sm font-semibold text-gray-800 mr-2 no-underline;
}
</style>
<a href="/tags/design/" class="tag">design</a>
I stumbled upon Tailwind on X through @adamwathan and @steveschoger, who are among the creators of the framework. I had been following the project for about a year prior but had not really explored it until now.
It’s available via CDN, but installing and configuring Tailwind with npm opens up more possibilities for customization (like the @apply example above). It’s a framework I will use again, and I’m exploring ways to bring it into our design system at Veritonic.
Still on Jekyll, Looking at Gatsby
Under the hood, this site is still running on Jekyll. I’ve found that it’s still the simplest and cleanest way to run a static site or blog, and it beats WordPress by a long shot.
That said, I did look into moving over to GatsbyJS, a static site generator like Jekyll that’s built on React.
It has a few more features I’d eventually like to see on this site, including out-of-the-box support for Progressive Web App techniques.
This website is my place for experimenting, and rebuilding it on GatsbyJS would be a fun way to learn and experiment with React.
But that’s a project for another day.