Free, faster.

Post pobrano z: Free, faster.

Ethan Marcotte, on time- and budget-constrained organizations websites:

Between the urgency of their work and the size of their resources, spending months on a full redesign isn’t something they can afford to do. Given that, a free theme for, say, WordPress can yield a considerable amount of value, especially to budget-constrained organizations. They can launch their redesign more quickly, and continue reaching the people who need their information most.

So Ethan takes a look at a bunch of free themes, so at least a responsible choice can be made there, and finds

the results were surprising: on a 3G connection, the slower themes I tested took anywhere from 45-90 seconds for any content to appear. In other words, the pages took roughly a minute before they were usable.

Pretty rough.

What I find particularly scary is that these are just empty themes. I usually attribute the slowness of sites in this category (off the shelf, slap-a-CMS on it) to be what happens on top of the theme. Stuff like uploading too many/too large of images and installing a million plugins that load their own set of resources.

I think it shows off some recent technology in a new light: saving us from ourselves. HTTP/2 makes concatenating resources less important, and that’s saving us from ourselves and those million plugins individual CSS and JavaScript files. WordPress does responsive images by default now, that’s saving us from ourselves and ensuring we aren’t loading more image than we need. AMP, as a technology, is saying y’all have lost the plot here and we need to save you from yourselves.

Direct Link to ArticlePermalink


Free, faster. is a post from CSS-Tricks

Skittles Romance the Rainbow

Post pobrano z: Skittles Romance the Rainbow

Mars has released Skittles Romance, a commercial designed for viewing during the 2017 Super Bowl game. The Skittles Romance commercial features a lovesick young man using Skittles to get a girl’s attention through her bedroom window. Katie is in her room making the most of his persistence, along with her parents, and some unexpected guests.

Skittles Romance the Rainbow - Katie

Skittles Romance Credits

The Skittles Romance campaign was developed at adam&eveDDB by chief creative officer Richard Brim, creative director Dan Fisher, creative Till Diestel, head of integrated production Matt Craigie Atherton, agency producer Cat Reynolds, head of planning Jessica Lovell, senior planner David Mortimer, managing partner Fiona McArthur, business director Robbie Black, account director Brittany Lippett, account director Matt Dankis, account managers Holly Fletcher and Josh Edwards.

Media was handled at Mediacom/Starcom.

Filmming was shot by director Harold Einstein via Outsider with director of photography Glynn Speeckaert, executive producer Richard Packer and producer Eric Liney.

Editor was Mark Edinoff at Work Editorial with assistant editor Jamie Hodgson.

Post production was done at The Mill by executive producer Alex Fitzgerald, producers Kirsty Ratcliffe, Tim Lyall, Anastasia von Rahl, shoot supervisor Tim Davies, 2D lead artists Gareth Brannan, Gary Driver, 2D artists Joseph Tang, Jeanette Eiternes, Brad Wood, Online Artists: David Wishart, George Rockliffe, motion graphics team Rajinder Davsi and Kwok Fung Lam, colourist Seamus O’Kane, producers Alex Fitzgerald and Kirsty Ratcliffe.

Audio post production was done at Factory Studios by audio engineer Jack Hallett.

International Artist Feature: Chile

Post pobrano z: International Artist Feature: Chile

For this article in the international artist series, we turn to Chile,
featuring six artists who create fantastic work, from illustrations to graphic design and more! I asked each artist how their country and
culture inspired their work, and they delivered fantastic answers.
Enjoy!

Sergio Edwards

Sergio is an art director and freelance illustrator based in Santiago, Chile. His work features incredibly detailed illustrations with amazing character designs. Check
out a small selection of his work below, or see more in his portfolio.

Cafe Caribe

I think what I love
the most about living in Chile is that this an inspiring country. For instance, it’s a country with diverse climates: from the driest desert
in the world, Atacama desert, to the beautiful green forests of the
southern region. That’s enough reason for me
to love this place and to feel inspired.

Cafe Caribe Art by Sergio Edwards
Cafe Caribe

There’s Always A Bigger Fish

When I think about
my influences, I think about foreign influences like Disney animated movies, Asterix comics, and
Marvel-DC comics. Some of my influences are also Chilean classics, like „Condorito,” a humorous comic with funny and
expressive drawings.

Theres Always A Bigger Fish Art by Sergio Edwards
There’s Always A Bigger Fish

There’s Always a Bigger Fish 2.0

Theres Always a Bigger Fish 2 by Sergio Edwards
There’s Always a Bigger Fish 2.0

Thief!

I feel pretty amateur in terms of knowing the art industry in
Chile. But the
art community in general has many artists who are very positive people.
All the artists I know are very open to share their knowledge. It’s something that always impressed me because it helped me grow as an
artist. And now I try to do the same with people who are just starting out.

Thief Art by Sergio Edwards
Thief!

Daniela Lobos

Daniela is an illustrator based in Santiago, Chile. Her work features charming illustrations with whimsical animals and gorgeous colors. Check out a small selection of her work below, or see more in her portfolio.

Fenix

The wonderful thing about Chile is that we have deserts, mountains, forests, and glacier landscapes. You never get bored or uninspired with places like that!

Fenix Art by Daniela Lobos
Fenix

Husk

Right now I live in Santiago but I was born in Antofagasta, and the
north of Chile has always been very influenced by Peruvian and Bolivian
culture. The bright colors and figures of the Diablada and the mysticism
of the desert are huge sources of inspiration to me.

Husk Art by Daniela Lobos
Husk

Snow Day

Snow Day Art by Daniela Lobos
Snow Day

Pet Plant

We have a lot of variety in the art community. Everybody here does their own thing, and I
absolutely love that. We all have different styles and different techniques. I also feel that the artists are very down to earth here so there’s no oversized egos,
which is awesome.

Pet Plant Art by Daniela Lobos
Pet Plant

Pablo Aburto

Pablo is an art director and digital artist based in Santiago, Chile. His work features exciting and inspiring designs for some of your favorite brands.
Check out a small selection of his work below, or see more in his portfolio.

Inteligencia Emocional

What I love about living in
Chile is its vast landscapes. It is a small country, but it has a desert in the north and glaciers in the south. I think the landscape
is what inspires many artists in my country.

Inteligencia Emocional Design by Pablo Aburto
Inteligencia Emocional

Bayer Aspirin

In Chile there are still many artisans who try to maintain their
ancestral roots by doing things by hand and in clay. I think this has influenced my work since I like to create my graphic pieces by hand. Some
have been made with Plasticine, others are modeled with
paper and cardboard. Most of what is done today
is digital, however, so I try to escape from the norm by doing things also by hand.

Bayer Aspirin Design by Pablo Aburto
Bayer Aspirin

Menta Fuerte – Dentyne

Menta Fuerte - Dentyne Design by Pablo Aburto
Menta Fuerte – Dentyne

Lanzamiento – Farox

The art community in my country is not very large. Many artists are dedicated to art as part of a
hobby, and must work on other things to support their love for art. Artists take to the
streets to show their talent rather than in the great art galleries.

Lanzamiento - Farox
Lanzamiento – Farox

Paula Castro

Paula is an art director and experimental illustrator based in Santiago, Chile. Her work features gorgeous geometric designs with powerful, vivid colors.
Check out a small selection of her work below, or see more in her portfolio.

The Space River

One of the things that I love about living here is that Chile is very
rich in nature and culture. It also possesses incredible and inspiring landscapes from the north and
south. I live in Santiago, it’s the
capital of Chile, and a variety of cultures exists here.

The Space River Art by Paula Castro
The Space River

The Path of Mind

Santiago is a cosmopolitan city. The art here is set upon diverse stages, where architecture, cultural norms, and lifestyle are a fundamental role in
acquiring knowledge that contributes
to an artist’s growth.
Also, I am surrounded by many graphic artists where I work, so there is always a great feedback.

The Path of Mind Art by Paula Castro
The Path of Mind

Deep Metal Sea

Deep Metal Sea Art by Paula Castro
Deep Metal Sea

Aura Melt

The art community in this city is small but there are many spaces for artists and varied cultural centers that allow us to gain recognition here. Though it has had an exponential
growth in the last few years, I feel that Chile as an artistic community that is still under
development.

Aura Melt Art by Paula Castro
Aura Melt

Marcelo Moya Ochoa

Marcelo is a graphic designer based in Santiago, Chile. His work features incredible digital retouching and powerful graphics for notable brands. Check out a small selection of his work below, or see more in his portfolio.

Mercedes Benz Viewpoints – BBDO Chile

Chile is a very big country. In a couple of hours of travel you can be in another region
and it’s almost like a completely different country. What I love the most is that there’s still a lot of work to do in
Chile in terms of design. It has a huge role it can play in making a better
society, starting with educating clients about the benefits of great
design.

Mercedes Benz Viewpoints - BBDO Chile by Marcelo Moya Ochoa
Mercedes Benz Viewpoints – BBDO Chile

Pepsi Skydive

When it comes to graphic design, it’s very hard to pinpoint a Chilean
identity. In the northern region
there’s a lot of Inca empire influences in the culture, but in the south there’s a deep
connection with the terrain and the cold climate. In the last 10 years or
so, the capital has become very multicultural.

My work has been influenced in two ways. I try to come up with
results that appeal to a larger audience than just my country. And very
recently, I’ve also tried to incorporate elements of a broader, Latin American
vibe.

Pepsi Skydive Design by Marcelo Moya Ochoa
Pepsi Skydive

Like a Ghost

Like a Ghost Design by Marcelo Moya Ochoa
Like a Ghost

Merrell Advertising

I think the art community here is becoming more accessible to new players. It slowly morphed
into a state where every weekend there’s a
fair showcasing emerging artists to common people in the
streets. There’s still a long way to go because Chile is not a place that
puts art in the same priority as more developed countries, but the
communities that are forming, especially the younger generations, have a
lot to say in that development. We just have to come together.

Merrell Advertising Design by Marcelo Moya Ochoa
Merrell Advertising

Caterina Pinto Lumio

Caterina is a designer based in Santiago, Chile. Her work features unique designs full of culture and charm.
Check out a small selection of her work below, or see more in her portfolio.

Film Festival – Go San Cris

What I really like about my country is the diversity in people and landscapes. It inspires me to have different points of
view and makes me feel alive. I think that it’s very important for
creative people to know their land well because we are ultimately a part of it.

Film Festival - Go San Cris Art by Caterina Pinto Lumio
Film Festival – Go San Cris

Let’s Connect – Fiis Chile

I really appreciate having lots of friends all over the country because they help me understand Chilean ways. I’ve learned to respect the different cultures more and now I think I have become more open-minded to my huge cultural background.

Lets Connect - Fiis Chile by Caterina Pinto Lumio
Let’s Connect – Fiis Chile

Cocktail Glass – Greenglass

Cocktail Glass - Greenglass by Caterina Pinto Lumio
Cocktail Glass – Greenglass

Astro CD

The art community has grown a lot in the past few years. It is very difficult here in
Chile, but we have a job to educate the people so that they may respect our artistic expressions. The new
generation is more open-minded and this has also helped us share more
about the true experiences of people living here.

Astro CD by Caterina Pinto Lumio
Astro CD

Many thanks to the artists who took time to answer my questions
and share a bit about themselves and how their country and/or culture
has affected their work. You can check out more of their work in the
links below:

Intro to Vue.js: Rendering, Directives, and Events

Post pobrano z: Intro to Vue.js: Rendering, Directives, and Events

If I was going to sum up my experiences with Vue in a sentence, I’d probably say something like „it’s just so reasonable” or „It gives me the tools I want when I want them, and never gets in my way”. Again and again, when learning Vue, I smiled to myself. It just made sense, elegantly.

This is my own introductory take on Vue. It’s the article I wish I had when I was first learning Vue. If you’d like a more non-partisan approach, please visit Vue’s very well thought out and easy to follow Guide.

Article Series:

  1. Rendering, Directives, and Events (You are here!)
  2. Components, Props, and Slots (Coming soon!)
  3. Vue-cli (Coming soon!)
  4. Vuex (Coming soon!)
  5. Animations (Coming soon!)

One of my favorite things about Vue is that it takes all of the successful things from other frameworks, and incorporates them without getting disorganized. Some examples that stand out for me:

  • A virtual DOM with reactive components that offer the View layer only, props and a Redux-like store similar to React.
  • Conditional rendering, and services, similar to Angular.
  • Inspired by Polymer in part in terms of simplicity and performance, Vue offers a similar development style as HTML, styles, and JavaScript are composed in tandem.

Some benefits I’ve enjoyed over Vue’s competitors: cleaner, more semantic API offerings, slightly better performance than React, no use of polyfills like Polymer, and an isolated, less opinionated view than Angular, which is an MVC.

I could go on, but it’s probably better if you read their comprehensive and community-driven comparison with other frameworks. It’s worth a read, but you can skip back to it later if you’d like to dive into the code.

Let’s Get Started!

We can’t kick this off without the obligatory „Hello, world!” example. Let’s do that so you can get up and running:

<div id="app">
 {{ text }} Nice to meet Vue.
</div>
new Vue({
 el: '#app',
 data: {
   text: 'Hello World!'
 }
});

See the Pen Vue Hello World by Sarah Drasner (@sdras) on CodePen.

If you’re familiar with React, this will have some similarities. We’ve escaped into JavaScript in the middle of the content with the mustache template and used a variable, but one difference is we are working with straight up HTML instead of JSX. JSX is pretty easy to work with, but I do think it’s nice that I don’t have to spend time changing class to className, etc. You’ll also notice that this is pretty lightweight to get up and running.

Now let’s try Vue out with something I really love: loops and conditional rendering.

Conditional Rendering

Let’s say I have a set of items, like navigation, that I know I’m going to reuse. It might make sense to put it in an array to update it in a few places dynamically and consistently. In vanilla JS (with Babel) we might do something like this: create the array, then create an empty string where we add each item wrapped in an <li>, and then wrap all of that in a <ul> and add it to the DOM with innerHTML:

<div id="container"></div>
const items = [
  'thingie',
  'another thingie',
  'lots of stuff',
  'yadda yadda'
];

function listOfStuff() {
  let full_list = '';
  for (let i = 0; i < items.length; i++) {
      full_list = full_list + `<li> ${items[i]} </li>`
  }
  const contain = document.querySelector('#container');
  contain.innerHTML = `<ul> ${full_list} </ul>`;     
}

listOfStuff();

See the Pen e699f60b79b90a35401cc2bcbc588159 by Sarah Drasner (@sdras) on CodePen.

This works fine, but it’s a bit messy for something so standard. Now let’s implement that same thing with Vue’s loop with v-for:

<div id="app">
  <ul>
    <li v-for="item in items">
      {{ item }}
    </li>
  </ul>
</div>
const app4 = new Vue({
  el: '#app',
  data: {
    items: [
      'thingie',
      'another thingie',
      'lots of stuff',
      'yadda yadda'
    ]
  }
});

See the Pen Conditional Rendering in Vue by Sarah Drasner (@sdras) on CodePen.

Pretty clean and declarative. If you’re familiar with Angular, this will likely be familiar to you. I find this to be such a clean and legible way to conditionally render. If you jumped into the code and had to update it, you could do so very easily.

Another really nice offering is dynamic binding with v-model. Check this out:

<div id="app">
  <h3>Type here:</h3>
  <textarea v-model="message" class="message" rows="5" maxlength="72"></textarea><br>
  <p class="booktext">{{ message }} </p>
</div>
new Vue({
  el: '#app',
  data() {
    return {
      message: 'This is a good place to type things.'  
    }
  }
});

See the Pen Vue Book v-model basic by Sarah Drasner (@sdras) on CodePen.

You’ll probably notice two things about this demo. First, that it really took nothing at all to type directly into the book and dynamically update the text. Vue enables us to very easily set up two-way binding between the <textarea> and the <p> with v-model.

The other thing you might notice is that we’re now putting data in a function. In this example, it would work without doing so. We could have just put it in an object like our earlier examples. But this would only work for the Vue instance and be exactly the same across the application (thus, not so great for individual components). It’s OK for one Vue instance, but this will share data across all of the child components as well. It’s good practice to start putting data in a function because we’ll need to when we start using components and want them to each hold state of their own.

These aren’t the only easy input bindings available to you at all, and even v-if has an alternate, v-show, which won’t mount/unmount the component, but rather, leave it in the DOM and toggle visibility.

There are so many more directives available to you, here’s a sampling of some of the ones I use very often. A lot of these offer shortcuts as well, so I’ll show both. From here on, we’ll mostly use the shortcuts, so it’s good to at least familiarize yourself with them a little bit in this table.

Name Shortcut Purpose Example
v-if, v-else-if, v-else none Conditional Rendering <g v-if="flourish === 'A'"></g>
<g v-else-if="flourish === 'B'"></g>
<g v-else></g>
v-bind : Bind attributes dynamically, or pass props <div :style="{ background: color }"></div>
v-on @ Attaches an event listener to the element <button @click="fnName"></button>
v-model none Creates two-way binding <textarea rows="5" v-model="message" maxlength="72"></textarea>
v-pre none Skip compiling for raw content, can boost performance <div v-pre>{{ raw content with no methods}}</div>
v-once none Don’t rerender <div class=”v-once”>Keep me from rerendering</div>
v-show none Will show or hide a component/element based on state, but will leave it in the DOM without unmounting (unlike v-if) <child v-show=”showComponent”></child> (toggles visibility when showComponent is true)

There are also really nice event modifiers and other API offerings to speed up development like:

  • @mousemove.stop is comparable to e.stopPropogation()
  • @mousemove.prevent this is like e.preventDelegation()
  • @submit.prevent this will no longer reload the page on submission
  • @click.once not to be confused with v-once, this click event will be triggered once.
  • v-model.lazy won’t populate the content automatically, it will wait to bind until an event happens.

You can even configure your own keycodes.

We’ll use these in examples a bit more coming up!

Event Handling

Binding that data is all well and good but only gets us so far without event handling, so let’s cover that next! This is one of my favorite parts. We’ll use the binding and listeners above to listen to DOM events.

There are a few different ways to create usable methods within our application. Just like in vanilla JS, you can pick your function names, but methods are intuitively called, well, methods!

new Vue({
  el: '#app',
  data() {
   return {
    counter: 0
   }
  },
  methods: {
   increment() {
     this.counter++;
   }
  }
});
<div id="app">
  <p><button @click="increment">+</button> {{ counter }}</p>
</div>

We’re creating a method called increment, and you can see that this automatically binds to this and will refer to the data in this instance and component. I love this kind of automatic binding, it’s so nice to not have to console.log to see what this is referring to. We’re using shorthand @click to bind to the click event here.

Methods aren’t the only way to create a custom function. You can also use watch. The main difference is that methods are good for small, synchronous calculations, while watch is helpful with more tasking or asynchronous or expensive operations in response to changing data. I tend to use watch most often with animations.

Let’s go a little further and see how we’d pass in the event itself and do some dynamic style bindings. If you recall in the table above, instead of writing v-bind, you can use the shortcut :, so we can bind pretty easily to style (as well as other attributes) by using :style and passing in state, or :class. There are truly a lot of uses for this kind of binding.

In the example below, we’re using hsl(), in which hue calculated as a circle of degrees of color that wraps all the way around. This is good for our use as it will never fail, so as we track our mouse in pixels across the screen, the background style will update accordingly. We’re using ES6 template literals here.

new Vue({
  el: '#app',
  data() {
    return {
      counter: 0,
      x: 0
    }
  },
  methods: {
    increment() {
      this.counter++;
   },
   decrement() {
     this.counter--;
   },
   xCoordinate(e) {
     this.x = e.clientX;
   }
  }
});
<div id="app" :style="{ backgroundColor: `hsl(${x}, 80%, 50%)` }" @mousemove="xCoordinate">
  <p><button @click="increment">+</button> {{ counter }} <button @click="decrement">-</button></p>
  <p>Pixels across: {{ x }}</p>
</div>

See the Pen Showing simple event handling by Sarah Drasner (@sdras) on CodePen.

You can see that we didn’t even need to pass in the event to the @click handler, Vue will automatically pass it for you to be available as a parameter for the method. (shown as e here).

Also, native methods can also be used, such as event.clientX, and it’s simple to pair them with this instances. In the style binding on the element there’s camel casing for hyphenated CSS properties. In this example, you can see how simple and declarative Vue is to work with.

We don’t even actually need to create a method at all, we could also increase the counter directly inline in the component if the event is simple enough:

<div id="app">
  <div class="item">
    <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/28963/backpack.jpg" width="235" height="300"/>
    <div class="quantity">
      <button class="inc" @click="counter > 0 ? counter -= 1 : 0">-</button>
      <span class="quant-text">Quantity: {{ counter }}</span>
      <button class="inc" @click="counter += 1">+</button>
    </div>
    <button class="submit" @click="">Submit</button>
  </div><!--item-->
</div>
new Vue({
  el: '#app',
  data() {
    return {
      counter: 0
    }
  }
});

See the Pen Backpack Shop Counter by Sarah Drasner (@sdras) on CodePen.

You can see that we’re updating the state directly in the @click handler without a method at all- you can also see that we can add a little bit of logic in there as well (as you wouldn’t have lower than zero items on a shopping site). Once this logic gets too complex, though, you sacrifice legibility, so it’s good to move it into a method. It’s nice to have the option for either, though.

Article Series:

  1. Rendering, Directives, and Events (You are here!)
  2. Components, Props, and Slots (Coming soon!)
  3. Vue-cli (Coming soon!)
  4. Vuex (Coming soon!)
  5. Animations (Coming soon!)

Intro to Vue.js: Rendering, Directives, and Events is a post from CSS-Tricks