Tuesday, September 15, 2015

Creating Material Design Ripple Effects with SVG and Javascript

An in-depth tutorial on how to build the ripple effect outlined under Google Material Design's Radial Action specification and combine it with the powers of SVG and GreenSock.


by via jQuery-Plugins.net RSS Feed

Monday, September 14, 2015

Molecule : HTML5 Game Framework

Html5 Game Framework to build cross-platform games on a fast and efficient way.

The post Molecule : HTML5 Game Framework appeared first on jQuery Rain.


by Admin via jQuery Rain

UpUp – Javascript Library to Create Offline-First Websites

UpUp is a tiny javascript library that makes sure your users can always access your site’s content, even when they’re on a plane, in an elevator, or 20,000 leagues under the sea.

With UpUp you control the content your users see, even when they are offline. And you can do it with just a single JavaScript command.

The post UpUp – Javascript Library to Create Offline-First Websites appeared first on jQuery Rain.


by Admin via jQuery Rain

Responsive Quiz Application Using PHP jQuery Ajax

In this tutorial I made few changes in the Responsive Quiz Application Using PHP, MySQL, jQuery, Ajax and Twitter Bootstrap based on the request from users.

The post Responsive Quiz Application Using PHP jQuery Ajax appeared first on jQuery Rain.


by Admin via jQuery Rain

How Many Online News Publishers Use Twitter Correctly? - #infographic

#Socialmedia tips: How Many Online Newspaper Websites Use Twitter Correctly? - #infographic

Did you know that 76 percent of the most popular online news publishers in the US use the @site or @author option within the default tweet.

"For almost every major news outlet, Twitter has become an integral part of their daily outreach strategy. The transition from print to pixels continues as major publications adapt to an evolving online readership."

So how may online news organizations actually use Twitter effectively. Find out the answer in this infographic which comes courtesy of Neomam.

by Irfan Ahmad via Digital Information World

Web Design Weekly #203

Headlines

Is the web platform getting too big?

Nicholas Zakas chimes in on the topic of “Stop pushing the web forward” which was an excellent article recently written by Peter-Paul Koch. Nicholas has some extremely good points that I’m sure will resonate with some of you. Also be sure to check out some of the wise words in the comments. (nczonline.net)

The State of Front-End Tooling – 2015 (ashleynolan.co.uk)

Today Only: Become a Web Design Pro with a Treehouse Free Trial

Treehouse is an online technology school where you can learn everything about web design, coding, mobile app development and more. You’ll learn the practical skills needed to design web sites, build apps, and start businesses. Learn the in-demand technology skills you need to land your dream job or take your skills to the next level. (treehouse.com)

Articles

Designing Safer Web Animation For Motion Sensitivity

I really enjoy posts that think outside the box and this one by Val Head nails it. Val looks into how the overuse of scrolljacking and parallax effects can not only provide an annoying experience but how it can make people physically ill. Throughout the post she looks at why this happens and how we can go about designing safer animations for everyone. (alistapart.com)

Put the “designers should code” debate to rest

I know what you are thinking…. Oh no another “should designers learn to code”. Ah sorry about that, but to be honest I’m extremely picky on what makes it into each issue of WDW and this piece by Stephen Hay is top notch. It’s extremely well written and a great read for people that still need some direction. (the-haystack.com)

Less CSS mess

A very entertaining, energetic and to the point post by Thomas Byttebier. If you seem to spend time fighting with CSS this piece is a great read. (thomasbyttebier.be)

Managing Custom Tables in WordPress (deliciousbrains.com)

Tools / Resources

An Overview of SVG Patterns

This post by Lucas Bebber dives into the wonderful world of SVG patterns and what can be achieved with them when combined with some nice typography. (adobe.com)

Web Animations API

Daniel Wilson’s part 4 of exploring the Web Animations API focusing on GroupEffects & SequenceEffects. If you have time, be sure to check out all of his previous posts, lots of interesting topics covered and a super easy way to skill up in this area. (danielcwilson.com)

Exploring Angular 2

A curated collection of high quality articles and guides about exploring the Angular 2 framework. (blog.thoughtram.io)

HTML Color Codes

Get HTML color codes, Hex color codes, RGB and HSL values with a simple color picker. (htmlcolorcodes.com)

Promise Cookbook

A brief introduction to using Promises in JavaScript (github.com)

Salesforce’s Lightning Design System is now open source (github.com)

Essential SublimeText Plugins for JavaScript Developers (sitepoint.com)

Node v4 released (nodejs.org)

Inspiration

AMA: Jessica Hische, Lettering Artist & Type Designer (designernews.co)

Fixing a poor WordPress Google Page Speed Score (youtube.com)

Jobs

Software Engineer, Frontend at Airbnb

Frontend Engineers are an essential part of Airbnb’s Product Team and we want you to help us. You will work closely with designers to help implement the user interface of our web app. We make the most of modern tools like React, ES6, SASS and we ensure our UIs work well on all screen sizes. (airbnb.com)

Need to find passionate developers? Why not advertise in the next newsletter

Last but not least…

Emoji Toggles (css-tricks.com)

The post Web Design Weekly #203 appeared first on Web Design Weekly.


by Jake Bresnehan via Web Design Weekly

Give Grunt the Boot! A Guide to Using npm as a Build Tool

Front-end build and workflow tools are available in abundance: Grunt, Gulp, Broccoli, and Jake to name but a few. These tools can automate almost anything you find yourself doing repeatedly in a project, from minifying and concatenating source files, to running tests or compiling code. But the question is, do you need them? Do you really want to introduce an additional dependency to your project? The answer is “No!”. There is a free alternative that can do the majority of these tasks for you and it comes bundled with Node.js. Of course I’m talking about npm.

In this article we’ll discuss what npm is capable of as a build tool. If you’d like a quick primer on npm before starting, please refer to our beginner’s guide to npm.

npm Scripts

To start our discussion, we’re going to create a directory for our new demo project, that we’ll call “buildtool”. Once done, we’ll move into this folder and then run the command npm init to create a package.json file:

$ mkdir ~/buildtool && cd ~/buildtool
$ npm init

You’ll be asked several questions. Feel free to skip all or part of them as you’ll replace the final content of the package.json file with the following content:

{
  "name": "buildtool",
  "version": "1.0.0",
  "description": "npm as a build tool",
  "dependencies": {},
  "devDependencies": {},
  "scripts": {
    "info": "echo 'npm as a build tool'"
  },
  "author": "SitePoint",
  "license": "ISC"
}

As you can see, we have a scripts object with a property called info. The value of info is going to be executed in the shell as a command. We can see a list of the scripts properties (also known as commands) and values defined in a project by running the command:

$ npm run

If you run the previous command in our project folder, you should see the following result:

Scripts available in buildtool via `npm run-script`:
  info
    echo 'npm as a build tool'

In case you want to run a specific property, you can run the command:

$ npm run <property>

So, to run the info command we defined in the package.json file, we have to write:

$ npm run info

It’ll produce the following output:

$ npm run info
> buildtool@1.0.0 info /home/sitepoint/buildtool
> echo 'npm as a build tool'

npm as a build tool

If you only want the output of info, you can use the -s flag which silences output from npm:

$ npm run info -s
npm as a build tool

We only used a simple echo so far, but this is a very powerful feature. Everything on the command line is available to us and we can be very creative here. So let’s build on what we’ve covered up to this point and install some packages to create some common workflows.

Workflows

The first thing we would like to implement is a linting capability for our JavaScript files. This involves running a program that will analyse our code for potential errors. We are going to use JSHint for this, so the first step is to install the package via npm:

$ npm install jshint --save-dev

After you execute this command, you’ll see a new subfolder named node_modules. This is where JSHint has been downloaded. In addition, we also need to create the following folder structure for our project:

├── assets
│   ├── css
│   │   └── main.css
│   └── scripts
│       └── main.js
├── dist
├── package.json
├── node_modules
└── test
    └── test.js

On a Unix system, this can be done with the following command:

$ mkdir -p assets/css assets/scripts test && touch assets/css/main.css assets/scripts/main.js test/test.js

Linting

Now we’ll force some syntax errors in the main.js file. At the moment the file is empty, so open it and paste in the following content:

"use strict";

var Author = new function(name){
  this.name = name || "Anonymous";
  this.articles = new Array();
}

Author.prototype.writeArticle = function(title){
  this.articles.push(title);
};

Author.prototype.listArticles = function(){
  return this.name + " has written: " + this.articles.join(", ");
};

exports.Author = Author;

var peter = new Author("Peter");
peter.writeArticle("A Beginners Guide to npm");
peter.writeArticle("Using npm as a build tool");
peter.listArticles();

Hopefully the intent of this code is clear — we are declaring a constructor function whose purpose it is to create new Author objects. We also attach a couple of methods to Author’s prototype property which will allow us to store and list the articles an author has written. Notice the exports statement which will make our code available outside of the module in which it is defined. If you’re interested in finding out more about this, be sure to read: Understanding module.exports and exports in Node.js.

Next, we have to add a property to our scripts object in package.json that will trigger jshint. To do that, we’ll create a lint property as follows:

"scripts": {
  "info": "echo 'npm as a build tool'",
  "lint": "echo '=> linting' && jshint assets/scripts/*.js"
}

Here we’re taking advantage of the && operator to chain the commands and file globs (the asterisk) which gets treated as a wildcard, in this case matching any file with a .js ending within the script directory.

Note: the Windows command line does not support globs, but when given a command line argument such as *.js, Windows passes it verbatim to the calling application. This means that vendors can install compatibility libraries to give Windows glob like functionality. JSHint uses the minimatch library for this purpose.

Now let’s lint the code:

npm run lint -s

This produces the following output:

=> linting
assets/scripts/main.js: line 1, col 1, Use the function form of "use strict".
assets/scripts/main.js: line 5, col 28, The array literal notation [] is preferable.
assets/scripts/main.js: line 3, col 14, Weird construction. Is 'new' necessary?
assets/scripts/main.js: line 6, col 1, Missing '()' invoking a constructor.
assets/scripts/main.js: line 6, col 2, Missing semicolon.
assets/scripts/main.js: line 16, col 1, 'exports' is not defined.

6 errors

It works. Let’s clean up those errors, re-run the linter to make sure, then move on to some testing:

(function(){
  "use strict";

  var Author = function(name){
    this.name = name || "Anonymous";
    this.articles = [];
  };

  Author.prototype.writeArticle = function(title){
    this.articles.push(title);
  };

  Author.prototype.listArticles = function(){
    return this.name + " has written: " + this.articles.join(", ");
  };

  exports.Author = Author;

  var peter = new Author("Peter");
  peter.writeArticle("A Beginners Guide to npm");
  peter.writeArticle("Using npm as a build tool");
  peter.listArticles();
})();

Notice how we have wrapped everything in an immediately invoked function expression.

npm run lint -s
=> linting

No errors. We’re good!

Continue reading %Give Grunt the Boot! A Guide to Using npm as a Build Tool%


by Peter Dierx via SitePoint