Wednesday, July 26, 2017

How to Add a PayPal Button in WordPress

Alongside your ecommerce needs, you’ll also want to develop responsive development skills as well. Take a look at the SitePoint Premium course Responsive Tips and Tricks for details! If you have ever wanted to sell anything online you will have wrestled with the issue of how to do it. There are many tools available, such […]

Continue reading %How to Add a PayPal Button in WordPress%


by Nathan Segal via SitePoint

How to Add Real-Time Notifications to Laravel with Pusher

The modern web user expects to be informed of everything that happens within the application. You don’t want to be that one website that doesn’t even have the notifications dropdown found not just in all social media websites, but everywhere else these days, too. Luckily, with Laravel and Pusher, implementing this functionality is a breeze. […]

Continue reading %How to Add Real-Time Notifications to Laravel with Pusher%


by Yazid Hanifi via SitePoint

7 Super-Useful Chrome Extensions for Designers in 2017

All designers have their own way of working. Whether you design directly in the browser (with code, I mean), or you only use web browsers for live-testing web designs in real-time (or otherwise), there are plenty of Chrome extensions for designers that will make your life exponentially easier. My biggest pet peeve? Having to open a huge desktop app to accomplish a relatively minor task, so I'm always looking for Chrome extensions that solve common design problems quickly.

Here are 7 super-useful Chrome extensions I can’t live without, and also, here's 6 Great Firefox Extensions for Designers,
in case you work in Firefox too (if you're a web developer you probably cross-test in all browsers!).

1. Page Ruler

Page Ruler is a useful Chrome extension for finding out the positioning and/or size of any element in the browser — it’s quicker than using the Chrome code inspector, or worse, awkwardly traipsing through CSS files. To start, use the crosshairs to draw a selection around the element in question. The bar at the top of the browser will tell you the length and width of that element, as well how far it is from the each edges of the screen (as if it had been applied fixed/absolute positioning).

Tip: use the arrow keys to fine-tune your selection for maximum accuracy.

Page Ruler Chrome Extension

2. WhatFont

As I constantly have to inspect fonts on webpages, to see what font-size is being used on certain blocks of text, what the actual font name is, and its color, the WhatFont Chrome extension is incredibly useful to me.

Click on any section of text to find out the Hex/RGBA value, weight, line-height, font style, and of course the font family.

Sometimes, adding the Chrome inspect window at the bottom of the browser throws things off while you're working, so being able to obtain all of this information without bringing up the entire inspect window makes things much easier!

WhatFont Chrome Extension

3. CSS3 Generator

CSS3 Generator is a Chrome app that will help you generate somewhat complex or hard-to-remember snippets of CSS code. You won’t need it for simple things, but let’s face it, some CSS values are difficult to code from scratch (such as the CSS needed to create cross-browser compatible gradients, or CSS transformations). With a couple of clicks you can generate some pretty useful CSS, preview it in the extension preview, then copy the CSS and paste the code into your real CSS file.

Here’s a list of what’s supported:

  • Multiple text shadows
  • Hex/RGBA codes
  • CSS transforms
  • Border radii
  • Multiple box shadows
  • Css columns
  • Arrows (for tooltips)
  • Gradients (linear, radial...even striped)

CSS3 Generator Chrome Extension

4. Check My Links

It’s fairly easy to mistype URLs (or forget to include them entirely, but that's another story), so whether your clients need help with existing websites, or if you’re building a website from scratch, Check My Links is a must-have for any web designer.

Check My Links will scan a webpage and look for broken links — simple as that. It saves you the hassle of having to manually check them yourself. The UI is pretty intuitive. Rather than presenting a list of dud links, Check My Links simply turns the broken links on the actual webpage red, while valid links will appear in green, so you can see what to fix at a glance. Simple!

Check My Links Chrome Extension

5. Gravit Designer

If you need to design a graphic, but you don’t want to open a resource-heavy design app (or if you don’t have one/don’t want to pay for one), download the free Gravit Designer extension for Chrome.

Surprisingly, it’s really fast. It’s super-easy to start a design with commonly-used artboard sizes, including presets for blog graphics, social media graphics and common print dimensions. Gravit is a vector design app, which makes designing scalable resolution-independent designs a total breeze.

I was surprised by the amount of options and features—it wasn’t too different from using a premium design app like Sketch, although the visual UI feels more like Affinity Designer.

Continue reading %7 Super-Useful Chrome Extensions for Designers in 2017%


by James George via SitePoint

Off With Your Head! Build Better Web Apps with a Headless CMS

Building Sites with Elemeno, a headless CMS

The "Headless CMS" is a relatively new type of tool, but what is it? What makes it different? And, how do you get started with one?

Traditional CMSs typically have two major components: a back end where you create and manage your content, and a front end which displays the content. The front end is almost always a website which is often built using outdated techniques, tools, and libraries.

Headless CMSs take a different approach, only having a back end where you create and manage your content. They typically deliver your content via a robust API which allows you to easily retrieve your content in a developer-friendly way. This separation of concerns means the CMS does only one thing: manage your content. Headless CMSs don't dictate how or where you display your content. You can deliver your content to any device or platform, using practically any programming language, framework or library.


Looking for more CMS topics? Check out these great links:

And check out SitePoint Premium for more books, courses and free screencasts.


Building a Simple Portfolio Site with Elemeno

Let’s take a look at how we would build a simple portfolio site using Elemeno, a popular Headless CMS cofounded by yours truly. We'll use a typical Node.js development stack, but the same principles could be applied to any language or framework.

The tools we'll be using include:

  • Node.js, a server-side JavaScript runtime environment
  • Express, a web framework
  • Pug, a templating library (formerly known as Jade)
  • Elemeno, a headless CMS

We’ll get started first by setting up our project on Elemeno. Elemeno is a hosted product, so there's nothing to install and no databases to set up. Simply create an account, if you don’t already have one, then create a new project. You can get started 100% free by choosing the development plan, which will fit our needs perfectly for this demo.

Defining content models

The next step is to define our content models. You can think of a content model as the template of inputs that will be displayed when creating content. Elemeno has two different types of content models: Singles and Collections. Collections allow you to create many items from the same content model. This is perfect for things like collections of products, articles, or projects. Singles allow you to create a single item from a content model. This is ideal for things like contact info, or about us pages.

For our simple portfolio site, we'll create a Collection to store information about our projects. We'll need to determine what information we want to display for each project, and what type of input is best suited to capture that information. For our portfolio, each project will have:

  • Title (Plain Text)
  • Description (Markdown)
  • Date (Date and Time)
  • Screenshot / Photo (Image Picker)
  • URL (Plain Text)

When creating a collection on Elemeno, you start by giving your collection a name at the very top of the screen. We’ll call our collection “Portfolio”. You'll see that our collection starts with a single “title” input on the left side of the screen, and a list of input elements on the right. To define our content model we simply drag and drop input elements from the list onto our blank slate on the left. These inputs are exactly what you'll see when creating the content items for your portfolio.

After placing each input element, click on the input to change its settings. We'll set the “label” for each input and leave the other options to their default setting for now.

Our Portfolio collection should now look something like this:

Elemeno interface: Portfolio collection screen shot

Once we’re happy with what we have, we can click the “Save” button to create the collection.

Creating Items

Now that we have our Portfolio collection defined, we can start creating items. Simply click the “Create the first item” button to get started. Fill out each of the inputs and click the “Save and Publish Now” button to create our Portfolio item. Next, create a few more items to fill up our Portfolio Collection a little bit.

Now we’re ready to jump into the code and start building our site. First we’ll need to ensure we have Node.js and NPM installed for our development environment. You can do a simple check by opening Terminal and entering the following command:

node -v

You should see your installed version show up, or command not found: node if Node isn't installed. If you need to install Node, simply download the installer from the Node.js website.

First create a new directory to store our project files, and then navigate to that folder in a Terminal window. We need a couple of node packages for our project, so we’ll use NPM to install them by entering the following command:

npm install elemeno express pug 

We'll create a new file called server.js, and we’ll get started by including the packages we just downloaded:

var Elemeno = require('elemeno'),
    express = require('express'),
    pug = require('pug');

We’ll create a new Express application by simply calling Express:

var app = express();

Now we need to create a new directory called views to hold all of our Pug template files. Then we’ll configure Express to tell it where our templates live, and which templating engine we’re using. Note: you can use any other supported templating engine based on personal preference.

app.set('views', './views');
app.set('view engine', 'pug');

We can now create the route for our landing page. We’ll keep things nice and simple by defining all of our routes right inside server.js. To define our first route, we’ll use:

app.get('/', function(req, res) {
    res.render('index.pug');
});

This simply tells Express when someone makes a GET request to our root / we want to render our index.pug template.

The next step is to create the index.pug template inside of our views directory. Create a new file, save it as index.pug and for now we'll just fill it with something simple like:

h1 Hello World!

Now back in server.js we just need to tell Express which server port it should listen on:

app.listen(3000, function () {
    console.log('Portfolio listening on port 3000');
});

From a Terminal window you can now type node server and hit enter to get our website up and running.

Voila! We have a super basic node website. In your web browser go to localhost:3000 and you should see our super awesome “Hello World!” message.

Including content

Now let’s include the content from Elemeno in our website. We’ll start by creating an API Key which will allow us to access the content from our portfolio website. Go to the Settings screen on Elemeno, find the API Keys section and click the “Create API Key” button. We'll give our key a name of “Website” and we’ll leave the other settings to their defaults. We'll see our new API Key listed, click on it to view the details and copy the “Access Token” value.

Back in our server.js file, we'll create a new instance of the Elemeno client near the top of our file:

var Elemeno = require('elemeno'),
    express = require('express'),
    pug = require('pug');

var app = express();
var elemeno = new Elemeno('PASTE-ACCESS-TOKEN-HERE');

Paste in the Access Token we copied from Elemeno. Now inside our index route we'll fetch a list of projects from our Portfolio collection

app.get('/', function(req, res) {
    elemeno.getCollectionItems('portfolio', function(err, response) {
        res.render('index.pug', {projects: response.data});
    });
});

We pass the slug for our Portfolio collection, portfolio, to the getCollectionItems function. This function will return an array of objects representing the items in our collection. We then render our Pug template and pass along the data that was returned.

Continue reading %Off With Your Head! Build Better Web Apps with a Headless CMS%


by Chris Erwin via SitePoint

#300: Adobe plans to stop distributing Flash

Frontend Focus
Issue 300 — July 26, 2017
Adobe is planning to stop updating and distributing Flash at the end of 2020, encouraging creators to migrate Flash content to open formats like HTML5, WebGL and WebAssembly.
Adobe

Manuel Matuzović thinks Grid is “one of the most exciting developments since responsive design” adding that we should “get the best out of it as soon as possible”.
Smashing Magazine

Much more than an intro, you’ll not only learn React, but also a proven set of tools including Router v4 for paging, Jest for testing, Redux and Flow!
Frontend Masters   Sponsor

Sebastian Eberlein explores ‘edge cases’ where scaling a fixed layout with viewport units can be a viable solution.
Hacker Noon

In this talk from CSS Day 2017 Rachel explores how the Web Animations API can be used to generate, manipulate and run CSS Animations in the browser. Associated slides here.
Rachel Nabors

Mozilla has prepared a roadmap for Flash support in Firefox, and guides for site authors to make their final transition away from Flash technology.
Benjamin Smedberg

Jobs

Can't find the right job? Want companies to apply to you? Try Hired.com.

In Brief

webpack 3.4.0 Released news
Tobias Koppers

Migrating Games from Flash to Open Web Standards on Facebook news
The social network is working on a migration path for devs that use Flash to power their Facebook games.
Jakub Pudełek

Components will make you a better web developer 
Component IO introduces modular content management you can embed anywhere.
Component IO  Sponsor

An In-Depth Look at the Updated WebCrypto API in WebKit tutorial
Jiewen Tan

A Collection of Interesting Facts about CSS Grid Layout tutorial
Some interesting but useful tidbits about using CSS grid layout.
Manuel Matuzović

You’re Offline: How to Check for Network Changes & React Accordingly tutorial
Your site should adapt to all kinds of situations: “A change in connectivity is one of them”.
Max Böck

How to Bundle a Simple Static Site Using Webpack tutorial
James Hibbard demonstrates how you can use Webpack to bundle a simple static site.
SitePoint

D3 in Depth: An Intermediate Guide to D3 Visualizations tutorial
Peter Cook

Animating with CSS Variables tutorial
Four examples showing how CSS variables can be helpful for animation.
Val Head

How to Use Polymer with Webpack tutorial
Rob Dodson

A Beginner's Guide to HTML5 Cross-Browser Polyfills tutorial
SitePoint

The Core Concepts of Webpack in 23 Minutes video
Tom Friedhof

The History of the Web: How We Got the Favicon story
“Favorite icons” have been with us since 1999.
Jay Hoffmann

Eleven Examples of How WebVR Is Being Used Today story
Yuvesh Tulsiani

Optimizing Performance of A-Frame Scenes for Mobile Devices story
Mozilla Hacks

A Eulogy for Flash opinion
“There’s no doubt in my mind that Flash drove the web forward.”
Bruce Lawson

5 CSS Properties That You Probably Don't Know opinion
Including contain, writing-mode, and will-change.
Annarita Tranfici

Video Player with Android & iOS SDKs tools
Easy to integrate Video Player for web browsers (HTML5), Android & iOS, Chromecast, AirPlay, AppleTV, SmartTVs.
Bitmovin  Sponsor

Flow: A Free Typeface Built for Wireframing tools
Replaces text with lines and comes in three weights.
Dan Ross

Fitty: Makes Text Fit Perfectly to Its Container tools
Rik Schennink

Kap: Open-Source Screen Capture Tool That Uses Web Technologies tools
Wulkano

A CSS-Only Image Slider Based on SVG Patterns demo code
Damián Muti


by via Frontend Focus

Get Started With Firebase Authentication for iOS

Animated Image Pieces

A set of experiments with an animated image pieces effect where an image gets shattered into rectangular fragments powered by anime.js.


by via jQuery-Plugins.net RSS Feed