Creating a Menu Image Animation on Hover

Original Source: http://feedproxy.google.com/~r/tympanus/~3/N1YGL0M-ap0/

At Codrops, we love experimenting with playful hover effects. Back in 2018, we explored a set of fun hover animations for links. We called that Image Reveal Hover Effects and it shows how to make images appear with a fancy animation when hovering items of a menu. After seeing the fantastic portfolio of Marvin Schwaibold, I wanted to try this effect again on a larger menu and add that beautiful swing effect when moving the mouse. Using some filters, this can also be made more dramatic.

If you are interested in other similar effect, have a look at these:

Image Trail EffectsImage Distortion Effects with SVG FiltersImage Dragging Effects

So, today we’ll have a look at how to create this juicy image hover reveal animation:

Some Markup and Styling

We’ll use a nested structure for each menu item because we’ll have several text elements that will appear on page load and hover.

But we’ll not go into the text animation on load or the hover effect so what we are interested in here is how we’ll make the image appear for each item. The first thing I do when I want to make a certain effect is to write up the structure that I need using no JavaScript. So let’s take a look at that:

<a class=”menu__item”>
<span class=”menu__item-text”>
<span class=”menu__item-textinner”>Maria Costa</span>
</span>
<span class=”menu__item-sub”>Style Reset 66 Berlin</span>
<!– Markup for the image, inserted with JS –>
<div class=”hover-reveal”>
<div class=”hover-reveal__inner”>
<div class=”hover-reveal__img” style=”background-image: url(img/1.jpg);”></div>
</div>
</div>
</a>

In order to construct this markup for the image, we need to save the source somewhere. We’ll use a data attribute on the menu__item, e.g. data-img=”img/1.jpg”. We’ll go into more detail later on.

Next, we’ll have some styling for it:

.hover-reveal {
position: absolute;
z-index: -1;
width: 220px;
height: 320px;
top: 0;
left: 0;
pointer-events: none;
opacity: 0;
}

.hover-reveal__inner {
overflow: hidden;
}

.hover-reveal__inner,
.hover-reveal__img {
width: 100%;
height: 100%;
position: relative;
}

.hover-reveal__img {
background-size: cover;
background-position: 50% 50%;
}

Any other styles that are specific to our effect (like the transforms) we’ll add dynamically.

Let’s take a look at the JavaScript.

The JavaScript

We’ll use GSAP and besides our hover animation, we’ll also use a custom cursor and smooth scrolling. For that we’ll use the smooth scroll library from the amazing folks of Locomotive, the Agency of the year. Since those are both optional and out of the scope of the menu effect we want to showcase, we’ll not be covering it here.

First things first: let’s preload all the images. For the purpose of this demo we are doing this on page load, but that’s optional.

Once that’s done, we can initialize the smooth scroll instance, the custom cursor and our Menu instance.

Here’s how the entry JavaScript file (index.js) looks like:

import Cursor from ‘./cursor’;
import {preloader} from ‘./preloader’;
import LocomotiveScroll from ‘locomotive-scroll’;
import Menu from ‘./menu’;

const menuEl = document.querySelector(‘.menu’);

preloader(‘.menu__item’).then(() => {
const scroll = new LocomotiveScroll({el: menuEl, smooth: true});
const cursor = new Cursor(document.querySelector(‘.cursor’));
new Menu(menuEl);
});

Now, let’s create a class for the Menu (in menu.js):

import {gsap} from ‘gsap’;
import MenuItem from ‘./menuItem’;

export default class Menu {
constructor(el) {
this.DOM = {el: el};
this.DOM.menuItems = this.DOM.el.querySelectorAll(‘.menu__item’);
this.menuItems = [];
[…this.DOM.menuItems].forEach((item, pos) => this.menuItems.push(new MenuItem(item, pos, this.animatableProperties)));


}

}

So far we have a reference to the main element (the menu <nav>
element) and the menu item elements. We’ll also create an array of our MenuItem instances. But let’s cover that bit in a moment.

What we’ll want to do now is to update the transform (both, X and Y translate) value as we move the mouse over the menu items. But we might as well want to update other properties. In our case we will additionally be updating the rotation and the CSS filter value (brightness). For that, let’s create an object that stores this configuration:

constructor(el) {

this.animatableProperties = {
tx: {previous: 0, current: 0, amt: 0.08},
ty: {previous: 0, current: 0, amt: 0.08},
rotation: {previous: 0, current: 0, amt: 0.08},
brightness: {previous: 1, current: 1, amt: 0.08}
};
}

With interpolation, we can achieve the smooth animation effect when moving the mouse. The “previous” and “current” values are the values we’ll be interpolating. The current value of one of these “animatable” properties will be one between these two values at a specific increment. The value of “amt” is the amount to interpolate. As an example, the following formula calculates our current translationX value:

this.animatableProperties.tx.previous = MathUtils.lerp(this.animatableProperties.tx.previous, this.animatableProperties.tx.current, this.animatableProperties.tx.amt);

Finally, we can show the menu items, which are hidden by default. This was just a little extra, and totally optional, but it’s definitely a nice add-on to reveal each item with a delay on page load.

constructor(el) {

this.showMenuItems();
}
showMenuItems() {
gsap.to(this.menuItems.map(item => item.DOM.textInner), {
duration: 1.2,
ease: ‘Expo.easeOut’,
startAt: {y: ‘100%’},
y: 0,
delay: pos => pos*0.06
});
}

That’s it for the Menu class. What we’ll be looking into next is how to create the MenuItem class together with some helper variables and functions.

So, let’s start by importing the GSAP library (which we will use to show and hide the images), some helper functions and the images inside our images folder.

Next, we need to get access to the mouse position at any given time, since the image will follow along its movement. We can update this value on “mousemove” . We will also cache its position so we can calculate its speed and movement direction for both, the X and Y axis.

Hence, that’s what we’ll have so far in the menuItem.js file:

import {gsap} from ‘gsap’;
import { map, lerp, clamp, getMousePos } from ‘./utils’;
const images = Object.entries(require(‘../img/*.jpg’));

let mousepos = {x: 0, y: 0};
let mousePosCache = mousepos;
let direction = {x: mousePosCache.x-mousepos.x, y: mousePosCache.y-mousepos.y};

window.addEventListener(‘mousemove’, ev => mousepos = getMousePos(ev));

export default class MenuItem {
constructor(el, inMenuPosition, animatableProperties) {

}

}

An item will be passed its position/index in the menu (inMenuPosition) and the animatableProperties object described before. The fact that the “animatable” property values are shared and updated among the different menu items will make the movement and rotation of the images continuous.

Now, in order to be possible to show and hide the menu item image in a fancy way, we need to create that specific markup we’ve shown in the beginning and append it to the item. Remember, our menu item is this by default:

<a class=”menu__item” data-img=”img/3.jpg”>
<span class=”menu__item-text”><span class=”menu__item-textinner”>Franklin Roth</span></span>
<span class=”menu__item-sub”>Amber Convention London</span>
</a>

Let’s append the following structure to the item:

<div class=”hover-reveal”>
<div class=”hover-reveal__inner” style=”overflow: hidden;”>
<div class=”hover-reveal__img” style=”background-image: url(pathToImage);”>
</div>
</div>
</div>

The hover-reveal element will be the one moving as we move the mouse.
The hover-reveal__inner element together with the hover-reveal__img (the one with the background image) will be the ones that we can animate together to create fancy animations like reveal/unreveal effects.

layout() {
this.DOM.reveal = document.createElement(‘div’);
this.DOM.reveal.className = ‘hover-reveal’;
this.DOM.revealInner = document.createElement(‘div’);
this.DOM.revealInner.className = ‘hover-reveal__inner’;
this.DOM.revealImage = document.createElement(‘div’);
this.DOM.revealImage.className = ‘hover-reveal__img’;
this.DOM.revealImage.style.backgroundImage = `url(${images[this.inMenuPosition][1]})`;
this.DOM.revealInner.appendChild(this.DOM.revealImage);
this.DOM.reveal.appendChild(this.DOM.revealInner);
this.DOM.el.appendChild(this.DOM.reveal);
}

And the MenuItem constructor completed:

constructor(el, inMenuPosition, animatableProperties) {
this.DOM = {el: el};
this.inMenuPosition = inMenuPosition;
this.animatableProperties = animatableProperties;
this.DOM.textInner = this.DOM.el.querySelector(‘.menu__item-textinner’);
this.layout();
this.initEvents();
}

The last step is to initialize some events. We need to show the image when hovering the item and hide it when leaving the item.

Also, when hovering it we need to update the animatableProperties object properties, and make the image move, rotate and change its brightness as the mouse moves:

initEvents() {
this.mouseenterFn = (ev) => {
this.showImage();
this.firstRAFCycle = true;
this.loopRender();
};
this.mouseleaveFn = () => {
this.stopRendering();
this.hideImage();
};

this.DOM.el.addEventListener(‘mouseenter’, this.mouseenterFn);
this.DOM.el.addEventListener(‘mouseleave’, this.mouseleaveFn);
}

Let’s now code the showImage and hideImage functions.

We can create a GSAP timeline for this. Let’s start by setting the opacity to 1 for the reveal element (the top element of that structure we’ve just created). Also, in order to make the image appear on top of all other menu items, let’s set the item’s z-index to a high value.

Next, we can animate the appearance of the image. Let’s do it like this: the image gets revealed to the right or left, depending on the mouse x-axis movement direction (which we have in direction.x). For this to happen, the image element (revealImage) needs to animate its translationX value to the opposite side of its parent element (revealInner element).
That’s basically it:

showImage() {
gsap.killTweensOf(this.DOM.revealInner);
gsap.killTweensOf(this.DOM.revealImage);

this.tl = gsap.timeline({
onStart: () => {
this.DOM.reveal.style.opacity = this.DOM.revealInner.style.opacity = 1;
gsap.set(this.DOM.el, {zIndex: images.length});
}
})
// animate the image wrap
.to(this.DOM.revealInner, 0.2, {
ease: ‘Sine.easeOut’,
startAt: {x: direction.x < 0 ? ‘-100%’ : ‘100%’},
x: ‘0%’
})
// animate the image element
.to(this.DOM.revealImage, 0.2, {
ease: ‘Sine.easeOut’,
startAt: {x: direction.x < 0 ? ‘100%’: ‘-100%’},
x: ‘0%’
}, 0);
}

To hide the image we just need to reverse this logic:

hideImage() {
gsap.killTweensOf(this.DOM.revealInner);
gsap.killTweensOf(this.DOM.revealImage);

this.tl = gsap.timeline({
onStart: () => {
gsap.set(this.DOM.el, {zIndex: 1});
},
onComplete: () => {
gsap.set(this.DOM.reveal, {opacity: 0});
}
})
.to(this.DOM.revealInner, 0.2, {
ease: ‘Sine.easeOut’,
x: direction.x < 0 ? ‘100%’ : ‘-100%’
})
.to(this.DOM.revealImage, 0.2, {
ease: ‘Sine.easeOut’,
x: direction.x < 0 ? ‘-100%’ : ‘100%’
}, 0);
}

Now we just need to update the animatableProperties object properties so the image can move around, rotate and change its brightness smoothly. We do this inside a requestAnimationFrame loop. In every cycle we interpolate the previous and current values so things happen with an easing.

We want to rotate the image and change its brightness depending on the x-axis speed (or distance traveled from the previous cycle) of the mouse. Therefore we need to calculate that distance for every cycle which we can get by subtracting the mouse position from the cached mouse position.

We also want to know in which direction we move the mouse since the rotation will be dependent on it. When moving to the left the image rotates negatively, and when moving to the right, positively.

Next, we want to update the animatableProperties values. For the translationX and translationY, we want the center of the image to be positioned where the mouse is. Note that the original position of the image element is on the left side of the menu item.

The rotation can go from -60 to 60 degrees depending on the speed/distance of the mouse and its direction. Finally the brightness can go from 1 to 4, also depending on the speed/distance of the mouse.

In the end, we take these values together with the previous cycle values and use interpolation to set up a final value that will then give us that smooth feeling when animating the element.

This is how the render function looks like:

render() {
this.requestId = undefined;

if ( this.firstRAFCycle ) {
this.calcBounds();
}

const mouseDistanceX = clamp(Math.abs(mousePosCache.x – mousepos.x), 0, 100);
direction = {x: mousePosCache.x-mousepos.x, y: mousePosCache.y-mousepos.y};
mousePosCache = {x: mousepos.x, y: mousepos.y};

this.animatableProperties.tx.current = Math.abs(mousepos.x – this.bounds.el.left) – this.bounds.reveal.width/2;
this.animatableProperties.ty.current = Math.abs(mousepos.y – this.bounds.el.top) – this.bounds.reveal.height/2;
this.animatableProperties.rotation.current = this.firstRAFCycle ? 0 : map(mouseDistanceX,0,100,0,direction.x < 0 ? 60 : -60);
this.animatableProperties.brightness.current = this.firstRAFCycle ? 1 : map(mouseDistanceX,0,100,1,4);

this.animatableProperties.tx.previous = this.firstRAFCycle ? this.animatableProperties.tx.current : lerp(this.animatableProperties.tx.previous, this.animatableProperties.tx.current, this.animatableProperties.tx.amt);
this.animatableProperties.ty.previous = this.firstRAFCycle ? this.animatableProperties.ty.current : lerp(this.animatableProperties.ty.previous, this.animatableProperties.ty.current, this.animatableProperties.ty.amt);
this.animatableProperties.rotation.previous = this.firstRAFCycle ? this.animatableProperties.rotation.current : lerp(this.animatableProperties.rotation.previous, this.animatableProperties.rotation.current, this.animatableProperties.rotation.amt);
this.animatableProperties.brightness.previous = this.firstRAFCycle ? this.animatableProperties.brightness.current : lerp(this.animatableProperties.brightness.previous, this.animatableProperties.brightness.current, this.animatableProperties.brightness.amt);

gsap.set(this.DOM.reveal, {
x: this.animatableProperties.tx.previous,
y: this.animatableProperties.ty.previous,
rotation: this.animatableProperties.rotation.previous,
filter: `brightness(${this.animatableProperties.brightness.previous})`
});

this.firstRAFCycle = false;
this.loopRender();
}

I hope this has been not too difficult to follow and that you have gained some insight into constructing this fancy effect.

Please let me know if you have any question @codrops or @crnacura.

Thank you for reading!

The images used in the demo are by Andrey Yakovlev and Lili Aleeva. All images used are licensed under CC BY-NC-ND 4.0

The post Creating a Menu Image Animation on Hover appeared first on Codrops.

Beautiful Collage Illustration by Daniel Escudeiro

Original Source: http://feedproxy.google.com/~r/abduzeedo/~3/MmWg8CEqQ_I/beautiful-collage-illustration-daniel-escudeiro

Beautiful Collage Illustration by Daniel Escudeiro
Beautiful Collage Illustration by Daniel Escudeiro

abduzeedo07.01.20

Daniel Escudeiro shared a really beautiful project on Behance that brought me back some good memories of the 90s and early 2000s. The project is a set of two collage illustrations for a short story by Raphael Montes, published in the Brazilian magazine Superinteressante (May 2017). The work has that deconstructivist look, mixing different photogs and textures. The color palette also reinforces the look, and do pay a homage to the work of  the incredible Eduardo Recife (misprintedtype.com/).

The short story

An aspiring actress is, since her childhood, obsessed with being cast in a film by her dream director. With each new audition, she completely transforms herself into the character she wants to play – which escalates from taking antidepressants to prostitution, and even to a sex change operation. She’ll never get the part, but will keep trying as her life is tragically and comically ruined in the process.

Illustration


How to Invoice Your Clients Professionally (10 Tips)

Original Source: https://www.hongkiat.com/blog/invoice-freelance-clients-professionally/

Let’s face it – while receiving money can be very addictive, invoicing is a total nightmare for freelancers, especially designers. However, the freelance business’s truth is that…

Visit hongkiat.com for full content.

How to Ensure Flexible, Reusable PHP Code with Insphpect

Original Source: https://www.sitepoint.com/how-to-ensure-flexible-reusable-php-code-with-insphpect/?utm_source=rss

Insphpect is a tool I wrote as part of my PhD project. It scans code for object-oriented programming techniques that hinder code reusability and flexibility.

Why?

Let me begin with two mundane observations:

Business requirements change over time.
Programmers are not clairvoyant.

New product launches, emergency lockdown regulations, expanding into new markets, economic factors, updated data protection laws: there are lots of potential causes for business software to need updating.

From those two observations we can infer that programmers know that the code they write is going to change, but not what those changes will be or when they will happen.

Writing code in such a way that it can be easily adapted is a skill that takes years to master.

You’re probably already familiar with programming practices that come back and haunt you. Novice programmers quickly realize that global variables are more trouble than they’re worth, and the once incredibly popular Singleton Pattern has been a dirty word for the last decade.

How you code your application has a big impact on how easy it is to adapt to meet new requirements. As you progress through your career, you learn techniques that make adapting code easier. Once you’ve grasped fundamentals of object-oriented programming you wonder how you ever did without it!

If you ask ten developers to produce software, given the same requirements, you’ll get ten different solutions. Some of those solutions will inevitably be better than others.

Consider a ship in a bottle and a model ship made of Lego. Both are model ships, but changing the sails on the ship in a bottle is very difficult, and reusing the parts is near impossible. However, with a Lego ship, you can easily swap out the sails or use the same components to build a model rocket, house or a car.

Certain programming techniques lead to the ship-in-a-bottle approach and make your code difficult to change and adapt.

Insphpect

Insphpect is a tool which scans your code for programming practices that lead to this kind of a ship in a bottle design.

It grades your code based on how flexible it is, and highlights areas where flexibility can be improved.

What does Insphpect look for?

Currently, Insphpect looks for the following:

tight coupling
hardcoded configuration
singletons
setter injection
using the new keyword in a constructor
service locators
inheritance
static methods
global state
files that have more than one role (e.g. defining a class and running some code)

If it detects anything it identifies as inflexible, it highlights the code, explains why it highlighted the issue, then grades your whole project and individual classes on a score of 0-100 (with 100 being no issues detected). As a proof of concept, for some detections it’s able to automatically generate a patch file that re-writes the code to remove the inflexibility entirely.

Take a look a sample report here.

Insphpect is currently in the testing phase, and it would really help my research progress if you can check it out and complete the survey in the “Give your feedback” section of the site.

Background

Are those bad practices really bad, though?

This was one of the more difficult parts of the background research, and you can read about how this was done in detail on the Insphpect website.

However, this can be summarized as:

The opinions of each bad practice were collected from 100 authors per practice.
The author’s opinion on the practice was graded on a scale of 1–5.
The author’s methodological rigor was graded on a scale of 1–7 based on the Jadad score used for clinical trials.

These were then plotted like the graph below:

Singleton pattern results

Each horizontal line represents an article, and the left (orange) bar for each article is the recommendation going from 5 — Avoid this practice at all costs (Far left) — to 1 — Favor this practice over alternatives.

The right (blue) bar for each article is the Jadad style score measuring analytic rigor. A score of seven means the article describes the practice, provides code examples, discusses alternative approaches, provides like-for-like code samples, discusses the pros/cons of each approach and makes a recommendation of which approach should be used.

In the case of the singleton above, authors who compare the singleton to alternative approaches, discuss the pros/cons, etc., are significantly more likely to suggest using alternative approaches.

Walkthrough

Currently, Insphpect allows uploading code via a Git repository URL or a ZIP file.

So not to point out flaws in other people’s work, let’s take a look at one of my own projects to see what it identifies.

We’ll use https://github.com/Level-2/Transphporm as an example project.

This is quite a good example, because it has a very high score on another code-quality tool Scrutinizer.

Firstly, enter the git URL https://github.com/Level-2/Transphporm into the text box at the top of the home page and press “Go”. It will take a few seconds to minutes, depending on the size of the project, and will generate a report that looks something like this:

Transphporm Report

Once you’re on the report page, you’ll see a summary at the top with an overall grade out of 100, with 100 being very good and 0 being very poor.

Underneath the summary, you’ll see a list of all the classes in the project, each with its own grade.

Don’t worry if your code doesn’t get a perfect score. It’s unlikely that it will. Remember, Insphpect is a tool that identifies flexibility in your code. There are parts of your code (like the entry point) where flexibility isn’t warranted.

For Transphporm, it has highlighted issues in seven classes.

Let’s take a look at some of those. Scroll down to TransphpormParserCssToXpath and click the link. You’ll see a score for that particular class and a list of issues which have been identified.

In this case, it has identified a static variable and a static method. Clicking on one of the red lines will reveal an explanation of why the line was flagged up.

For example, clicking line 12 will give an explanation of why static variables are less flexible than instance variables.

Single class report

Although there’s a more in-depth explanation of the issues caused by static properties on the report, as a quick refresher, static variables have one value which is shared across all the instances of the class.

This is inherently less flexible than an instance variable, because using an instance variable allows each instance to have a different value.

For example, consider the following:

class User {
public static $db;
public $id;
public $name;
public $email;

public function save() {
$stmt = self::$db->prepare(‘REPLACE INTO user (id, name, email) VALUES (:id, :name, :email)’);

$stmt->execute([
‘id’ => $this->id,
‘name’ => $this->name.
’email’ => $this->email
]);
}
}

Because $db is static, every instance of this class shares the same $db instance and records will always be inserted into the same database.

While this sounds reasonable, let me give you a real-world example.

Continue reading
How to Ensure Flexible, Reusable PHP Code with Insphpect
on SitePoint.

15 React Interview Questions with Solutions

Original Source: https://www.sitepoint.com/react-interview-questions-solutions/?utm_source=rss

15 React Interview Questions with Solutions

React’s popularity shows no sign of waning, with the demand for developers still outstripping the supply in many cities around the world. For less-experienced developers (or those who’ve been out of the job market for a while), demonstrating your knowledge at the interview stage can be daunting.

In this article, we’ll look at fifteen questions covering a range of knowledge that’s central to understanding and working effectively with React. For each question, I’ll summarize the answer and give links to additional resources where you can find out more.

1. What’s the virtual DOM?
Answer

The virtual DOM is an in-memory representation of the actual HTML elements that make up your application’s UI. When a component is re-rendered, the virtual DOM compares the changes to its model of the DOM in order to create a list of updates to be applied. The main advantage is that it’s highly efficient, only making the minimum necessary changes to the actual DOM, rather than having to re-render large chunks.

Further reading

Understanding the Virtual DOM
Virtual DOM Explained

2. What’s JSX?
Answer

JSX is an extension to JavaScript syntax that allows for writing code that looks like HTML. It compiles down to regular JavaScript function calls, providing a nicer way to create the markup for your components.

Take this JSX:

<div className=”sidebar” />

It translates to the following JavaScript:

React.createElement(
‘div’,
{className: ‘sidebar’}
)

Further reading

What is JSX?
JSX in Depth
JSX in React Design Patterns and Best Practices

3. What’s the difference between a class component and a functional one?
Answer

Prior to React 16.8 (the introduction of hooks), class-based components were used to create components that needed to maintain internal state, or utilize lifecycle methods (i.e. componentDidMount and shouldComponentUpdate). A class-based component is an ES6 class that extends React’s Component class and, at minimum, implements a render() method.

Class component:

class Welcome extends React.Component {
render() {
return <h1>Hello, {this.props.name}</h1>;
}
}

Functional components are stateless (again, < React 16.8) and return the output to be rendered. They are preferred for rendering UI that only depends on props, as they’re simpler and more performant than class-based components.

Functional component:

function Welcome(props) {
return <h1>Hello, {props.name}</h1>;
}

Note: the introduction of hooks in React 16.8 means that these distinctions no longer apply (see questions 14 and 15).

Further reading

Functional Components vs Class Components in React
Functional vs Class-Components in React

4. What are keys used for?
Answer

When rendering out collections in React, adding a key to each repeated element is important to help React track the association between elements and data. The key should be a unique ID, ideally a UUID or other unique string from the collection item, but which can be an array index as a last resort:

<ul>
{todos.map((todo) =>
<li key={todo.id}>
{todo.text}
</li>
)};
</ul>

Not using a key can result in strange behavior when adding and removing items from the collection.

Further reading

Lists and Keys
Understanding React’s key prop

5. What’s the difference between state and props?
Answer

props are data that are passed into a component from its parent. They should not be mutated, but rather only displayed or used to calculate other values. State is a component’s internal data that can be modified during the lifetime of the component, and is maintained between re-renders.

Further reading

props vs state

6. Why call setState instead of directly mutating state?
Answer

If you try to mutate a component’s state directly, React has no way of knowing that it needs to re-render the component. By using the setState() method, React can update the component’s UI.

Bonus

As a bonus, you can also talk about how state updates are not guaranteed to be synchronous. If you need to update a component’s state based on another piece of state (or props), pass a function to setState() that takes state and props as its two arguments:

this.setState((state, props) => ({
counter: state.counter + props.increment
}));

Further reading

Continue reading
15 React Interview Questions with Solutions
on SitePoint.

How to Keep Working Remotely in a Post-COVID-19 World

Original Source: https://www.sitepoint.com/post-covid-19-remote-work/?utm_source=rss

How To Keep Working Remotely in a post-COVID-19 World

Though the COVID-19 pandemic is still far from over, many companies and employees are already looking to the post-COVID world. For many organizations, the enforced move to remote working over the past few months has presented significant challenges.

On the other hand, there are many employees who, despite being reticent to move to remote working at the beginning of the pandemic, are now finding that remote work actually suits them rather well.

If you fall into this category, you might be wondering how you can continue to work from home after the current crisis ends. Many of the strategies you can deploy to achieve this are, in fact, similar to those that make for effective remote working in the first place: ensuring effective collaboration in remote teams, and making sure that you set yourself up for success with remote work, to name a couple things.

Nevertheless, your employer might be hesitant to let you continue to work remotely after the pandemic is over. If you don’t want to move back to the office, you’ll find some tips in this article on how to convince your boss to let you continue working from home.

The Benefits of Remote Working

If you don’t want to move back to your office in the next few months, you’re not alone. In fact, nearly 43% of full-time American employees say they want to work remotely more often even after the economy has reopened. One of the biggest reasons for this is the time that the average tech worker saves in commuting. The average American spent roughly 27 minutes on their one-way commute to the office in 2018, which equates to more than 200 hours spent commuting per year.

For tech companies, there are other benefits of remote working. Many software development firms are inherently multi-national, and co-ordinating employees across the globe can actually be easier if they’re working from home. As we’ve previously pointed out, the future of remote work is asynchronous. Research has also found that the kind of creativity and flexibility that tech firms value is actually increased by remote working rather than decreased.

Despite these findings, many organizations are still hesitant to let their employees work from home — at least once the global health crisis is over. So how can you continue to work from home after all this is over?

Continue reading
How to Keep Working Remotely in a Post-COVID-19 World
on SitePoint.

This Week In Web Design – June 26, 2020

Original Source: http://feedproxy.google.com/~r/1stwebdesigner/~3/wXFGQBC-8q8/

It’s the last Friday of June – how did we get here so fast? Friday at 1stWebDesigner means it’s time for this week’s edition of “This Week In Web Design”, our roundup of all the web design and development articles we’ve found that have been published in the past seven days. This week’s list includes UX design and testing, GitHub, JavaScript, WordPress, CSS, ways to get clients, and more! Let’s have a look!

Web Designer Toolbox: Unlimited Downloads Starting at $16.50/Month

Website Kits

Website Kits
16,000+ Web Designs

UX & UI Kits

UX & UI Kits
14,000+ UX & UI Kits

Graphic Assets

Graphic Assets
33,000+ Graphics

DOWNLOAD NOW
Envato Elements

What Is User Experience (UX) Testing? [+4 UX Best Practices]

User experience (UX) testing can help you analyze your site to ensure you’re providing a great experience for your audience.

Using 6 Google Analytics Features to Improve User Experience and Website Metrics

Two subsets of what you can use Google Analytics for as a UX designer: user behavior and user intent.

How (And Why) to Design for Local Businesses

When you take a small business client, your approach to design will likely be a little different. Here’s how to think about it.

JavaScript If Else Statement Made Simple

This tutorial will help you learn all you need to know about if else statement. You will learn how to use if, else, else if and nested if else.

Staying creative during hard times—and why it matters now more than ever

If we’re not creating anything when we’re suffering, there might not be anything tangible to look back upon.

How To Migrate a WordPress Website

All the ways you can migrate your WordPress site – manually and with plugins – can be found here.

Using Custom Property “Stacks” to Tame the Cascade

Use Custom Property “stacks” to solve some of the common issues people face in the cascade: from scoped component styles, to more explicit layering of intents.

Learn GitHub CLI: Your Guide to GitHub from the Command Line

In this quickstart guide, you’ll learn GitHub CLI. Find out what the GitHub CLI tool is used for, how to set it up, and how to use it.

Awesome Demos Roundup #16

The newest roundup of fantastic demos and web experiments from around the web.

12 Freelance Web Developer Jobs Sites to Get New Dev Clients

Knowing where to find high-quality freelance web developer jobs is critical to keeping your freelance dev business thriving.

Simple Design Tips for Crafting Better UI Cards

In this article, we will review the concept of cards and share some practical tips for designers.

An Overview of Scroll Technologies

An overview of scroll-related technologies and tools to help choose the one that’s right for you.

Examples of Creative Contact and Web Form Designs

Let us consider some good tips on how to create web form designs that are pleasant to use, accessible, secure & easily convertible.

How Web Designers Can Help Restaurants Move Into Digital Experiences

Restaurants are going to need web designers’ help in doing three things that ensure their survival in an increasingly digital world.

Best Design System Tools (Free & Premium)

Are you looking for design system tools to help you out with your next project? If yes, then you are in the right place.

Design Trend: Geo Shapes & Patterns (With Animation)

Stylish geometry is a design trend that keeps coming back around. This time the new twist is that shapes and design elements include touches of animation to bring shapes and patterns to life.

Accessibility and inclusion in UX for Product Managers

A disability is a phenomenon reflecting the interaction between features of a person’s body and features of the society in which he or she lives.

How To Add reCAPTCHA v3 to PHP Form and Submit Using Ajax

In this tutorial, we will add Google reCAPTCHA v3 to a PHP form and submit it without leaving the page, using Ajax.

A Glitchy Grid Layout Slideshow

An experimental grid slideshow with a stack-like navigation and glitch effect.

11,000+
Icons

20,000+
Illustrations

Envato Elements

DOWNLOAD NOW

14,000+
UI & UX Kits

16,000+
Web Templates

Highlight Text CSS: 7 Cool CSS Highlight Text Effects

In this short tutorial I will show you several cool ways in which you can use CSS to highlight text.

On racism and sexism in branding, user interface, and tech

Take a look at some unfortunate design, copy, and tech decisions made by massive international brands.

Hide Scrollbars During an Animation

Use @keyframes not to animate the opening, but just for this scrollbar-hiding functionality.

How to Present a Logo to Clients in 6 Steps (Tips from Experts)

A collection of incredible advice from experienced logo designers who have been designing logos and presenting them to clients for years.

Skeuomorphism is making a comeback

Today with even more certainty, I’ll say it again: skeuomorphism is coming back in web design.

15 React Interview Questions with Solutions

For less-experienced developers (or those who’ve been out of the job market for a while), demonstrating your knowledge at the interview stage can be daunting.

The Importance of Documentation for Web Developers

Although it can be burdensome, writing documentation is important and will deliver advantages for your users, your colleagues, and especially yourself.

How to write an effective design brief in 9 easy steps

A 9-step plan to create an effective brief that helps you deliver a new design to your client.

How to Enhance Your Website Layouts With SVG Shapes

Get rid of the usual boring rectangular boxes and learn to build a landing page full of complex SVG shapes.

How to get web design clients

One of the biggest challenges as a freelance designer isn’t the work itself. It’s finding clients.


Cinema 4D Visual Explorations by David Milan

Original Source: http://feedproxy.google.com/~r/abduzeedo/~3/11aXY9bgeD4/cinema-4d-visual-explorations-david-milan

Cinema 4D Visual Explorations by David Milan
Cinema 4D Visual Explorations by David Milan

AoiroStudio06.25.20

Here at abdz., we love 3D and Cinema 4D. I don’t generally have the dedicated time to get into 3D so we feature the incredible designers/artists to feast your eyes. That being said and following this route, let’s take a look at these 3D explorations by David Milan . David is the ‘creative type’ to push its boundaries and explore with lights, textures, shapes, colours through its work. What we are featuring is his series titled: EXPERIMENTYPE VOL. 2 and enjoy!

Links

http://www.davidmilan.com
https://www.behance.net/DavidMilan


Are You a Designer? Here’s What You Need to Know About the Laws!

Original Source: http://feedproxy.google.com/~r/Designrfix/~3/8cBvRPUrSr4/are-you-a-designer-heres-what-you-need-to-know-about-the-laws

As a designer, your creativity has its limits and there are times it’s necessary to refer to different sources for inspiration.  It’s important that you understand the laws with regards to using another person’s art. Failure to do so could cause you to face legal repercussions if losing your reputation isn’t bad enough.  Furthermore, understanding […]

The post Are You a Designer? Here’s What You Need to Know About the Laws! appeared first on designrfix.com.

How To Migrate a WordPress Website

Original Source: http://feedproxy.google.com/~r/1stwebdesigner/~3/dhBThR3yQSw/

If you have a WordPress (or any other type of) website for any length of time, it’s likely you’ll run into the need to move it to a new host at some point. Figuring out how to migrate a WordPress website is one of those site maintenance tasks a lot of people would rather avoid as it can seem unruly, unpredictable, and time-consuming.

And sometimes, it really is all of those things. However, if you plan ahead and have a good set of instructions to walk you through the process, you should be good to go.

2100+ WordPress Themes, Plugins, Templates: ONLY $16.50 per Month

WordPress Themes

WP Themes
1,200+ Themes

WordPress Plugins

WP Plugins
500+ Plugins

WP Template Kits

WP Template Kits
250+ Template Kits

DOWNLOAD NOW
Envato Elements

Why Migrate?

Site owners find they need to migrate WordPress sites for a number of different reasons. A lot of the time, it’s a matter of finding a better hosting deal elsewhere. The promise of saving money is always enticing. Another common reason to migrate your site is due to a lack of satisfaction with your current service provider. Whether they offer poor customer service or slow server response times, there are many reasons to switch.

Here are a few more common reasons people decide to migrate a WordPress website:

Seeking better site performance. If your site is currently too slow, an upgrade to a new host might be the right call.
A need for greater bandwidth. If your site is growing rapidly, migrating to a host that can handle your increased traffic needs is a must.
A need for more storage space. If your site is multimedia-heavy, migrating to a host with greater storage capacity might be the right choice for you.
More hands-on customer support. If you run an extensive website with a lot of moving parts (customers, clients, accounts, etc), the need for a more responsive customer support team might be more pronounced and necessary.
Better pricing. Sometimes, the price tag tells the whole story. If you find a better hosting deal elsewhere, migrating your WordPress site might be your best bet.
Expanded feature set. If your current host is lacking in features, you may find you need to migrate to one that offers more.

With the “why” spelled out, let’s move onto the “how.” We’ll cover how to manually migrate WordPress, along with some plugins that will do the hard work for you.

A truck on a street.

How to Manually Migrate a WordPress Site

You will need an FTP client to complete this process. A few options include:

FileZilla
CyberDuck
CuteFTP
FreeFTP

Step 1: Backup Your Site

Before you can move your site anywhere, you need to back it up. This means going through the process of downloading every single file of your WordPress site from a remote location. You will need an FTP client for this. Though I typically use FileZilla for this process, I’ll keep the steps fairly generic. Apply as needed to your chosen FTP client:

Connect to your old site’s server.
Go to the public_html folder.
Select all files in this folder.
Download the files.

Next, you’ll need to create and download a backup of your site’s MySQL database as well. To do this, you’ll need to go to the control panel of your web host. Most of the time, this will be cPanel. Go to phpMyAdmin and select the database associated with your WordPress site. Click Export and the database will be downloaded to your computer.

If you’d rather have this process be somewhat automated, go to cPanel (if your host supports it) and access the File Manager. In here, you can create a .zip file that contains all of your site’s files and its database for easy downloading. If you’re not super familiar with FTP, this might be the preferred method to use.

Step 2: Upload Your Files to the New WordPress Host

The next step to migrate a WordPress website is to upload your site’s files to the new host. You’ll need your trusty FTP client again. Once connected, you’ll need to go to the public_html folder on this new hosting account. Next, you’ll need to upload all the files from your site – make sure to decompress them first!

Step 3: Upload Your WordPress Database to the New Host

Once the files are uploaded, you’ll need to upload your WordPress MySQL database, too.

To do this, go to the cPanel or other control panel connected to your new hosting account. There should be a section specifically for MySQL databases. From there you’ll need to:

Create a new database. Make note in a safe place of the database name, username, and password associated with this new database.
Go to phpMyAdmin. The new database should be listed. Select it.
Click Import. Then, select the MySQL database file you’d previously downloaded. Upload it and save your settings.

Step 4: Edit the wp-config.php File

Now that everything has been uploaded to the new host, you’ll need to do some fine-tuning to ensure all of the new host’s settings work with your site. This will require using your FTP client again, but this time, find the wp-config.php file.

Once you’ve located this file, you’ll need to modify some code. According to SiteGround, you need to locate this section of code within the file:

/** The name of the database for WordPress */
define(‘DB_NAME’, ‘user_wrdp1’);

/** MySQL database username */
define(‘DB_USER’, ‘user_wrdp1’);

/** MySQL database password */
define(‘DB_PASSWORD’, ‘password’);

/** MySQL hostname */
define(‘DB_HOST’, ‘hostname’);

Once you’ve located this section of code, you need to replace bits of it with information about the WordPress database you created. Here’s what you need to replace:

Change the database name, if necessary
Set username to your database’s username
Set password to your database’s password
Swap out hostname for localhost or a custom name provided by your host

Save the changes you made. In a lot of cases, this will be the last step you need to take. Your site should now be up and running on the new host.

Step 5: Update the DNS

In some cases, you’ll need to update Domain Name Server or DNS information on your new host. This will ensure that when someone types in your site’s URL, they wind up on your actual site and not a blank page. This is common practice when you’re switching domain servers, hosting plans, and hosting companies.

According to WPEngine, you’ll need DNS info about your new host and access to the registrar from whom you bought your domain name in the first place. Specifically, you’ll need:

CNAME record
A NAME for your site.

Input this info in your domain registrar account. This can sometimes take up to a few days to complete processing.

11,000+
Icons

20,000+
Illustrations

Envato Elements

DOWNLOAD NOW

14,000+
UI & UX Kits

16,000+
Web Templates

Plugins for Migrating WordPress Sites

If all of the above sounds like a lot of work, you can rely on plugin-based solutions to do the heavy lifting for you. These plugins are sometimes referred to as “cloning” plugins but for our purposes, we’re considering them all methods of migrating WordPress websites.

Now, you will still likely need to adjust a few settings on your new site server manually, but these plugins will definitely take care of the backing up, exporting, and importing processes.

Duplicator

Duplicator WordPress Plugin

The Duplicator plugin makes it much easier to migrate WordPress by streamlining the process. It works by making click-of-a-button copies of your site’s files and database. Then you can download all of this information in a handy .zip file with minimal effort.

All-in-One WP Migration

All-in-One WP Migration WordPress Plugin

Another great option is the All-in-One WP Migration plugin. This one allows you to make backups of your site’s content and database as well and import this information over to your new host, all from within the plugin.

WP Engine Automated Migration

WP Engine Automated Migration WordPress Plugin

Our last recommendation is the WP Engine Automated Migration plugin. This one copies your files and WordPress database and allows you to upload them to your new site server with ease. So long as you have your hosting account details on hand, the plugin will handle much of the site migration process for you. Just note that this plugin only works with the WP Engine hosting provider.

Migrate Your Site Now

Whether you decide to migrate a WordPress site manually or you opt for the plugin route, you hopefully now have a stronger understanding of what the process entails, how it works, and what you need to do to prepare. Again, it might seem like a lot of work on the surface but the end result is often well worth it when you end up with a better home for your website.

Best of luck!