UI Interactions & Animations Roundup #6

Original Source: http://feedproxy.google.com/~r/tympanus/~3/fXbOPrnlXyg/

We are very happy to share our sixth UI interactions and animations roundup with you today! Lots of creativity has flown into these amazing works and it’s a pleasure to watch each and every one of them unfold their incredible imagination.

We hope you enjoy this collection and that it will spark some fresh inspiration in you!

Insidemind Motion Concept

by Nathan Riley

Motion exercise N?003

by Bastien Allard

Book event ios mobile app interaction

by Taras Migulko

Starlink Website Design

by Shakuro

Playful Creative Collective

by Zhenya Rynzhuk

Virtual Run | Landing Page

by Minh Pham

Memories Of A Geisha

by K?vin Lagier

Photographer Portfolio Interactions

by K?vin Lagier

Outpost – Concept Exploration

by Sean Hobman

Berluti Editorial Landing Page

by Francesco Zagami

Octane Material

by Matthew Hall

PanPan – Dog Treats UI

by Daniel Tan

Neural Network Website

by Max Gedrovich

Online Museums

by Viacheslav Olianishyn

Format web site design interaction

by Taras Migulko

Nana Asia Site of the Day on CSS Design Awards

by Cuberto

Kalli – Responsive HTML Templates II

by Anton Tkachev

Kati Forner Featured Projects Animation

by Zhenya Rynzhuk

X SEE

by Slava Kornilov

MUUTO Lookbook

by Nicholas.design

Interior Design Project Webpage Animation

by tubik

Play with Magic Motion

by Edoardo Mercati

The post UI Interactions & Animations Roundup #6 appeared first on Codrops.

Mirage JS Deep Dive: Understanding Timing, Response And Passthrough (Part 3)

Original Source: https://www.smashingmagazine.com/2020/06/mirage-javascript-timing-response-passthrough/

Mirage JS Deep Dive: Understanding Timing, Response And Passthrough (Part 3)

Mirage JS Deep Dive: Understanding Timing, Response And Passthrough (Part 3)

Kelvin Omereshone

2020-06-10T12:30:00+00:00
2020-06-10T17:34:03+00:00

Mirage JS was built to give frontend developers the ability to simulate actual backend API calls. So far, we have seen how we can create records with Mirage, intercept API requests via route handlers and, last but not least, how the shape of the data returned to us from Mirage is affected.

In this part of the series, we will see Mirage mechanism for simulating other aspects of an actual backend server like slow network, HTTP status code response, and also making requests to an actual backend even though Mirage is intercepting your frontend requests.

Let’s begin by simulating slow network requests.

Timing

When developing your frontend application that relies on a backend API, it’s useful to see how your application behaves under slow networks (think about testing loading messages and loaders). This test is important because requests to backend API are asynchronous in nature. What this means is that we can’t make assumptions about when we will get the response so we need to write our code as if it might come immediately, or there might be a delay.

A common reason for a delay in response is a slow Internet connection. It is then really important to know how your app would behave in such circumstances. Mirage caters to this need by making available a timing option which is a property passed to a route handler that tells the handler to wait for a particular duration specified by the timing option (in milliseconds) before returning a response whenever the route it is handling is called.

Note: By default, Mirage is setting a 400ms delay for the server during development and 0 during testing so your tests can run faster (no one really enjoys slow tests).

We now know in theory how to customize Mirage’s server response time. Let’s see a couple of ways to tweak that response time via the timing option.

timing On routes()

As earlier stated, Mirage sets a default delay for the server response time to be 400ms during development and 0 for tests. You could override this default on the routes method on the Server instance.

In the example below, I am setting the timing option to 1000ms in the routes method to artificially set the response delay for all routes:

import { Server } from ‘miragejs’

new Server({
routes() {
this.routes = 1000
}
})

The above tells Mirage to wait for 1000 milliseconds before returning a response. So if your front-end make a request to a route handler like the one below:

this.get(‘/users’, (schema) => {
return schema.users.all();
});

Mirage will take 1000 milliseconds to respond.

Tip: Instead of directly using the schema object, you could use ES 6 object restructuring to make your route handler cleaner and shorter like below:

this.get(‘/users’, ({ users }) => {
return users.all()
}

timing For Individual Routes

Although the this.timing property is useful, in some scenarios you wouldn’t want to delay all your routes. Because of this scenario, Mirage gives you the ability to set the timing option in a config options object you could pass at the end of a route handler.
Taking our above code snippets, let’s pass the 1000ms response delay to the route itself as opposed to globally setting it:

this.get(‘/users’, ({ users }) => {
return users.all();
}, { timing: 1000 });

The result is the same as globally assigning the timing. But now you have the ability to specify different timing delays for individual routes. You could also set a global timing with this.timing and then override it in a route handler. Like so:

this.timing = 1000

this.get(‘users’, ( { users } ) => {
return users.all()
})

this.get(‘/users/:id’, ({ users }, request) => {
let { id } = request.params;
return users.find(id);
}, { timing: 500 });

So now when we make a request to /users/1, it will return the below user JSON in half of the time (500ms) it would take for every other route.

{
“user”: {
“name”: “Kelvin Omereshone”,
“age”: 23,
“id”: “1”
}
}

Passthrough

Route handlers are the Mirage mechanism for intercepting requests your frontend application makes. By default, Mirage will throw an error similar to the one below when your app makes a request to an endpoint that you haven’t defined a Route handler for in your server instance.

Error: Mirage: Your app tried to GET ‘/unknown’, but there was no route defined to handle this request. Define a route for this endpoint in your routes() config. Did you forget to define a namespace?

You can, however, tell Mirage that if it sees a request to a route that you didn’t define a route handler for, it should allow that request to go through. This is useful if you have an actual backend and you want to use Mirage to test out endpoints that haven’t been implemented yet in your backend. To do this, you would need to make a call to the passthrough method inside the routes methods in your Mirage server instance.

Let’s see it in code:

import { Server } from ‘miragejs’

new Server({
routes() {
// you can define your route handlers above the passthrough call
this.passthrough()
}
})

Note: It is recommended keeping the call to passthrough at the bottom in order to give your route handlers precedence.

Now when Mirage sees requests to a route that you didn’t define in Mirage, it would let them “passthrough”. I really find this useful because it makes Mirage play nicely with an actual backend. So a scenario would be, you are ahead of your backend team and you want to make a request to an endpoint that you don’t have in your production backend, you could just mock out that endpoint in mirage and because of the passthrough option, you wouldn’t need to worry about other parts of your app making requests failing.

Using passthrough To Whitelist Route

passthrough takes in options to allow you to have more control over routes you want to whitelist. So as opposed to calling passthrough without any option and allowing routes not present in mirage to passthrough, you can pass in one or more strings of the routes you want to whitelist to passthrough. So if we want to whitelist /reviews and /pets we can do that using passthrough like so:

this.passthrough(‘/reviews’, ‘/pets)

You can also do multiple calls to passthrough:

this.passthrough(‘/reviews’)
this.passthrough(‘/pets’)

Note: I find passing multiple route strings to passthrough cleaner as opposed to making multiple calls. But you are free to use whatever feels natural to you.

Using passthrough On A Set Of HTTP Verbs

The above passthrough we defined will allow all HTTP verbs (GET, POST, PATCH, DELETE) to passthrough. If your use case requires you to allow a subset of the HTTP verbs to passthrough, Mirage provides an options array on the passthrough method wherein you pass the verbs you want Mirage to whitelist on a particular route. Let’s see it in code:

// this allows post requests to the /reviews route to passthrough
this.passthrough(‘/reviews’, [‘post’]);

You could also pass multiple strings of routes as well as the HTTP verbs array like so:

// this allows post and patch requests to /reviews and /pets routes to passthrough

this.passthrough(‘/pets’, ‘reviews’, [‘post’, ‘patch’])

Response

Now you see the level of customization Mirage gives you with both the timing option and passthrough method, it feels only natural for you to know how to customize the HTTP status code Mirage sends for the requests you make. By default, Mirage would return a status of 200 which says everything went fine. (Check out this article for a refresher on HTTP status code.) Mirage, however, provides the Response class which you can use to customize the HTTP status code as well as other HTTP headers to be sent back to your frontend application.

The Response class gives you more control over your route handler. You can pass in the following to the Response class constructor:

The HTTP status code,
HTTP Headers,
Data (a JSON payload to be returned to the frontend).

To see how the Response class works, we would start on an easy note by rewriting our previous route handler using the Response class. So we would take the below route handler:

this.get(‘users’, ( { users } ) => {
return users.all()
})

and then reimplement using the Response class. To do this we first need to import the Response class from Mirage:

import { Response } from ‘miragejs’

We would then rewrite our route handler using the Response class:

this.get(‘/users’, ({ users }) => {
return new Response(200, {}, users.all());
});

Note: We are passing an empty {} to the header argument because we are do not want to set any header values for this response.

I believe we can infer that Mirage under the hood uses the Response class when we previously returned users.all() because both implementations would act the same way and return the same JSON payload.

I will admit the above use of Response is a little bit verbose because we are not doing anything special yet. However, the Response class holds a world of possibility to allows you to simulate different server states and set headers.

Setting Server States

With the Response class, you can now simulate different server states via the status code which is the first argument the Response constructor takes. You can now pass in 400 to simulate a bad request, 201 to simulate the created state when you create a new resource in Mirage, and so on. With that in mind, let’s customize /users/:id route handler and pass in 404 to simulate that a user with the particular ID was not found.

this.get(‘/users/:id’, (schema, request) => {
let { id } = request.params;
return new Response(404, {}, { error: ‘User with id ${id} not found’});
});

Mirage would then return a 404 status code with the error message similar to the below JSON payload:

{
“error”: “User with id 5 not found”
}

Setting Headers

With the Response class, you can set response headers by passing an object as the second argument to the Response constructor. With this flexibility, you can simulate setting any headers you want. Still using our /users/:id route, we can set headers like so:

this.get(‘/users/:id’, (schema, request) => {
let { id } = request.params;
return new Response(404, {“Content-Type” : “application/json”, author: ‘Kelvin Omereshone’ }, { error: `User with id ${id} not found`});
});

Now when you check Mirage logs in your browser console, you would see the headers we set.

Wrapping Up

In this part of the Mirage JS Deep Dive series, I have expounded three mechanisms that Mirage exposes to its users in order to simulate a real server. I look forward to seeing you use Mirage better with the help of this article.

Stay tuned for the next and final part of the series coming up next week!

Part 1: Understanding Mirage JS Models And Associations
Part 2: Understanding Factories, Fixtures And Serializers
Part 3: Understanding Timing, Response And Passthrough

Smashing Editorial
(ra, il)

How to Create a Motion Hover Effect for a Background Image Grid

Original Source: http://feedproxy.google.com/~r/tympanus/~3/L_wR_kj8R2Q/

If you follow our UI Interactions & Animations Roundups, you might have spotted this beautiful grid designed by the folks of tubik:

Previously, Zhenya Rynzhuk also designed this wonderful layout with a similar interaction:

It’s not too complicated to implement this. I wanted to try it and in the following I’ll walk you through the relevant markup and code.

The markup and style for the grid

The markup is simply a grid of items that have background images. I like to use this structure because it allows me to control the sizes of the images by setting their position in the grid.

<div class=”grid”>
<div class=”grid__item pos-1″>
<div class=”grid__item-img” style=”background-image:url(img/1.jpg);”></div>
</div>
<div class=”grid__item pos-2″>
<div class=”grid__item-img” style=”background-image:url(img/2.jpg);”></div>
</div>
<div class=”grid__item pos-3″>
<div class=”grid__item-img” style=”background-image:url(img/3.jpg);”></div>
</div>

</div>

The grid is stretched to be a bit bigger than its parent because we want to move the items and create the illusion of an infinite plane of images.

.grid {
pointer-events: none;
position: absolute;
width: 110%;
height: 110%;
top: -5%;
left: -5%;
display: grid;
grid-template-columns: repeat(50,2%);
grid-template-rows: repeat(50,2%);
}

.grid__item {
position: relative;
}

.grid__item-img {
position: relative;
width: 100%;
height: 100%;
background-size: cover;
background-position: 50% 50%;
}

The grid is divided into 50 cells for the rows and columns. With this layout density, the position of each image element can be set precisely.

/* Shorthand grid-area: grid-row-start / grid-column-start / grid-row-end / grid-column-end */

.pos-1 {
grid-area: 10 / 1 / 26 / 7;
}

.pos-2 {
grid-area: 1 / 18 / 9 / 27;
}

.pos-3 {
grid-area: 1 / 36 / 14 / 42;
}

Note that I use the double division structure for the possibility of moving the inner element with the background image to create the motion effect seen in demo 3. For that case, I define some extra styles:

/* If we want to move the inner image */

.grid–img .grid__item {
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
will-change: transform;
}

.grid–img .grid__item-img {
flex: none;
width: calc(100% + 100px);
height: calc(100% + 100px);
will-change: transform;
}

The JavaScript

Now, let’s have a look at the JavaScript part. I’m using GSAP by GreenSock. We start by creating a Grid class to represent the grid of pictures:

export default class Grid {
constructor(el) {
this.DOM = {el: el};
this.gridItems = [];
this.items = […this.DOM.el.querySelectorAll(‘.grid__item’)];
this.items.forEach(item => this.gridItems.push(new GridItem(item)));

this.showItems();
}

}

const grid = new Grid(document.querySelector(‘.grid’));

There should be an initial animation where the grid items scale up and fade in. We can add a method to the class for that. We also want the items to start at different times and for that we use the GSAP stagger option. The items will start animating from the center of the grid:

showItems() {
gsap.timeline()
.set(this.items, {scale: 0.7, opacity: 0}, 0)
.to(this.items, {
duration: 2,
ease: ‘Expo.easeOut’,
scale: 1,
stagger: {amount: 0.6, grid: ‘auto’, from: ‘center’}
}, 0)
.to(this.items, {
duration: 3,
ease: ‘Power1.easeOut’,
opacity: 0.4,
stagger: {amount: 0.6, grid: ‘auto’, from: ‘center’}
}, 0);
}

Now, let’s make the items move as we move the mouse around. Each grid item will be represented by a GridItem class:

class GridItem {
constructor(el) {
this.DOM = {el: el};
this.move();
}

}

The position of each item in both axes should be mapped with the mouse position. So, the mouse can move from position 0 to the width or height of the window. As for the item, it’ll move in a range of [start, end] that we need to specify. We’ll be assigning random values for the start/end value so that each item moves differently from each other.

Let’s add the move method to the GridItem class:

move() {
// amount to move in each axis
let translationVals = {tx: 0, ty: 0};
// get random start and end movement boundaries
const xstart = getRandomNumber(15,60);
const ystart = getRandomNumber(15,60);

// infinite loop
const render = () => {
// Calculate the amount to move.
// Using linear interpolation to smooth things out.
// Translation values will be in the range of [-start, start] for a cursor movement from 0 to the window’s width/height
translationVals.tx = lerp(translationVals.tx, map(mousepos.x, 0, winsize.width, -xstart, xstart), 0.07);
translationVals.ty = lerp(translationVals.ty, map(mousepos.y, 0, winsize.height, -ystart, ystart), 0.07);

gsap.set(this.DOM.el, {x: translationVals.tx, y: translationVals.ty});
requestAnimationFrame(render);
}
requestAnimationFrame(render);
}

And that’s it!

I hope you find this helpful and please let me know your feedback via @codrops. Thank you for reading!

The post How to Create a Motion Hover Effect for a Background Image Grid appeared first on Codrops.

Web Design Trends for Gaming Sites: Then and Now

Original Source: http://feedproxy.google.com/~r/Designrfix/~3/8_6mSeGYJfs/web-design-trends-for-gaming-sites-then-and-now

With each new leap in the development of technology, it is becoming increasingly difficult to imagine that only about three decades ago, the Internet did not exist in principle. The appearance of the first online casino site dates back to 1995, when Microgaming launched its first online project. There was nothing on this website other than text, […]

The post Web Design Trends for Gaming Sites: Then and Now appeared first on designrfix.com.

Inspirational Websites Roundup #15

Original Source: http://feedproxy.google.com/~r/tympanus/~3/NodCHe9J0cE/

With our roundups we want to share the most interesting design trends around the web with you. Every collection is our personal selection of what we consider to be the most inspirational and trend-setting designs.

This collection is no different: we think these are the finest and most intriguing web experiences that were released in the past weeks. They are not the only ones though, of that I’m sure! So if you stumble upon some great designs, please share them with us @codrops.

We hope you enjoy this special set of really nice designs!

Madies

Rino & Pelle

Stone & Style

LM Chabot

Dash Dash

Henrik & Sofia

Muteza

Voeux Adveris 2020

Powerhouse Company

CUSP

Mixlegno

Kontrapunkt Type

Waka Waka

Houses Of

Corentin Bernadou

LEGO Ventures

Polygon

Edoardo Smerilli

Kati Forner

DEGENESIS

Kelly Milligan

Henge

Cassiom

thePenTool

Rogier de Boev?

Tiffanie Mazellier

100 DAYS OF POETRY

Olivier Gillaizeau

Guillaume Gouessan

GOODFISH

Ruud Luijten

Alan Menken

Rodolfo Sarno

Stephanie Jeong

The post Inspirational Websites Roundup #15 appeared first on Codrops.

20 Unmissable Websites, June 2020

Original Source: https://www.webdesignerdepot.com/2020/06/20-unmissable-websites-june-2020/

Every month we publish a roundup of the 20 most unmissable websites newly launched, or updated in the previous four weeks.

In June’s edition you’ll find everything from corporate sites for global power-houses, to personal sites for innovative designers. This month we’re seeing a lot of flamboyance, a lot of passion, and the color of the moment is (hooray!) yellow. Enjoy!

Black Lives Matter

In recent weeks there have been protests in the US and beyond in response to alleged police brutality directed at people of color. The Black Lives Matter website is a central hub for news, resources, and information on civil rights campaigns in 38 countries.

Quip

Quip is a site focused on helping us build, and maintain healthy oral care habits. Centred around its innovative products, this site mixes images, illustration, and motion effortlessly to create a healthcare brand that’s highly appealing.

Matthew P Munger

This portfolio site for Matthew P Munger is a delightful jaunt through a Mac OS of yesteryear. What we really enjoyed is that despite being presented in this early-90s style, the UI manages to adapt itself responsively.

Moooi

There’s a maximal feel to Moooi’s site, layers of illustration enlarge so you feel like Alice falling down the rabbit hole. But the real excellence of this site is the tiny UI details, like the draggable bar that reveals the product videos.

Jazz Keys

Jazz Keys is an experiment in adding extra emotional meaning to the often impersonal messages we send digitally. Type your message and hear it play in sound. You can send your message to anyone, and let them hear your words.

AIAIAI

There’s a brutally cool black and white aesthetic to AIAIAI’s site. The dark, low-contrast product photography’s absence of color punctuated by some shocking neon, and the occasional golden shine of a plug.

Stromwerk

Cycling is taking over the world, and one of the biggest new trends is for e-bikes. Stromwerk’s site does an excellent job of taking something that seems a bit like cheating, and transforming it into something rugged and cool.

Satu Pelkonen

Satu Pelkonen is a NY-based creative director who joined Squarespace in 2019. His site features a really cool custom cursor that inverts the thumbnail it’s hovering over, creating a delightful, simple interaction.

Babord

Babord is a Norwegian seafood supplier. The relationship Norwegian’s have with the sea is evident, and the site transforms simple fishing into an almost mystical experience. Plus that brand font is fantastically daring.

Yuko Higuchi x Gucci

Guggi has a history of expansive and ambitious marketing campaigns. This latest micro-site from Italy allows you to play a fun, tile-slide game based around the fashion label’s new kids collection.

Delassus

Delassus is a Moroccan company that grows ingredients from citrus fruits to avocados. Its whole site is a cornucopia of 3D design, with models of its products, and humorous typography. Bold, and fun, and practical too.

320 and 360 Wythe

Who would think that bricks and timber could look so glamorous? That’s what this site for two new buildings in Brooklyn achieves. The colors, the mockups, and the old-timey photography give these new builds a much needed heritage.

Readymag Design Workout

To keep you creative during the pandemic, Readymag has created this daily training program to hone your design skills and help you with decision making. It’s a drag and drop playground, with real world tasks to challenge you.

Radical Design Course

If you think that web design’s just too samey, then you’ll appreciate the launch page for the upcoming Radical Design course. It features tons of yellow, engaging typography, and some super-cute illustrations.

Bastarda

Bastarda is a type and branding design studio from Bogotá, Colombia. It has managed to create a sense of both simple, structured minimalism, and energy and excitement with hovers on its main links that trigger awesome reels.

Jens Nielsen

This awesome portfolio for Jens Nielsen features some great artwork, a super-brave choice of font, and some really cool mouse overs that flash up thumbnails of work that’s all linked up on Dribbble.

POC

More cycling this month curtesy of POC, makers of cycling helmets and apparel. This site does an awesome job of balancing lifestyle imagery, and a clean, practical e-commerce site that is easy to explore.

Stefanie Nelson Dancegroup

Some of the most striking design of the last century can be found on the radical covers of jazz albums. The Stefanie Nelson Dancegroup site follows a similar path with abstract shapes on the site mimicking body movements.

Barrel 2019

Barrel is a design studio that specialises in wellness brands, from workout products to the vitamins you take. This recap of their work from last year is fun, colorful, and a great opportunity for them to break away from their usual style.

Feijoo

I have a soft-spot for all-text sites, and this simple list one-pager by Feijoo is right up their with my favorites. Perhaps is reminds me of my Sublime Text theme. Either way, I love the details like the numerals being replaced by words.

Source

p img {display:inline-block; margin-right:10px;}
.alignleft {float:left;}
p.showcase {clear:both;}
body#browserfriendly p, body#podcast p, div#emailbody p{margin:0;}

Tips on How to Design an Outstanding Website

Original Source: http://feedproxy.google.com/~r/Designrfix/~3/EbOgn7f_dtA/tips-on-how-to-design-an-outstanding-website

Today we will talk about how online casino site should look like for Australian players. We will take as an example Casinonic.com website. Creating your own site for online gambling Australia is actually the second option for earning in this niche. First option is to make gambling related site with reviews of online casinos and the second […]

The post Tips on How to Design an Outstanding Website appeared first on designrfix.com.

Collective #606

Original Source: http://feedproxy.google.com/~r/tympanus/~3/8YD1dJTqSKA/

Collective Item Image

Inspirational Website of the Week: Ivan Toma

A fitting design that shouts elegance and sophistication. Our pick this week.

Get inspired

Our Sponsor
Start your own freelance business by becoming a Divi developer

Learn how to develop websites with the most popular WordPress theme in the world and secure your success as a freelancer.

Start learning now

Collective Item Image

WebGL guide

Maxime Euzi�re’s complete, summarized WebGL tutorial, with tiny interactive demos in each chapter.

Check it out

Animated Sparkles in React

Learn how to animate sparkle text in React in this tutorial by Josh W Comeau.

Read it

Collective Item Image

Beginner’s Guide to Eleventy [Part II]

In this second article of a four part series, Tatiana Mac shows you how to install Eleventy step-by-step.

Read it

Collective Item Image

Best Practices in JavaScript Array Iteration

Violet Pe�a invites you to take a look at four essential Array methods and how to use them.

Read it

Collective Item Image

Minimalist HTML

An HTML document by Ryan Jacobs that shows a minimal example of HTML5.

Check it out

Collective Item Image

Thinking About The In-between Design Cases

Ahmad Shadeed writes about those often neglected in-between design cases of a responsive website.

Read it

Collective Item Image

Neon Mode: Building a new Dark UI

Max B�ck explains how the dark mode with extra features was implemented on Codista.

Read it

Collective Item Image

An introduction to accessible data visualizations with D3.js

Sarah L. Fossheim’s series on data visualizations and accessibility.

Read it

Collective Item Image

Runme.io

Run your application from any public GitHub repo with one click.

Check it out

Collective Item Image

The Third Age of JavaScript

Some interesting thoughts on the future of JavaScript by Shawn Wang.

Read it

Collective Item Image

How to Use Object Destructuring in JavaScript

Dmitri Pavlutin explains how to use object destructuring in JavaScript really well in this article.

Read it

Collective Item Image

The Kawaiization of product design

Tobias van Schneider’s thoughts on the “cutification” of product design.

Read it

Collective Item Image

new.css

A classless CSS framework to write modern websites using only HTML.

Check it out

Collective Item Image

DOM diffing with vanilla JS

Previously, Chris Ferdinandi explains how to build reactive, state-based components with vanilla JS and in this article he shows how to add DOM diffing to a component.

Read it

Collective Item Image

Ghost at the Disco

Anna the Scavenger’s beautiful animated scene.

Check it out

Collective Item Image

The Fastest Google Fonts

Harry Roberts’ exploration of how to design some fairly resilient measures for faster Google Fonts loading.

Read it

Collective Item Image

In defense of the modern web

Rich Harris thoughts on the article “Second-guessing the modern web” by Tom MacWright.

Read it

Collective Item Image

Release 4.0.0 of reveal.js

This update of the great HTML presentation framework brings some important changes.

Check it out

Collective Item Image

This Word Does Not Exist

This Word Does Not Exist uses an artificial intelligence model named GPT-2 to invent new English words with a definition.

Check it out

Collective Item Image

SEO Cheat Sheet

A sorted list that provides technical On-Page SEO best practices.

Check it out

Collective Item Image

Painter

A subtly animated illustration by Ricardo Oliva Alonso.

Check it out

Collective Item Image

From Our Blog
UI Interactions & Animations Roundup #6

A hand-picked collection of superb UI inspiration from the past weeks.

Check it out

Collective Item Image

From Our Blog
Inspirational Websites Roundup #15

A new roundup that consists of a special collection of the latest web design trends and inspiration.

Check it out

The post Collective #606 appeared first on Codrops.

30 Life-saving Tools for Front-end Developers

Original Source: https://www.sitepoint.com/life-saving-tools-for-front-end-developers/?utm_source=rss

30 Life-saving Tools for Front-end Developers

As the functionalities of web apps keep getting ever more sophisticated and complex, web developers need flexible tools to keep up with rising user expectations. The good news is, the web development ecosystem gives us plenty of choice, with both well-established companies and the open-source community racing to build more powerful libraries, frameworks and apps to help developers do their job and increase productivity and efficiency.

In this post, I’ve rounded up 30 top tools for front-end web developers ranging from code editors and code playgrounds to CSS generators, JS libraries, and more.

Let’s dive right in!

Code Editors

Front-end developers spend hours writing or editing code. Therefore, it’s only natural that their closest friend on the job is the code editor. In fact, getting to know their code editor of choice and all its capabilities and shortcuts gives any dev a great advantage in terms of productivity.

1. Visual Studio Code

Visual Studio Code (VS Code) by Microsoft is a full-blown, free and open-source cross-platform integrated development environment (IDE) — that is, a complex piece of software that allows developers to create, test and deploy an entire project.

Here are some of VS Code’s most popular features:

IntelliSense, offering syntax highlighting and smart completions based on variable types, function definitions and imported modules
debugging capabilities
built-in Git commands
flexibility and extensibility: you can easily add extensions relative to new languages, themes, etc.
easy deployment capabilities

You can download VS Code for Windows, MacOS, and Linux.

2. Atom

Atom is a free, open-source and powerful cross-platform code editor that allows you to:

collaborate with other developers using Teletype for Atom
work with Git and GitHub with GitHub for Atom
edit code on different platforms
speed up coding with smart auto-completion
search for, install and even create your own packages
browse project files
split the interface into multiple panes
find and replace in a file or in multiple projects
add new themes and customize the editor’s appearance and behavior by tweaking its code.

3. Sublime Text

Sublime Text introduces itself as “a sophisticated text editor for code, markup and prose”.

It’s a paid, cross-platform code editing app with tons of features. These include:

Goto Anything functionality: shortcuts that allow developers to search for bits of code in files and open files in projects
multiple selections
powerful API and package ecosystem to extend the built-in functionality
split editing
easy customization
fast project switching
high performance
and more

Package Managers

Package managers are collections of tools for consistently automating processes like installing, upgrading, configuring and removing programs. Typing npm install or yarn install in a command-line interface has become one of the most ordinary parts of a developer’s day-to-day job.

4. NPM

What is npm? Well, as it says on the company’s website, it’s many things. In particular:

it’s the package manager for Node.js that helps JS devs to share packaged modules of code
the npm registry is a public collection of packages of open-source code for Node.js, front-end web apps, and more
npm is also the command-line client developers use to install and publish those packages
npm, Inc. is the company responsible for hosting and maintaining all of the above

5. Yarn

Yarn is a package manager for installing and sharing code and also a project manager. It’s extensible via plugins, stable, very well documented, free and open source.

Bundlers

Module bundlers are used to bundle several modules into one or more optimized bundles for the browser.

6. Webpack

Here’s all the goodness you’ll find in webpack, as it’s detailed in the software’s website:

At its core, webpack is a static module bundler for modern JavaScript applications. When webpack processes your application, it internally builds a dependency graph which maps every module your project needs and generates one or more bundles. … Since version 4.0.0, webpack does not require a configuration file to bundle your project. Nevertheless, it is incredibly configurable to better fit your needs.

7. Parcel

Parcel is a “blazing fast, zero configuration web application bundler”.

Parcel

is fast
bundles all the project’s assets
has zero-config code splitting
and more.

CSS Generators

Have you ever tried to memorize how to declare CSS properties for gradients, text shadows, Flexbox or Grid, to mention just a few? Not easy. Unless you use some CSS features and their properties over and over again, it’s hard to remember them all. But even those who master CSS sometimes need a refresher on some properties, especially if they haven’t used them in a while.

If you need some quick help with the latest and greatest CSS, here are CSS generators to the rescue. Enter the values, preview the result, grab the generated code and run.

8. CSS3 Generator

The CSS3 Generator is a free online app that lets you quickly write code for a number of modern CSS features like Flexbox, gradients, transitions and transforms, and many more.

Enter the required CSS values, preview the result in real time, copy and paste the generated code. Also, this app shows a list of browsers and their versions where your CSS code is supported.

9. The Ultimate CSS Generator

The Ultimate CSS Generator is a free online app that lets you generate code for CSS animation, backgrounds, gradients, borders, filters, and more.

The interface is user-friendly, the information about browser support for the CSS feature you’re interested in is clear and easy to spot, and the generated code is clean and accurate.

10. The CSS Grid Layout Generator by Dmitrii Bykov

CSS Grid is awesome, and creating your grid in code gives you full control over the final result. However, it’s helpful to have a visual representation of the grid while you’re coding. Although some major browsers have implemented great tools to let you visualize your grid, some devs could do with some additional help. Here’s where a CSS Grid generator might come in handy.

The CSS Grid Layout Generator by Dmitrii Bykov is free, accessible online, and extremely flexible. I took it for a spin and found that it gives me a lot of control both at the level of the grid container and that of the grid item while providing me with nice preview capabilities and clean code.

If you need help, click on the How to Use button and watch the presentation video offered by the app’s author.

To know more about which CSS Grid generators are available, I put some of the best ones through their paces on SitePoint in my article “5 Super CSS Grid Generators for Your Layouts”.

Libraries and Frameworks

The demands on today’s web apps place great importance on speed in loading and updating page content. As powerful as modern JavaScript is, when packaged into a library or a framework, it becomes a fantastic tool for writing elegant and maintainable code and cutting back on repetitive and time-consuming typing efforts.

Continue reading
30 Life-saving Tools for Front-end Developers
on SitePoint.

5 Ways to Build Codeless Websites Using WordPress’ Gutenberg

Original Source: https://www.webdesignerdepot.com/2020/06/5-ways-to-build-codeless-websites-using-wordpress-gutenberg/

Web designers could be forgiven if their eyes glazed over at the mere mention of building a custom website. Creating an advanced website used to require programming knowledge and hours of coding.

But thanks to Gutenberg, even those who don’t know their HTML from their CSS will be able to create professional websites that stand out from the competition.

The initial feedback to the release of Gutenberg certainly was damning: “…Useless…A joke…Terrible…”

You can argue about how WordPress handled the launch of its new content block editor (and you might be right in thinking it wasn’t great) but the dirty secret is that, after a number of updates, Gutenberg has evolved into an excellent tool for building websites.

Below I will show you 5 ways a web designer with limited coding experience can take advantage of Gutenberg to build the types of custom websites that businesses are looking for.

I created a travel website with a number of custom features using these three tools:

Gutenberg
Toolset – Its new Toolset Blocks allows you to add custom features to your websites including custom post types, a search and dynamic content.
GeneratePress – A lightweight and fast theme that is easy for beginners to use.

Now I’ll let you in on a secret. I’m not a developer. In fact, I have limited coding experience. Yet I was able to use Gutenberg to build a professional website with a number of features that custom websites would require. Below I’ll go through five of them.

1. You Can Create Dynamic Content

An advantage it has over page builders is that Gutenberg comes with a number of block extensions to enhance your websites. One of those is Toolset which offers dynamic content capabilities.

Dynamic content means you can create an element (such as an image) that will draw the correct content from the database. So when you create a list of posts you only need to add each block for each element once, but that block will display different content for each post.

For example, I’ve created a list of tours posts – later I’ll go into how you can do this with Gutenberg. Do you notice something strange about the headings below?

The heading is exactly the same for each of my tours. That’s because the headings are static, the opposite of dynamic. It means when I add my blocks, whatever text I enter in the heading will be displayed for each of the posts. However, when it is dynamic, you will see the correct heading on every tour.

To illustrate, here is my tour post about visiting the West Bank on the back-end. You can see the post title at the top.

I want to display this tour post with the correct heading in my list of content. All I need to do thanks to Gutenberg and Toolset is the following:

Select Toolset’s heading block — unlike the normal Gutenberg blocks, Toolset’s allows you to make your content dynamic;
Select the dynamic option;
Choose the source for your heading;
Confirm that the heading is correct.

You can create dynamic content for a number of other blocks available on Gutenberg including images, custom fields and the link for buttons.

2. Display Custom Lists of Content

On a custom website, there will be times when you will want to list your content from a particular post type on different parts of your website. For example, a list of properties for sale on your real estate homepage.

Each of these properties uses the same layout, displaying the same information such as the price, number of bedrooms and number of bathrooms in the same way. This information is added using custom fields which are pieces of information you can add to WordPress content. Page builders on their own can’t build custom fields. However, you can create them using Gutenberg and its blocks plugins.

Below for my travel website, I displayed a slider with a list of featured tours. The list includes a number of custom fields including the price, rating and duration.

I used Gutenberg and Toolset to create the custom fields which you can see in my list above. Here are all of the custom fields I created. I’ve highlighted the price field as an example.

On the back-end I can use Toolset’s View block to create a list of posts. I can choose what posts I want to display and how I want to display them.

For example, below you can see that I am able to select which content I want to display.

I can also decide how I want to display my list, whether it is in the form of a grid, ordered list, unformatted or much more.

I can now select which fields I want to display. Many of these fields will be the custom fields that I created previously. Each of my tours will display the fields in the same layout. Once again, I’ve highlighted the price custom field below. For each field I create a block and then choose the source of the content (such as the price) on the right hand sidebar.

Once I have arranged the layout for my posts I can decide exactly which posts I display and in what order. Using Gutenberg and Toolset I can select:

The order I display posts such as the most recent blog post;
The number of posts I display;
If I want a filter on my posts, for example display only the tours that cost less than a certain amount.

I added a filter to display only the featured tours. As part of my custom fields I created a field for “Featured tours” which you can click for each post on the back-end.

I can use Gutenberg and Toolset to create a filter using the right-hand sidebar which tells my list of content to only display those tours posts which are featured.

Notice how I am able to completely customize my lists of posts on Gutenberg without using any coding at all. Even designers without any programming experience will be able to add a list of posts to their website.

3. Create a Template For Your Content

A template is your blueprint for your post types that provides each of your posts with a structure. For example, I’ve created a template for my tours post types which means each tour post will have exactly the same structure when you look at it on the front-end.

As you can see, both posts are from the same template. You know this because each post has the same layout, with the content following the same structure.

All I needed to do to create my template on my Gutenberg Editor was insert my blocks and add dynamic content. As I’m adding the content I can use the drop-down at the top of the page to switch between the posts to see what the template looks like with different post content.

4. Create a Custom Search

One of the most important features on a custom website is a search.

If you are designing a directory website which sells items, for example, you will want to make it as easy as possible for potential customers to find your products. The best way is with a search that contains filters so they can narrow the results down and find exactly what they’re looking for.

Below you can see the custom search I created using Gutenberg and Toolset for my tours. It contains a number of filters. One of the filters is to only show those tours with a rating of 3-5 stars.

Creating a custom search consists of two steps. First, creating the search (which you can see above) and second, designing the results.

I created the search using Toolset’s View block on a new page. Below are the options to enhance the block. I can select the search option, add front-end sorting so that the user can sort the results when they appear (lowest to highest price, for example) and pagination to split the content into pages.

Once I add the block I can proceed to add additional filters such as the maximum price. I can also include a map and markers to display the results. Once again thanks to Gutenberg and its extensions I do not need to use coding. I just select the blocks and adjust the options on the right-hand sidebar.

For the results, I added blocks just like I did for the template and custom list of content.

And just like that, I have a custom search for my tours. I can now enter searches using the filters on the front-end.

5. Create an Archive of Similar Posts

An archive makes it easier for users to find all the posts you have published. If you want an archive with standard fields such as a heading and post content then a page builder such as Elementor is a great option. However, if you want to include custom fields with dynamic content then you will need to use Gutenberg,

I built an archive for all of my tours on my travel website. When someone clicks on the archive they will see every tour I have created. You can create a tour for any of your posts.

Just like with the custom list of content I can add the blocks for the content and arrange the posts how I want.

I can also style the blocks by changing the text color, adding a padding/margin, add the background color, and much more.

You Do Not Need to be a Professional Developer to Create Professional Websites

Now that you have seen how even a coding beginner can build complete custom websites it is time for you to try it out yourself. Here are some tutorials and documentation worth going through:

If you are new to Gutenberg, Colorlib offers a good WordPress Gutenberg tutorial which will introduce you to how you can create blocks.
The plugin I used with Gutenberg, Toolset, offers a training course on how you can use the two tools to build WordPress directory websites. It is a great way to understand exactly what features you can build and how for any type of website.
To keep up to date with any changes to Gutenberg it is also worth keeping an eye on the block editor handbook.

Gutenberg is still in its infancy and is far from the finished product. But that does not mean it can’t revolutionize the website building contracts you can take on. If you take advantage of its visual UI and blocks plugins you will be able to build custom websites that you never before thought were possible.

Source

p img {display:inline-block; margin-right:10px;}
.alignleft {float:left;}
p.showcase {clear:both;}
body#browserfriendly p, body#podcast p, div#emailbody p{margin:0;}