VBlog

A quick overview of the new hype thing in the Frontend ecosystem that is Yarn. What is it? Is it meant to replace npm? How is it different? Should we use it? I try to answer those questions in this post on Medium.

 

Don’t compare yourself to someone else. Compare your present to your past.
@ChrisLema

What is the key to a successful SEO strategy in 2016? Put the user first.

User-Centric: the key to SEO success in 2016

A video by Disney talking about the laws of animations, and how things move in real life and how we should emulate the properties of physics in real life when we are animating things digitally.

Developers take a long time to train, then they are useful for a little while, then they retire and then they die.

Component (or pattern) libraries are a way of designing and building websites in a modular fashion, breaking up the UI into small, reusable chunks that can then later be assembled in a variety of ways to build anything from larger components right up to whole pages.

From the Fractal.build introduction page

All you ever wanted to know about WordPress hosting cleverly summed up in a superb infography. Courtesy of CodeinWP.com.

Continue reading

Responsive Videos in WordPress Posts

Here’s a small jQuery code snippet that I found on Anders Noréen‘s themes that makes sure embeded videos have the correct size ratio on any screen.

(function() {
    // resize videos after container
	var vidSelector = "iframe, object, video";
	var resizeVideo = function(sSel) {
		$( sSel ).each(function() {
			var $video = $(this),
				$container = $video.parent(),
				iTargetWidth = $container.width();

			if ( !$video.attr("data-origwidth") ) {
				$video.attr("data-origwidth", $video.attr("width"));
				$video.attr("data-origheight", $video.attr("height"));
			}

			var ratio = iTargetWidth / $video.attr("data-origwidth");

			$video.css("width", iTargetWidth + "px");
			$video.css("height", ( $video.attr("data-origheight") * ratio ) + "px");
		});
	};

	resizeVideo(vidSelector);

	$(window).resize(function() {
		resizeVideo(vidSelector);
	});
})();

Interesting talk by @Jack_Franklin about the State of JavaScript in 2016 and beyond.

 

« Older posts

Copyright © 2018 VBlog

Theme by Anders NorenUp ↑