xonecas.io
1361
Xc

xonecas.com / commit c2938b2

fixed no resize (because of canvas) on chrome; added promote a better web section; improved responsive layout (i think)

xonecas2012-06-10 c2938b2f4e82f8ba63ff3fbb20679ebde6cd1174 parent 12f9e2f

9 files changed

css/style.css+31−21
@@ -3,7 +3,6 @@ html,
33 body,
44 section,
55 header,
6-footer,
76 h1,
87 h2 {
98 display: block;
@@ -22,7 +21,7 @@ html {
2221 }
2322
2423 body {
25- width: 480px;
24+ width: 100%;
2625 margin: 40px auto;
2726 }
2827
@@ -30,24 +29,14 @@ section {
3029 margin: 40px 0;
3130 }
3231
33-footer {
34- margin: 40px 0;
35-}
36-
37-footer a {
38- float: left;
39- width: 18.75%;
40- margin: 0 3.125%;
41-}
42-
4332 img,
4433 object {
4534 max-width: 100%;
4635 }
4736
4837 img {
49- border: 0; /* 1 */
50- -ms-interpolation-mode: bicubic; /* 2 */
38+ border: 0;
39+ -ms-interpolation-mode: bicubic;
5140 }
5241
5342 a,
@@ -97,7 +86,22 @@ h2 {
9786 font-size: /* 24 / 16 */ 1.5em;
9887 }
9988
100-canvas {
89+.xonecas-elsewhere a {
90+ float: left;
91+ width: 18.75%;
92+ margin: 20px 3.125%;
93+}
94+.xonecas-elsewhere a span {
95+ display: none;
96+}
97+
98+.promote-a-better-web > a {
99+ float: left;
100+ width: 25%;
101+ margin: 20px 4.167%;
102+}
103+
104+#bg {
101105 position: fixed;
102106 top: 0;
103107 left: 0;
@@ -111,20 +115,26 @@ canvas {
111115 }
112116
113117 @media screen and (max-width: 480px) {
114- body {
115- width: 100%;
116- }
117-
118- footer {
118+ .xonecas-elsewhere {
119119 text-align: center;
120120 }
121121
122- footer a {
122+ .xonecas-elsewhere a {
123123 width: 37.5%;
124124 margin: 20px 6.25%;
125125 }
126126 }
127127
128+@media screen and (min-width: 960px) {
129+ html {
130+ font-size: 20px;
131+ }
132+
133+ body {
134+ max-width: 960px;
135+ }
136+}
137+
128138 /* util */
129139 .cf:before,
130140 .cf:after {
images/github.png+0−0
images/h5logo.png+0−0
Binary file, not shown.
images/js.png+0−0
Binary file, not shown.
images/last-fm.png+0−0
images/tumblr.png+0−0
images/twitter.png+0−0
index.html+37−10
@@ -51,19 +51,46 @@
5151
5252 <hr>
5353
54- <footer class="cf">
55- <a href="//github.com/xonecas">
56- <img src="/images/github.png" title="Github">
54+ <section class="xonecas-elsewhere cf">
55+ <header>
56+ <h2>Sean elsewhere<h2>
57+ </header>
58+
59+ <a href="//github.com/xonecas" title="">
60+ <img src="/images/github.png" alt="Github">
61+ </a>
62+ <a href="//xonecas.tumblr.com" title="">
63+ <img src="/images/tumblr.png" alt="Tumblr">
5764 </a>
58- <a href="//xonecas.tumblr.com">
59- <img src="/images/tumblr.png" title="Tumblr">
65+ <a href="//twitter.com/xonecas" title="">
66+ <img src="/images/twitter.png" alt="Twitter">
67+ </a>
68+ <a href="//www.last.fm/user/xonecas" title="">
69+ <img src="/images/last-fm.png" alt="Last FM">
70+ </a>
71+ </section>
72+
73+ <hr>
74+
75+ <section class="promote-a-better-web cf">
76+ <header>
77+ <h2>Promote a better web</h2>
78+ </header>
79+
80+ <a href="//www.html5rocks.com/en/" title="HTML5">
81+ <img src="/images/h5logo.png" alt="HTML5 Logo">
6082 </a>
61- <a href="//twitter.com/xonecas">
62- <img src="/images/twitter.png" title="Twitter">
83+
84+ <!-- from promotejs.org -->
85+ <a href="//developer.mozilla.org/en/JavaScript/"
86+ title="JavaScript at Mozilla Developer Network">
87+ <img src="http://static.jsconf.us/promotejsh.gif"
88+ alt="JavaScript Docs">
6389 </a>
64- <a href="//www.last.fm/user/xonecas">
65- <img src="/images/last-fm.png" title="Last FM">
90+
91+ <a href="//github.com/voodootikigod/logo.js" title="Javascript">
92+ <img src="/images/js.png" alt="JS Logo">
6693 </a>
67- </footer>
94+ </section>
6895 </body>
6996 </html>
js/follower.js+14−7
@@ -6,17 +6,20 @@
66 canvas,
77 c,
88 height,
9+ img,
910 radians,
1011 width;
1112
1213 body = document.querySelector('body');
1314 canvas = document.createElement('canvas');
1415 c = canvas.getContext('2d');
15- height = window.innerHeight;
16- width = window.innerWidth;
16+ img = document.createElement('img');
1717 radians = Math.PI / 180;
1818
19- body.appendChild(canvas);
19+ //body.appendChild(canvas);
20+ img.id = 'bg';
21+ img.alt = 'Background image';
22+ body.appendChild(img);
2023
2124
2225 function rrange(min, max, noFloor) {
@@ -31,8 +34,8 @@
3134 size = 10;
3235 startColor = 5;
3336
34- canvas.width = width;
35- canvas.height = height;
37+ canvas.width = window.innerWidth;
38+ canvas.height = window.innerHeight;
3639
3740 c.save();
3841 c.translate(canvas.width / 2, canvas.height / 2);
@@ -71,9 +74,13 @@
7174 }(0, startColor, 0, 1));
7275
7376 c.restore();
77+
78+ return canvas.toDataURL();
7479 }
7580
76- fractal();
77- setInterval(fractal, 10000);
81+ (function drawLoop() {
82+ img.src = fractal();
83+ setTimeout(drawLoop, 10000);
84+ }());
7885
7986 }());