با سلام
اینم یه قالب زیبای 404 متفاوت تقدیم شما
<!doctype html>
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!-- Consider adding a manifest.appcache: h5bp.com/d/Offline -->
<!--[if gt IE 8]><!--> <html class="no-js" lang="fr"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>5emegauche</title>
<meta name="title" content="5emegauche" />
<meta name="description" content="5eme Gauche is an interactive agency located in Paris, France. We offer you an exclusive expertise on all digital questions. Our team is dedicated to find the best solutions and the best roi regarding your interactive expression. Web design, digital strategy, brand content, interactive development and social network are a daily routine to us. Discover more about us." />
<meta name="language" content="fr" />
<meta name="viewport" content="width=1200">
<meta property="og:title" content="5emegauche">
<meta property="og:site_name" content="5emegauche" />
<meta property="og:image" content="http://www.5emegauche.com/images/layout/fb.jpg">
<meta property="og:type" content="website" />
<meta property="og:url" content="http://www.5emegauche.com" />
<link rel="shortcut icon" href="/favicon.ico" />
<script src="/js/vendor/modernizr-2.6.1.min.js"></script>
</head>
<body id="">
<header>
</header>
<div class="tampon"></div> <style type="text/css">
body{background:#010101}
canvas{
margin-left: -450px;
margin-top: -250px;
left: 50%;
position:absolute;
top:50%;
}</style>
<canvas id="c"></canvas>
<script>
var color_array = ['#ff0081','#ff5a00','#87f705','#00ccff','#ffde00'];
var b = document.body;
var c = document.getElementsByTagName('canvas')[0];
var a = c.getContext('2d');
function Ptcl(obj){
this.x = 0;
this.y = 0;
this.originX = 0;
this.originY = 0;
this.vx = 0;
this.vy = 0;
this.dt = 0;
this.radius = Math.random() * 3 +1;
this.size = 0;
this.bound = 0;
this.init = function(){//SET INITIAL POSITION / SIZE /VELOCITY
this.x = getRandom(true) * 1000;
this.y = getRandom(true) * 1000;
this.originX = obj.originX
this.originY = obj.originY
this.vx = getRandom(true) * 10;
this.vy = getRandom(true) * 10;
this.size = 2 + getRandom(false) * 10;
this.dt = .05;
this.color = color_array[Math.floor(Math.random()*color_array.length)];
//this.color = RGB2HTML(Math.round(Math.random() * 256),Math.round(Math.random() * 256),Math.round(Math.random() * 256));
this.bound = 10 + getRandom(false) * 10;
}
this.draw = function(){//DRAW HEART SHAPE
a.fillStyle = this.color;
a.beginPath();
a.arc(this.x, this.y,this.radius,0,Math.PI * 2,false);
a.closePath();
a.fill();
}
this.checkBound = function(){//CHECK IF PARTICUL IS OUT OF HIS BOUND
if(this.x < this.originX - this.bound){ this.x = this.originX - this.bound; this.vx *= -1} ;
if(this.x > this.originX + this.bound){ this.x = this.originX + this.bound; this.vx *= -1 } ;
if(this.y < this.originY - this.bound){
this.y = this.originY - this.bound;
this.vy *= -1;
}
if(this.y > this.originY + this.bound){
this.y = this.originY + this.bound;
this.vy *= -1;
}
}
this.update = function(){//UPDATE POSITION
if(this.vx>100)this.vx=100;
if(this.vy>100)this.vy=100;
this.x += this.vx * this.dt;
this.y += this.vy * this.dt;
this.checkBound();
}
}
//
function enterFrame(){// DO EVERY FRAME
c.width=900
c.height=500
a.fillStyle = '#010101';
a.fillRect(0, 0, 900, 500); //CLEAN CANVAS
for(i=0;i<p_array.length;i++){//UPDATE AND DRAW EACH PARTICULE
var p = p_array;
p.update();
p.draw();
}
}
function checkBlackPoint(data){//CHEK IF THE PIXEL IS BLACK
var collision = 0;
p_array = []
for (var i = 0; n = data.length, i < n; i += 4) {
if (data == 0) { // IF BLACK SET A PARTICULE WITH X AND Y POS
collision++;
if(collision%30==0){
p = new Ptcl({originX:((i/4)%900),originY:Math.floor((i/4)/900)});
p.init();
p.draw();
//
p_array.push(p);
}
}
}
}
//
function getRandom(bool){
var rand = Math.random()
if(bool){
rand = rand * 2 - 1
}
return rand;
}
function startApp(){
var interval;
c.width=900
c.height=500
a.fillStyle = '#010101';
a.fillRect(0, 0, 900, 500);
a.fillStyle = "black"
a.font = '450px sans-serif'
a.fillText('404', 100, 400);
imageData = a.getImageData(0, 0, 900, 500);
checkBlackPoint(imageData.data);
interval = setInterval(enterFrame,1000/60);
}
//
function RGB2HTML(red, green, blue)
{
var decColor = red + 256 * green + 65536 * blue;
return decColor.toString(16);
}
startApp();
</script>
</nav>
</footer>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.8.0.min.js"><\/script>')</script>
<script type="text/javascript" src="/js/plugins.js"></script>
<script>
var _gaq=[['_setAccount','UA-787790-19'],['_trackPageview']];
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
s.parentNode.insertBefore(g,s)}(document,'script'));
</script>
</body>
</html>
