xonecas.io
57
Fi

firelaunch / commit 14e1444

Polished it up, used the grey and #bada55 colorscheme

xonecas2011-03-05 14e144410996d6d2c27fec4dc10ef8cad4dc348d parent d3e0d5d

5 files changed

css/style.css+45−11
@@ -90,17 +90,21 @@ html { overflow-y: scroll; }
9090 /* accessible focus treatment: people.opera.com/patrickl/experiments/keyboard/test */
9191 a:hover, a:active { outline: none; }
9292
93-a, a:active, a:visited { color: #607890; }
94-a:hover { color: #036; }
93+a, a:active, a:visited { color: #bada55; }
94+a:hover {
95+ /* :-) */
96+ text-shadow: 0 0 15px #bada55;
97+ cursor: pointer;
98+ }
9599
96100 /* These selection declarations have to be separate.
97101 No text-shadow: twitter.com/miketaylr/status/12228805301
98- Also: hot pink. */
99-::-moz-selection{ background: #FF5E99; color:#fff; text-shadow: none; }
100-::selection { background:#FF5E99; color:#fff; text-shadow: none; }
102+ Also: badass. */
103+::-moz-selection{ background: #bada55; color:#fff; text-shadow: none; }
104+::selection { background:#bada55; color:#fff; text-shadow: none; }
101105
102106 /* j.mp/webkit-tap-highlight-color */
103-a:link { -webkit-tap-highlight-color: #FF5E99; }
107+a:link { -webkit-tap-highlight-color: #bada55; }
104108
105109 /* make buttons play nice in IE:
106110 www.viget.com/inspire/styling-the-button-element-in-internet-explorer/ */
@@ -121,7 +125,15 @@ button { width: auto; overflow: visible; }
121125
122126 html, body {
123127 color: #eee;
124- background-color: #444;
128+ background-color: #333;
129+ height: 100%;
130+ background: -webkit-gradient(
131+ radial, 50% 25%, 0, 50% 25%, 700, from(#777), to(#333)
132+ ) #f90 fixed;
133+
134+ background: -moz-radial-gradient(
135+ 50% 25%, circle, #777 0px, #333 700px
136+ ) fixed;
125137 }
126138 em { font-weight: bold; }
127139
@@ -137,7 +149,8 @@ h2 {
137149
138150 #container {
139151 width: 760px;
140- margin: 40px auto;
152+ margin: 0 auto;
153+ padding: 40px 0;
141154 }
142155
143156 #header {
@@ -155,6 +168,8 @@ h2 {
155168
156169
157170 .tweet {
171+ display: block;
172+
158173 -moz-border-radius: 6px;
159174 -webkit-border-radius: 6px;
160175 border-radius: 6px;
@@ -177,11 +192,30 @@ h2 {
177192 .tweet .meta { margin-top: 1em; }
178193 .tweet .time { color: #aaa; }
179194
195+.special {
196+ text-align: center;
197+}
180198
199+.tweet:hover {
200+ font-size: 1.5em;
201+ color: #444;
202+ background-color: #bada55;
203+ -moz-box-shadow: 0px 0px 4px #bada55;
204+ -webkit-box-shadow: 0px 0px 4px #bada55;
205+ box-shadow: 0px 0px 4px #bada55;
206+}
207+.tweet:hover .time {
208+ color: #666;
209+}
181210
182-
183-
184-
211+.tweet:hover a {
212+ /* :-) */
213+ color: #000;
214+ cursor: pointer;
215+ }
216+.tweet:hover a:hover {
217+ text-shadow: 0 0 15px #222;
218+}
185219
186220
187221
images/loading.gif+0−0
Binary file, not shown.
index.html+2−2
@@ -32,7 +32,7 @@
3232 <p>
3333 Tracking Twitter activity about Firefox, as the launch of Firefox 4 approaches.<br />
3434 Currently tracking the following keywords:
35- <em>Firefox 4, firefox4, ff4</em>.
35+ <em>Firefox 4, firefox4, ff4, fx4</em>.
3636 </p>
3737 <div id="stats">
3838 <h2>Stats:</h2>
@@ -43,7 +43,7 @@
4343 </div>
4444 </div>
4545 <ul id="list">
46- <li></li>
46+ <li class="special">Loading <img src="images/loading.gif"/></li>
4747 </ul>
4848 <div id="footer">
4949 <p>By <a href="//xonecas.com/">Sean Caetano Martin</a>; Source <a href="https://github.com/xonecas/firelaunch">here</a>.
js/script.js+3−1
@@ -7,6 +7,7 @@
77
88 function addTweet (tweet) {
99 var stats = tweet.stats,
10+ name = tweet.user.screen_name,
1011 time = new Date(tweet.created_at),
1112 timeStr = 'on '+ time.toDateString() +
1213 'at '+ time.toTimeString();
@@ -22,7 +23,8 @@ function addTweet (tweet) {
2223 ' <img src="'+ tweet.user.profile_image_url +'" />'+
2324 ' <div class="text">'+ tweet.text +'</div>'+
2425 ' <div class="meta">'+
25-' <span class="name">By '+ tweet.user.screen_name +'</span>'+
26+' <a href="//twitter.com/'+name+
27+ '" target="_new" class="name">By '+name +'</a>'+
2628 ' <span class="time">'+ timeStr +'</span>'+
2729 ' </div>'+
2830 '</li>'
server.js+2−2
@@ -64,7 +64,7 @@ var file = fs.createWriteStream(
6464 { flags: 'w', enconding: 'utf8' }
6565 );
6666
67-twitter.stream('statuses/filter', {track: 'firefox 4, ff4, firefox4'},
67+twitter.stream('statuses/filter', {track: 'firefox 4, ff4, firefox4, fx4'},
6868 function (hose) {
6969
7070 hose.on('data', function (twiit) {
@@ -88,7 +88,7 @@ twitter.stream('statuses/filter', {track: 'firefox 4, ff4, firefox4'},
8888
8989 twiit.stats = stats;
9090 socket.broadcast(JSON.stringify(twiit));
91- cache.push(twiit);
91+ cache.unshift(twiit);
9292 cache = cache.slice(0, 25); // save the cache
9393
9494 console.log('===== Twits containing firefox: '+ stats.count);