THE PENDING DRAFT

Maybe what we call Responsive Design today isn’t that new after all. Wouldn’t have noticed it myself – maybe i was already too much in the “CD-Generation” – but it shows again that most of the fancy new stuff had been there before, in some way or another.

In some ways, this felt like an early form of what we might now call responsive design. Over time, designers adapted to the new formats, and came up with a process that took that into account. They had less control over things like the aspect ratio, and that forced them to work harder and more flexibly.

Raymone Brigleb (Needmore Designs) – The Cassette Tape as Responsive Design

Cabel Sasser XOXO Talk

January 18, 2015

Cabel Sasser gave an honest and personal talk at XOXO 2013 about how they started Panic and became what they are today. It’s always easy to look up to people who “made it” and to think everything was easy and just fell in place for them. From the outside everything looks easy. But there’s always a great amount of work and struggle behind every success, that you don’t see. Nice to get that “behind the scenes” perspective.

Found via Manical Rage.

Adding things to titles inside the post content

January 8, 2015

For a specific styling i needed to be able to add elements, specifically a <span> element inside the H2 tags automatically.

Outside of the content is easy

To achieve this for titles outside of the_content is pretty easily done with the $before and $after Parameters on the_title() like so, or we could just wrap the_title inside the desired tags.

<?php the_title( '<h2 class="entry-title"><span>', '</span></h2>' ); ?>

Filtering the_content

To achieve the same result for all H2 tags inside the content we need to filter the_content with a regular expression.

function pdr_add_class_to_h2( $content ){
    return preg_replace( '/<h2(.*?)>(.*?)<\/h2>/', '<h2\1 class="entry-title"><span>\2</span></h2>', $content );
}
add_filter( 'the_content', 'pdr_add_class_to_h2' );

To extend this with other tags to replace, we can also pass arrays to preg_replace. Each element in $pattern will be replace by its counterpart in $replacement.

function pdr_add_class_to_titles( $content ){

    $pattern = array(
        '/<h2(.*?)>(.*?)<\/h2>/',
        '/<h3(.*?)>(.*?)<\/h3>/',
        '/<h4(.*?)>(.*?)<\/h4>/',
        '/<h5(.*?)>(.*?)<\/h5>/',
        '/<h6(.*?)>(.*?)<\/h6>/'
    );

    $replacement = array(
        '<h2\1 class="entry-title"><span>\2</span></h2>',
        '<h3\1 class="entry-title"><span>\2</span></h3>',
        '<h4\1 class="entry-title"><span>\2</span></h4>',
        '<h5\1 class="entry-title"><span>\2</span></h5>',
        '<h6\1 class="entry-title"><span>\2</span></h6>',
    );

return preg_replace( $pattern, $replacement, $content );
}
add_filter( 'the_content', 'pdr_add_class_to_titles' );

I found this solution in this support thread and adapted it a bit to fit my needs and replace all titles but it could basically be used to replace all kinds of stuff inside the content.

The Correspondents – Fear & Delight

January 5, 2015

Just stumbled upon this music video from the Correspondents. Never heard of them before, but like them. Go watch it and have a good start into the new year!

Another Video Introduction to Backbone.js

January 3, 2015

While the video intro i shared yesterday gives a nice overview to some basics of Backbone.js, it left many things untouched and unfortunately the code examples weren’t really complete which made it hard to follow along.

Luckily i found this other talk by Nick Gauthier which goes a lot more into detail but is still very understandable, even if you’re just starting out with JS. The talk starts with a short theory part, which really helped me finally grasp some of the basic concepts behind Backbone. After that he demonstrates everything in a practical hands-on coding example, which is very easy to follow and well explained.

If you want to learn some more about Backbone.js, you should definitely watch this.

The presentation slides and source Code can be found here.

He also wrote/co-wrote two Ebooks, “Mobile Web Patterns with Backbone.js” and “Recipes with Backbone“, which i will keep an eye on and intend to read right after i finished Addy Osmani’s “Developing Backbone.js Applications“.

Designers:Watch – a collection of must-see documentaries for designers and artists. Perfect for the holiday break.

Designers:Watch

John Cleese Talking About Creativity

August 16, 2014

John Cleese talks about how the ability to switch between the “open” and “closed” mindset can help us be more creative. Great Talk!

Chris Lema on the art of giving estimates

June 24, 2014

Chris Lema with some practical tips and his personal way of giving project estimates. Best article i read on the subject in a long time.

“I know you may think that if you give me a budget I’m going to make the project use up all that budget, even if it’s smaller. Let me assure you of one thing – and this isn’t personal and it’s not you. Most people’s budget is 2-3 times smaller than their desires or expectations.”

Chris Lema – The art of giving an estimate (that’s helpful)

Convert Apache Configuration to nginx

December 25, 2013

This comes in handy if you want to migrate from Apache to nginx and have some custom .htaccess Instructions you want to take to the new environment.

First of all, the service was thought as a mod_rewrite to nginx converter. However, it allows you to convert some other instructions that have reason to be ported from Apache to nginx.

.htaccess to nginx Converter