3. Front-End Design Conference
07.12.14
#contextAware
1. Defining contextual awareness
2. Applications in web design
3. Level 4 Media Queries
4. Summary
3
4. Front-End Design Conference
07.12.14
#contextAware
We bring together product
design, brand communications,
social connections and content
to help businesses thrive.
4
10. Front-End Design Conference
07.12.14
#contextAware
Contextually Aware Web Design:
Appropriating user context based on any JavaScript accessible data point in
order to deduce a users assumed context. Essentially its a theory that if you
can assume what a user is doing you can alter a design to meet the users
immediate needs and use all available user data to circumvent frivolous UI or
build more intelligent design systems based on a users physical surrounding.
10
11. Front-End Design Conference
07.12.14
#contextAware
Contextually aware design uses
JavaScript to access available
data points within a users
environment and adjust the
design accordingly.
11
26. Front-End Design Conference
07.12.14
#contextAware
In this example our contextual
breakpoints are morning, noon,
and night.
26
27. Front-End Design Conference
07.12.14
#contextAware
var sensors = {
morning: function(){
var x = new Date();
x = x.getHours()
return !!(x > 4 && x < 12);
},
afternoon: function(){
var x = new Date();
x = x.getHours()
return !!(x >= 12 && x < 18);
},
evening: function(){
var x = new Date();
x = x.getHours()
return !!(x >= 18 && x < 24 || x > 0 && x <= 4);
},
};
27
28. Front-End Design Conference
07.12.14
#contextAware
All contextual breakpoints
should result in true or false.
28
31. Front-End Design Conference
07.12.14
#contextAware
for (var x in sensors) {
if(sensors[x]()){
var html = document.documentElement;
html.className += "is-" + x;
};
}
31