Tuesday, March 29, 2016

How To Craft Ridiculously Engaging Social Media Updates?


Do you use social media? Want to engage your audience better? Updating your audience on social media can be a great asset when it comes to increasing your brand's popularity and reputation, however what many businesses don’t understand is writing any old social media post won’t help your cause. When it comes to writing social media posts it’s important to make them engaging, entertaining and interactive to enhance audience participation and interaction. The following is a guide on how to craft ridiculously engaging social media updates that will help increase your followers, fan base, and potential customers.

by Guest Author via Digital Information World

CSS and Scalability

When I read about or listen to ideas on how to scale an app’s css – most of the talk is about how to write css. The real way to scale css, is to stop writing css. Abstract out the things you use most and move to a multi-class pattern where you compose visual patterns in your html. You might be amazed at how quickly your team starts to move.

If you write CSS, this is a must read.

The post CSS and Scalability appeared first on Web Design Weekly.


by Jake Bresnehan via Web Design Weekly

How Github Became Our Best Marketing Tool

It all started with a ‘Hackweek.’ Hackweek is a creative week that all our team members get after they finish working on a project. During this week our developers spend time building projects that typically end up on Github.

When we introduced Hackweeks about a year ago, we couldn’t even imagine what results this would bring. It turns out that giving away creative solutions for free can grow into a powerful marketing strategy. At least, this is how it worked out for our company.

We published our first Hackweek project on Github in January 2015 – a library called Side Menu Animation for Android. As of today, it has earned 2,649 stars.

[caption id="attachment_127534" align="aligncenter" width="400"]Our Side Menu animation for Android Our Side Menu animation for Android[/caption]

After publishing the Side Menu Animation, we built more iOS and Android libraries for Github. 12 months and 36 repositories later, Yalantis landed on Github’s list of top organizations among Facebook, Google, Microsoft, Apple, and other top tech companies. Last month, Sitepoint included us in an article on the 7 best resources for web and mobile app animations.

It took us only one year to hit Github’s list of top organizations. It feels like the time has come to give back to the community that helped us get where we are today. So...

How can you get popular on Github?

1. Make a Remarkable Project

There are at least three ways you can make your source code remarkable: 1) build a tool that solves a problem or improves an existing solution, 2) break a traditional concept and create your own, or 3) spot trends.

1. Build a tool that solves a problem or improves an existing solution.

There are more than 30 million repositories on Github. But that doesn’t mean that all problems are solved. Far from it, actually. Even if there’s no obvious problem, there are a lot of existing solutions that could be built better. This is especially true when it comes to Android app development.

The projects Koloda and uCrop are two of our most popular animations on Github. These libraries offer alternatives to existing solutions – albeit great improved alternatives.

Koloda is our version of Tinder’s card-swipe functionality. A lot of developers have already implemented similar solutions, but we weren’t satisfied with any other them. We decided to make swipe-left-to-like-and-right-to-pass much simpler. Our take includes:

  • API designed in a native way
  • A reverse previous card feature
  • A fully customisable library

[caption id="attachment_127547" align="aligncenter" width="400"]Koloda Tinder-like animation Koloda Tinder-like animation. Read the tutorial here[/caption]

uCrop is a cropping library for Android. There are already plenty of libraries for image cropping on Android, but none of them satisfied our requirements. We decided to make our own version of an image cropper with the following features:

  • Support for any crop ratio.
  • Gesture-based scaling, translation, and rotation of images.
  • A solution to prevent empty space inside crop bounds.
  • A ready-to-use crop Activity, and the possibility to use the underlying Crop view on its own.

uCrop has received huge support from the tech community on Github and even on Product Hunt. We just learned that it’s made its way into the new version of the Thirsty app, a social app that keeps people motivated to achieve new things.

[caption id="attachment_127548" align="aligncenter" width="400"]uCrop image cropping library uCrop image cropping library. Read the tutorial here[/caption]

2. Break a traditional concept and create your own.

The majority of apps you have on your mobile phone have similar interface elements. Think of a sidebar menu. When you tap on the menu icon, the menu appears, pushing all content to the side. Sure, it’s practical and familiar. The menu does what it is supposed to do. But it’s just a bit too predictable. In other words… boring!

That’s why we came up with the Guillotine Menu (check out the component for iOS and Android). This component offers a much more creative way of displaying a menu. It falls down from the top in an entertaining manner when you tap on an icon.

Your idea doesn’t necessarily have to solve a problem. If you get creative and reinvent a concept, you can always draw people’s attention.

[caption id="attachment_127550" align="aligncenter" width="400"]The Guillotine Menu animation The Guillotine Menu animation. Read the tutorial for iOS and for Android[/caption]

Continue reading %How Github Became Our Best Marketing Tool%


by Emilia Hansen via SitePoint

Balance Text – jQuery Plugin for Text Wrapping

Balance Text is a jQuery plugin for implementing balancing of wrapping text in a web page.


by via jQuery-Plugins.net RSS Feed

Creating a Donation Widget with Flight Components

In this tutorial I will be teaching you the basics of Twitter's Flight.js by making a donation widget, which also uses Materialize for the front-end, and Stripe to handle the payments. We'll be covering Flight's main concepts and methods.

Flight is an event driven framework by Twitter. Based on components, Flight maps behaviors to DOM nodes independently. Unlike other popular frameworks, Flight doesn't prescribe a particular approach to how you render or fetch your data it is, however, dependent on jQuery. In its essence, Flight is all about events. These can be triggered by the DOM or by artificial triggers within other UI components. Flight is basically a framework for making frameworks. This might sound complicated, but while Flight isn't as 1-2-3 as jQuery, its learning curve is exaggerated and learning Flight could definitely improve your JavaScript skills.

Why Use Flight?

  • Write more readable jQuery.
  • Write re-useable components.
  • Use as much or as little of other libraries as you want.
  • A better structure for your code in general.
  • Supports and even prefers modular JS.

Readability: jQuery vs Flight

Let's say we're listening for a click and a hover on a button. Using jQuery you'd probably do something like this:

$('#button').on('click', function() {
  confirm('You clicked?');
});
$('#button').on('mouseover', function() {
  console.log('Oops');
});

But using Flight this all goes into one component.

var Button = flight.component(function () {
  this.log = function () {
    console.log('Oops!');
  }
  this.confirm = function () {
    confirm('You clicked?');
  }
  this.after('initialize', function(){
    this.on('mouseover', this.log);
    this.on('click', this.confirm)
  })
});

Button.attachTo('#button');

Of course, jQuery requires less code but, with Flight our code is structured a lot clearer. The events are two different threads in jQuery, but in Flight these are both contained within the same component. We can easily see that this component and the element it is attached to are listening for two events. But let's say we wanted to add that hover event listener 200 lines later in our code. Using jQuery, you'd probably add it at that point in your file. However using Flight we are almost forced to add it to the existing component.

I've made a template that includes everything you need to get started so you can get straight to coding. You can download it from Github or fork it on CodePen.

Want to make your own template? Just copy in these CDN's:

<script src="http://ift.tt/1hhKFa1"></script>
<script src="http://ift.tt/1qfoTcA"></script>
<script src="http://ift.tt/1doUtf9"></script>    

Making Your First Component

Flight consists of 'components'. Components are reusable blocks of code that stand alone within your application. Creating a component is a lot like creating an object constructor except that components cannot be changed or accessed after they have been initialized. Components can only communicate with your app through events. Either by triggering them, or listening to them.

Flight component's can be as simple or as complex as you like. In the example below we are only listening for a hover (mouseover) event on a button, and showing an alert when that happens.

var Button = flight.component(function () {
  this.alert = function () {
    alert('Oops!');
  }
  this.after('initialize', function(){
    this.on('mouseover', this.alert);
  })
});

Button.attachTo('#button');

This is obviously nothing jQuery couldn't do, and structuring your code like this may seem like a lot of effort now, but once you start using Flight for things other than hover events you will understand its benefits.
As long as you understand that it's listening for a mouseover event and triggering an inner function you're fine for now. I'll explain what the rest means later on in this tutorial.

Getting Started

If you are using the template, the form in your index.html file should look like this:

<form action="#">
    <input type="checkbox" id="accept" />
    <label for="accept">By proceeding your agree to our terms, which are completely unfair and well, not very real.</label>
    <br/>
    <button class="waves-effect btn" style="margin-top: 15px;" id="launch" disabled>Let's Go</button>
</form>

We want to enable the button when the check-box has been checked and disable it otherwise. Let's head over to our JavaScript code and create our first component.

var checkToEnable = flight.component(function () {
  // Magic
});

Each Flight component consists of a few different methods. Some of these are required, others are not. The first method we'll be adding is attributes(). The attributes() method contains one or more attributes. Attributes are scoped variables and / or arguments. Empty attributes (ones declared with a value of null), require a value to be passed to them when the component is initialized. Other attributes will use their default values unless instructed otherwise. Attributes are typically used to hold element references. Insert the following code into your component:

this.attributes({
    button: null 
});

The button attribute will serve as a reference to the button we want to enable. The next method we want to add is the initialize() method.

this.after('initialize', function () {
    this.on('change', this.enableButton); 
});

Flight components already define a default implementation of initialize() which we want to extend rather than overwrite, which is why we're using the after() method here. Inside of the callback function we've added an event listener. This will listen for a change on the element which the component will be attached to and consequently trigger the enableButton() function, which we'll create next.

this.enableButton = function (e) {
    var buttonEl = document.getElementById(this.attr.button);
    switch (e.target.checked) {
        case true:
            buttonEl.disabled = false;
            break;
        case false: 
            buttonEl.disabled = true;
            break;
    }
};

Continue reading %Creating a Donation Widget with Flight Components%


by Niels Klomb via SitePoint

Maxi Best-of

opl-small

Responsive landing page for 'Maxi Best-of' - a new web design inspiration chrome extension. Nice touch how the install button disappears on small screens as you can't install the app on mobile.

by Rob Hope via One Page Love

Introduction to WordPress Term Meta and WP_Term

In WordPress, you can easily save metadata for your posts, pages and other custom content types, however saving metadata for use with your taxonomies used to be an overly complex process (I even wrote a previous article about it here!).

To get it all to work you would need to save your term metadata as a field inside your wp_options table for each piece of data, meaning potentially you could have hundreds, if not thousands of extra entries if you had a decent amount of terms or just several customized taxonomies.

However, since WordPress 4.4 and beyond, terms are now objects, the same as posts, pages and custom content types. This change makes it much easier to add, remove and update your metadata.

The Backstory with Term Meta

The community has been pushing for an easy way to control term metadata since way back in WordPress 2.8. It’s been a slow process, but finally terms have been re-designed from the ground up to use a class structure. This plus a few different changes in WordPress 4.4 means that terms in a taxonomy (such as ‘tags’, ‘categories’ or custom) can now have their own meta easily assigned to them.

Continue reading %Introduction to WordPress Term Meta and WP_Term%


by Simon Codrington via SitePoint