Gutenberg 5.7 Adds New Block Appender for Group and Columns Blocks

Today’s release of Gutenberg brings a major improvement to the usability of the Group block. In previous versions of the editor, it wasn’t easy to see if a block had been inserted as a child block, especially since the default behavior was to insert an empty paragraph block. Gutenberg 5.7 brings more clarity to the UI for Group blocks by displaying the new block appender as the default state when no inner blocks are detected. (The “appender” is the fancy name for the button with the plus sign inside it that opens the UI for inserting a new block.)

The Columns block has also been updated to add the new block appender, and this release adds support for setting column widths. The inflexibility of the Columns block has been a frustration for users since it was introduced, but this release makes progress on one of the most common requests. Users can now set a percentage width for the columns in the block settings. The UI for this is a bit clunky, but a more interactive, draggable column resizer handle is coming in a future release. Future iterations may also include “quick-select” template options for users to select from when setting up their columns.

Other new features in this release include support for showing post content or an excerpt in the Latest Posts block and support for header and footer toggles in the Table block.

One handy little addition to Gutenberg 5.7 is the ability to update images using drag & drop. Users can now drag an image onto an image block that already contains an image. The image will be uploaded and will replace the previous one, saving users many clicks in the process of changing an image. Future updates may also add the same behavior to the audio, video, file, and Media & Text blocks.

Gutenberg 5.7 includes dozens of bug fixes and accessibility improvements, with several suggestions that originated from WPCampus’ accessibility audit. It also brings a significant boost in performance with a 14% faster loading time than the previous version.

The project’s documentation has a new home on WordPress DevHub and has been reorganized for better navigation.

A list of all the changes in the 5.7 release is available in the release post.

Site Health Tool Manager Provides A Convenient Way to Disable Unnecessary Site Health Check Tests

WordPress 5.2, released last week, added two new pages to the WordPress backend to help users diagnose common configuration issues. The Site Health Check page runs a series of tests and categorizes the results as critical, recommended, and good. This helps users prioritize which issues require immediate attention.

WordPress 5.2 adds filters for developers to add, edit, or remove tests but these filters may not be as accessible as a plugin. Site Health Tool Manager by William Earnhardt is a new plugin that provides an easy way to disable tests.

Site Health Tool Manager Settings

In some situations, consultants may want to disable certain tests to prevent the results from panicking a client. For example, if a consultant has configured a site to not receive automatic updates because the site is managed with version control, the site health check test is unnecessary.

Disabling unnecessary tests can also increase a Site’s Health Percentage score. However, in the plugin’s description, Earnhardt stresses that the plugin should, “only be used to disable tests with a legitimate and acceptable reason for failing. It should not be used to hide tests which can be fixed.

Site Health Manager also supports the tests that were recently added in Jetpack 7.3. Site Health Tool Manager is free and can be found on the WordPress plugin directory.

Pressing Topics – Episode 2

Pressing Topics is a daily podcast hosted by Malcolm Peralty and myself. We discuss the news that’s making headlines in the WordPress ecosystem as well as related topics that catch our eyes. Generally speaking, if you listen to this show on a daily basis, you should have a good idea on what’s going on in the WordPress community.

In this episode, Malcolm and I review the most common mistakes WordPress theme developers make based on a veteran theme reviewer’s experience, the 10 best countries to outsource software development too, and a new proposal to the Plugin Directory Guidelines.

Due to a software issue, the volume of my voice in the beginning of the show varies from loud to quiet to loud again. The audio normalizes after about 5-10 minutes. I’ve made some software changes and am hopeful the audio quality in episode three is much better.

Stories Discussed:

The Most Common WordPress Theme Development Mistakes (and How to Fix Them)

10 Best Countries to Outsource Software Development, Based on Data

4 Reasons You Should Choose WordPress for Your E-Commerce Site

Jetpack 7.3.1: Maintenance Release

Proposal to Modify Plugin Guidelines

The transcript is in Rich-Text format. You can download the show or listen to it via the embedded audio player below.

Listen to Episode 2 of Pressing Topics

#221: Responsive Pen Editor

Show Description

We've recently updated our Pen editor to be responsive and unified in the process. Cassidy, Klare, Stephen, and Marie are on to talk about the process of updating the Pen editor for 2019.

Time Jumps

  • 00:53 The history of the editor
  • 03:07 Pulling code out of the old editor
  • 08:38 Native app vs mobile app
  • 11:15 Sponsor: WooCommerce
  • 12:44 How to plan for a mobile editor
  • 20:21 Cassidy's Mechanical Keyboard Corner

Sponsor: WooCommerce

WooCommerce is a WordPress plugin that brings eCommerce to your WordPress sites. It's unique in its customizability and flexibility. You can use it to sell physical products, digital downloads, memberships, services, and tickets, plus offer customers lots of different ways to pay, including things like Apple Pay and Bitcoin powered by Stripe.

Show Links

CodePen Links

The post #221: Responsive Pen Editor appeared first on CodePen Blog.

Reakit Version 1.0 Released: A New Toolkit for Building Accessible Web Apps with React

Reakit is a new toolkit for building accessible web apps with React. Brazilian developer Diego Haz launched his MIT-licensed open source project this week with a stable version 1.0 now available to the public.

The toolkit offers offers composable, themeable, and accessible UI components that strictly follow WAI-ARIA 1.1 standards. Out of the box, Reakit manages focus and keyboard interactions for components that require them.

“WAI-ARIA is hard,” Haz said. “Mostly because the spec is dense, confusing and incomplete. My goal with Reakit is not only to provide accessible components out of the box, but also to serve as an example so people can build their own accessible stuff from scratch.”

Last year Haz removed all the unnecessary styles from the core package, in favor of having separate packages for themes. The core library is now unstyled by default and does not depend a CSS library. This makes it easier for developers to build UIs from scratch. Developers with specific presentational requirements can easily apply their own styles, instead of spending time having to overwrite a built-in set of styles.

Those who don’t want to start from scratch can install a theme package like reakit-theme-default. As the community around Reakit grows, more themes will may become available as packages.

Reakit’s GitHub repository has been starred more than 2,100 times and 34 people have contributed to the project. Developers who discovered Reakit in its earlier days of development are already building apps and libraries that use the toolkit.

One year ago, Haz left his job to work on Reakit full time as an open source project, because accessibility wasn’t a major priority at the company that employed him.

“I started building Reakit in my spare time with the purpose of easing my team’s work as we were building most of our components from scratch,” Haz said. “The company not only denied that idea (which may be reasonable), but also asked me to delete the project.

“So I realized that I was in the wrong company and quit. Since I had savings, I decided to focus on this project. But soon enough I’ll have to find another job. I’ll try to find companies where I can use Reakit so I can improve the library at the same time I’m building something with it.”

Not all companies prioritize accessibility in their React-based products. One reason is the expertise and passion for accessibility, paired with React skills, is hard to find.

As WPCampus’ Gutenberg accessibility audit demonstrated, making accessible web apps with React is challenging. Gutenberg is making major improvements towards becoming more accessible after the completion of the audit. This process has shown that leveraging accessibility expertise and baking it in from the beginning is crucial for writing accessible web apps.

React is often, and perhaps unfairly, singled out as having an accessibility problem. The library isn’t known for making it easy, but it does provide accessibility documentation and encourages developers to write semantic HTML.

While there is no magical “do-it-for-me” library that can ensure an app’s accessibility, the Reakit toolkit gives developers a head start. The project is open to contribution on GitHub and is also on Open Collective for those interested in funding its development.

How to use grids in graphic design

grids in graphic design

Do you want to know the best way to set up any graphic design? How about one of the most useful concepts of all graphic design? In short, do you want to understand how to use graphic grids?

In this article, I want to discuss the topic of graphic grids in detail, through rules, useful examples and design resources that you can download and save on your computer. I will tell you how much of the grids are necessary for the construction of any graphic design, the aesthetic-usability effect and how to build a grid in a harmonious way.

Come on, let’s start that there is so much to talk about!

What are the graphic grids?

A grid, or cage, is essentially a subdivision of the workspace through vertical and horizontal lines aimed at organizing the spaces and defining the elements that will make up a project. Let’s think more specifically, and try to understand why the division and organization of a workspace in graphic design are so fundamental.

The composition of the grids is the basis of graphic design

Whether you work with the press or with the web, on the design of a logo or on the construction of a font, on packaging design or layout, understanding how to compose grids is something you need to consider essential among your skills as a designer. A grid is like an invisible glue that holds the project together and gives it coherence. For many designers, though, grids are an almost unknown thing, especially among the many self-teachers who, of course, were not taught about the theoretical aspect of design and therefore about grid theories.

grids in graphic design

The fact that a good organization of the project is so often overlooked is one of the reasons why around the streets and on the web we often see projects with bad balances or alignments. This article was born just to try to fill this “hole” in the training of many creatives. Without a starting grid, a project is born already messy.

Always start with a grid

Whatever your project, once thought and sketched (because making sketches is very important), you have to start realizing the final project starting from a grid.

grids in graphic design

Why? Well, try considering each of your projects as if it were a building. A building without its supporting structure collapses or at least is very unstable when that structure is poorly designed. In addition to being fundamental to creating a supporting structure for your layout, the cages are also extremely important for creating harmony between shapes and relationships. For example, the balance between the white spaces and the text or imagery in the middle of a web page. In fact, a good composition can lead to much more usable projects, as stated in the Aesthetic-Usability Effect theory.

The aesthetic-usability effect

There is a theory about design called the Aesthetic-Usability Effect. Essentially this theory states that when something is designed to be beautiful, consequently and naturally, then it will be something that will also be easily usable. It is a very important concept in all design: from graphics to interface design. A well-designed grid makes your design not only more beautiful but also more usable!

grids in graphic design

So how do you design something beautiful and easily useable? Ok, you have to start from a grid, but what kind of grid? Based on which principles and which theories? We’ll discuss this a little further below.

How to build a functional grid

I told you how a harmonious composition plays a crucial role in determining the success of a project. To construct a harmonious design project it is therefore necessary to construct a graphic grid that is also harmonic. Yes, but how do you construct a harmonious graphic grid?

One of the most effective ways to do this is to use mathematics (nothing complicated) and specific mathematical relationships to construct the structure of the grid itself. Here’s how it’s done:

Follow the paper format

grids in graphic design

The first method is to exploit the dimensional relationships of the support on which you are working. For example, if you are working on an international sheet of paper, such as the A4, it will have a ratio between the two sides of 1: 1.414 and you can then use this mathematical relationship to create the divisions given within the sheet itself.

Creating divisions in a stable relationship with each other inside the sheet will create an important visual harmony.

How to create a grid on A4 paper

Once you have built a grid, you absolutely must not limit your creativity. A grid serves to channel creativity towards your goal. Alas, grid construction is not a science with a set of rules to learn by heart. Many of the most effective grids in graphic design were born from experiments with mathematical relationships, with texts, photographs, and elements of the page or website. Sometimes even from random experiments!

grids in graphic design

You, as a graphic designer, do not have to invent new grids or new methods to build graphic elements, you can simply rely on mathematical conventions, such as those I mentioned in this article. You can even take visual inspiration from highly published magazines and from other websites. The important thing is this: the grids are a great help if they become the most difficult and expensive part of your job, maybe you are doing something wrong. Grids should decrease and not increase the time spent on your project.

Resources

Before concluding, I think it may be useful to have some useful resources for building grids. Let’s start with books, or rather with a book in particular because knowledge is power, isn’t it?   

One of the most useful resources in graphic design is the book (in English and German) of one of the masters of Swiss design in the mid-1900s, Josef Muller-Brockmann entitled “Grid Systems in Graphic Design”. This really is a MUST for every graphic designer professional. A historical and precious piece for your library. The price is directly proportional to the quality, really.

Even if you get the smallest chance to read it, it’s very worth it. You could even try getting it at a library. Here are some easy online tools that will also help in your grid creating adventures:

Gridulator – create simple grids that can be quickly saved in .png

Grid Designer – very useful for web designers to design columns and export with .css files

Searching on Google for keywords such as “grid building tool” or “grid builder” can find an infinite number of free tools that do more or less the same simple things.

Conclusion

That’s it for today. I hope I have convinced you of the importance of building a good and balanced grid in all your graphics and design projects. I also hope that this has helped you find a few new resources for designing and creating the perfect grid.

This is just an introductory article on the grids in graphic design. In short, this is just the tip of the iceberg. There are many design theories and strategies out there that will help you perfect your grid related design technique, so always be on the lookout!

 

Read More at How to use grids in graphic design

A Deep Dive into Native Lazy-Loading for Images and Frames

Today's websites are packed with heavy media assets like images and videos. Images make up around 50% of an average website's traffic. Many of them, however, are never shown to a user because they're placed way below the fold.

What’s this thing about images being lazy, you ask? Lazy-loading is something that’s been covered quite a bit here on CSS-Tricks, including a thorough guide with documentation for different approaches using JavaScript. In short, we’re talking about a mechanism that defers the network traffic necessary to load content when it’s needed — or rather when trigger the load when the content enters the viewport.

The benefit? A smaller initial page that loads faster and saves network requests for items that may not be needed if the user never gets there.

If you read through other lazy-loading guides on this or other sites, you’ll see that we’ve had to resort to different tactics to make lazy-loading work. Well, that’s about to change when lazy-loading will be available natively in HTML as a new loading attribute… at least in Chrome which will hopefully lead to wider adoption. Chrome has already merged the code for native lazy-loading and is expected to ship it in Chrome 75, which is slated to release June 4, 2019.

Eager cat loaded lazily (but still immediately because it's above the fold)

The pre-native approach

Until now, developers like ourselves have had to use JavaScript (whether it’s a library or something written from scratch) in order to achieve lazy-loading. Most libraries work like this:

  • The initial, server-side HTML response includes an img element without the src attribute so the browser does not load any data. Instead, the image's URL is set as another attribute in the element's data set, e. g. data-src.
  • <img data-src="https://tiny.pictures/example1.jpg" alt="...">
  • Then, a lazy-loading library is loaded and executed.
  • <script src="LazyLoadingLibrary.js"></script>
    <script>LazyLoadingLibrary.run()</script>
  • That keeps track of the user's scrolling behavior and tells the browser to load the image when it is about to be scrolled into view. It does that by copying the data-src attribute's value to the previously empty src attribute.
  • <img src="https://tiny.pictures/example1.jpg" data-src="https://tiny.pictures/example1.jpg" alt="...">

This has worked for a pretty long time now and gets the job done. But it’s not ideal for good reasons.

The obvious problem with this approach is the length of the critical path for displaying the website. It consists of three steps, which have to be carried out in sequence (after each other):

  1. Load the initial HTML response
  2. Load the lazy-loading library
  3. Load the image file

If this technique is used for images above the fold the website will flicker during loading because it is first painted without the image (after step 1 or 2, depending on if the script uses defer or async) and then — after having been loaded — include the image. It will also be perceived as loading slowly.

In addition, the lazy-loading library itself puts an extra weight on the website's bandwidth and CPU requirements. And let’s not forget that a JavaScript approach won't work for people who have JavaScript disabled (although we shouldn't really care about them in 2019, should we?).

Oh, and what about sites that rely on RSS to distribute content, like CSS-Tricks? The initial image-less render means there are no images in the RSS version of content as well.

And so on.

Native lazy-loading to the rescue!

Lazy cat loaded lazily

As we noted at the start, Chromium and Google Chrome will ship a native lazy-loading mechanism in the form of a new loading attribute, starting in Chrome 75. We’ll go over the attribute and its values in just a bit, but let’s first get it working in our browsers so we can check it out together.

Enable native lazy-loading

Until Chrome 75 is officially released, we have Chrome Canary and can enable lazy-loading manually by switching two flags.

  1. Open chrome://flags in Chromium or Chrome Canary.
  2. Search for lazy.
  3. Enable both the "Enable lazy image loading" and the "Enable lazy frame loading" flag.
  4. Restart the browser with the button in the lower right corner of the screen.
Native lazy-loading flags in Google Chrome

You can check if the feature is properly enabled by opening your JavaScript console (F12). You should see the following warning:

[Intervention] Images loaded lazily and replaced with placeholders. Load events are deferred."

All set? Now we get to dig into the loading attribute.

The loading attribute

Both the img and the iframe elements will accept the loading attribute. It's important to note that its values will not be taken as a strict order by the browser but rather as a hint to help the browser make its own decision whether or not to load the image or frame lazily.

The attribute can have three values which are explained below. Next to the images, you'll find tables listing your individual resource loading timings for this page load. Range response refers to a kind of partial pre-flight request made to determine the image's dimensions (see How it works) for details). If this column is filled, the browser made a successful range request.

Please note the startTime column, which states the time image loading was deferred after the DOM had been parsed. You might have to perform a hard reload (CTRL + Shift + R) to re-trigger range requests.

The auto (or unset) value

<img src="auto-cat.jpg" loading="auto" alt="...">
<img src="auto-cat.jpg" alt="...">
<iframe src="https://css-tricks.com/" loading="auto"></iframe>
<iframe src="https://css-tricks.com/"></iframe>
Auto cat loaded automatically
Auto cat loaded automatically

Setting the loading attribute to auto (or simply leaving the value blank, as in loading="") lets the browser decide whether or not to lazy-load an image. It takes many things into consideration to make that decision, like the platform, whether Data Saver mode is enabled, network conditions, image size, image vs. iframe, the CSS display property, among others. (See How it works) for info about why all this is important.)

The eager value

<img src="auto-cat.jpg" loading="eager" alt="...">
<iframe src="https://css-tricks.com/" loading="eager"></iframe>
Eager cat loaded eagerly
Eager cat loaded eagerly

The eager value provides a hint to the browser that an image should be loaded immediately. If loading was already deferred (e. g. because it had been set to lazy and was then changed to eager by JavaScript), the browser should start loading the image immediately.

The lazy value

<img src="auto-cat.jpg" loading="lazy" alt="...">
<iframe src="https://css-tricks.com/" loading="lazy"></iframe>
Lazy cat loaded lazily
Lazy cat loaded lazily

The lazy value provides a hints to the browser that an image should be lazy-loaded. It's up to the browser to interpret what exactly this means, but the explainer document states that it should start loading when the user scrolls "near" the image such that it is probably loaded once it actually comes into view.

How the loading attribute works

In contrast to JavaScript lazy-loading libraries, native lazy-loading uses a kind of pre-flight request to get the first 2048 bytes of the image file. Using these, the browser tries to determine the image's dimensions in order to insert an invisible placeholder for the full image and prevent content from jumping during loading.

The image's load event is fired as soon as the full image is loaded, be it after the first request (for images smaller than 2 KB) or after the second one. Please note that the load event may never be fired for certain images because the second request is never made.

In the future, browsers might make twice as many image requests as there would be under the current proposal. First the range request, then the full request. Make sure your servers support the HTTP Range: 0-2047 header and respond with status code 206 (Partial Content) to prevent them from delivering the full image twice.

Due to the higher number of subsequent requests made by the same user, web server support for the HTTP/2 protocol will become more important.

Let’s talk about deferred content. Chrome's rendering engine Blink uses heuristics to determine which content should be deferred and for how long to defer it. You can find a comprehensive list of requirements in Scott Little's design documentation. This is a short breakdown of what will be deferred:

  • Images and frames on all platforms which have loading="lazy" set
  • Images on Chrome for Android with Data Saver enabled and that satisfy all of the following:
    • loading="auto" or unset
    • no width and height attributes smaller than 10px
    • not created programmatically in JavaScript
  • Frames which satisfy all of the following:
    • loading="auto" or unset
    • is from a third-party (different domain or protocol than the embedding page)
    • larger than 4 pixels in height and width (to prevent deferring tiny tracking frames)
    • not marked as display: none or visibility: hidden (again, to prevent deferring tracking frames)
    • not positioned off-screen using negative x or y coordinates

Responsive images with srcset

Native lazy-loading also works with responsive img elements using the srcset attribute. This attribute offers a list of image file candidates to the browser. Based on the user's screen size, display pixel ratio, network conditions, etc., the browser will choose the optimal image candidate for the occasion. Image optimization CDNs like tiny.pictures are able to provide all image candidates in real-time without any back end development necessary.

<img src="https://demo.tiny.pictures/native-lazy-loading/lazy-cat.jpg" srcset="https://demo.tiny.pictures/native-lazy-loading/lazy-cat.jpg?width=400 400w, https://demo.tiny.pictures/native-lazy-loading/lazy-cat.jpg?width=800 800w" loading="lazy" alt="...">

Browser support

At the time of this writing, no browser supports native-loading by default. However, Chrome will enable the feature, as we’ve covered, starting in Chrome 75. No other browser vendor has announced support so far. (Edge being a kind of exception because it will soon make the switch to Chromium.)

You can detect the feature with a few lines of JavaScript:

if ("loading" in HTMLImageElement.prototype) {
  // Support.
} else {
  // No support. You might want to dynamically import a lazy-loading library here (see below).
}

See the Pen
Native lazy-loading browser support
by Erk Struwe (@erkstruwe)
on CodePen.

Automatic fallback to JavaScript solution with low-quality image placeholder

One very cool feature of most JavaScript-based lazy-loading libraries is the low-quality image placeholder (LQIP). Basically, it leverages the idea that browsers load (or perhaps I should say used to load) the src of an img element immediately, even if it gets later replaced by another URL. This way, it’s possible to load a tiny file size, low-quality image file on page load and later replace it with a full-sized version.

We can now use this to mimic the native lazy-loading’s 2 KB range requests in browsers that do not support this feature in order to achieve the same result, namely a placeholder with the actual image dimensions and a tiny file size.

See the Pen
Native lazy-loading with JavaScript library fallback and low-quality image placeholder
by Erk Struwe (@erkstruwe)
on CodePen.

Conclusion

I'm really excited about this feature. And frankly, I'm still wondering why it hasn't got much more attention until now, given the fact that its release is imminent and the impact on global internet traffic will be remarkable, even if only small parts of the heuristics are changed.

Think about it: After a gradual roll-out for the different Chrome platforms and with auto being the default setting, the world's most popular browser will soon lazy-load below-the-fold images and frames by default. Not only will the traffic amount of many badly-written websites drop significantly, but web servers will be hammered with tiny requests for image dimension detection.

And then there's tracking: Assuming many unsuspecting tracking pixels and frames will be prevented from being loaded, the analytics and affiliate industry will have to act. We can only hope they don't panic and add loading="eager" to every single image, rendering this great feature useless for their users. They should rather change their code to be recognized as tracking pixels by the heuristics described above.

Web developers, analytics and operations managers should check their website's behavior with this feature and their servers' support for Range requests and HTTP/2 immediately.

Image optimization CDNs could help out in case there are any issues to be expected or if you’d like to take image delivery optimization to the max (including automatic WebP support, low-quality image placeholders, and much more). Read more about tiny.pictures!

References

The post A Deep Dive into Native Lazy-Loading for Images and Frames appeared first on CSS-Tricks.

How to Create an Expert Roundup Blog Post

In the past, I’ve shown you how to build links and traffic from link roundups. This strategy involves creating content that will get featured in a weekly or monthly roundup post on other websites.

Now I’m going to teach you how to create an expert roundup. What’s the difference between these two?

Rather than trying to get your link featured on another site’s roundup post, you’re going to create content on your own website using expert opinions.

At the end of the day, this will have similar advantages to getting featured on a link roundup. Creating expert roundups will still help you build backlinks, boost your website traffic, and add plenty of SEO value.

Why are expert roundup posts so great?

Here’s the thing. Not all of you have a well-known name or platform, especially if you’re just starting out as a blogger. That’s OK. We’ve all been there.

I’m not saying this to sound rude or harsh, but why should someone take your advice?

You might know what you’re talking about, but nobody knows that. If you’re an up and coming blogger, getting experts featured on your blog will give people a reason to visit your site and consume your content.

Here’s an analogy.

Let’s say you’re an avid golfer and you want to start giving people golf lessons. But if nobody knows who you are, they have no reason to listen to you, even if you’re offering excellent tips and advice.

Now let’s say you can get Tiger Woods to attend one of your golf camps. People will definitely listen to him since he’s a household name and arguably the best golfer on the planet. His presence at your golf lessons will get people to come and ultimately validate your legitimacy. You’ll get even more exposure if Tiger Woods promotes your golf lessons by telling people that he’ll be there.

You can apply this same analogy to your blog posts. Only instead of one expert, you’re going to get dozens to share their opinions.

So how do find these experts and get them to participate? I’ll explain everything you need to know in this guide.

Why expert roundup posts are so effective

Let me take a minute here to reverse the roles for a second.

Hypothetically speaking, pretend a blogger reached out to you to participate in their expert roundup. They value your opinion and want to share it on their website.

When their post gets published, you’d share it—right? Absolutely.

These posts get a ton of traffic since the experts who are part of the roundup will eventually share the content as well.

Here’s an example from the Small Business Ideas Blog.

Small Business Ideas Blog

Brian Liang wrote created this post about blog promotion, which is ironically related to the topic that we’re discussing right now.

He got 40 experts to share their marketing advice. All he did was ask them one simple question.

What can bloggers and marketers do to be more effective when promoting their content?

This is a question that so many people can relate to, and will be eager to hear the advice of experts in the industry. All different types of experts answered the question.

  • SEO experts
  • Affiliate marketers
  • Internet marketers
  • Business marketers

By getting people from different niches to participate, it increases the exposure even more.

So, how did this post perform? Check out this information from the backlink checker at Ahrefs.

Backlink Profile

It has 342 backlinks from 95 referring domains.

If you look back to the first screenshot of the blog itself, you can see that it has more than 4,000 social media shares as well.

Expert roundups generate a ton of traffic.

That’s because everyone who participates will, at the very least, throw the link up on their social media platforms. As an industry expert, they most likely have large social followings. You might even get backlinks and your link shared with their email subscribers.

Since a roundup that contains insight from a wide range of experts is such a valuable piece of content, it has a greater chance of being shared by other people as well, even if they weren’t one of the contributors. It might even end up on a link roundup.

Expert roundups validate your website and build brand awareness.

The fact that all of these experts were willing to participate and be part of something on your website shows a lot about who you are. Industry leaders won’t do this for just any average Joe.

Plus, the backlinks you’ll get from major websites will boost your domain authority.

Roundup posts help you build strong bonds and relationships with influencers. This is a great networking opportunity for you.

These experts are building links with your roundup. Whenever you introduce an expert, it’s common practice to say who they are with a link to their website. So they benefit from the exposure as well. They might even ask you to write a guest post for their website or something like that in the future.

Another top benefit of a roundup post is that it adds a new perspective to your content. You get to switch it up instead of publishing the same thing over and over again.

Find industry experts

Obviously, you can’t write an expert roundup without the help of experts.

Don’t expect these people to come to you and say, “Hey! On the off chance that you create an expert roundup, I’d love to be included in it.”

That’s unrealistic. Instead, you need to get out there and find them.

The easiest way to do this is by looking for other expert roundup posts. So use Google to your advantage.

I’ll give you an example. Let’s say you want to create a roundup about blogging mistakes. Just run a search for something along the lines of “blogging mistakes expert roundup.”

Here’s one of the top results.

TheSavvyCouple

19 blogging experts talk about their mistakes in this post.

There is a table of contents that includes a list of the bloggers and the amount of money that their blog generates each month.

Table of Contents

Use this list as a resource. It’s up to you to prioritize which experts you want to contact.

You could just make a list of all of them, or go for the big ones who make $50k, $100k, or $400k per month.

Creating a spreadsheet is the best way to stay organized. The list should include:

  • Name of expert
  • Their website
  • Contact information
  • Status

In the status column, you’d put notes like, “Sent email on 5/14 — waiting for reply,” or something like that.

Don’t stop building your list of experts with just one post. Here’s another top post from that same Google search.

Self Hosted Life

This similar blog shares the opinions of 17 experts.

So between these two posts alone, you’ve got 36 potential experts to reach out to. Continue adding to the list. Eventually, you’re going to narrow it down.

Don’t just take their “expert” label at face value.

You need to check out their websites, credentials, and metrics like domain authority. Look at how frequently they publish content. View their social media pages to see if they’re willing to share content from other websites.

Make sure they’re a good writer and have a strong following.

If you see someone on your list that’s an expert, but they don’t have lots of social media followers, don’t publish content frequently, and have a site with a low domain authority, you don’t need to prioritize them. You may ultimately decide not to reach out to them or include them in your roundup.

Send your pitch

Once you have your list of experts compiled, it’s just a matter of finding their contact information, which should be pretty straightforward.

Rather than just submitting a general inquiry on a website form, it’s always better to try and get their personal email address.

For example, we’ll look at Adam Connell from Blogging Wizard as an example, since he was the first expert in the post that we were just talked about. I went to his website and navigated to the contact page.

Blogging Wizard Contact Page

This page shows an email address.

Normally, I wouldn’t like that because it’s so general. However, since this is Adam’s website, I’m confident that he’ll receive the message.

The page also states that all email inquiries need to start with “Hey Adam” to ensure it’s not a spam message. As you can see from this page, you could also reach out to him via social media.

Your outreach messages should be very concise. For this example, you could say something like:

Hey Adam!

I’m doing an expert roundup post on my website [link to website] about blogging. Could you please answer this question for me?

“What was the biggest struggle or hurdle that you had to overcome as a blogger?”

Thanks in advance for the help. I really appreciate it! I’ll include your name, brief bio, and a link to your website in the roundup as well.

After you send the message, update your spreadsheet with notes so you can keep track of managing your communication with all of these people.

Don’t go overboard and ask them for more than they’ll be willing to deliver. As you can see from the example, all I did was ask one question. So the response can be as long or as short as he’d like it to be.

If you ask an expert to send you a 2,500-word case study, don’t expect a response.

Follow-up with emails if you haven’t heard back after a week.

Hey! I know you’re busy but I just wanted to follow up with you on this question again. Do you have a rough idea for when you’ll be able to answer? No rush. I just want to plan accordingly. Thank you!

A follow-up message like this increases the chances that they’ll participate.

Top elements of an expert roundup

Now that you’ve reached out to the top experts in your niche, it’s time to go through their responses and start writing your roundup post. If you want the post to be successful, it needs to have the following elements:

A great question

The responses given by the experts will only be as good as the question you ask them. If you ask them a yes or no question, don’t expect a high-quality response. On the flip side, if you ask for their life story, it’s going to be too long and unappealing to the readers.

Instead, look for questions that will actually add value and help people who are looking for insight. Review blog comments, forums, and Google related search suggestions to get inspiration for crafting the perfect question.

Epic headline

Don’t make your expert roundup to sound like an average “how-to” post or guide. Let everyone know that this post is different.

Here’s an example of a roundup written by Ian Blair at BuildFire.

Buildfire Headline

The title is great because it’s very clear. Readers know they’re getting advice from 32 different experts. They also know exactly what the post is going to be about.

For more assistance with this, check out my guide on writing attention-grabbing headlines that convert.

Skimmable headers

Expert roundups are long. So you need to make sure the post is formatted properly so it’s easy for readers to navigate.

Let’s say your blog has 25 experts answering a question. Realistically, people aren’t going to read all 25 responses. Your headers need to be clear so that anyone can scroll through and view the answers from specific experts.

Quality images

Images are another great way to break up the content and make your blog more reader-friendly. Consider using a picture of each expert with their name and bio.

We saw this with one of our example posts earlier.

Promotion

Your work isn’t done once the roundup has been published. Now it’s time to make sure that the post performs at a high level.

For starters, you’ll want to share it on all of your distribution channels (as with all of your blog posts). But you’ll also want to make sure the experts in your post do the same thing.

Don’t expect these participants to be refreshing your website every day waiting for the post to go live. Let them know that the post has been published and send them a link. The best way to do this is with a “thank you” message.

You might also want to consider asking top experts for an exclusive interview. This type of content can be used for your YouTube channel or podcast. Plus, it strengthens your relationship with them and increases the chances that they’ll consider you for guest posting opportunities.

Conclusion

Expert roundups and link roundups are not the same things.

However, both of these strategies can help you drive traffic to your website, build backlinks, improve brand awareness, and increase your authority.

In my experience, experts are willing to participate in these roundups because they get increased exposure as well. So it’s a win-win scenario for everyone involved.

You just need to make sure that you find the right experts, ask them the right question, and promote the blog properly to ensure that it performs at the highest possible level.

So keep this guide as a reference for creating epic expert roundup blog posts on your website.

A Better Approach for Using Purgecss with Tailwind

Greg Kohn looks at how to use Purgecss — a tool that helps remove unused styles — and Tailwind — a utility-based CSS framework — and why we might want to pair these tools together:

Tailwind, by intention, is aiming to equip you with an arsenal of utility classes by generating more than you need. There are some best practices which will help keep this overall build size down, like limiting your colors and breakpoints or turning off the modules by default before adding them as necessary. Still, you’ll inevitably generate classes that go unused. And honestly, approaching your configuration with an unrelenting miserly attitude will slow you down and make development less fun. By leaning on Purgecss, there’s no worry that the CSS your users download will only include classes that are ultimately needed.

I’ve never used Tailwind or Purgecss, but I reckon the latter could be particularly useful if you have a giant old codebase and you don’t have the resources to refactor things just yet. I guess my only concern with introducing a tool like that is it could encourage folks to not refactor large and problematic areas in their styles – taking the safest route with this tool instead.

For more info about Tailwind, though, Ben Tinsley wrote a great post a while back about how to get started and Nick Basile showed us how to style a form with Tailwind.

Direct Link to ArticlePermalink

The post A Better Approach for Using Purgecss with Tailwind appeared first on CSS-Tricks.

2 Ways to Add Interactive Hotspots to Postcards Email Templates

You're reading 2 Ways to Add Interactive Hotspots to Postcards Email Templates, originally posted on Designmodo. If you've enjoyed this post, be sure to follow on Twitter, Facebook!

2 Ways to Add Interactive Hotspots to Postcard Email Templates

Adding an interactive hotspot to your email’s image is a wonderful idea. It can significantly improve clickthrough conversions if your subscribers can click on the items you’re referring to in your copy. Additionally, these interactive hotspots can be an innovative …

How to Create an Email Newsletter the RIGHT WAY (Step by Step)

Do you want to create an email newsletter for your website, blog, or eCommerce business?

An email newsletter helps you stay in touch with your users, bring them back to your website, and convert them into customers.

The challenge is that many beginners find it difficult to start an email newsletter. Mainly because they feel that it would be too technical or time-consuming.

That used to be the case 10 years ago, but now creating an email newsletter is so easy that even a non-techy can do it!

Having built an email newsletter with over 1 million subscribers, we have decided to create an ultimate guide on how to start an email newsletter with step by step instructions.

Our goal is to help you walk through the process and set up your email newsletter the RIGHT way.

How to easily create a newsletter

Since this is a comprehensive guide, we have included a table of content for easier navigation.

What is an Email Newsletter?

An email newsletter is a form of online communication that allows you to send news, tips, and updates about your product, business, or non-profit.

In order to receive these updates, people need to join your email list by providing their email address. These users are referred to as subscribers, leads, or contacts.

Organizations and individuals use email newsletters in many different ways. For example, businesses use email newsletters to send users product information, new arrivals, and latest updates.

Websites and blogs use email newsletters to send content updates, increase traffic, and building a loyal following.

Why Start an Email Newsletter?

Did you know, that more than 75% of people visiting your website today will never find it again?

It is not your fault, it’s just that the internet is so huge and there is a lot of content out there.

Starting an email newsletter will allow you to convert those website visitors into subscribers. Once they join your email newsletter, you will be able to stay in touch and bring them back to your website.

Basically without an email newsletter, you are losing potential subscribers and customers every day.

Now you may be thinking, ‘ What if we ask users to follow us on social media? Wouldn’t that provide a way to contact those users?’

It will, and you should definitely build a social media following. However, you don’t own those social media platforms.

Social media giants like Facebook and Twitter limit your audience’s reach. More importantly, most of your users may not be checking their social feeds as often.

On the other hand, people tend to check their email inbox several times every day. Most users use a mobile device with notifications turned on for emails.

For more on this topic, see our article on why building an email newsletter is so important.

Who Should Start an Email Newsletter?

Many of our users often ask us if they should make a newsletter for their business, blog, or organization. Our answer is always ‘Yes’.

Even if you are just starting out, you should start building your newsletter from day 1. Each day you are not doing this, you are losing money, subscribers, and potential customers.

Email marketing is a win-win situation regardless of your industry, business, or website traffic.

1. Email Marketing for Small Businesses

Business websites, regardless of their industry or size, can always benefit from creating a newsletter.

It is the most cost-effective way to stay in touch with your existing customers, website visitors, and potential customers.

Sony PlayStation Newsletter signup

2. Email Newsletter for Ecommerce Websites

A study found that more than 44% of email recipients have made at least one purchase because of a promotional email.

If you run an online store, then email marketing is the most effective tool to convert abandoned carts into paying customers.

For a long time, eCommerce giants have been effectively using email to convert casual visitors into buyers.

Abandoned cart emails

3. Email Newsletter for Non-Profits

Non-profit organizations need to reach out to their supporters for donations, support, events, and more. Other mediums like social media, phone, and physical mailing all cost a lot more money than email marketing.

Human Rights Watch newsletter signup form

Creating an email newsletter allows non-profits to stay in touch with the general public, supporters, and donors.

Users are more likely to open emails from a non-profit that they support. In fact, 49% of millennials prefer to get updates from the organizations they support via email.

To learn more, see this article on why email marketing is essential for non-profits.

4. Email Newsletter for Blogs and News Websites

If you want to start a blog or make a content-driven news site, then email marketing is the best way to build your audience. You will see that all popular internet marketers, influencers, and famous bloggers actively build their email lists.

Chris Brogan newsletter

Here is why:

  • You get to send email updates to users who would otherwise never return to your website again.
  • You build a steady audience of loyal readers without relying on third-party platforms like search and social media.
  • You don’t control search engines or social media. Your search rankings can drop and your social media profiles can get suspended for no reason. On the other hand, you own your email list and have complete freedom to use it.

5. Email Newsletters for Education

Educational institutions need support from an engaged community of students, faculty, parents, and local businesses. Whether it is for fundraising, admissions, events, or other activities; Email is the cheapest and most direct way for schools and colleges to reach out.

University of California newsletter signup form

These are just a few examples of how email newsletters can benefit businesses, individuals, and non-profits. There are many more examples out there, which is why most marketers believe that email marketing is crucial for being successful online.

That being said, let’s take a look at how you can easily start an email newsletter to grow your own business and brand.

Step 1. Starting an Email Newsletter

The most important thing you’ll need to start your email newsletter is an email marketing service provider. These are companies that allow you to collect email addresses and send mass emails.

There are literally hundreds of email marketing services in the world including Constant Contact, SendinBlue, AWeber, Drip, ConvertKit, and many more.

After trying out almost every popular email marketing service, we recommend our users to use Constant Contact. They are one of the most popular email marketing service providers in the world, and their support is great in helping people get started.

Constant Contact offers a beginner friendly email marketing platform with simple drag and drop tools to help you quickly get started. They also have advanced email list growth tools, marketing automation, eye catching templates, and more.

First, you need to visit the Constant Contact website and click on the signup button. They have a 60 day free trial (no credit card required).

Signup for Constant Contact

Once you click the button, it will bring you to the signup page where you need to provide the information to create your account.

Fill in the signup form

After you complete the signup, you will be redirected to Constant Contact guided set up. Click on the ‘Skip this step’ below as we will show you how to set it up later in this article.

Skip set up wizard

You will now reach your Constant Contact dashboard. This is where you will manage your email lists, subscribers, and send your email newsletter.

Constant Contact dashboard

Note: Constant Contact free trial account only allows you to send up to 100 emails. You will need to purchase their paid plan to access all the powerful features. WPBeginner users can get a special 20% off when using our Constant Contact coupon code.

Step 2. Creating an Email List

An email list is basically a contact list of your subscribers. Think of it as a contact book containing email addresses of all the users who sign up to receive your email newsletter.

To keep your contacts organized, you need to create an email list.

Simply click on the ‘Contacts’ link from the top menu and then click on the Email List link in the sidebar.

Creating a new email list

This page will show all your email lists. By default, Constant Contact creates an email list for you labeled ‘General Interest’. You need to click on the ‘Enter a new list’ link to create a new email list.

Choose a name for your email list

You’ll be asked to enter a name for your list. You can enter anything here that helps you easily identify the list.

Next, click on the ‘Add list’ button, and Constant Contact will create the list for you.

Email list created

In order to start using this email list, you need at least one contact added to it. You can manually add a contact to your list by visiting the ‘Contacts’ page and clicking on the ‘Add Contacts’ button.

Add contact to your email list

This will show you a drop-down menu, asking how you would like to add contacts. You need to select ‘Type in one contact’ to continue.

On the next screen, you need to enter contact information. You can add one of your own email addresses here. This will allow you to test your email campaigns.

Adding a contact to your email list

After entering your contact information, click on the save button to add it. Your email list is now ready to be used.

Now that you have created an email list, it is time to set up some basic list settings.

Step 3. Setting up Your Email List Settings

The first thing you would want to set up is a welcome email. This is the email message sent to your users when they join your email newsletter.

Let’s get started.

First, you need to click on the ‘Campaigns’ link from the top menu and then click on the ‘Create’ button.

Create welcome email campaign

This will bring up a popup where you will be asked to select an email campaign type. Click on the ‘Email Automation’ to continue.

Email automation campaign

After that, you need to choose the email automation type. Click on the ‘Welcome email’ option to continue.

Select automated welcome email

Next, you will be asked to select a template for your email. The builder will automatically show you ‘Welcome email’ templates that you can use as a starting point.

Select welcome email template

Simply click on a template to select and open it in Constant Contact’s drag and drop email builder.

Creating welcome email

From here, you will design your welcome email newsletter template.

You can start by giving your campaign a proper title, this will help you identify the campaign when you need to edit or change it in the future.

Click on the ‘Untitled…’ link at the top left corner to edit it. Now enter a name for your campaign, for example, welcome email, new user signup, introduction, etc.

Campaign name

After that, you can start editing the email template. It is a drag-and-drop editor, so you can simply drag elements from the left column and drop them on the canvas. You can also point and click anywhere in the email to edit it.

Point and click to edit your welcome email

You can replace the logo with your own, add your own header image to match your branding, customize the email subject and message text to fit your needs.

Once you are satisfied with the design, click on ‘Save’ to store your email and then click the ‘Continue’ button.

The email builder will now ask you to select an email list. Go ahead and select the list you created in the earlier step. After that, fill out the physical address form.

Welcome email settings

Due to the anti-spam laws in many countries, you need to include physical address information in each newsletter email. This can be your business address or a P.O. box.

Lastly, click on the ‘Activate’ button at the top right corner of the screen to save and activate your welcome email.

Welcome email campaign set up

You have successfully set up a ‘Welcome email’ campaign. From now on, all new users joining your newsletter will receive this email upon sign up.

Some tips on writing an effective welcome email

Welcome emails have an average open rate of 50% which is higher than any other email newsletter you send.

It will be the first thing new subscribers will hear from you. This is your opportunity to impress them, so they look forward to your next email newsletter.

  • Say thanks and let your users know that you appreciate them sharing their contact information with you.
  • Next, you would want to introduce yourself, your business, and what you do. Keep it short and simple.
  • Let your users know how often you’ll email them and what kind of content and offers they should expect.
  • If you promised users an incentive to join your email list, then include that information in your welcome email.
  • The best way to introduce users to your brand is by sending them to the most useful content on your website. It helps them discover content and builds engagement.

For more tips, see this guide on how to write the perfect welcome email for new subscribers.

Step 4. Setting up Newsletter Signup Forms to Get More Subscribers

Now that you have signed up with an email marketing platform and set up your email list. It is time to start promoting it.

The easiest way to get more subscribers is by adding the newsletter sign up forms to your website. Usually, your email marketing service would have ready-made sign up forms that you can add to your website.

However, these signup forms don’t look good and sometimes don’t fit in the container where you want to place them.

Let’s take a look at how to easily add newsletter signup forms to your WordPress site. We will show you two methods, and you can choose one or both of them together.

1. Add Newsletter Signup Form Using WPForms Lite (Free)

WPForms is the best drag & drop WordPress from plugin in the market. They have a free version called WPForms lite which includes built-in support to connect with your Constant Contact account.

This allows you to use WPForms’ drag and drop form builder to create your newsletter sign up form.

The first thing you need to do is install and activate the WPForms Lite plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, you need to visit WPForms » Settings page and click on the ‘Integrations’ tab.

WPForms integrations

You will see Constant Contact integration listed there. You need to click to expand it and then click on the ‘Add Account’ button.

This will show you the information needed to connect your Constant Contact account to WPForms. Click on the link that says ‘Click here to register with Constant Contact’.

Connect Constant Contact to WPForms

This will bring up a popup which will take you to the Constant Contact website. Click on the ‘Allow’ button to give WPForms access to your Constant Contact account.

Allow access

Next, you will see an authorization code which you need to copy.

Authorization code

Switch back to the WPForms settings page and enter the authorization code you copied earlier. You also need to provide a name for this integration.

Add authorization code

Finally, click on the ‘Connect to Constant Contact’ button.

WPForms will now connect to your Constant Contact account. You will see a ‘Connected’ label appear next to the integration.

Constant Contact connected

Now you are ready to create your newsletter sign up form using WPForms.

Simply head over to WPForms » Add New page to launch the WPForms builder interface.

Creating a newsletter sign up form

Provide a title for your form and then click on the ‘Newsletter signup form’ template.

This will load up a read-made signup form with required fields already added to the form.

Editing newsletter signup form

You can point and click to edit form fields, change fields labels, and add more fields from the left column if needed.

Once you are satisfied with the form, you need to click on the Marketing tab to integrate it with Constant Contact.

Add new connection

Click on the Constant Contact tab and then click on the ‘Add Connection’ button. You will be asked to provide a title for this connection. You can enter anything here and then click OK button.

Name your connection

Next, you will see the settings for this connection. It will automatically detect your Constant Contact account and show it under the Select Account field.

Below that you need to select the email list. Click on it to select the email list you created earlier.

Select email list and map form fields

After that, you need to map your WPForms form fields to the Constant Contact fields. Once done, you can click on the ‘Save’ button at the top to save your sign up form.

WPForms also makes it super easy to add your newsletter signup form anywhere on your website.

If you want to add the form to your website’s sidebar, then visit Appearance » Widgets page and add WPForms widget to a sidebar.

WPForms widget

Provide a title for your widget and then select the signup form you created earlier. Don’t forget to click on the ‘Save’ button to store your settings.

You can now visit your website to see your newsletter signup form in action.

Newsletter sign up form displayed in the sidebar

You can also add sign up form to your blog posts or pages. Simply edit the post and add the WPForms block to the content area.

Adding WPForms block to blog post

After adding the block, select the newsletter signup form you created earlier and WordPress will load it inside your post. You can now save or publish your post and visit your website to see it in action.

Newsletter signup form in a WordPress post

2. Add Newsletter Signup Form Using OptinMonster (Pro)

For this method, we will be using OptinMonster, which is the best tool in the market to help you get more email subscribers, faster!

It includes dozens of high-converting signup forms like lightbox popups with exit-intent technology, 2-step optins, slide-in forms, floating bar, and more. This gives you powerful tools that you need to quickly grow your email list.

For more details, see our complete OptinMonster case study to learn how we used it to increase our email subscribers by 600%.

First, you will need to sign up for an OptinMonster account. It is a premium service and their plans start from $9 per month.

You can use our OptinMonster coupon code: WPB10 to get 10% off your purchase.

Once you have signed up for OptinMonster, you will reach your account dashboard.

Let’s create your first OptinMonster campaign. Click on the ‘Create Campaign’ button to get started.

Create campaign

Next, you will be asked to select an optin type. For the sake of this guide, we will be creating a lightbox popup signup form. Below that you need to choose a template for your campaign.

Choose optin type and template

After that, you will be asked to provide a title for your campaign and enter your website address.

Campaign settings

This will launch the OptinMonster builder interface. It is a powerful drag and drop campaign builder where you can design your optin forms.

OptinMonster builder

You can point and click to edit any item on the screen. You can also add new blocks to add different elements to your optin.

Once you are satisfied with the design, it is time to connect the OptinMonster campaign to your Constant Contact account.

Switch to the ‘Integrations’ tab from the top menu and then click on the ‘Add new integration’ button.

Adding a new integration in OptinMonster

Next, you need to select Constant Contact as your ‘Email service provider’ and then click on ‘Register with Constant Contact’ button.

This will bring up a popup where you need to click on the ‘Allow’ button.

Allow OptinMonster to access your Constant Contact account

Switch back to the OptinMonster and provide a name for this connection. After that, click on the ‘Connect to Constant Contact’ button.

Connect Constant Contact to OptinMonster

OptinMonster will now fetch your Constant Contact account details. You need to select the email list you created for your newsletter.

Select your email list

Now, we will take a look at the display rules for your campaign. Display rules allow you to choose when and where to display your campaign.

Display rules

By default, OptinMonster will show the popup to any user after 5 seconds. The popup will only appear on their first pageview and will not bother your users again during the same session.

Next, you need to switch to the Publish tab and change campaign status to Live. After that, don’t forget to click on the ‘Save’ button to store all your campaign settings.

Publish your OptinMonster campaign

Your OptinMonster campaign is now ready, let’s add it to your WordPress site.

First, you will need to install and activate the free OptinMonster plugin on your site. This plugin acts as a connector between your WordPress site and OptinMonster.

Upon activation, you need to click on the OptinMonster menu item in your WordPress admin sidebar. On the next screen, click on the ‘Connect Your Account’ button to continue.

Connect OptinMonster to WordPress

Next, you will be asked to enter your OptinMonster API key. You can find this information under your account on the OptinMonster website.

Connect to OptinMonster

After entering the API key, click on the ‘Connect to OptinMonster’ button. The plugin will now connect your website to OptinMonster.

Next, you need to switch to the ‘Campaigns’ tab. This is where all your OptinMonster campaigns will appear. If you don’t see any campaigns here, then click on the ‘Refresh campaigns’ button.

Turn on campaign on your website

Now you need to click on the ‘Go Live’ live below the campaign you just created. After that, you can visit your website in a new Incognito browser tab to view your newsletter signup popup in action.

Newsletter sign up form

OptinMonster is an incredibly powerful tool to quickly get more subscribers for your website.

Following are a few other campaign types that you can create with OptinMonster.

Step 5. Sending Your First Email Newsletter

Once you have added newsletter signup forms to your website, you will gradually start getting subscribers. After getting your initial welcome email, these new subscribers will be waiting to see what you send them next.

You are now ready to start sending newsletter emails.

Let’s create your first email campaign.

The great thing about using Constant Contact is that it comes with an incredibly easy to use email builder with tons of beautiful templates.

Creating your campaigns and sending newsletter emails is quite easy. Simply log in to your Constant Contact account and click on the Campaigns menu from the top.

Create new Constant Contact campaign

The campaigns page lists all your current, past, and automated email campaigns. Click on the create button to start a new email.

You will be asked to select a campaign type. Click to select the ‘Email’ campaign type and continue.

Select email campaign type

Next, you need to pick an email template for your newsletter. Constant Contact comes with several ready-made template for different industries, campaigns, and email types.

Choose an email template

All these email templates are fully customizable, and you can add your own logo and images to customize them. Once you edit and save a template, you will be able to use it for your future campaigns.

We recommend starting with a simple newsletter template and customizing it with your own brand logo.

Simply click on a template to select it for your email newsletter. Constant Contact will then load the email builder with your selected template.

Editing your email template

This is the same email builder that you used to create your welcome email. You can add your brand logo, point and click to add text, link, and images.

Adding your blog posts to the email newsletter

You can also fetch and add your blog posts to the newsletter. Click on the ‘More’ button in the left column and then drag and drop the ‘Read More’ block to your email.

Adding blog posts with read more link

Next, you need to click on the ‘Read more’ block to edit it. This will bring up a popup where you need to enter the link of the blog post you want to add.

Add blog post to your email

Click on the preview button to fetch a featured image and article description and then click on the Insert button. Repeat the process to add more blog posts if needed.

Once you are satisfied with your email’s design and contents, click on the ‘Continue’ button to move forward.

Continue to email settings

On the next screen, first, you need to select the email address you want to send this message. After that, review other email settings on the page.

Email settings and scheduling

Lastly, you need to select whether you want to send this email right away or schedule it to send later.

We recommend sending your emails on a fixed schedule. This helps your users anticipate the arrival of your email and sets expectations. For more on this topic, see this guide on choosing the best time to send newsletter emails.

Click on the Schedule button at the top right corner of the screen to save your email.

That’s all, you have successfully created your first newsletter email and scheduled to send it.

Need help with writing effective newsletter emails? See these tips on writing effective email newsletters.

Step 6. Tips to Get More Email Subscribers

In 2018, the number of global e-mail users amounted to 3.8 billion users.

In another study, 48% of participants said that they would like to receive email updates from their favorite brands.

This means that users prefer to get emails from their favorite businesses. Now the only question that remains is how do you get them to subscribe to your newsletter?

Luckily, email marketing has been around for a very long time. Experts are regularly experimenting, sharing, and finding new ways to grow their email lists.

Here we will share some of our own tips that are tested and proven to work.

1. Use multiple signup forms

Many beginners just add a single newsletter signup form to their website and forget about it. Add multiple signup forms to your website using a variety of placements.

Multiple signup forms

However, you need to be careful not to ruin user experience with aggressive prompts to signup.

For example, in the screenshot above, the second prompt only appears when a user scrolls down and the first signup form is no longer visible.

Social Media Examiner uses multiple sign up forms and creative strategies which has helped them get over 250,000 email subscribers (case study).

Keep experimenting with different forms and placements to find out what gets you the best results.

2. Use lead magnets to capture more subscribers

Lead Magnets are special offers used as an incentive to join your email newsletter. These special offers could be an exclusive download, an ebook, a helpful resource, discount coupon, etc.

Lead Magnets work extremely well because they offer users instant gratification and value for performing an action.

You can see a live example of lead magnets just below this article, where we offer users a free download of our ultimate WordPress toolkit as an incentive.

Lead magnet example

3. Offer Content Upgrades

Similar to lead magnets, content upgrades offer users an additional piece of content or bonus content, which they can download after signing up for your newsletter.

You can easily add content upgrades to your existing content. This can be a checklist, a PDF download of the article, a case study, a research report, and more.

Content upgrade example

For more details, see our guide on how to add content upgrades in WordPress.

4. Use social media to grow your email list

Promoting newsletter on social media

Your website is not the only place to promote your newsletter and find new subscribers. Social media platforms can be another place to convert followers into email subscribers.

For detailed tips, see our guide on how to use social media to grow your email list

Need even more tips? Check out the following email marketing guides:

Step 7. How to Make Money from Email Newsletter

One of the popular sayings among digital marketers is that “The money is in the list”. Every dollar you spend on email marketing has a return average of $32 dollars.

As your subscriber count grows, you would want to explore opportunities to monetize your email newsletter.

Following are just some of the easiest ways to make money from your email newsletter.

1. Sell your products

Sell your own products

First, you would obviously want to use your email list to sell your own products. You can use your email list to send special offers and discount deals exclusive to your subscribers.

You can also bring them back to your website by adding calls to action, offer members-only content, demo, and free samples.

When trying to sell your own products, keep the ‘Value Value Value Pitch’ formula in your mind.

It basically suggests that you should offer three times more value than your sales pitch. Most marketers agree that such emails work better than those that are nothing more than a plain sales pitch.

2. Upsell products and services

Upselling is a sales technique to persuade customers into buying something additional like an upgrade or add-on. As your email list grows, you can send personalized offers to existing customers.

Upselling through email

Due to its highly targeted messaging and personalized offers, upsell emails tend to perform way better. This may lead many businesses to send more such emails.

You need to remember that your emails should offer value first, otherwise those emails would soon become annoying.

3. Affiliate marketing

affiliate marketing

Affiliate marketing is a referral program where an online retailer (advertiser) pays you a commission when users purchase their product using your referral link.

You can find products and services that might interest your users and add affiliate links, reviews, and coupons in your newsletter emails.

To get started, see our beginner’s guide to affiliate marketing.

4. Advertisement or renting out your email list

If your email list grows quickly, then you can make money by renting your email list.

You see, a lot of folks don’t realize the potential of email marketing until they realize that they could benefit immensely from an email list.

Lucky for you, they are now looking for someone who may already have a list of people interested in specific products, services, or industry.

You can approach such advertisers directly, or you can find email list brokers like Info USA, List Giant, or Mailing List Direct.

Step 8. Keep Your Newsletter Emails Out of Spam

How to make avoid ending up in spam

In 2012, 90% of all emails were spam. This number was reduced to 58% by the end of 2018.

The main reason for this decline was the improved spam detection and prevention technologies used by email marketing tools.

This is great news for all users and businesses. However, the AI-powered spam detection technologies are quite sensitive and can wrongfully mark your email messages as spam.

Following are the most common reasons for newsletter emails to end up in spam:

1. You didn’t use double opt-in

Basically, all email marketing services including Constant Contact require users’ consent for sending them emails. This is done by the user verifying their email address after signing up.

However, they also allow you to manually add email addresses. If you misuse this feature and add email addresses from random sources, then your messages will end up in spam.

2. Sender email address was used for spam

If your sender email address was used to send spam or malware, then your email campaigns with the same sender address will end up in spam. This is why you need to get a business email address to ensure high deliverability for your newsletter emails.

3. Misleading subject lines

Misleading email subjects are annoying and due to many users reporting such emails, spam algorithms can now identify many such lines and mark them spam.

Following are a couple of examples of common misleading subject lines.

  • Urgent: Update your information
  • Thanks for your order!
  • You have won a prize

Need some good examples? See these 160+ excellent email subject lines for inspiration.

4. Your email must have accurate information

The anti-spam laws in many countries require the sender to provide accurate from address (sender email address), complete physical address, and an unsubscribe link in the email message.

If any of these are missing from your newsletter email, then it would most likely end up in spam.

Basically, you need to follow the rules and guidelines provided by your email marketing software and you’ll be able to avoid the spam folder.

We hope this article helped you learn how to easily create an email newsletter. You may also want to see our article on how to get a free business email address to send your newsletter emails.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Create an Email Newsletter the RIGHT WAY (Step by Step) appeared first on WPBeginner.

SVG Web Page Components For IoT And Makers (Part 2)

SVG Web Page Components For IoT And Makers (Part 2)

SVG Web Page Components For IoT And Makers (Part 2)

Richard Leddy

So, we already have ways of dynamically loading a menu of SVG icons made to react by loading panels if we so desire, but the icons were not actual components. We were able to use a simple trick of bringing in the SVG for each icon and passing it into the Vue application. It was simple enough to generate a list of icons, and each icon reacted in a similar way except for small data differences. The data difference made it possible to bind the name of a panel to each icon in such a way that the handler for the icon’s button click could pass it on.

When a panel is loaded in the form of Vue component, everything about the panel and its components has to be loaded, templates, JavaScript, and more. So, the job of just managing loading the panel is bigger than what we have encountered so far in this discussion.

Let’s look at Vue’s way of providing a hook for async loading. The following snippet is from the Vue guide.

Vue.component('async-example', function (resolve, reject) {
  setTimeout(function () {
    // Pass the component definition to the resolve callback
    resolve({
      template: '<div>I am async!</div>'
    })
  }, 1000)
})

The guide tells us that the setTimeout function is an example of how to use the synchronicity with Vue components. Notice that where before there had been an object as the second parameter to Vue.component, there is now a function, which is referred to as a factory function. Within the resolve callback is a component definition, that would have been the second parameter to Vue.component before.

So, I had to stare at this example a while before it made sense to me. Here is another example, which suits me better:

Vue.component('async-example', function (resolve, reject) {
  // Vue will call this function and promise itself to handle
  // it when it gets back with data.

  // this function can then call a promising object loader
  // here the 'loader' function is some abstract function.
  // Most likely the application will use 'fetch'
  // but it could be something else.
  loader('/my/resource/on/server.json').
    then(function (JSON_data) {
         var object = transformJSONToJSObject(JSON_data);
          resolve(object)
    }).catch( (error) => { handle it } );

It seems like the right thing to do to make a more general function to go around this form.

function componentLoader(c_name,resource_url) {
  Vue.component(c_name, function (resolve, reject) {
    loader(resource_url).
      then(function (JSON_data) {
           var object = transformJSONToJSObject(JSON_data);
            resolve(object)
      }).catch( (error) => { handle it } );
}

So, in general, to load a component, we would just need a line like the following:

componentLoader('ThermoPanel','./JSON/thermo-panel.json');

So now, just what is the JSON that is being loaded? It can include everything about the component. In this case, as a panel component, it can include thermometers, machine switches, sliders, gauges, and more. While it seemed nicer to keep the components parts on the web page, it may actually work better to use the subcomponent field that is in the longer example for ‘thermo-panel’ that we made before and also for the other similarly constructed panels. The JSON will contain a complete panel structure.

However, if the reader will notice the inclusion of the function call to transformJSONToJSObject, he will understand that JSON might be coded in some way to make transport easier and to make it easier for a server to handle the definition. After all, the definition will include complete SVG templates, function definitions, and other JavaScript expressions. Also, the JSON object may contain more than just the panel definition because some information may simply aid in bookkeeping or validation. So, one can expect that there will be some treatment of the object upon receipt.

As for the encoding, the data coming in from the server may be encoded in a number of ways. Perhaps it will be simply URL encoded. Or more securely, it might be enciphered. For this discussion, we can just use URL encoding.

Some of the tools that are available for creating Vue applications no doubt take care of the JSON transformation. But, this discussion has so far avoided the use of command line tools. This omission is not that bad as we have also used Vue with the minimum of resources, using only one script tag for the referring to the CDN. However, I certainly do recommend looking into the command line tools especially for organizing projects.

When the JSON arrives at the page, given the component is completely assembled with subcomponents, no more work has to be done to fetch the parts. We can make the assumption that all components will come in fully defined for the rest of this discussion. But, assembling complete component hierarchies will require command line tools at some point.

The SVG editing process will also require some work. The SVG editing processes allow a designer to draw a panel and all the components on it. But, each subcomponent has to be identified, called out in a group, or given a place holder. Any approach to using the drawing requires some treatment of the SVG so that Vue component tags can replace the groups or graphic elements. In this way, any artist rendering can become a template. And, the drawn subcomponents will have to be disassembled into templates for Vue subcomponents.

This sort of parsimony is contrary to the workflow of most of the JavaScript frameworks. The frameworks are about assembling pages. But, editing or drawing, results in something already assembled by an artist. In practice, the result of editing does not provide a text file that corresponds directly to a framework component definition.

More about the editing process may be considered in some other discussion. There is a lot to it. But, for now, we have the tools we need in order to load hierarchal components and make them come alive.

The Lazy Application

For our IoT panel construction, we already have a selection bar that responds to searches. And, we have a way of loading components when we need them. We just need to connect up these parts. And, at last, we have to make sure that the panels appear and that they start working when they do.

The lazy loading of panels done by the async code above provides a sketch of an idea. But, thankfully, some people have experimented to find ways of making sure that all kinds of components can be loaded. There is one codepen entry that shows how to update Vue apps with new components of varying types. That is the mechanism that is needed for updating a designated part of the page with different types of panel.

With the ability to add in different kinds of panels and with a simple mechanism to load their definitions, we can, at last, have our panel searching page.

Here is the HTML that we need in our page so that the Vue app can place components in dynamically:

<template v-for="(panel, index) in panelList">
  <component :is="panel" :key="panel.name"></component>
</template>

The component tag is a Vue meta tag. See the reference for dynamic components. The properties, special attributes, used for the component tag in this case are is and key. The is attribute exists for dynamic components. And, the key ensures that the new children will have different identities from each other and helps Vue to decide what to draw.

“Children of the same common parent must have unique keys. Duplicate keys will cause rendering errors.”

The template tag will loop through components that are provided in the panelList data field of the application.

So, starting with the application level Vue definition for the icon app, we can make changes to include the panelList in the data elements. (Let’s now call it the panelApp).

var panelApp = new Vue({
        el: '#PanelApp',
        data: {
        iconList: [  // Where is the data? Still on the server.
        ],
        panelList: [
        ],
        queryToken : "Thermo Batches"  // picked a name for demo
        },
        methods : {
          goGetPanel: function (pname) {
            //
              var url = panelURL(pname);  // this is custom to the site.
              fetch(url).then((response) => {  // this is now browser native
                response.text().then((text) => {
                      var newData = decodeURIComponent(text);
                       eval(pHat);  // widgdef = object def, must be assignment
                       pHat = widgdef;
                     var pnameHat = pname + pcount++;
                     pHat.name = pnameHat; // this is needed for the key
                     this.panelList.push(pHat);  // now it’s there.
                  }).catch( error => { /* handle it */ });
          }
        }
    });

Besides adding in the panel, goGetPanel is now in a form required for getting a component definition from a database or other store. The server side must be careful about delivering JavaScript code in the correct format. As for what the object looks like coming from the server, we have already seen it. It is the kind of object used as a parameter to Vue.component.

Here is the complete body of the Vue app that provides a menu as a search result and a place to put panels fetched from the server when the user clicks an icon.

<div id="PanelApp">  <!-- Recognize the name from the Vue doc -->
  <div>
  <h2 itemprop="name">Request MCU Groups</h2>
  <p itemprop="description">These are groups satistfying this query: {{queryToken}}.</p>
  <button onclick="GetIcons(11)">Find All</button>
  <button onclick="GetIcons(5)">Find 5 Point</button>
  <button onclick="GetIcons(6)">Find 6 Point</button>
  </div>

  <!-- Here is a Vue loop for generating a lit -->
  <div class="entryart" style="padding:4px">
  <button v-for="iconEntry in iconList" @click="goGetPanel(iconEntry.name)" >
    <div v-html="iconEntry.icon">
    </div>
  </button>
  </div>

  <div class="entryart" style="padding:4px" >
    <template v-for="(panel, index) in panelList">
      <component :is="panel" :key="panel.name" :ref="panel.name" ></component>
    </template>
  </div>

</div>

In the last div, the component tag now has a ref parameter bound to the panel name. The ref parameter allows Vue app to identify which component to update with data and keeps components separate. The ref parameters also allow our application access to the new dynamically loaded components.

In one test version of the panel app, I have the following interval handler:

setInterval(() => {
  var refall = panelApp.$refs;   // all named children that panels
  for ( var pname in refall ) {  // in an object
    var pdata = refall[pname][0];  // off Vue translation, but it’s there.
    pdata.temp1 = Math.round(Math.random()*100);  // make thermos jump around.
    pdata.temp2 = Math.round(Math.random()*100);
  }
},2000)

The code provides a little animation, changing thermometers randomly. Each panel has two thermometers, and the app allows the user to keep adding panels. (In the final version, some panels must be thrown away.) The refs are being accessed using panelApp.$refs, a field that Vue creates given the refs information in the component tag.

So, this is what the randomly jumping thermometers look like in one snapshot:

A collection of animated panels for one type of panel (or component) showing thermometers.
A collection of animated panels for one type of panel (or component). (Large preview)

Connecting The Panel To The IoT Device

So, the last piece of code is a setInterval test updating thermometers with random values every two seconds. But, what we want to do is read in real data from real machines. In order to do that, we will need some form of communication.

There are a variety of ways. But, let’s use MQTT which is a pub/sub message system. Our SPWA can subscribe to messages from devices at any time. When it gets those messages the SPWA can direct each message to the appropriate data handler for the panel mapped to the device identified in the message.

So, basically what we need to do is replace the setInterval with a response handler. And, that will be for one panel. We probably want to map panels to handlers as they are loaded. And, it is up to the web server to see that the correct mapping is delivered.

Once the web server and the SPWA have the page ready for operation, the web server no longer needs to take care of messaging between the page and the device. the MQTT protocol specifies a routing server to handle pub/sub. A number of MQTT servers have been made. Some of them are open source. One very popular one is Mosquito, and there are a few developed on top of Node.js.

The process for the page is simple. The SPWA subscribes to a topic. One good version of a topic is an identifier for an MCU such as a MAC address or a serial number. Or, the SPWA could subscribe to all temperature readings. But, then the page would have to do the work of filtering the messages from all devices. Publication in MQTT is essentially a broadcast or multicast.

Let’s take a look at how the SPWA will interface with MQTT.

Initializing MQTT On The SPWA

There are several client libraries to choose from. One, for instance, is a MQTT.js. Another is eclipse paho. There are more of course. Let’s use Eclipse Paho since it has a CDN stored version. We just need to add the following line to our page:

<script src="https://cdnjs.cloudflare.com/ajax/libs/paho-mqtt/1.0.1/mqttws31.min.js" type="text/javascript"></script>

The MQTT client has to connect to a server before it can send and receive messages. So, lines setting up the connection also need to be included in the JavaScript. We can add in a function MQTTinitialize which sets up the client and the responses for connection management and message receipt.

var messagesReady = false;
var mqttClient = null;

function MQTTinitialize() {
  mqttClient = new Paho.MQTT.Client(MQTTHostname, Number(MQTTPort), "clientId");
  mqttClient.onMessageArrived = onMessageArrived;
  // connect the client
  mqttClient.connect({
           onSuccess: () => {
             messagesReady = true;
           }
        });
  // set callback handlers
  mqttClient.onConnectionLost = (response) => {
    //
    messagesReady = false;
    //
    if (response.errorCode !== 0) {
      console.log("onConnectionLost:"+response.errorMessage);
    }
    setTimeout(() => {
            MQTTinitialize()
           },1000); // try again in a second
  };
}

Setting up Subscription

With the connection ready, the client can subscribe to message channels, send messages on them, etc. Just a few routines can do most of the work necessary to connect panels with the MQTT pathways.

For the panel SPWA, the moment of subscription can be used to establish the association between the panel and the topic, the MCU identifier.

function panelSubcription(topic,panel) {
    gTopicToPanel[topic] = panel;
    gPanelToTopic[panel] = topic;
    mqttClient.subscribe(topic);
}

Given that an MCU is publishing on its topic, the SPWA will receive a message. Here, the Paho message is unpacked. And, then the message is passed on into the application mechanics.

function onMessageArrived(pmessage) {
  //
  var topic = pmessage.destinationName;
  var message = pmessage.payloadString;
  //
  var panel = gTopicToPanel[topic];
  deliverToPanel(panel,message);
}

So, now all we need to do is create deliverToPanel which should be somewhat like the interval handler that we had before. However, the panel is clearly identified, and only the keyed data sent in the particular message may be updated.

function deliverToPanel(panel,message) {
  var refall = panelApp.$refs;   // all named children that panels
  var pdata = refall[panel][0];  // off Vue translation, but it’s there.
  var MCU_updates = JSON.parse(message);
  for ( var ky in MCU_updates ) {
    pdata[ky] = MCU_updates[ky]
  }
}

This deliverToPanel function is abstract enough to allow any panel definition with any number of data points for animation.

Sending Messages

To complete the application loop between the MCU and the SPWA, we define a function to send a message.

function sendPanelMessage(panel,message) {
    var topic = gPanelToTopic[panel];
    var pmessage = new Paho.MQTT.Message(message);
    pmessage.destinationName = topic;
    mqttClient.send(pmessage);
}

The sendPanelMessage function does no more than sending the message out on the same topic pathway that the SPWA subscribes to.

As we plan to make the icon buttons responsible for bringing in some number of panels for a single cluster of MCU’s, there will be more than one panel to take care of. But, we keep in mind that each panel corresponds to a single MCU, so we have a one-one mapping, for which we may use two JavaScript maps for the map and the inverse.

So, when do we send messages? Usually, the panel application will send a message when it wants to change the state of the MCU.

Keeping The View (Vue) State In Sync With Devices

One of the great things about Vue is that it is very easy to keep the data model synchronized with the activity of the user, who may edit fields, click on buttons, use sliders, etc. One can be sure that button and field changes will be reflected immediately in the components’ data fields.

But, we want changes to fire off messages to the MCU as soon as the changes occur. So, we seek to make use of the interface events that Vue may govern. We seek to respond to such an event, but only after the Vue data model is ready with the current value.

I created another kind of panel, this one with a fairly artistic looking button (perhaps inspired by Jackson Pollock). And, I went about turning it into something whose click reports the state back to the panel that contains it. That was not so simple a process.

One thing that threw me off is that I had forgotten some of the oddities in managing SVG. I first tried to change the style string so that the display field of the CSS style would either be “None” or “something”. But, the browser never rewrote the styles string. But, as that was cumbersome, I tried changing the CSS class. That also had no effect. But, there the visibility attribute, which most of us recall from old HTML (version 1.0 perhaps), but that is very up to date in SVG. And, that works well. All, I had to do was to get the button click event to propagate.

Vue has designed properties to propagate in one direction, parent to child. So, to change data in the application, or in the panel, you have to send a change event to the parent. Then, you can change the data. The change of the data element controlling the button causes Vue to update the property affecting the visibility of the SVG element we have chosen to indicate state. Here is an example:

More than one type of panel and more than one animation instance per type.
Finally, a collection of different types of panels each with instances assigned to separate MCU’s. (Large preview)

Each instance of the squiggly button panel is independent. So, some are ON and some are OFF.

This snippet of SVG contains the odd-looking yellow indicator:

<path
     :visibility="stateView"
     style="opacity:0.98000004;fill:#faea4a;fill-opacity:1;stroke:#eecd5c;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
       id="sunthing"
       d="m -36.544616,12.266886 c 19.953088,17.062165 5.07961,-19.8251069 5.317463,8.531597 0.237853,28.356704 13.440044,-8.847959 -3.230451,10.779678 -16.670496,19.627638 14.254699,-2.017715 -11.652451,3.586456 -25.90715,5.60417 10.847826,19.889979 -8.095928,-1.546575 -18.943754,-21.436555 -1.177383,14.210702 -4.176821,-12.416207 -2.999438,-26.6269084 -17.110198,8.030902 2.14399,-8.927709 19.254188,-16.9586105 -19.075538,-8.0837048 9.448721,-5.4384245 28.52426,2.6452804 -9.707612,-11.6309807 10.245477,5.4311845 z"
       transform="translate(78.340803,6.1372042)" />

The visibility is populated by stateView, a computed variable that maps the state boolean to a string for SVG.

Here is the panel component definition template:

<script type="text/x-template" id="mcu-control-panel-template">
  <div>
    <control-switch :state="bstate" v-on:changed="saveChanges" ></control-switch>
    <gauge :level="fluidLevel" ></gauge>
  </div>
</script>

And, this is the JavaScript definition of the Vue panel with its children as subcomponents:

var widgdef = {
  data: function () {
    var currentPanel = {  // at the top level, values controlling children
      bstate : true,
      fluidLevel : Math.round(Math.random()*100)
    }
    //
    return currentPanel
  },
  template: '#mcu-control-panel-template',
  methods: {
    saveChanges: function() {  // in real life, there is more specificity
      this.bstate = !this.bstate
      relayToMCU(this.name,"button",this.bstate) // to be defined
    }
  },
  components: {
    'control-switch' : {  // the odd looking button
      props: [’state'],
      template: '#control-switch-template',  // for demo it is in the page.
      computed: {
        // you saw this in the SVG above.
        stateView : function() {
          return ( this.state ) ?  "visible" : "hidden"
        }
      },
      methods : {
        // the button handler is in the SVG template at the top.
        stateChange : function () {  // can send
          this.$emit('changed');  // tell the parent. See on the template instance
        }
      }
    },
    'gauge' : { // some other nice bit of SVG
      props: ['level'],
      template: '#gauge-template'
    }
  }
}

So, now the mechanism for a single button embedded in a panel has been laid out. And, there has to be a hook for telling the MCU that something has taken place. It must be called immediately after the data state of the panel component has been updated. Let’s define it here:

function relayToMCU(panel,switchName,bstate) {
  var message = switchName + ':' + bstate  // a on element parameter string.
  sendPanelMessage(panel,message)
}

There is the state change on it’s way to hardware in just two lines of code.

But, this is a fairly simple case. Any switch can be viewed as a function call to a piece of hardware out in the world. So, the string might contain the switch name and several other data elements. So, the component method that registers change will have to have some custom handling in it in order that it might gather together all the pieces of data set on the panel and send them along in one command string. Even the command string is a little simple. If the MCU is quite small, the command string might have to be translated into a code. If the MCU has a great deal of capability, the command string might actually be a JSON structure or perhaps all the data that the panel hosts.

In this discussion, the buttons on the icon panel contain the name of the panel to fetch. That may also be fairly simplified as well. It seems to make sense that that parameter can stand for any panel that might be stored in an enterprises databases. But, perhaps it is some formula. Perhaps, information about the panel should be wrapped around the panel definition that we receive from the server. In any case, the basics can be easily expanded upon once certain headaches are out of the way, like making the SVG respond to clicks properly.

Conclusion

This discussion has laid out some basic steps and decisions that lead to the realization of a Single Page Web App (SPWA) that can interface with IoT devices. We now know how to get panels from a web server and turn them into MCU interface.

There is much more to this discussion with quite a few other discussions that may follow. Starting with Vue is one thing to think about. But, then there is the whole MCU story, which we have only briefly touched upon.

In particular, by selecting MQTT as a communication substrate, we assume that IoT devices on the other end can somehow be ruled by MQTT. But, that may not always be the case. Sometimes gateways are needed if MQTT is to gain access to a device with serial links or Bluetooth. Or, perhaps all one ever needs from on the web page is WebSockets. Nevertheless, we used MQTT as an example to show how Vue could both receive and send data while keeping its data state in sync with devices.

Once again we only have part of the story. This time it is for synchronization because the page should be able to deal with alerts and bother the user if something critical is happening. Sometimes messages can get lost. So, we have to have a mechanism for acknowledgments.

Finally, it is my opinion that Vue makes updating data upon receipt quite elegant. But, sending the state changes is not so straight forward. It does not seem to make the job much simpler than can be done with vanilla JavaScript. But, there is a way and it makes sense.

Perhaps a clean library can be built to make a universal set of components for all panels. The elements for making such libraries and having them stored in a database have been briefly mentioned. Tools that go beyond just making SVG pictures may have to be developed. In any case, there are likely many things that can be done for the next steps.

Smashing Editorial (dm, yk, il)

Online trade shows guides

That’s the reason why trade shows are still very efficient when it comes to selling products. Since exposures are market-specific, you can be sure that market participants are more likely to become loyal customers. Trade shows, indeed, are commonly considered one of traditional marketing most expensive branches. If your company is spending money, time, and commitment to display a stall at an event, making the best of it is essential. Here are some of the guides for online trade shows.

Setting budget and goals

Like any other business decision, jumping into the marketing of trade shows begins with an aim. Setting a clear goal actually helps to ensure that you are using the right trade show to be in. Make a list of your objectives to help you find the best. By identifying an aim, strategizing which in return will keep you from wasting time and money, also known as your marketing budget, will be much easier.

Business cards

Business cards are fully customized advertising forms, so keeping their design and role as close as possible to the brand is crucial. And with the competitive environment of today, we absolutely recommend coming up with ideas and making your business cards so remarkable that it will attract the recipient to investigate about your business.

Giveaways

Without gifts, a fashion retail trade show event is never complete. Even if its key chains, flash drives, or pens, you should always integrate your free stuff or loot bags with your brand. It probably works as well as for items related to your business. Giveaways actually help your business in getting more exposure. People are more likely to attend your giveaway session.

Company profile

If the first perception is the business card, so the first date is the business profile. Whether in the form of a pamphlet or a handbook, a business profile is intended to give a concise summary of what your fashion retail company is all about to your market or potential partner. This means it should be able to tell the story of your brand, what it continues to stand for and what it has to deliver.

Booth display

If you are planning long-term, prime location is something you can try to exploit at that time. Make your point clear and capable of being seen from both near and far in all directions. Use obvious signs and optimum illumination. To appeal to different people, have a range of different display options. Some people like flyers, brochures, and material for reading. Ensure that your trade show display is published and that it is very clear. Serve some value to the guests of the trade show. This can be something like a state-of-the-art white paper, top 10 brand lists, and latest trends.