forked from hakimel/Fokus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
222 lines (201 loc) · 11.1 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Fokus - Emphasized text-highlighting using JavaScript</title>
<meta name="description" content="Fokus uses JavaScript to emphasize anything you select by covering the rest of the page with semi-transparent black.">
<meta name="author" content="Hakim El Hattab">
<meta name="viewport" content="width=800, user-scalable=no">
<link href='http://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/demo.css">
<link rel="icon" type="image/png" href="favicon.ico">
</head>
<body>
<div class="intro">
<article>
<h1>Fokus</h1>
<p>
Fokus uses JavaScript to emphasize anything you select by covering the rest of the page with semi-transparent black.
</p>
<p>
Try it out by selecting this paragraph or the sample content below. You'll see the entire page fade out while this text is highlighted.
</p>
<p>
If you want to use Fokus on your site you just need to include the <a href="https://github.com/hakimel/Fokus/blob/master/js/fokus.min.js">fokus.min.js</a> script (3kb, no dependencies).
</p>
<p>
Fokus is also available as a <a href="https://chrome.google.com/webstore/detail/flkkpmjbbpijiedjdgnhkcgopgnflehe">Chrome extension</a>.
</p>
<small>
Created by <a href="http://twitter.com/hakimel">@hakimel</a> / <a href="http://hakim.se/">http://hakim.se</a>
</small>
</article>
<div class="sharing">
<a href="http://twitter.com/share" class="twitter-share-button" data-text="Fokus - Emphasized text-highlighting using JavaScript by @hakimel" data-url="http://lab.hakim.se/fokus" data-count="small" data-related="hakimel"></a>
<iframe id="facebook-button" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Flab.hakim.se%2Ffokus%2F&layout=button_count&show_faces=false&width=83&action=like&font=arial&colorscheme=light&height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:85px; height:24px; position: relative; top: 4px;" allowTransparency="true"></iframe>
</div>
<a href="https://github.com/hakimel/fokus"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://a248.e.akamai.net/camo.github.com/e6bef7a091f5f3138b8cd40bc3e114258dd68ddf/687474703a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f7265645f6161303030302e706e67" alt="Fork me on GitHub"></a>
</div>
<!-- START DEMO CONTENT FROM http://hakim.se -->
<div class="demo">
<article class='projects single' id='rvl-io'>
<h2>rvl.io</h2>
<a class="image-link" href="http://www.rvl.io/" title="Visit rvl.io">
<img alt="rvl.io" height="305" src="http://s3.amazonaws.com/hakim-static/portfolio/images/rvl-io.jpg" width="320">
</a>
<p>
As
<a href="http://lab.hakim.se/reveal-js">reveal.js</a>
has grown more popular there has been a lot of requests for an online editor and
<a href="http://www.rvl.io/">rvl.io</a>
is the answer. rvl.io is a service for authoring, storing and presenting slide decks without having to touch the underlying HTML of reveal.js. It was created by myself (frontend) and
<a href="https://twitter.com/h__r__j">@h__r__j</a>
(backend).
</p>
</article>
<article class='experiments single' id='linjer'>
<h2>Linjer</h2>
<a class="image-link" href="http://lab.hakim.se/linjer/" title="View demo">
<img alt="Meny" height="226" src="http://s3.amazonaws.com/hakim-static/portfolio/images/linjer.jpg" width="320">
</a>
<p>
An interactive experiment based on the visuals originally created for
<a href="/experiments/radar">Radar</a>.
</p>
</article>
<article class='experiments single' id='avgrund'>
<h2>Avgrund</h2>
<a class="image-link" href="http://lab.hakim.se/avgrund/" title="View demo">
<img alt="Meny" height="219" src="http://s3.amazonaws.com/hakim-static/portfolio/images/avgrund.png" width="320">
</a>
<p>
A conceptual modal which gives a sense of depth between the page and modal layers.
</p>
</article>
<article class='experiments single' id='meny'>
<h2>Meny</h2>
<a class="image-link" href="http://lab.hakim.se/meny/" title="View demo">
<img alt="Meny" height="299" src="http://s3.amazonaws.com/hakim-static/portfolio/images/meny.png" width="320">
</a>
<p>
An experimental CSS 3D fold-in menu. Works in any browser that supports CSS 3D transforms, that includes Mobile Safari so get your iPhone ready!
</p>
</article>
<article class='experiments single' id='radar'>
<h2>Radar</h2>
<a class="image-link" href="http://lab.hakim.se/radar/" title="View demo">
<img alt="Radar" height="260" src="http://s3.amazonaws.com/hakim-static/portfolio/images/radar.jpg" width="320">
</a>
<p>
An audio-visual experiment that uses
<a href-"https://github.com/oampo/Audiolet">Audiolet</a>
to synthesize sound in real-time. The visuals are rendered on
<code><canvas></code>.
</p>
</article>
<article class='projects double' data-showin='experiments' id='sinuous-ios'>
<h2>Sinuous for iPhone & iPad</h2>
<a class="image-link" href="http://itunes.apple.com/us/app/sinuous/id543097218?ls=1&mt=8" title="Open in the App Store">
<img alt="Sinuous" height="300" src="https://s3.amazonaws.com/hakim-static/portfolio/images/sinuous-ios.png" width="695">
</a>
<div class="two-columns">
<p>
Almost two years after releasing the
<a href="http://www.sinuousgame.com">web version</a>
Sinuous has finally made its way to the App Store! The gameplay is very much alike the web but it ties into Game Center so that you can compete with friends. Oh, and keep and eye our for the new 'vortex'-boost!
</p>
<p>
The game is still powered by JavaScript and rendered on HTML canvas. It relies on native code for audio and Game Center integration but that bit was easy thanks to the ever so lovely
<a href="http://phonegap.com/">PhoneGap</a>. I'm very happy with how well the controls translated to touch and I hope you will be too.
</p>
<p>
This runs as smooth as butter on the iPad but the framerate is a bit shaky on the iPhone 4. I will be releasing an update soon to address that as well as some other improvements.
<a href="http://itunes.apple.com/us/app/sinuous/id543097218?ls=1&mt=8">Try it out</a>!
</p>
</div>
</article>
<article class='experiments single' id='forkit-js'>
<h2>forkit.js</h2>
<a class="image-link" href="http://lab.hakim.se/forkit-js/" title="View demo">
<img alt="forkit.js" height="260" src="http://s3.amazonaws.com/hakim-static/portfolio/images/forkit-js.png" width="320">
</a>
<p>
An experimental animated ribbon which lets you drag down a curtain of additional content. A fun twist on the "Fork me on GitHub" banner! Created with JavaScript-controlled CSS3 transforms.
</p>
</article>
<article class='experiments single' id='scroll-effects'>
<h2>CSS3 Scroll Effects</h2>
<a class="image-link" href="http://lab.hakim.se/scroll-effects" title="Launch">
<img alt="CSS3 Scroll Effects" height="383" src="http://s3.amazonaws.com/hakim-static/portfolio/images/scroll-effects.png" width="320">
</a>
<p>
Decided it was time for some CSS tinkering again and ended up creating this set of CSS3 scrolling styles. Not intended for any practical use but the visuals are surprisingly impactful.
</p>
<p>
This works by applying a
<code>future</code>/<code>past</code>
class to list items outside of the viewport as you scroll. Based on this class a variety of transforms are transitioned to via CSS.
</p>
<p>
Thanks
<a href="http://paulirish.com/">Paul Irish</a>
for improving the JavaScript performance!
</p>
</article>
<article class='thoughts double' id='2011'>
<h2>Recap 2011</h2>
<div class="two-columns">
<p>
It's that time of the year again! In late 2010, having spent five great years working at
<a href="http://www.f-i.com">Fi</a>, I was determined to change up my professional life. After interviewing with
<a href="http://www.qwiki.com">Qwiki</a>
and accepting the position of Lead Interactive Developer it was decided; I was moving to San Francisco! It took a good few months of hard work to sort out all of the practicalities but it was definitely worth it now that I'm here.
</p>
<p>
Fortunately I've still been able to keep this site updated and worked on a variety of projects and experiments throughout the year.
</p>
<p>
The first project to see the light of day was
<a href="http://hakim.se/experiments/html5/sketch/">Sketch</a>, a drawing tool that mimics the style of old cartoons. It was refreshing to build something that allows others to be creative. Now – almost a year later – over 78,000 sketches have been saved.
</p>
<p>
Sketch was followed by a short freelance project which involved building an interactive and animated logo for a Canadian media production company called Meru. Try it out on their site;
<a href="http://meru.ca/">http://meru.ca/</a>.
</p>
<p>
Next I stumbled into the land of CSS3 3D transforms and ended up trying them out on two projects;
<a href="http://hakim.se/experiments/css/holobox/">Holobox</a>
and CSS3 3D Slideshow (later renamed
<a href="http://lab.hakim.se/reveal-js/">reveal.js</a>). A few weeks ago, in mid December, I resumed my CSS 3D pursuits by creating a
<a href="http://hakim.se/thoughts/rolling-links">rolling effect</a>
for links and building a
<a href="http://hakim.se/experiments/domtree">Christmas tree</a>
out of form elements.
</p>
<p>
Being far from tired of working with
<code><canvas></code>
I also created a new game called
<a href="http://hakim.se/experiments/html5/coil/">Coil</a>, it's similar in design to
<a href="http://sinuousgame.com">Sinuous</a>
but adds a touch of WebGL and perhaps an element of stress to the gameplay. Shortly thereafter I worked on a tool called
<a href="http://textify.it">Textify.it</a>
which allows you to recreate images using thousands of letters of text. Using Phonegap, I was able to easily port
<a href="http://itunes.apple.com/app/textify-it/id441057755">Textify.it to iOS</a>.
</p>
<p>
It's been really encouraging to see that there's still a lot of activity on
<a href="http://sinuousgame.com">sinuousgame.com</a>
even though it's been out since 2010 – meaning ancient, in internet-time. In the past year it saw more than 2,000,000 visits.
</p>
<p>
Now the new year is approaching and with it new adventures. 2012 will start with relocating to NYC and opening up Qwiki's new office. Can't wait to see where it goes from there!
</p>
</div>
</article>
</div>
<!-- END DEMO CONTENT FROM http://hakim.se -->
<script src="js/fokus.min.js"></script>
<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
</body>
</html>