Archive

Archive for November, 2016

WPDK, the WordPress Development Kit for Plugin Developers

November 17th, 2016 No comments
wordpress-plugins

WPDK is a rather new development kit for WordPress and promises to enable the simple creation of easily maintainable plugins and themes. It’s supposed to improve the WordPress kernel and extends its core features and classes. WPDK is fully object-oriented and guarantees easy usability.

WPDK is the acronym of WordPress Development Kit. It’s an easily installable PHP framework that was written for the plugin and theme development with WordPress.

The WPDK – WordPress Development Kit Framework

Nowadays, developing plugins and themes is not an easy task anymore. The code is becoming increasingly more complicated, and more and more features have to be implemented. This is the best time for a development plugin that promises to stand for an easily maintainable code base.

Due to its object-oriented infrastructure, WPDK encapsulates many aspects of the development of a WordPress plugin or theme and automatically executes tasks that generally are supposed to precede the right approach of a developer.

The developer should focus on his idea, and not on the infrastructure. Thanks to the expansion of the WordPress objects with the WPDKWordPressPlugin object, the developer can access a bunch of advantages with a simple action.

Further Information:

WPDKWordPressPlugin Class Reference

WPDK – Examples of the Most Important Advantages for Developers

Many important things are quickly accessible to ease the development of plugins. A few examples:

  • The immediate availability of your plugin data; like name, version, and text domain.
  • The immediate availability of useful paths related to your plugin, like the plugin folder, the plugin main file name, and so on.
  • The automatic creation of hooks to WordPress filters in connection with the activation, loading, and the deactivation of the plugin.
  • A clear cut between the necessary code for the admin area and the frontend for WordPress is also made. This lets you implement the code in the correct spot fast and efficiently.

The readability and the plugin performance are supposed to be increased as well. This would already be a very helpful thing in itself. Especially in very large plugins, the readability is a real problem for some developers.

A Brief Presentation of the Most Important Features:

  • Simplicity
    Your WordPress development should become easier, thanks to the steadily growing amount of WordPress objects that WPDK provides: fast generation of a plugin infrastructure, shortcode manipulation, file system, DateTime helpers, and so forth.
  • More Productive
    The development becomes more productive and faster, as you can stop writing the same code for the same purpose over and over. Basic infrastructures for the development of WordPress plugins and themes are embedded in WPDK.
  • Integration
    The framework can be integrated into the most important IDEs (PHPStorm, Eclipse, Netbeans and others), and supports you with an internal documentation in PHPDoc format. Direct help during development is also offered inline.
  • Improvement
    The WordPress UI is improved and allows for better user friendliness of your creation. This way, faster and more efficient results can be secured.
  • Maintainability
    Your WordPress creations should be easier to take care of now, due to the object-oriented internal infrastructure, as well as the MVC pattern compatibility.
  • Swiftness
    Thanks to the WPDK autoloading technology, your WordPress creations will get up to 50% faster. You only write the PHP source code that is necessary for the fulfillment of the client’s HTTP request load, analyze, and execute. Every other WPDK PHP source code that is not related to the HTTP transaction is not loaded, which drastically increases the speed during loading and running the code.

Further Information:

The Complete List of WPDK Features

The Installation of the Framework and its Requirements

Before the installation, there are requirements to be met, however, almost all hosts should meet them by now.

  1. At Least WordPress Version 3.4
  2. At Least PHP Version 5.2.4
  3. At Least MySQL Version 5.0

Next up is the installation which works just like a manual plugin installation.

  • Download of the framework from the official Github page
  • Unpacking the file to the desktop
  • Loading the folder wpdk-production into the WordPress plugin index using FTP

The framework is installed now. It does not appear in the list of plugins, as it does not need to be activated.

The skeleton of a plugin created with WPDK:

Here in this code example, you’re able to see that a plugin with the WPDK framework is very well structured. The strict division of frontend and admin features is also exemplary. There are classes for the activation and deactivation of plugins as well.

View the code on Gist.

Important Links For the WPDK WordPress Development Kit:

Conclusion

Inevitably, the approach of a strictly object-oriented development means following the right track. The fast availability of UI elements that don’t need to be explicitly defined is well thought out. I also like the separation of code blocks for the admin, and for the front end area of the plugin.

An in-depth look would be required to find out if the plugins developed using this framework are significantly different from the “default” plugins that were developed following the WordPress requirements. Getting used to the controls of WPDK is only worth it for developers that deal with the creation of plugins on a daily basis, however.

The framework is also being praised for the development of themes. I dare to doubt that working with an additional PHP framework in this area is advantageous. The WordPress Coding Standards certainly are more than sufficient here. It would already be a real advantage if the theme developers stuck to them. This would give a real boost to the readability and performance of developed themes.

Categories: Others Tags:

Making logos work for the web

November 16th, 2016 No comments

When you design for the web, no matter the industry, there are expectations that must be met, and realities that must be accounted for. Although this is true for all forms of web design, it is especially true for logo design.

This is something we’ve encountered numerous times. Think about the many different conventions of logo design. They’re usually placed in the top left-hand corner of the page, they are usually linked to the homepage, they’re usually used to reinforce ideas or messages about the brand itself… I could go on.

So how do we craft innovative logos in a world where there are so many standards and expectations? We take advantage of them.

Brand reinforcement is a must

Okay, so first and foremost, your logo is your brand’s identity. It is a badge of pride, and a way to reinforce the principles and ideas that make up your organization. In that sense, it ought to be a straightforward platform for innovation. Yet, there are some expectations that a user has about what a logo should look like.

Here are a couple of examples:

Your logo ought to reiterate the same ideas that the rest of your content and branding supports. Organization names have a lot to do with logo design as well. In the above examples, the designs reflect the subject matter in the name of the organizations.

This type of cognitive association also helps to reinforce brand identity.

As one of its primary purposes, the way in which you choose to reinforce your brand has a huge bearing on the success of a logo. Here’s your chance to introduce creativity and playfulness into your organization in a way that captures the attention of a potential visitor.

Do you have a fun work culture? Show us with your logo, but don’t take it so far that it is not immediately recognizable as a logo.

Alternative linking schemes

When designing the flow of a site, designers must account for the need to return to the homepage. Rather than providing a “home” button in the navigation bar, the logo has been the traditional method for providing users with a way to return home.

This is a standard. But that doesn’t mean it’s the best possible way to go about things. You could theoretically link your logo to any page you deem appropriate. And since we’re talking about logo innovation, there are numerous ways to get sneaky (in a good way) with your logo linking scheme.

Consider the advantages of directing users to your contact page when they click on the logo

Perhaps there is a page on your site with a particularly high conversion rate, and you’d like to increase traffic to that particular page. You could try linking your logo to that page instead of the homepage, and measuring the results. There’s a high probability this will confuse your users, but it doesn’t necessarily mean that there will be a detrimental impact on conversion performance, especially if you still provide a way of returning home.

Consider the advantages of directing users to your contact page when they click on the logo: you know that the user is interested in staying on the site, because they’re clicking the logo, but you also know that they don’t necessarily know what they want if they’re returning to the homepage.

Placement is important

Another standard in logo design has to do with placement. How many logos have you seen that have not been in the top left corner of the page? I bet you can count all of them on one or both hands. That’s because users expect it to be in the top left-hand corner.

Expectation plays a huge role in usability.

And while I may have advocated for the abuse of user expectations in the previous section, here it is an entirely different story: until someone proves me wrong, there’s no reason to believe that conversion and bounce rates would be negatively affected by an altered linking scheme; placement, on the other hand, could be a deal breaker.

Expectation plays a huge role in usability.…placing the logo in any location other than the top left-hand corner will hurt your site

Case studies have shown that placing the logo in any location other than the top left-hand corner will hurt your site. NN Group found that centering your logos will make it roughly six times harder to return to the homepage of a site than left-aligned logos.

That means that regardless of where your logo will take users, they just won’t click on it if it’s not in an easily recognizable location.

Your logo is not arbitrary, but there’s room for innovation

Properly thought-out logo innovation can elevate an organization to a level beyond their competitors in the eyes of their target audience.

And while innovation is almost always a good thing, there are ways that it can hurt you. User expectations don’t have to be met 100% of the time, but it is important to take into consideration the exact ways in which your innovations will affect your user base.

Don’t make choices that will restrict users, or make it more difficult to convert. Remember that there are conventions and expectations in web design, and often, they can make or break a website’s performance.

Do find ways to innovate that will excite users or direct them to corners of your website they may have never known existed without your intervention. If this means surprising them, don’t hesitate to do so.

Anytime you innovate, be sure to track the performance of your changes on a level that will give you granular detail. Which users were negatively affected by your change? What were their expectations? You get the point.

The Design Deck – Playing Cards for Designers – only $14!

Source

Categories: Designing, Others Tags:

Adding and Leveraging a CDN on Your Website

November 16th, 2016 No comments

If you’ve been working around web development for a while, you’ll know that the web has a need for speed. The truth is simple: speed matters and faster is considered better.

One “easy win” for increasing performance is using a CDN. We’ve discussed this several times at CSS-Tricks. It’s easy in that you aren’t rewriting a codebase or hand-editing content, but it’s an area of performance many of us might overlook because, well, hosting, servers and cPanels, oh my!

Thankfully, the process for integrating a CDN does not have to be hard. Ideally, you get things configured and then things like Google PageSpeed shriek with glee in the form of high performance scores which, in turn, yield to better search engine rankings, higher revenue, a raise for you and…you get the point.

This post is going to walk through the process for setting up a CDN to work on a custom web application, followed by some tricks we can use to get the most out of our work. Like I said, it doesn’t have to be hard, so let’s dive in and make the web faster!

It’s worth noting that setting up a CDN can be even simpler than what we’re covering here for those working with a CMS like WordPress, where plugins can help with the lift. We’re going to assume that not everyone has that luxury (shout out to web applications!) and proceed in the more traditional way.

Hold up, you lost me at CDN

It doesn’t hurt for us to review the basic concepts of what a CDN is and what they’re used for, so let’s start with that.

A CDN works by fetching static assets from your site’s server and caching them on their servers. When a browser makes a request to visit your site, the static contents are served via the CDN rather than by your site. This is faster because the CDN servers are globally distributed and serve as proxies that determine which server is located physically closest to your visitor, thus delivering content on a speedier, more convenient network. Hence the full name: Content Delivery Network.

A Content Delivery Network is globally distributed for optimized delivery of static assets

So, how does the browser know to get the resources from the CDN instead of your server? The URL of your static resources are replaced to point to the CDN server instead of the URL of your own site.

For example, say we want CDN to be configured as a subdomain. For CSS-Tricks, that might be something like cdn.css-tricks.com and that will be the relative URL for which we base all our assets.

Put more succinctly put, the URLs of assets on our site like this:

http://www.css-tricks.com/image.jpg 
http://www.css-tricks.com/style.css 
http://www.css-tricks.com/script.js

…would become:

http://cdn.css-tricks.com/image.jpg 
http://cdn.css-tricks.com/style.css 
http://cdn.css-tricks.com/script.js

The browser sends the requests to your CDN rather than your server, taking the load off your server and making your whole site faster as a result.

Wait, two servers for one site?

Yes, to a degree, but it doesn’t really mean that you’re managing two servers.

What we’re talking about instead is using the CDN as a virtual layer that stands between your server and a user’s browser. That virtual layer listens in on the request the browser is making to your server and gladly responds with cached assets on behalf of the server.

In some cases, you may upload your asset directly to the CDN and take the entire burden off your server. What we’ll be looking at in this post instead is a process where the CDN fetches assets from your server and pre-caches them so there’s no need to upload to different servers and manage multiple locations.

How to implement a CDN on a Custom Application

Two of the most widely used CDN services are Amazon AWS and MaxCDN, though plenty of other services are certainly available. We’ll be focusing most of our attention on MaxCDN as an example of how to set things up.

Step 1: Choose a CDN and Register Your Site

Once you’ve decided that a CDN is the way to go for your web application, you’ll want to register for an account. There are many, many options out there and, rather than weigh the pros and cons of each (which might make a good future post), here are a few to get you started:

A common step when registering your account is to set up a pull zone or distribution. A pull zone or distribution is used by the CDN as a bucket for your everyday support files. It will automatically pull the data from a location that you specify upon the first request for the file. The files are served to the end user from either a subdomain of your CDN of choice or a custom domain (sub domain) of your choice that points to the CDN. The data in the bucket is automatically purged from the server after a customizable amount of time.

Step 2: Create your CDN URL

Your CDN URL is the URL all of your assets will point to once things have been set up. A good rule of thumb is to use a URL name that is easy to do a search and replace in your database for all of your existing URLs.

Like any other subdomain, this will need to be set up as a CNAME record in your host’s DNS settings.


A typical cPanel screen for configuring CNAME records with a host

Step 3: Point Your Assets to the CDN

Let’s look at a method for creating a variable for the CDN URL and how it can be used to help programmatically prepend the URL to our static resources. The reason we want to do this is that (1) it makes it tougher to make mistakes in our markup and (2) it is easier to maintain the URL should we need to change it.

We’ll do this is by defining a global CDN variable, then prepend this variable to our static resources URL. We define this variable at both the PHP level and the JavaScript level so that we have more flexibility in how we use it down the road. It also makes it easier for us if we decide to ditch the CDN because all we have to do is replace the variable with a simple / to get things back to the relative path of our original server.

Note that the following examples are here to serve illustrate examples rather than to be used literally. Your actual usage may vary.

<?php
define('cdnURL', 'http://cdn.css-tricks.com/');
?>
<html>
    <head>
        <title>Hello World!</>
        <script type='text/javascript'>
            /* Let's define a javascript global for using the CDN inside scripts */
            var cdnURL = '<?php echo cdnURL ?>';
        </script>
        
        <link rel='stylesheet' href='<?php echo cdnURL ?>css/style.css' />	
    </head>
    <body>
        <img src='<?php echo cdnURL ?>img/logo.png' />
        <button>Submit</button>
        <script type='text/javascript' src='<?php echo cdnURL ?>js/main.js'></script>
    </body>
</html>

Or, done in JavaScript:

(function() {
    var preloadImage = document.createElement('img');
    preloadImage.src = cdnURL + 'img/logo.png';
})();

This does require a slight change in your thought processes as a developer. Every static resource needs to get the cdnURL variable prepended to it.

Same thinking goes for your CSS. For example, we can also setup a global CDN variable and prepend it to our CSS resources using a CSS preprocessor, like LESS:

@cdnURL: 'http://cdn.css-tricks.com/';
button {
    background-image: url('@{cdnURL}img/button.png');
    &:hover {
        background-image: url('@{cdnURL}img/button_hover.png');
    }
}

…or Sass for that matter:

$cdnURL: 'http://cdn.css-tricks.com/';
 
button {
    background-image: url('@{cdnURL}img/button.png');
    &:hover {
        background-image: url('@{cdnURL}img/button_hover.png');
    }
}

The great thing about this is that you can switch off your CDN by simply setting the cdnURL to / which will recreate all of your relative URLs. This also has the advantage that should you want to switch the CDN URL, you just need to change the cdnURL.

That is really the three-step process for setting up a CDN, linking it to your server and then pointing your existing assets to it for so the CDN can serve things up when requested.

Let’s talk about some advanced settings

Setting up the CDN wasn’t that scary, right? Now that we’ve gotten past the main hurdles, we can have some fun with advanced settings that optimize the way our assets are served.

TimeToLive (TTL)

CDNs typically have a TimeToLive (TTL) set for assets. This is a fancy way of telling the CDN how long (in seconds) before it should treat an asset as stale. At that point, it looks it up on the server again for a “fresh” copy.

The longer the TTL, the longer a “version” of that asset will stay with the CDN and continue to be served. The shorter the TTL, the more often it ditches the “version” of the asset it stores and goes back to the original server to look for an updated version.


MaxCDN cache settings screen for setting TTL expirations

Invalidating assets

The double-edged sword with TTL is that you can update an asset on your server and the change will not reflect on your site until the TTL has expired and the CDN makes its next stop to the server to find a new copy.

We can overcome this by invalidating an asset. The trick here is to change the filename on update. If the filename changes, the CDN doesn’t know any better and reads the newly named file as a completely new asset rather than an update to the existing one.

In other words, this: http://cdn.css-tricks.com/image100.jpg

…would be renamed to something like this: http://cdn.css-tricks.com/image101.jpg

So long old version and hello new one!

Leveraging TTL for version control

Hey, so if the CDN is holding onto one version of an asset and there is a fresh copy of it living on our server that it hasn’t fetched yet, then we technically have two iterations of the same asset. We can use this to create a form of “version control” where updating our assets on the server doesn’t mean we automatically lose them and can revert to a past copy, if needed.

The really complicated way to do this is to rename all of your resources every time you make a change like we did when invalidating the asset. However, this is overkill from a maintenance perspective, even if we had to create a variable to do this like we did for the cdnURL. We’re going to do some cheating instead because that’s how we roll on a blog that is built around tricks.

We’ll start by placing our static assets into their own folders so that this: http://cdn.css-tricks.com/image.jpg

…becomes this: http://cdn.css-tricks.com/img100/image.jpg

To invalidate the file and force the CDN to serve the latest version, we would modify the subdirectory path like this: http://cdn.css-tricks.com/img101/image.jpg

See the difference? The filename stays the same but it now appears to live in a directory on the server. Again, the CDN does not know the difference and sees this as a completely new file. We just created a faux form of version control that happens directly in the folder!

But wait, we can do better.

Changing the number on a folder on every update is still a cumbersome process and yet another step in the maintenance of our site. What we can do instead is make a few small changes to the site’s .htaccess file to do the heavy lifting for us.

We’ll outsmart the CDN by serving all our assets from the same folder, but make it look like it’s being served from a versioned folder, thanks to some rewrite rules.

<IfModule mod_rewrite.c>
	RewriteEngine On
	RewriteBase /
	RewriteRule ^ver-[0-9]+.[0-9]+.[0-9]+(.*)$ $1 [L,NC]
	RewriteCond %{REQUEST_FILENAME} !-d
	RewriteCond %{REQUEST_FILENAME} !-f
	RewriteRule ^(.*)$ index.php?/$1 [QSA,L]
</IfModule>

Ha! Now our server is spoofing the version number in the URL while delivering our example image.jpg asset from the same path on the server where it was originally uploaded.

Invalidating all assets on demand

The last thing to round this out is to integrate our version control trick into our HTML markup so that the CDN will refresh all of the assets as soon as we want to fully invalidate them.

We’ll set up a config file where we define a variable for the version number, import that variable into our asset URL structure and then change the version number each time we want to push a refresh of our assets across the board.

Here’s what that might look like in a PHP config file:

VERSION
1.0.0

Configure::load('cdn');
define('VERSION', file_get_contents(APP.DS."Config".DS."VERSION"));
define('CDN', Configure::read('CDN.path').VERSION.'/'); /* the trailing slash is important */

Here’s how that might work as a LESS config file:

@VERSION: '1.0.0';

@import 'cdn';
@import 'version';
@CDNURL: '@{CDN}@{VERSION}/';
 
button {
    background-image: url('@{CDNURL}img/button.png');
    &:hover {
        background-image: url('@{CDNURL}img/button_hover.png');
    }
}

As you can see, you can also choose to use the CDN variable as a file, environment variable or whatever would work best for you. The principles are mostly the same, all will achieve the desired end result of incorporating the CDN URL (and version number) into all of our external resources.

CDN, FTW!

Hopefully this takes the scare out of setting up a CDN. It can certainly appear to be a daunting task and there absolutely are advanced settings that can get you lost in the weeds. The initial setup is what most of us need anyway and the benefits are profound when it comes to performance and user experience, among a host of other things (pun intended).

The truth is that it gets even simpler if you manage content on your site with a popular CMS like WordPress, where there are plugins galore to streamline the process even further.

Even if we do not have the luxury of plugins, setting up a CDN can still be pretty straightforward, even for the least hosting-oriented of us. The setup is the largest hurdle and we were able to break that down into three basic steps. All else flows nicely from there.


Adding and Leveraging a CDN on Your Website is a post from CSS-Tricks

Categories: Designing, Others Tags:

Exploring Repeat Grid In Adobe XD

November 16th, 2016 No comments

If you’re a visual designer, you probably spend a majority of your time making small adjustments to multiple visual elements. Maybe your client has decided they need a few more pixels of padding between each of your elements, or perhaps they’ve decided that all of their avatars needed to have rounded corners. Any which way, you might find yourself making the same adjustment in your design over and over… and over again.

In Adobe Experience Design CC (Beta), we’ve introduced the Repeat Grid feature to address this tedious aspect of a designer’s workflow. In this article, we’ll dig deep to uncover the true power of this time-saving feature. We’ll create and adjust a Repeat Grid, add content to it, and wire it up in Adobe XD’s simple and powerful Prototype Mode. If you’d like to follow along, you can download and test Adobe XD for free.

The post Exploring Repeat Grid In Adobe XD appeared first on Smashing Magazine.

Categories: Others Tags:

How to Build a Successful Landing Page

November 16th, 2016 No comments
marketeer-1687065_640

Nowadays, a lot of businesses are using individual landing pages to sell products via the internet. This one page displays everything about the product and is supposed to turn visitors into paying customers. To make this possible, a sales page has to be well structured and thought out. In this article, we’ll guide you through the essentials of a successful landing page.

Today, the question is not whether a product needs a landing page, but rather how it needs to be structured to make the product sell well.

The Structure of a Successful Landing Page

Build your landing page along the lines of the following tips, and you will be bound to raise your revenue easily.

e-commerce-402822_640

1 – The Logo

The logo makes for recognition value and unites everything the business stands for. It should set itself apart from the competition, as the customer will think of the logo as the sender of the offer. A good logo should also be able to build trust, which is why it is one of the most essential elements of a well-done landing page.

2 – Headline and Subline

These two elements will quickly show the visitor whether they are on the right page or not. The headline can repeat the keywords that the visitor used to get there. The subline can be utilized for an extended description. In the best case, both headlines together should show your customer that he has come to the right place.

3 – The Hero-Shot

Here, you should show your product’s best side. Turn it into a superstar, the winner of an Academy Award. The better the product looks, the higher the chances to sell it. A neat video in which you could explain the history of your product is an option as well.

4 – The Introduction

What does the customer get out of this, why exactly should he buy your product? If you didn’t make this clear yet, you have to put in all you’ve got now. You may repeat the keywords from the headline. Write a brief description that will touch your potential customer.

5 – USP (Unique Selling Proposition)

This basically means “what value do I get out of this offer?”. Inform your visitor about what value he’ll get from your offer. Keep it short and concise. You may even extend this area with a list that includes the four or five most important aspects.

6 – The Price

Here’s where you’ll show the price, or prices (when offering multiple versions or variants of your product). From a psychological perspective, it is important to “explain” the price. You could do that with an original and a reduced price. Or you offer your product at a special price for a limited amount of time. This creates an artificial “psychological pressure” that makes customers purchase the product much easier.

7 – Call To Action

Now, you’ll make clear what you expect from your visitor. Lead him to the next step of the process. Make sure that your call to action really stands out from the other elements, and makes users click it. A CTA can also consist of a sentence that leads the visitor into the next step in a psychologically smart way.

8 – Reason Why – The Reason for the Purchase

Why should a visitor become a customer? Give strong, clear arguments to make him do what you expect him to. A human always needs a reason for a decision; especially when it comes to purchase. Depending on the target audience, a good reason may be backed by statistics, a report, or a graphic.

9 – The Functional Principle

Your visitor won’t read through long texts. This area works just like an excellent blog post. Make sure that the provided information is scannable. The visitors want to know if your product brings them what they want it to, and if it’s the right choice for them. And they want this information as fast and with as little effort as possible. Illustrations have the potential to be very helpful here.

10 – Testimonials

Have you already sold your product to someone? Great! Ask them for their opinion, and place them on the page as testimonials. A real testimonial does not leave the customer alone but gives him an “expert” on the product to help him. This builds trust in your business, as well as your product. Here, it’s crucial to obtain and post honest opinions.

11 – Trust Elements

Confidence is one of the strongest psychological motives for purchase. Here, you have to convey trust and safety. Good elements to do that are seals, brands, and certificates, for example. However, Facebook likes can also be trustworthy. A professional landing page design also creates a feeling of safety and trust.

fruit-1275551_640

Landing Page Statistics You Should Know

  • 48 percent of all marketers create a new landing page for each marketing campaign
  • The effects of the landing page on the lead volume depending on business size. Here, small businesses with up to ten employees achieve the largest lead volume. Especially when a lot of landing pages were created. This could definitely be because of the fast decision-making paths in the business.
  • Only 22 percent of businesses are satisfied with their conversion rate. Here, in-depth landing page tests may be helpful. The campaigns of President Obama have shown this.
  • Only 52 percent of businesses test their landing pages.
  • Just one additional second of loading time may decrease the conversion by seven percent.
  • President Obama collected an additional 60 million dollars of donations from in-depth A/B tests.

Inspiring Content That Leads to Purchases

Our brain is lazy and does not always want to think rationally. We prefer being “seduced” to do something driven by our emotions. Purchase decisions are often made on a purely emotional level for that reason. Afterward, the decision is justified by our mind.

With this background knowledge, we should make sure that our texts address the visitors on an emotional level. They have to move, touch, and bind your visitors. Surely, this is not always easy. You also won’t always hit the mark with every text right away. Thus, test your sales pages. A simple edit may result in a significantly higher conversion rate.

The Crucial Differences in Ways of Communication

The two examples show you the most important differences. With regular communication, you’ll quickly know what a product does. You’ll also learn how the product works in no time. However, this leaves you alone with the most important question: Why do I need this, why should I buy it, why do I want this right now?

Do you know the feeling of wanting something right here, right now? This moment where you can’t think of anything other than that thing you think you really want?

Categories: Others Tags:

How to add a Pricing Plan Table in Adobe Muse

November 15th, 2016 No comments
Muse For You - Responsive Pricing Plan Table Widget - Adobe Muse CC

Add a Responsive Pricing Plan Table to your Adobe Muse Website. No Coding Skills Required.

Adobe Muse CC Logo paypal_2014_logo_detail

E-Commerce is a big part of web design and web development these days. That is why I decided to create a widget that allows you to easily add a pricing plan table to your Adobe Muse website. The pricing plan table is fully responsive and changes position when resizing the browser.
You can select between 1 and 4 plans for the pricing plan table. After the widget is added you can link the plans to a PayPal subscription or any other link you’d like. All of the colors and text within the plans are fully customizable. You can even choose from over 600 Font Awesome Icons for the plan icon! Wow! – say hello to easy E-Commerce in Adobe Muse.

In the video above I go over how to use the widget and how to link it to a PayPal subscription. I take you through all the steps required to creating a subscription in PayPal and then how to link it within the widget.

Muse For You - Responsive Pricing Plan Table Widget - Adobe Muse CC

The steps are as follows:

1. Install the widget.

2. Drag and drop the widget onto your Adobe Muse website from the library panel. If you do not see the library panel go to Window > Library. Choose from 1 plan up to 4 plans.

3. Style the plan within the widget options.

4. Add the text for each plan.

5. Link the plan to a PayPal product.

6. Done!

You can link each plan to one of the following PayPal products:

  • Shopping Cart
  • Buy Now
  • Donations
  • Gift Certificates
  • Subscriptions
  • Automatic Billing
  • Installment Plan

You can also link to any internal URL, external URL, or anchor point.

Muse For You - Responsive Pricing Plan Table Widget - Adobe Muse CC

Here is how to create a subscription in PayPal:

1. Go to PayPal.com.

2. Sign-in.

3. Go to ‘Tools’ in the upper toolbar.

4. Click on the option called ‘PayPal buttons’.

5. Click on ‘Create new button’ on the right.

6. Choose a button type and fill in the information on this page.

7. After the information is filled in click on ‘Create Button.’

8. On this page select the ‘Email’ tab.

9. Copy the link here and paste in the ‘PayPal URL’ option within the widget.

10. Done!

For more video tutorials and widgets for Adobe Muse visit http://museforyoushop.com.

Happy Musing :).

Read More at How to add a Pricing Plan Table in Adobe Muse

Categories: Designing, Others Tags:

Everybody Loves The New Plesk Onyx And We Know Why

November 15th, 2016 No comments
plesk-onyx

Web development and maintenance can be the most annoying thing sometimes. Even for tedious small tasks, there are so many things that can go wrong and so many variables that you haven’t thought of, it’s just a huge hassle. Which brings me to Plesk.

the new plesk onyx

Plesk is an ever-evolving platform that makes server management easy for anyone.

If you’re a web developer or a web designer, chances are, you probably heard of Plesk before. Afterall, Plesk is a leading control panel in the US that also captures roughly 75 to 80 percent of the European market. However, if you didn’t know about them, here is a little rundown of what Plesk does.

Plesk is a great developing tool for IT professionals.
The platform enables you to ease most of the daily tasks in website administration, even if you are managing a huge number of sites created with different apps and technologies. From building, securing, and running Plesk is your ally. You can build your website or application in a
ready-to-code environment with an intuitive interface. The platform secures your applications and websites automatically and automates all server related tasks and components to run and scale your web applications and websites.
Basically, Plesk is the only tool you’ll ever need to build, secure and run websites and applications in the Cloud. For about 10$ a month you get 30 domains, WordPress toolkit, a developer pack, subscription management and account management.
Okay, that all sounds great, but how is that different from every other competitor out there, you might ask.
Well, the company recently launched the new Plesk Onyx, and everybody loves it. The new platform is all about speed and automation. Plesk Onyx isn’t just another sysadmin tool, it became a fully functional WebOps solution for web professionals.

the new plesk onyx

For a more practical approach, here is a list of the most important features that you can find only on Plesk Onyx.

  1. Features and user experience parity on 14 Linux Distributions (including Ubuntu) and 4 Windows Server Versions.
  2. Certification to run on major virtualization & container platforms as well as the largest cloud players such as Amazon AWS or Microsoft Azure.
  3. Full support for Docker containers management, Git (including through GitHub and Bitbucket) focused on a complete continuous delivery workflow.
  4. Interface templates that will majorly simplify the lives of developers and administrators
  5. As a WordPress hosting customers you can handle your entire security management with a single click. Plesk will then manage plugin updates, bug fixes, and security patches for you.
  6. Specific tools for scalable WordPress hosting and mass-management through an advanced Toolkit (and soon for other applications)
  7. Broadest levels of supported server security tools – build in the core and additionally through 3rd parties (OS, Network, Application, Website)
  8. The largest ecosystem & 3rd party marketplace in the area of web professionals and cloud based hosting
  9. The most advanced backup features on server, reseller, customer and site level what no other such platform can provide.

Conclusion

Plesk Onyx is the only platform out there that works for web developer and designers both not just on sysadmins. The new Plesk Onyx represents a significant leap forward in functionality and user friendliness.
You can give it a try by signing up here.

Read More at Everybody Loves The New Plesk Onyx And We Know Why

Categories: Designing, Others Tags:

Web Design Freelancers Should Focus on Value for Money

November 15th, 2016 No comments
1

There’s much to like about being a freelancer.
You don’t have to learn sophisticated workflow management techniques, and you don’t have to waste your time in meetings that all too often tend to drift off course. What you are selling of course, are your skills.

A gift for design is wonderful to have; but to ensure you always give your clients value for money, you need to look at your freelancing activities from a business perspective:

  • Consider your work costs. If, for example, you are using Be’s pre-built WordPress websites, you are already saving precious time, and delivering high quality in the process.
  • Seeking client recommendations to potential clients should be one of your business objectives. Focus on building a group of recurrent and referred clients.
  • Constantly work on improving your skills, and upgrading your work standards.

1

If passion brought you this far, you might need some business smarts to go further.

Focusing on the “value for money” idea is essential. The resources you use need to be spent with care. Do that, and it will be that much easier to convince your clients that the work you put in was well worth their money.

When you utilize your resources wisely and efficiently, it’s easier to go the extra mile for a client. Make under promising and over-delivering a habit; deliver your work before the deadline; make transparent communications routine; give discounts to recurring clients. All these things prove that the value of your work exceeds the money paid.

Are Your Tools Really Valuable?

Let’s take a close-up look at your WordPress theme of choice, and see if it is helping you provide value for money for your clients. Ask yourself the following questions:

  • Am I spending excessive time on technical issues related installing/customizing the theme? Or, is the process a straightforward, pleasant task?

A WordPress pre-built website destined to a younger audience that can be customized in no time.

  • What specific features about this tool help me most in my work?
  • When I work with this tool, am I spending my time, energy, technical, and creative resources efficiently?

In recent months, BeTheme has become one of the most appreciated and popular themes on the market. Its features are extremely simple to use, it doesn’t require coding skills, and it offers tremendous value for your money. Be Theme places at your disposal 200+ WordPress pre-built websites to start your projects on.

3

This eBook pre-built website can easily be transformed into a crisp presentation website of any e-book category.

Be is a perfect example of a product that has value for money. For example:

  • Using Be can save you valuable time. Since WordPress pre-built websites already provide quality design, you simply need to pick one that best suits your client’s domain, and follow your vision from there.
  • You can skip the mock-up wireframe stage. This is a real time saver, plus your clients will love you for it, since they will find editable layouts much easier to work with.

4

A minimalist herbal shop is one of the newest pre-built website launches.

  • There is no shortage of WordPress pre-built website categories to choose from; they range from business, entertainment, and creative, to one page, lifestyle, food, sports, and beauty, and everything in between. Each one can be heavily customized with your client’s branding and content – in no time.

Could you describe your finished projects as having value for money?

To honestly answer this question, you must have good communications with your clients, and a good understanding of their needs. You can usually get a good measure of their degree of satisfaction if you ask yourself, or your clients the following:

  • Are they pleased with the way you solve their briefs? Are they sometimes pleasantly surprised when you find innovative solutions to their problems?
  • If they were to describe the way you work, would it be “OK”, or “the best I’ve seen”?

5

Delivering great projects for clients requires experience, skill, and good communication.

  • Are clients coming back, and are they recommending you to others? In e-commerce marketing, returning clients is an indicator that business is good, and they want it to be even better. A growing number of returning clients or new projects that come from client recommendations, usually means that your work is not only OK, but far above it. You are perceived as a freelancer who provides “value of money” – that’s big.
  • The number of times you are ready and willing to modify layouts is another test of the way you work. If your clients believe that all their specifications have been considered, they will be more open to modifications or suggestions for change you send their way.

Take time to make this short self-analysis. If you can identify some points where everything is no all it should be, you’ll know where you can start improving.

6

Sometimes freelancers need to work harder; usually they just need to work smarter.

Set a specific purpose. Improving the way you communicate with clients might be a good choice. Research areas in which you can improve, learn new rules, or simply pay closer attention to what your clients want. Some new work procedures may be in order, or a short guide your clients can use to better partner with you.

Are you actively working on creating value for yourself?

This is a complicated one, since you’re the one with the answers. Look at it this way. If you strive to produce more value for money for yourself, you’ll provide more for your clients down the road.

Startups invest some of their money in employee paychecks, office rent, the internet bill, and so on. At the end of the month, these investments are expected to provide more than their value, much more.

As a freelancer, your principle investments are time and effort. You can see where that time and effort has been well spent, or where there are certain skills or techniques you need to upgrade. When you’ve had a great month, it’s a good sign you’ve created some value. It’s not just the money.

7

The most beautiful experiences are defined by the way you enjoy them.

Paying attention to how you improve on a personal level, and what you have gained is important. This is true of any other domain in your life you seek to improve, whether it involves a weekend of travel or working on a personal project or hobby.

There are plenty of examples of resources in your life that offer more that their effort’s worth on a financial level. As you explore in greater detail, and in different settings, what value for money means to you, and learn from it, you’ll become a more confident, relaxed freelance professional.

Take-away ideas

You can use the value for money concept as a criterion, to determine how others are impacted by your work.

  • The products you use day to day to produce your website designs, must be more than good. Be Theme’s 220+ pre-built websites, with their easy to use features, clearly provide you with value for money you can carry over to your clients.
  • How you use these pre-built websites will tell a tale.

8

Be Theme – the WP Theme of Choice for over 49,000 designers around the world.

  • Your objective must be to become a human resource that provides real value to your clients.
  • The way you work should reflected in your income, in your lifestyle, and in your dealings with others.

Read More at Web Design Freelancers Should Focus on Value for Money

Categories: Designing, Others Tags:

Creating a design system language

November 15th, 2016 No comments

It seems like the current buzz word in the design industry and everyone wants one. But how exactly can a product benefit from having a living, breathing design language? I’m going to try break down the very basics so you can understand why it’s needed.

Creating an underlying language will unite our design philosophies and methodologies across our platform.

So why do we need a design language?

There are two ways of looking at it, from an internal and an external perspective.

Internal

It creates a holistic perspective to ensure we’re all adhering to the same methodologies and patterns as a team. Every team member should be inline with the concept that we’re promoting and should be able to reference the design principles against any project they are currently working on. The main goal of a design language is to create focus and clarity for designers. A design language is like any language. If there is any confusion it will cause a breakdown in communication.

External

Having a cohesive Design Language creates harmony within a platform. For onlookers, standardised colours, interactions and patterns creates a sense of familiarity and security. A well planned and well executed design language is the key to a gratifying experience. For instance, if you walk into a Starbucks in Iceland, you will recognize a lot of similar touches to your local Starbucks down the road. Familiarity brings a sense of comfort and security to the user.

Introducing design constraints on individual elements within a platform creates consistency at a higher level.

A successful design language will:

  • Focus: allow the designer to focus clearly on the project at hand rather then to be diverted by other distractions.
  • Clarity: allow the designer to think clearly about our design beliefs as well as the design constraints in place across the platform.
  • Confidence: allow the designer to have complete confidence in what they are designing and that it is in line with others in the team.
  • Consistency: create consistency across the product which in turn will create a secure, familiar experience across the platform.
  • Efficiency: create understanding across the teams, meaning less time consumed concentrating on the less important details.

Basically, if your designers are focused and understand the design language, it will give them confidence, which in turn will help the business at a higher level as it will create consistency and efficiency.

Building the foundations

Design principles

Having solid design principles in place, that the whole team has contributed to, ensures that we’re all adhering to the same methodologies and patterns as a team. Every team member should be in line with the concept that we’re promoting and should be able to reference the design principles against any project they are currently working on.

Tone of voice

Its important to create a consistent voice for our product. Each designer (or whoever is involved) should be aware of the approach needed when writing content. Having consistent content is a very large part of creating a consistent user experience and all designers should try to align all content accordingly.

How do we work together as a team? It’s important that everyone pulls in the same direction and everyone agrees that the chosen values are important to creating a happy working environment.

There are obviously a whole lot more elements you can establish to create a core foundation for your design identity. The above is just the tip of the iceberg. Every company is different so feel free to expand on it as much as you feel is right to explain the methodologies of your approach.

Visual identity

Creating the visual identity isn’t something that will be created overnight. It takes time. Sometimes it’s as clear as day as to what is needed, other times it takes time for the building blocks to fall into place. Once in place, it’s important that the fundamentals are captured and documented at a high level. The likes of use of colour, typography and style of iconography is key to creating consistency across a platform.

  • Colours: What is the colour palette used on the platform? Explain how, where and why we use certain colours.
  • Typography: What typeface is used on the platform? Summarises rules around weighting, sizing, vertical alignment etc?
  • Iconography: What is the generic style for icons? It will explain the rational as to why we have specific styles for different icon families.
  • Grid/Layouts: What grid system is used across the platform? Explain the use of the grid and the high level idealism of our layouts.
  • Interactions: What do people expect to see when they interact with our site? Give an overview of our standard interactions.
  • Animations: How do we approach animations? Explain the reason for animations on the platform and our constraints around using them.
  • Design Resources: A central point for assets to be easily downloaded for external partners. Colour swatches, logo’s, icon sets etc.

The next steps

You probably are fully aware of how important a design language is within your platform but saying to yourself ‘where do I start?. This article is pretty high level. Creating a design language goes far, far deeper then what I have identified above. The creation of the style guide and in turn the development of a component library is the evolution of a design system.

So here is a process that I’ve put together that should help you focus on exactly what is needed to get the ball rolling:

Do a UI inventory audit

Before you start anything, its best to identify how inconsistent the current build is. This works in two ways. It helps identify the reason as to why you’re doing it, to identify how inconsistent everything is but it should help you get the backing of the business as to why exactly you’re creating the design system; to create consistency across the platform. Brad Frost has put together a great article around how you go about doing a UI audit.

An example of a UI Audit

Prioritize your UI elements

I’m sure every design team has different priorities with regards to what they feel is crucial to creating consistency but there are generally some elements that are critical to creating the basics. The likes of colors, typography and iconography is a great place to start. Work closely with the design and development team to create a list of priorities based on your UI audit, this should guide your road map for the foreseeable future.

I’ve found using a Trello board, as a way to keep a priority list up to date, is a great way of working. It allows you to a) create your list and set items in a line of priority i.e. what are you going to tackle first and b) allows you to track exactly how far along you are with each component.

An example of a Trello board documenting the transition of a component in the cycle

Start discussions with the design team

So now that you’ve identified exactly what you’re going to be tackling first in the priority list, it’s time to sit down with the design team to get all ideas and opinions out around the first components needed. There are various approaches as to who owns the design system project, but for this example I’m going to take the instance that there is one sole designer who is in charge of the project.

This means it’s up to you to discuss every aspect of the component with the designers who will, in time, be using the design language. This is extremely important to ensure that the designers all feel as if they have had an input into what is being created.

Document all instances

Its time to start making some decisions. Document what you are creating, ensuring that you’re catering for all instances needed. It’s vital that what you are creating is not subjective. You have to have rationale as to why you are making these decisions as it will allow you to explain your decisions to the design team down the line.

An example of color usage.

See if it works

The next step is to try out your decisions. It’s very easy to make decisions on paper but when you are putting them into practice it might turn out that some decisions just don’t work. Try out some examples of the new style using current designs.

Lock it down

Once you are happy with the outcome, and you have buy-in from all parties, it’s time to lock it down and educate the rest of the team as to how and why these elements are to be used. It’s important to remember that although you are locking down the styling, if you feel certain elements aren’t working, you can change them if needs be.

Move on to the next element

Once you have educated the team and are comfortable in the knowledge that the designers are respecting your decisions, it’s time to move on to the next set of elements. It’s up to you as to how many elements you take at a time, but you should never bite off too much. It will just distract you from really focusing on the smaller details. My starting preference would be?: colors, typography, icons, input fields, tables, lists.

Once everyone is educated as to what the new style is, it’s important that all designers and developers are implementing the styles properly.

Weekly check-ins are vital to monitor the style choices to ensure that everyone is working off the same design decisions. Using products such as Craft by Invision really help bring consistency when moving forward.

How to gauge success

The design language is not a success until the company starts using it and finding value in it.

Examples of design languages

Also, here is a case study that I created for a recent design overhaul that I was involved in: https://www.behance.net/gallery/34224289/Ryanair-Design-Centre

The biggest existential threat to any system is neglect

Alex Schleifer, VP of Design at Airbnb

[– This article was originally published on Medium. –]

The Immense Typography Collection of 120+ Fonts & Logos – only $17!

Source

Categories: Designing, Others Tags:

Lazy Loading Responsive Adsense Ads

November 15th, 2016 No comments

You’ve been hard at work optimizing your site. You’ve already done things like lazy-loading Google Maps and been wondering if there was anything else you could do. For example, is there anything we can do to improve the loading of ads? Good news, there is some things you can do. You can respect user’s mobile data plan by loading ads only when they are likely to appear in the viewport zone. You can also serve ads in the right size in accordance to the screen of the device. That would be nice of you. That would not only be responsive but also responsible.

The Problem

The nature of Google Adsense is that the ads, along with the script, file are loaded automatically: this may unreasonably slow down the appearance of the other important things, like styles, fonts, or other scripts.

Google Adsense: no lazy load

Moreover, the correct ad size is determined only once right before the ad load. It means that if the user resizes the browser or rotates the tablet, the ad size remains the same and most likely doesn’t fit the context anymore.


Google Adsense: not responsive

The Arguments

  • There are many factors that Google Adsense considers for monetization, but “Click Through Rate” plays the major role in revenue. Therefore, focusing on clicks rather than just views in a long term may result in increased revenue. You can get more clicks by making your site look and feel trustworthy to a user. You can get that trust by prioritizing which parts of your website to load first. Serving ads first instead of the actual content that the user came for is a way to the decreasing ad clicks and impressions.
  • Logically, Google Adsense shouldn’t track an ad view when the ad never gets into the zone of the viewport. I don’t know if Google Adsense has this kind of tracking yet, but since the technology is JavaScript-based, they have all the means to do it.
  • It is typical for smartphone and tablet users to constantly switch between portrait and landscape modes until they find the most comfortable one. Providing the most appropriate ad size for each mode improves the possibility of getting more clicks.
  • When loading ads via Ajax, you just only need to serve the correct markup. The plugin takes care of the rest. See the next section!

The Solution

I’ve made a JavaScript plugin to help. It helps to lazy loads the ads:


Google Adsense: with lazy load

No matter where the ad is, above or below the viewport, it won’t get loaded if the ad is out of view.

It also helps to resize the ads:


Google Adsense: responsive

The banner gets reloaded at a particular breakpoints.

JavaScript

The plugin itself is a tiny piece of JavaScript code, and I made two versions of it: vanilla and jQuery. I called it adsenseLoader. You can grab the files here:

This is how you initialize it:

// vanilla
var instance = new adsenseLoader( '.adsense' ); // accepted argument types: Selector String, Element, NodeList, Array
 
// jQuery
$( '.adsense' ).adsenseLoader();

You can also customze it. The default options are:

var options =
{
    laziness: 1,
    /*
        @int (<=0)
        This sets the laziness of loading the ads: (viewport height) * laziness . For example:
        0 – ad load starts when at the least a tiny part of it gets in the viewport;
        1 – ad load starts when the distance between the ad and the viewport is no more than the height of the viewport;
        2 – 2x viewports, etc.
    */
 
    onLoad: false
    /*
        @bool
        A callback function which is fired when the ad is fully loaded.
        A single argument (object) of the ad element is passed. For example:
        onLoad: function( ad )
        {
            alert( ad.getAttribute( 'data-ad-slot' ) + ' ad is loaded' );
        }
    */
};
 
// vanilla
var instance = new adsenseLoader( '.adsense', options );
 
// jQuery
$( '.adsense' ).adsenseLoader( options );

Moreover, there’s a methodical function destroy, which does as it’s named: destroys the ad and brings back the corresponding DOM fragment to the default state. You can call the function for the whole instance as well as for single elements:

// vanilla
var instance = new adsenseLoader( '.adsense', options );
 
instace.destroy();
// or
document.querySelectorAll( '.adsense' )[ 0 ].adsenseLoader( 'destroy' );
 
 
// jQuery
$( '.adsense' ).adsenseLoader( options );
 
$( '.adsense' ).adsenseLoader( 'destroy' );
// or
$( '.adsense' ).get( 0 ).adsenseLoader( 'destroy' );

Lastly, you can change a few more options that have a global impact across all of the plugin instances. You can call the function anywhere, but it’s designed to be used before creating any instance of the plugin. The default options are:

var options =
{
    scriptUrl: '//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js',
    /*
        @string (url)
        URL for Google Adsense's executive script file
    */
 
    throttle: 250
    /*
        @int (miliseconds)
        This defines how often the plugin should make
        calculations during the processes such as resize
        of a browser's window or viewport scroll.
        250 means that this happens 4 times in a second.
    */
};
 
// vanilla
adsenseLoaderConfig( options );
 
// jQuery
$.adsenseLoaderConfig( options );

HTML

Here we have to simplify Adsense code snippet by leaving only two parameters and put it all into a container element:

<div class="adsense">
  <ins data-ad-client="ca-pub-4676533344420647" data-ad-slot="5741144487"></ins>
</div>

CSS

This part is responsible for controlling the size of ads. Using CSS, we will define the width and the height of the container element with the exact dimensions for the expected ad. With the help of media queries and a pseudo element, we’ll set the guides for the plugin which will later be able to determine when to resize/reload an ad.

.adsense {
    width: 970px;
    height: 90px;
    display: block;
}
.adsense:before { display: none !important; }
.adsense ins    { width: 100%; height: 100%; display: block; }
 
@media screen and ( max-width: 1024px ) {
    .adsense        { width: 728px; height: 90px; }
    .adsense:before { content: '1024'; }
}
 
@media screen and ( max-width: 800px ) {
    .adsense        { width: 468px; height: 60px; }
    .adsense:before { content: '800'; }
}

/* etc. */

Luckily, Adsense itself is able to pick the right banner size according to the given dimensions. The width and height properties for selector .adsense determine what ad we will be expecting.

Using media queries and the pseudo element :before, we tell the plugin when it is supposed to reload the ad. The JavaScript part checks for differences for content values. An ad is automatically reloaded when a difference is detected. You can use any different integers across the media queries. In my examples, I equated the values to the media queries’ width parameters for an easier maintenance.

Resizing the banners is a job split across two disciplines: CSS is the logic and JavaScript is the execution.

Demo

Remember that if you’re using an ad blocker that blocks AdSense, you may not see this work correctly.

See the Pen Lazy-Loading Responsive Adsense Ads by Osvaldas (@osvaldas) on CodePen.

You are welcome to follow and contribute to the project on GitHub.

Disposing Multiple Ads

Here’s a quick tip on how to manage multiple differently sized ads. Say we have two banners: one in the content area and another in the sidebar. We can assign different class names for each:

<div class="adsense adsense--main">...</div>

<div class="adsense adsense--side">...</div>

Now we can define common styles for .adsense and individual styles for .adsense--main and .adsense--sidebar, like this:

.adsense{
    display: block;
}
.adsense:before     { display: none !important; }
.adsense ins        { width: 100%; height: 100%; display: block; }
 
.adsense--main      { width: 728px; height: 90px; }
.adsense--side      { width: 336px; height: 280px; }
 
@media screen and ( max-width: 1024px ){
    .adsense--main          { width: 468px; height: 60px; }
    .adsense--main:before   { content: '1024'; }
}
 
@media screen and ( max-width: 800px ){
    .adsense--side          { width: 250px; height: 250px; }
    .adsense--side:before   { content: '800'; }
}

Ad Loading Indication or Taking Advantage of onLoad()

You can indicate the loading process in a few ways: provide a placeholder image, add text, border, background or anything else that best meets your design direction and is visible until the ad loads:


Google Adsense Loading Indication Preview

To start with, let’s add extra an HTML element and some styling, which basically adds an overlay with text “Loading…” above the ad:

<div class="adsense">
  <p class="adsense__loading">Loading…</p>
</div>
.adsense {
    position: relative;
}
    .adsense__loading {
        width: 100%;
        height: 100%;
        background-color: rgba( 255, 255, 255, .9 );
        display: table; /* for vertical centering */
        position: absolute;
        top: 0;
        left: 0;
    }
    .adsense--loaded .adsense__loading { display: none; }
 
        .adsense__loading span {
            text-align: center;
            vertical-align: middle; /* for vertical centering */
            display: table-cell; /* for vertical centering */
        }

Google Adsense Loading Indication Stack

Using the callback function onLoad() we can add the class adsense--loaded which is responsible for hiding the .adsense__loading element:

// vanilla
var instance = new adsenseLoader( '.adsense',
{
    onLoad: function( ad )
    {
        if( ad.classList )
            ad.classList.add( 'adsense--loaded' ); // IE 10+
        else
            ad.className += ' ' + 'adsense--loaded'; // IE 8-9
    }   
});
 
// jQuery
$( '.adsense' ).adsenseLoader(
{
    onLoad: function( $ad )
    {
        $ad.addClass( 'adsense--loaded' )
    }
});

Google Adsense Loading Indication Animated Stack

Thanks for reading and being a responsible web designer/developer.


Lazy Loading Responsive Adsense Ads is a post from CSS-Tricks

Categories: Designing, Others Tags: