Full-Screen Video Backgrounds in Web Design: Pros, Cons & Tips

There’s still a debate going on in the web design community on whether video backgrounds in websites are good or bad. However, we’ve seen a rise in websites utilizing fullscreen video backgrounds in the past few months than ever before. But is it really an effective strategy? Does it help engage with an audience? Does…

How the Muffin Live Builder Will Help You Build Better Sites, Faster

How the Muffin Live Builder Helps You Build Better Sites – SitePointSkip to main contentFree JavaScript Book!Write powerful, clean and maintainable JavaScript.RRP $11.95 This sponsored article was created by our content partner, BAW Media. Thank you for supporting the partners who make SitePoint possible.

Page builders have revolutionized the way we create websites today. But with so many options available for WordPress, it can take some time to find the best one for your web design projects and workflows.

With BeTheme’s new and improved page builder, your search may be over. 

The Muffin Live Builder tool gives web designers a more intuitive and faster way of building high-quality websites for clients. See for yourself:

[embedded content]
It has all the live editing features you’ll likely recognize from other page builders. However, this live builder has a number of standout features that will transform the way you work. 

Below, we’ll look at 5 of them.

Muffin Features That’ll Change the Way You Build Websites

At first glance, the Muffin Live Builder and its features may look like other WordPress page builders you’ve tried. But here’s how they differ:

1. It’s part of a fully-loaded website builder platform

One of the more frustrating parts about finding a WordPress page builder plugin you like is that you can’t get to the good features without upgrading. And if your client is already paying for a premium theme, they might be hesitant to splurge on an additional design and editing tool. There’s also the added complexity of having a theme and separate page builder to edit with.

With Betheme, however, there’s no need to buy and install a premium page builder or other plugins. It’s all included. 

A Betheme license includes: 

600+ pre-built professional-grade websites100+ mix-and-match pre-built section templates60+ customizable elementsMuffin BuilderLive BuilderPlugins like WooCommerce, Slider Revolution, Contact Form 7, and morePremium supportBetheme is the all-in-one solution for building high-quality WordPress websites. 

2. Pre-built sections you can use on any website

Betheme’s pre-built websites do a great job handling the majority of the design and content decisions you’ll have to make. 

Website structure. Page layouts. Image and text placement. After installation, it’s all there. 

However, every client has different needs. 

So, let’s say you’re building an online surf shop for one of your clients. Out of the box, Be Surfing is exactly what your client is looking for. However, the one thing it doesn’t have is a carousel on the homepage to promote recent blog posts.

When adding a new section in the Live Builder (in this case the carousel section for recent posts), you get a choice between creating it yourself or using a pre-built section: 

Pre-designed sections aren’t new to page builders. But with the Live Builder, you don’t have to spend time searching for a section that matches your pre-built site nor do you have to waste time stripping out existing designs or content.

There are over 100 pre-built sections you can choose from and they’re easy to find too, as they’re organized under categories like “List & Menus”, “Call to action”, and “Contact”. 

Because they more closely resemble wireframes than fully designed sections, you can easily repurpose these section templates for any type of website you build.

3. Well-organized toolbars make customizing sites a breeze

Even though most page builders come with a visual editor, the editing toolbars aren’t always that intuitive. Designers often have to comb through different tabs and menus to try and find the settings they need to configure. 

With Muffin’s live builder, you won’t need to do that. After you add a new element or select the existing one you want to edit, a custom toolbar appears on the left: 

All of the available settings for that element live right there in the toolbar. There’s no need to go digging around to figure out where the typography settings are or where you can make advanced CSS edits. It’s all in one place. 

It’s not just the editing toolbar that’s well-designed and organized. The admin toolbar is always available from the left side of the screen as well as the bottom of the editing toolbar:

The most commonly used admin actions live there: Save, Undo, Revisions, Responsive Mode, Return to WordPress, and so on.

The Live Builder is so easy to get around that you won’t waste any time searching for what you need or digging through layer after layer to take the desired action.

4. Autosave and backup tools are useful for version control

The Live Builder comes with a variety of “Save” tools beyond the standard Publish and Update. 

If you go to Revisions in the admin toolbar, you’ll find four different save features: 

Autosave makes a copy of the page every five minutesUpdates is where copies of the page get stored after you hit the “Update” buttonRevision allows you to save special versions of the pageBackup stores copies of the page just before you restore an older oneThis feature makes it so easy to capture copies of a page in progress. And, if you prefer, you can let the Live Builder manage those backups automatically for you.

That said, the Live Builder also gives you the power to create a clear history of all the major updates you make to a page (under “Revision”). This way, if you or your client ever change your minds about a recent update, a one-click restore will automatically take you back to the preferred version.

5. Lightweight editor for fast editing

It’s always frustrating when you open up WordPress, go to the page you’re working on, and then have to wait a minute or two for the page builder to load. 

It might not seem like a big deal, but multiply that by the number of pages you’re designing or editing, as well as the number of revisions you do to each, and that wait time adds up. 

The Muffin Live Builder is super lightweight, so you can avoid this frustration altogether.

The GIF you see here captures how quickly the Muffin page builder loads in real-time. For your reference, the clip is just 12 seconds long: 

According to Betheme developers, the Live Builder is now 60% faster than it was before. And when compared to other popular WordPress page builder plugins, there are no issues with the page builder getting “stuck” when you try to open it. 

It’s not just the speed of your page builder that should be concerned with either. 

Core Web Vitals is a useful tool for checking your website’s loading speeds (among other ranking factors). We compared how the Be Mechanic website was built with Elementor compared to the same website built with the Muffin Builder. 

Here’s what we found on the Elementor-built site: 

The largest contentful paint took 6.116 seconds to load. 

Compare that with the Muffin Builder-built site, which only took 1.232: 

Google knows that all it takes is three seconds before visitors start leaving a site in droves. So, having a lightweight page builder that speeds up your work and creates a speedier experience for your visitors is absolutely crucial.

Will You Be Building with the New Muffin Live Builder?

Between the intuitive design, convenient features, and fast loading, the Muffin visual page builder is a web designer’s best friend. Heck, it’s something your clients will love to use once they’re inside WordPress, too. And don’t forget about everything you get with it. The Muffin Live Builder is part of a powerful WordPress toolkit. With 600+ pre-built sites, 100+ pre-built sections, 60+ elements, and bundled premium plugins, you won’t need to look much further than Betheme to build the websites of your clients’ dreams.
Related Articles10 Top WordPress Ecommerce Themes for 2021WebBy

Virtual Environments in Python Made Easy

Python Virtualenv: Virtual Environments in Python Made Easy – SitePointSkip to main contentFree JavaScript Book!Write powerful, clean and maintainable JavaScript.RRP $11.95 Most Python newcomers don’t know how to set up a development environment that follows the latest standards used by professional programmers. This tutorial will teach you how to properly create a fully working Python development environment using industry-accepted best practices.
Virtual Environments
A virtual environment helps us to solve project dependency conflicts by creating isolated environments. These “isolated environments” contain all the goodies Python programmers might need to develop their projects.
Virtual environments include a fresh duplicate of Python binaries, and a standalone copy of the entire Python standard library. That’s why it can work by itself.
Using virtual environments give us the following advantages:
we’re able to maintain our local machine packages intact
we can share dependencies with others with a requirements.txt file
we can deploy a Python app in a dedicated server (PythonAnyWhere, Heroku, and so forth)
The Need for Virtual Environments
I use many libraries for my projects. Among them are three web application development frameworks, and there are other libraries I’d like to explore in future. This serves as the main argument that serious projects in Python depend on other packages written by other developers.
If you’re a Django developer, I’m confident you use Django rest framework to create powerful rest APIs, Django Debug Toolbar for gathering various debug information about the current request/response, Celery for taking care of real-time operations, and scheduling as well, and so on.
For example, I rely heavily on the requests package for some of my projects, and a Django web application I’m currently working on depends on version 2.3.0. According to the official documentation, at the time of writing the latest version of this package is version 3.2.
Let’s suppose I go ahead and install the latest version of the library on my Ubuntu machine because I need it for another project. Everything seems to work fine until I try to make use of my older project, which worked fine with 2.3.0. Suddenly, everything is broken.
What happened? Maybe the API of the latest version of Django has changed since version 2.3.0? The reason doesn’t matter at this point, as my older project is broken and no longer works.
A conflict between two projects has been created. They make use of the same library, but they require different versions of it.
Various packages solve this problem. Let’s see some that stand out.
Before Starting
In this tutorial, we’ll be using Python 3, so let’s start by checking your Python installation.
To do this, open up a terminal — cmd/PowerShell on Windows — and type the following command:
python –version

Python 3.9.5

Note: Most macOS and Linux systems have Python installed. You can check the Python installation guide if you’re using Windows.
If you didn’t get a result of the form Python 3.x there are two options:
if this command returned a Python 2.x version, you’ll need to use python3 along with this tutorial
if you got an Unknown command error, try to run python3, and if you get another error, follow the Python installation guide
You can proof the existence of the python3 binary by checking its version:
python3 –version

Python 3.9.5

Note: if the command above worked, you’ll need to run python3 instead of python.
Now that you know which Python command runs on your machine, let’s get into virtual environments.
Built-in venv Module
Let’s use the built-in Python venv module to create your first virtual environment.
Note: to use this module you need Python 3.3 or greater installed in your system.
To create a Python virtual environment with venv, type the following command:
python -m venv virt1

Note: the -m flag means Python is running the built-in venv module as a script.
This will create a virtual environment with the name of virt1, but this is just an argument. You can create the virtual environment with any name you want.
Everything installed in the virt1 directory won’t affect the global packages or system-wide installations, thus avoiding dependency conflicts.
Activating Virtual Environments
It’s crucial to know that each time we want to use a created virtual environment, we need to activate it with the following command:
source virt1/bin/activate

This won’t work in every system, so you can check the table below to have a clear idea of which command to use:
Command to activate virtual environment
$ source (venv-name)/bin/activate

$ source (venv-name)/bin/activate.fish

$ source (venv-name)/bin/activate.csh

PowerShell Core
$ (venv-name)/bin/Activate.ps1
C: > (venv-name)Scriptsactivate.bat

PS C: > (venv-name)ScriptsActivate.ps1
Note: the $ sign on POSIX and the C: >, PS C: > signs on Windows aren’t part of the command.
As you may notice, I’m using a bash shell in a POSIX (macOS and Linux), which is why I’m running the command above.
After the environment is created
Once the virtual environment gets activated, the terminal prompt changes a bit.

The following command lets you deactivate the virtual environment:

Note how your terminal prompt has changed again.

Now activate your virtual environment again and use the which command to check the Python binary that’s being used:
source virt1/bin/activate
which python

If everything worked well, you should get something similar to the following output:

If you deactivate and which again, you should get a different output:

This is because, when working inside a virtual environment, the binary copy placed inside that environment is being used. The same applies to packages.
Pip with virtual environments
Although this isn’t a pip guide it’s important to show off the workflow between pip and virtual environments.
pip — whose name stands for “Pip Installs Packages” — is a package manager used to install and manage Python packages.
It’s extremely useful when you want to distribute your project to others, as it allows other developers — and end-users — to install all the dependencies of your project at a glance.
For example, a fellow developer can activate a virtual environment and then run the following command to install the dependencies of the project:
pip install -r requirements.txt

Here, requirements.txt is the file that contains all the project dependencies — the specific versions of packages.
To generate the dependencies file of your project, you can run the command below:
pip freeze > requirements.txt

If you want to install a specific version of a package, you can run pip install followed by the package name, double equal sign (==), and its version:
pip install package==version

In other situations, we can also uninstall a package from our machine (or virtual environment):
pip uninstall some-package-name

Virtualenv is an external package used to create virtual environments. In reality, the Python built-in venv is a subset of it, so virtualenv has more features than the first option we saw. You can learn more about virtualenv advantages over venv in the official documentation.
For now, let’s install virtualenv with pip (make sure you’ve deactivated the previous venv) making use of the command below:
pip install virtualenv

This tool works similar to venv, so let’s test it out by creating another virtual environment:
virtualenv virt2

Note: make sure you deactivate the other environment before running the above command.
As with venv, we must activate the virtual environment before using it:
source virt2/bin/activate

If I now install the newest version of requests, it will be installed only on the virtual environment venv2:
pip install requests

The above command produces the following output:
Collecting requests

Installing collected packages: urllib3, idna, chardet, certifi, requests
Successfully installed certifi-2021.5.30 chardet-4.0.0 idna-2.10 requests-2.25.1 urllib3-1.26.5

If I run the pip freeze command, which prints a list of all my installed packages, I’ll get this:

As you can see, the only packages I get are the latest version of requests — at the time of writing — and its dependencies.
Other Virtualenv features
We can use the -p flag while working with virtualenv to use a specific version of Python that’s globally installed on the machine.
For example, the following command can be used to create the virtual environment virt2 with Python3 in it, if you have Python3 installed on your machine:
virtualenv -p /usr/bin/python3 virt2

And to delete a virtual environment, you use the rm -r command as you do with any other directory you want to delete:
rm -r virt2

You can learn more about advanced usage of the virtualenv CLI interface in the official documentation.
Virtualenvwrapper provides very useful commands that make working with virtual environments even easier, by organizing all of them in a simple place.
As with virtualenv, It can be installed easily with pip.
pip install virtualenvwrapper

This will create a shell file virtualenvwrapper.sh located at your ~/.local/bin/ directory. This folder is used to store package binaries which let you to use Python packages directly from your terminal.
Before using virtualenvwrapper, you’ll need to edit your shell configuration file. Since I’m using a bash shell, I’ll append the following content to the .bashrc file, located in my home directory:
cat ~/.bashrc

export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python
export VIRTUALENVWRAPPER_VIRTUALENV=~/.local/bin/virtualenv
export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/Documents
source ~/.local/bin/virtualenvwrapper.sh

This will append — write at the end of the file — the above content to the .bashrc file. If the command above didn’t work, open the file and modify it manually.
The VIRTUALENVWRAPPER_PYTHON is pointing to the Python binary of your machine. You can check it with the following command (without any virtual environment activated):
which python


Make sure to modify the .bashrc file according to your Python binary path.
Note: if you’re using Windows, you can use virtualenvwrapper-win.
Then, we reload the bash shell with the changes we made to the .bashrc file by running the following command:
source ~/.bashrc

Now, the mkvirtualenv command can be used to easily make new environments placed by default inside this folder:
mkvirtualenv sitepoint

You can see the sitepoint virtual environment folder by entering to the WORKON_HOME path, which we defined above as $HOME/.virtualenvs:
ls ~/.virtualenvs


To get a list of all the virtual environments created by virtualenvwrapper, you can run the workon command without arguments:


We can easily activate the virtual environment with the help of the workon command:
workon sitepoint

The command to deactivate the virtual environment is the same as the one we used before:

It’s very easy to switch between different virtual environments. For example, to workon another virtual environment:
workon another_virtualenv

To delete a virtual environment, the command rmvirtualenv should be used:
rmvirtualenv sitepoint

In this tutorial, you’ve learned about the essential workflow that every Python developer should master. Virtual environments are a crucial part of any collaborative Python project, and you can instantly improve your productivity by using them.
The tools are out there. Now it’s time to incorporate them into challenging personal projects. Do you use any other interesting approaches in your Python development workflow? Let us know in the Python forum!
Related ArticlesUsing Python to Parse Spreadsheet DataProgrammingBy

Color Tools And Resources

Today, we’re shining the spotlight on color tools and resources for all kinds of projects, from all types of color palettes and generators to getting contrast and gradients just right for your projects. This collection is by no means complete, but rather a selection of things that the team at Smashing found useful and hope…