Tuesday, July 14, 2015

Apple Watch Is Improving Health. Does This Come With a Price?

The Apple Watch launched last March and shipped in April to those who pre-ordered. Thousands of apps are available for Apple Watch, either as standalone apps or combined with iPhone apps. A compelling (and popular) feature is the ability of the watch to track health and fitness, a trend throughout wearable technology. This article will discuss how Apple Watch can help with health and fitness but also the issues with Apple Watch's data privacy and security.

Continue reading %Apple Watch Is Improving Health. Does This Come With a Price?%


by A. Hasan via SitePoint

50 Free Productivity Dashboards and Templates

Please raise your hand if you think redundant tasks suck. You know the ones I’m talking about – designing invoices, creating project roadmaps and writing business plans. Formatting charts and/or designing business invoices can be a time suck that add up overtime. But it doesn’t have to be. Stop reinventing the wheel, and download a […]

Continue reading %50 Free Productivity Dashboards and Templates%


by Peter Daisyme via SitePoint

Exploring the Hero Section

As defined by the Oxford Dictionary: Hero /ˈhirō/ (noun)

:A person, typically a man, who is admired or idealized for courage, outstanding achievements, or noble qualities

:The chief male character in a book, play, or movie, who is typically identified with good qualities, and with whom the reader is expected to sympathize

:(In mythology and folklore) a person of superhuman qualities and often semi-divine origin, in particular one of those whose exploits and dealings with the gods were the subject of ancient Greek myths and legends.

Hero takes on cerebus.

These are all definitions to a word derived from the Ancient Greek word ἥρως which means heroes. A word that has a rich history dating back to a time where Gods clashed with mythological beasts and championed heroes to fell nasty foes on a path of destruction.

But what does the etymology and history of such a word have to do with web design? In short, if you know how to make mortar you can build something a lot more effective than a straw hut.

What is the Hero Section?

download

Sad truth time: the hero section has nothing to do with your favorite comic and movie heroes. That means no Batman, Hellboy, Ironman, Doctor Strange or any other cape crusader.

Wellington, Nelson and Franklin promoting products.

The “Hero Section” – also commonly referred to as the “Hero Header” and “Hero Image” – is a design trend that isn't all that new. Soap companies of the 1800's competed vigorously to develop the most effect hero panels on their labels and newspaper ads, featuring lithographs of cute kids, caring mothers and fluffy kittens.

Not a lot has changed there.

For the first time companies were understood the benefits of drawing links between their products and contemporary heroes such as Benjamin Franklin, Horatio Nelson, or the Duke of Wellington – not always with permission.

On the web the hero section is typically a prominent image, slider, text or similar element that has pride of place at the top of your homepage layout and possibly subsequent pages. It is front and center and in your face.

Don't confuse Hero Sections with those large, trendy background images used in lieu of color or patterns. There is always a purpose and focus for these sections opposed to just serving to set a general look and tone.

The Hero Section is not only a visual stimulant but it is also a core tool that is used to not only give the design a focal point but to pull in the masses and get them hooked. The Hero Section is not only the ‘likable protagonist’ in your story, but also the summary in the book jacket that gets you to read on.

The Literary Hero

Batman, Hellboy etc

When I create music videos for artists (maybe you didn’t know I do that) I often find myself being left to my own devices without any concept but my own. I’ve found that looking for unconscious links between song meaning and images not only yields a better understanding of the project, but allows me to create visuals that leave the artists happy.

With web design and specifically with the Hero Section the concept works pretty much the same. Know the past – the hero's backstory – and you can apply it to the present.

_______

Joseph John Campbell introduced the concept of “monomyth” or “the heroes journey” back in 1947. The concept goes as followed:

A hero ventures forth from the world of common day into a region of supernatural wonder: fabulous forces are there encountered and a decisive victory is won: the hero comes back from this mysterious adventure with the power to bestow boons on his fellow man. 

The hero archetype is something that is not only a literary vehicle but also one that has hooks in psychology. Carl Jung described this journey as the process of “individuation”. This individuation of the hero which Jung referred to as the “Self” served as the central archetype of order amongst all the others.

You see this manifestation of the Self often in literature no matter the genre.

The Take Away

The Heroes Journey: 8 Steps

In a typical monomyth structure there are three acts, departure, initiation and return. Each act is broken up in phases which when looked at can be applied to the creation and structuring of your site’s Hero Section.

The key things to remember when using literary and psychological attributes of the hero to your sections are:

  • The hero is idolized and is a chief player in the world they inhabit
  • The hero’s journey is a journey of purpose, from start to finish
  • The myth of the hero is consequently the beginning step to finding the true “self”
  • The end product or individuation of the hero is as important as the rest of the story

Continue reading %Exploring the Hero Section%


by Gabrielle Gosha via SitePoint

Sass Maps vs. Nested Lists

The title of this post may be surprising to some of you. If you are a Sass veteran, you may remember the days (pre-Ruby-Sass-3.3) of using lists of lists to emulate nested arrays of data. (Ruby) Sass 3.3 added a new data type called maps. Lists of lists could hold complex data in a nested format, but without key-value pairing. Maps added key-value pairs and let us create arrays of data.

With the advent of maps, many of us Sass users started putting everything into maps (and for good reason!). All your breakpoint widths, color values, grid layouts, type scales and other responsive typography details can go into maps!

Now that Sass has maps with key-value pairs, is there a good reason to use a list of lists? One theoretical reason would be backwards-compatibility: if your Sass might be maintained by a developer with an older version installed, lists will help them. In practice, however, Sass versions are often controlled by a package.json or other project config, and the Ruby gem can be updated with just one command (gem update sass).

A more practical reason that you might choose to use nested lists instead of a map is typing less. Let's compare a map and a nested list to see how they compare in their own syntax, and in how we'd loop through them.

Continue reading %Sass Maps vs. Nested Lists%


by James Steinbach via SitePoint

12 Little-Known CSS Facts (The Sequel)

Over a year ago I published the original 12 Little-known CSS Facts and, to this day, it has been one of SitePoint’s most popular articles ever. Since that post was published, I’ve been collecting more little CSS tips and tidbits for a new post. Because we all know that every successful movie should spawn a cheesy sequel, right?

[caption id="attachment_110386" align="aligncenter" width="800"]12 Little-known CSS Facts: The Sequel Artwork by SitePoint/Natalia Balska.[/caption]

So let’s get right into this year’s developer’s dozen. I’m sure many of us will know at least some of these, but you can let me know in the comments how many of these were new to you.

1. The border-radius property can use “slash” syntax

This is something I’ve written about before more than four years ago on SitePoint, but I still think many beginners and even some experienced developers don’t know this feature exists.

Believe it or not, the following is valid border-radius code:

[code language="css"]
.box {
border-radius: 35px 25px 30px 20px / 35px 25px 15px 30px;
}
[/code]

If you’ve never seen that, it might seem a little confusing, so here’s the explanation from the spec:

If values are given before and after the slash, then the values before the slash set the horizontal radius and the values after the slash set the vertical radius. If there is no slash, then the values set both radii equally.

The spec also provides the following diagram:

Multiple Radii on each corner with border-radius

The caption for that image explains: “The two values of border-top-left-radius: 55pt 25pt define the curvature of the corner.”

So the use of the slash in the value allows you to create curved corners that are not symmetrical. If you want a more detailed consideration of this, check out my original article linked above, or better yet, try out this handy little interactive demo from MDN:

Most border-radius generators do not allow you to set these optional values. The MDN generator is the only one I’ve found that does this.

2. The font-weight property accepts relative keywords

Normally when you see the font-weight property defined, the value will be either normal or bold. You might also occasionally see an integer value in hundred increments: 100, 200, etc., up to 900.

The two values that are often forgotten, however, are bolder and lighter.

According to the spec, these keywords specify a bolder or lighter weight than the inherited value. This comes into play most significantly when you are dealing with a font that has multiple weights that are bolder than just plain “bold” and lighter than just normal text.

In the hundred-based values, “bold” maps to 700 and “normal” maps to 400. So if you have a font that has a 300 weight, but nothing lower, a value of “lighter” will produce 300 if the inherited value is 400. If there is no lighter weight (i.e. 400 is the lightest weight) then it will just stay at 400 and thus a value of “lighter” will have no effect.

Look at the following CodePen demo:

See the Pen Using font-weight bolder/lighter Keywords by SitePoint (@SitePoint) on CodePen.

In this example, I’m using a font called Exo 2, which has 18 different styles available. My demo embeds only the non-italic styles, which are enough for each of the hundred-based weights.

Notice that the demo includes 12 nested ‘box’ elements with different font-weight values, including “bolder” and “lighter” so you can see how these affect the weight of the text in different inheritance contexts. Below is the CSS from that example. Notice the comments in the code, and remember that each subsequent “box” is nested inside the previous:

[code language="css"]
.box {
font-weight: 100;
}

.box-2 {
font-weight: bolder; /* maps to 400 */
}

.box-3 {
font-weight: bolder; /* maps to 700 */
}

.box-4 {
font-weight: 400;
}

.box-5 {
font-weight: bolder; /* maps to 700 */
}

.box-6 {
font-weight: bolder; /* maps to 900 */
}

.box-7 {
font-weight: 700;
}

.box-8 {
font-weight: bolder; /* maps to 900 */
}

.box-9 {
font-weight: bolder; /* maps to 900 */
}

.box-10 {
font-weight: lighter; /* maps to 700 */
}

.box-11 {
font-weight: lighter; /* maps to 400 */
}

.box-12 {
font-weight: lighter; /* maps to 100 */
}
[/code]

In this case, the “bolder” and “lighter” keywords will map only to the 100, 400, 700, and 900 values. With 9 different styles, these keywords will never map to the 200, 300, 500, 600, and 800 values.

This happens because you’re telling the browser to choose the next font in the series that is considered either ‘bold’ or ‘light’. So it’s not picking the next boldest or the next lightest, but merely a bold or light font relative to what is inherited. If, however, the lightest font started at 300 (as in the case of Open Sans), and the inherited value was 400, then a value of “lighter” would map to 300.

This might all be a bit confusing at first, but you can fiddle around with the demo to see how these keywords work.

3. There is an outline-offset property

The outline property is pretty well known due to its ability to help in debugging (it doesn’t affect page flow). The spec, however, has added an outline-offset property, which does exactly what its name suggests — it lets you define how far the outline should be offset from the element.

See the Pen The outline-offset property by SitePoint (@SitePoint) on CodePen.

In the demo above, move the range slider left or right to see the outline offset change. The range in this example covers 0px to 30px, but you could go as large as you want in the CSS. Take note that although the outline property is a shorthand property, it doesn’t include outline-offset, so you always have to define outline-offset separately.

The only major drawback to the outline-offset property is the fact that it’s supported in every browser except Internet Explorer (not even IE 11).

4. There is a table-layout property

You’re probably thinking, Old news. I know all about display: table, bruh. Easiest way to vertically center! But that’s not what I’m talking about. Notice I said the table-layout property, not the display property.

The table-layout property isn’t the easiest CSS feature to explain so let’s first go to the spec, and then look at an example. The spec says:

Continue reading %12 Little-Known CSS Facts (The Sequel)%


by Louis Lazaris via SitePoint

From Tuts+ to AudioJungle

The Beginners Guide to WooCommerce: Shipping Settings Part 1