Monday, April 29, 2013

Ultra Clean Update

I've added some radio-like buttons to my "Ultra Clean" experiment. I did not decide, whther I should implement some behaviour, or just leave it as a design-study. Anyway, here is the current screen.


Monday, April 8, 2013

Some Buttons

Today, on the train, I was tired, bored, had no internet access and was not motivated to read anything. So I coded something I wanted to try long time ago:

To put this great UI photoshop comp (as seen on Dribbble) into HTML:

clean design *sight*
After hitting the Starbucks in Cologne, I had some Internet, so I could verify that my memory of this design was right and after finding the last missing tutorial (I needed it for that inner shadow on the text), i finally came up with this:


Link: http://loie.de/ultraclean/

Tradeoff: This currently works only in Webkit, due to the inner shadow of the text.

Feel free to grab the code.


Thursday, March 21, 2013

Just had to share this...

Yes, I neeeeed this piece of plastics for my spoiled kids to ruin my 700,- € iPad.

Just take a look at this video:
http://www.amazon.com/gp/mpd/permalink/m2C229W9U5FIEP/ref=ent_fb_link

Tuesday, March 19, 2013

How to handle DOM updates in AngularJS Directives in "link"

AngularJS directives are great. They provide a really wonderful mechnism "to teach HTML new tricks". But apparently there is no predefined mechanism for doing your DOM manipulation after the template has been loaded, cloned and transformed and rendered. Today I found a workaround for that.

var myModule = angular.module(myModule', []);
    myModule.directive('myDirective', function () {
        return {
            templateUrl: 'partials/timeline.html',
            link: function postLink(elem, attrs, transclude) {
                    // This code will run after
                    // templateUrl has been loaded and cloned
            }
        };
    );

The problem is divided in two steps, that must be handled each: The function "link" is called after the template has been cloned. This does not include any DOM manipulations that happen after this cloning, triggered by directives ng-repeat or ng-view. If you want to start your DOM manipulation after these directives have been handled by AngularJS (i.e. the DOM has been manipulated), you will need a setTimeout, or better the $timeout function from AngularJS.

So now you will get this code.
var myModule = angular.module(myModule', []);
    myModule.directive('myDirective', function ($timeout) {
        return {
            templateUrl: 'partials/timeline.html',
            link: function postLink(elem, attrs, transclude) {
                $timeout(function () {
                    // This code will run after
                    // templateUrl has been loaded, cloned
                    // and transformed by directives.
                }, 0);
            }
        };
    );
Yeah, that's better. But wait, we're not done yet. What if you want you want to do transformations of the DOM based on the positions of the newly rendered elements? Getting the position, offset, height, width of the newly created elements are not guaranteed to provide the correct values, because the browser had not enough time to render and layout those elements. The hack is to further delay these operations.
var myModule = angular.module(myModule', []);
    myModule.directive('myDirective', function ($timeout) {
        return {
            templateUrl: 'partials/timeline.html',
            link: function postLink(elem, attrs, transclude) {
                $timeout(function () {
                    $timeout(function () {
                        // This code will run after
                        // templateUrl has been loaded, cloned
                        // and transformed by directives.
                        // and properly rendered by the browser
                    }, 0);
                }, 0);
            }
        };
    );
If you wonder, why a timeout of 0 really helps, here's a great explanation by John Resig.

Website for "Medizinische Kosmetik Hördt" finished

Yes, it's finished. Design, HTML and stuff by me. For my cousin Ina Hördt, who runs a small saloon (she does not like this word) in Würzburg. Her previous website really needed some polishing.
Anyway, because it's businness-related stuff, I did not want to do it for free. But because moving money between cousins sucks, I had another approach. She will invite my wife and me to a fancy restaurant. Why? Because time is more valuable than money. Because people do matter most in life. Because spending money for yourself won't make you happy.

Oh, here is the new website:


Monday, March 18, 2013

My Wife Blogs

My wife started blogging. I think I will start a cooking challenge, too. That will be fun.

Saturday, March 16, 2013

Sandbox

A friend founded a new company, called it "sandbox interactive". He hired a team of great artists and programmers to create a new MMORPG. One of those kind they would like to play themselves. They needed a logo for their fresh, new company. He told me, that if I liked to, I could give it a try.

This was one of my tries I liked most:



In general, I like typographic logos (see BaSiC). I find logos of this kind are usually very clever and very fun (My opinion may be biased because of stuff like this). So I fell in love doing such stuff.

Oh, in the end, they didn't choose my logo. As already told, they have some really great artists. :)