Monday, November 13, 2017

Web Design Weekly #299

Headlines

Fake designs yield real results

If you are new to the industry or a keen to take your skills to the next level this post by Daniel Burka highlights some great advice to help you on your way. (gv.com)

The Web began dying in 2014, here’s how

André Staltz shares some deep thoughts about how the underlying dynamics of the power on the web has drastically changed due to Google, Facebook and Amazon. (staltz.com)

Articles

Flexbox and Grids, your layout’s best friends

Eva Ferreira takes a look at some current layout myths in order to understand the true power of Flexbox and CSS Grids working together, rather than against each other. (aerolab.co)

Using a React 16 Portal to do something cool

David Gilbertson explains one of the more interesting additions in React 16, Portals. Portals let you render a bit of React-controlled DOM outside of the parent component. (hackernoon.com)

The GraphQL stack – How everything fits together

This post buy Sashko Stubailo dives into caching, tracing, schema stitching and GraphQL’s future. (dev-blog.apollodata.com)

Simple React Patterns (lucasmreis.github.io)

Tools / Resources

Different remote and local resource URLs, with Service Workers

In this post, Lea Verou describes all the solutions and workarounds she has used over the years for serving different remote URLs as well as the current solution that uses Service Workers. (lea.verou.me)

Create data-intensive, feature-rich web and mobile apps with Sencha Ext JS

Learn how to design, develop and test data-intensive web and mobile apps that run on desktops, tablets, and smartphones with Sencha Ext JS. (sencha.com)

Syntax Highlighter

Automatically highlight the syntax of any code snippet, right within Sketch. (danielguillan.github.io)

React PWA

A highly scalable, Progressive Web Application foundation with the best Developer Experience. (reactpwa.com)

Probot – GitHub Apps to automate and improve your workflow. (probot.github.io)

Where can I find high-end stock images for a website? (news.ycombinator.com)

Advanced CSS-Only Form Styling (jonathan-harrell.com)

What’s New In DevTools (Chrome 63) (developers.google.com)

The VS Code Roadmap 2018 (github.com)

V8 JavaScript Engine (v8project.blogspot.com)

Inspiration

Portfolio with GraphiQL (iamsaravieira.com)

Accidental Digital Detox (thesweetsetup.com)

Jobs

Frontend Engineer at Auth0

If you feel you want to be part of the challenge of helping developers secure their applications, we are looking for frontend engineers to join our team to work on our Management Dashboard, where users integrate, secure and configure their applications. (auth0.com)

Product Designer at Trello

We’re looking for a savvy product designer to join the Product Team at Trello. Your work will have an impact on how millions of people all over the world collaborate and organize their lives. (trello.com)

Need to find passionate developers or designers? Why not advertise in the next newsletter

Last but not least…

The Front-End Checklist (codeburst.io)

The post Web Design Weekly #299 appeared first on Web Design Weekly.


by Jake Bresnehan via Web Design Weekly

Best Motion Graphics Trends in Design [Video]

Here are the hottest motion graphics trends from this year you should keep an eye out for. No matter what the current trends are, it’s important to remember that motion graphics are just another way to convey the desired message to our target audience. Therefore, keeping the message and target...

[ This is a content summary only. Visit our website http://ift.tt/1b4YgHQ for full links, other content, and more! ]

by Irfan Ahmad via Digital Information World

10 Fascinating Facts You Didn't Know About Apple

Apple may be best known as the inventor of the iPhone and iPad, but there is more to this tech giant than meets the eye. In fact, you may be surprised by some of the inner workings of Apple, one of the most successful and yet polarizing brands in the world. When Apple was founded on April 1,...

[ This is a content summary only. Visit our website http://ift.tt/1b4YgHQ for full links, other content, and more! ]

by Irfan Ahmad via Digital Information World

City Lights

Lovely One Pager from the Yummygum team showcasing beautiful dark themes they designed for Atom & Visual Studio Code. Awesome added touches with the coding language preview switcher, the number line page edge and the random color icon bursts in the Icon Package section.

Full Review | Direct Link


by Rob Hope @robhope via One Page Love

Responsive Accessible Table

A nice tutorial about building a responsive table that is also keyboard accessible by using css and javascript.


by via jQuery-Plugins.net RSS Feed

How to Pitch a New Idea to Your Boss - #infographic

One of the most rewarding parts of work is having your ideas accepted and seeing them in action. Getting your suggestions accepted can be a real challenge if you’re not in charge, however. What can you do to convince your boss your ideas are worth trying? Maybe your boss doesn’t like the...

[ This is a content summary only. Visit our website http://ift.tt/1b4YgHQ for full links, other content, and more! ]

by Web Desk via Digital Information World

Get Started With Vue Router

Introduction

Routing becomes an important feature to put in place when you have many components. Thanks to the awesome Vue.js team, this is easy using vue-router.

In this tutorial, you will see how to use vue-router while building a simple Vue.js application.

Set Up the Application

You will make use of Vue-CLI to set up your application for this tutorial. If you do not have it installed already on your machine, you can do so by running:

With that done, you can set up your application using the command below.

You are going to be asked some questions. One of these questions is: Install vue-router? For that, enter y.

Navigate to your project folder from your terminal:

Run the command to install all dependencies:

Start your development server by running:

If you want to install vue-router manually, you can use the command below.

Integrate Vue-Router

When using Vue-CLI, the router gets activated by default. You can see that in your src/router/index.js file.

  1. Vue is imported from vue.
  2. Router is imported from the vue-router package.
  3. HelloWorld is imported from the components folder. We'll talk more about this later.
  4. Router is mounted as middleware to your project.
  5. A default route configuration is created. The route is an array of a JavaScript object. It consists of a path, name, and component. The path gets appended to the URL of your web application. The route created above is meant for the home page. You can change the path to /hello, and it will no longer work for the home page. It will only be triggered when you visit the /hello path of your application. The component tells the route the component you want to load when that path is visited. This is the reason you imported the HelloWorld component. This route is exported as Router.

The exported Router has to be imported in your src/main.js file. This is important for the routes to work. This is taken care of when working with Vue-CLI. Your src/main.js should look like this:

  1. The router is imported from your router folder.
  2. The imported router is used when creating a new Vue instance.

Standard Routes

The route you saw above is an example of a standard route. A standard route is one having a path, component, and name. Let's create our own route. Try this part out yourself using the flow below.

  1. Create a new component called Pack. You need to have some dummy text.
  2. Go to your src/router/index.js, import the new component you created, and add a new path.
  3. Open your browser and point to the new path.

I bet you were able to do that on your own. Let's try it out together.

Here is what my Pack component looks like.

Open your router file, and it should be looking like this.

Now point your browser to http://localhost:8080/#/pack and you should see your new page.

Routes With Parameters

The routes you have made so far are static routes. Let's see how to make dynamic routes. Open your routes file and add another route like this.

Here you have your path set to /user/:id; the :id defines a parameter that allows you to pass values to the routes via the URL. From the above, it is possible to have http://localhost:8080/user/23.

The value passed to the route component, in this case, is 23, and this can be accessed in the User component.

To try this out, create a new component called User. In this component, you want to be able to access the route parameter passed through the URL. This parameter will be saved in a variable called id, and the value outputted in the template. Here is what the component should look like.

Now point your browser to http://localhost:8080/#/user/123 and you will see the parameter displayed. Change from 123 to something else, and the new value will be displayed.

Child Routes

In Vue.js, it is possible to nest routes by defining children routes. This is possible using the children property provided by Vue.js. The children routes are passed as an array of objects. In your test app, you will create a child route for profiles. The child route will be given a path and a component.

First, create a new component called Profile.vue. Here is what it should look like.

Open your router file. The first thing you want to do will be to import the Profile component. After doing that, add the children property to the route for the User component so your route file looks like this.

Now you will be able to access this new component when you point your browser to http://localhost:8080/#/user/13/profile.

Link to Routes

At this moment, the only way to navigate in your application is by entering the URL path in the browser. This is not how you will want to build a real-world application. To link to routes in Vue.js, you'll have to make use of the <router-link> element.

Here is how it is used:

For children routes, here is what it should look like.

The to attribute contains the path to the route.

To set that up in your application, open your App.vue file and make it look like this.

Conclusion

Navigating from one view to another is now very easy. You can go ahead and add more views. Try adding a child route to the profile route, so the path becomes http://localhost:8080/#/user/13/profile/child-path.

In this tutorial, you learned how to set up routing in Vue.js. Going forward, you should have no issues with routing in a Vue.js application. While working on this application, you also learned about the route and params object.

I hope you enjoyed yourself.


by Chinedu Izuchukwu via Envato Tuts+ Code