Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- --
- LOVE IS ONE
- --
- <html>
- <head>
- <title> Hai c: </title>
- <link rel="shortcut icon" type="image/png" href="http://a.thumbs.redditmedia.com/asdqBvUbIHd2ysJt.png" />
- <meta charset="utf-8" description="Hai ^-^" />
- <style type="text/css">
- @import url(http://fonts.googleapis.com/css?family=Play:400,700);
- * { font-family: Play, Arial; }
- html {
- min-width: 750px;
- width: 100%;
- height: 100%;
- background-color: #000000;
- background-size: 100% 100%;
- transition: opacity 0.2s;
- margin: 0px;
- }
- body {
- margin: 0px;
- width: 100%;
- height: 100%;
- text-align: center;
- color: #ffffff;
- #font-family: Arial;
- font-size: 13px;
- }
- a {
- /* Cause link = dick */
- text-decoration: none;
- color: #ffffff;
- }
- span {
- position: fixed;
- font-size: 100%;
- cursor: default;
- transition: top 0.2s, left 0.2s, transform 0.2s;
- }
- #youtube {
- position: fixed;
- top: -500px;
- }
- #videos {
- width: 561px;
- margin: 20px auto 0px auto;
- }
- .ytVideo {
- width: 120px;
- height: 90px;
- display: inline-block;
- background-position: left;
- background-size: 120px 90px;
- background-repeat: no-repeat;
- background-color: rgba(255, 255, 255, 0.1);
- cursor: pointer;
- opacity: 0.65;
- margin: 10px;
- transition: opacity 0.4s, transform 0.2s;
- }
- .ytVideo:hover {
- opacity: 1;
- }
- #textwrap {
- width: 400px;
- height: 130px;
- background-image: url('http://i62.tinypic.com/2d7vhjq.png');
- background-repeat: no-repeat;
- background-size: 150px 150px;
- margin: 0px auto;
- padding: 10px 0px 10px 150px;
- }
- #textblock {
- height: 130px;
- width: 380px;
- margin-left: 10px;
- overflow: hidden;
- }
- </style>
- </head>
- <body>
- <script type="text/javascript">
- var text = "Heya there ^-^\nWelcome to my Site :P Come and See the Furry of a natural habitat\n\n-Kyfx-";
- var background = ["http://images5.alphacoders.com/410/410316.jpg", "http://i61.tinypic.com/dh3l0h.jpg"];
- var messages = [
- 'Lol HAI ^-^', 'Welcome to furville!', 'c:',
- 'FLUFFY!!!', 'Such Fur', 'Mega Fox', 'Much Fox'
- ];
- var playlist = [
- '3RStkZa5jnA', '0UATEO9wTlY', '9SWLK8VxFPA', 'IEuPDaA-Bys',
- 'AW1sejLXQqA', 'Xh8uiKbT9_E', 'Mto25cISPD4', 'HdMREDVJNAk',
- 'GsStopZdNnQ', 'xY75tKEaJmE', '4l9WijhWwUs', 'maiHUbIIi3g'
- ];
- var textblock = null;
- var textIndex = 0;
- var typeMax = 0;
- var typeInter = null;
- var fadeInter = null;
- var ytFrame = null;
- var ytVids = null;
- var rgbGlow = [255, 255, 255];
- var fade = true;
- var lolblocks = [];
- window.onload = function()
- {
- type();
- setInterval( function() { fade ? fadeOut() : fadeIn(); }, 30 );
- youtube();
- showVideos();
- for(var i = 0; i < 30; i++)
- {
- createScrollBlock(i);
- }
- document.getElementsByTagName('html')[0].style.backgroundImage = "url('" + background[0] + "')";
- }
- function createScrollBlock(i)
- {
- ele = lolblocks.push(document.createElement('span'));
- lolblocks[i].innerHTML = messages[Math.floor(Math.random() * messages.length)];
- lolblocks[i].style.transform = 'rotate(' + (Math.random() * 30 - 15) + 'deg)';
- document.body.appendChild(lolblocks[i]);
- lolblock(lolblocks[i]);
- lolblocks[i].inter = setInterval(lolblock, Math.floor(Math.random() * 200) + 400, lolblocks[i]); // Random Movement Patterns
- }
- function showVideos()
- {
- ytVids = document.getElementById('videos');
- ytFrag = document.createDocumentFragment();
- ytBlocks = [];
- for(var i = 0; i < playlist.length; i++)
- {
- block = document.createElement('div');
- block.className = "ytVideo";
- block.id = "Video_" + i;
- block.style.backgroundImage = "url('https://i.ytimg.com/vi/" + playlist[i] + "/default.jpg')";
- block.addEventListener('click', youtube);
- block.ytVideo = i;
- block.style.transform = 'rotate(' + (Math.random() * 60 - 30) + 'deg)';
- ytFrag.appendChild(block);
- if(i % 4 == 3)
- {
- ytFrag.appendChild(document.createElement('br'));
- }
- }
- ytVids.appendChild(ytFrag);
- }
- function youtube(t)
- {
- try
- {
- ytFrame = document.getElementById('youtube');
- video = playlist[t ? this.ytVideo : Math.round(Math.random() * (playlist.length - 1))];
- ytFrame.setAttribute('src', 'http://www.youtube.com/apiplayer?video_id=' + video + '&hd=1&autoplay=1&loop=1&playlist=' + playlist.join(","));
- } catch(err) { /* Do Nothing */ }
- }
- function type()
- {
- textblock = document.getElementById('textblock');
- typeMax = text.length;
- setInterval(
- function()
- {
- rgbGlow[0] = (rgbGlow[0] + Math.round(Math.random() * 0x0000ff)) % 0x0000ff;
- rgbGlow[1] = (rgbGlow[1] + Math.round(Math.random() * 0x00ff00)) % 0x00ff00;
- rgbGlow[2] = (rgbGlow[2] + Math.round(Math.random() * 0xff0000)) % 0xff0000;
- color = '#' + ((rgbGlow[0] + rgbGlow[1] + rgbGlow[2]).toString(16));
- document.body.style.textShadow = "0 0 0.2em " + color + ", 0 0 0.2em " + color + ", 0 0 0.2em " + color;
- }, 125
- );
- typeInter = setInterval(
- function()
- {
- if(textIndex == typeMax)
- {
- clearInterval(typeInter);
- }
- else
- {
- if(text[textIndex] == '\n')
- {
- textblock.innerHTML += '<br />';
- clearInterval(typeInter);
- setTimeout(type, 600);
- }
- else
- {
- textblock.innerHTML += text[textIndex];
- }
- textIndex += 1;
- textblock.scrollTop = textblock.scrollHeight;
- }
- }, 50
- );
- }
- function fadeIn()
- {
- if(textblock.style.opacity > 1.0)
- {
- textblock.style.opacity = 1.0;
- fade = true;
- }
- else
- {
- textblock.style.opacity = parseFloat(textblock.style.opacity) + 0.05;
- }
- }
- function fadeOut()
- {
- if(textblock.style.opacity <= 0.25)
- {
- textblock.style.opacity = 0.25;
- fade = false;
- }
- else
- {
- textblock.style.opacity -= 0.05;
- }
- }
- function toglolblock(e)
- {
- status = lolblocks[0].inter;
- if(status > 0)
- {
- document.getElementById('tooFuckingLaggyBro').innerHTML = 'Animate PLZ c:';
- for(var i = 0; i < lolblocks.length; i++)
- {
- clearInterval(lolblocks[i].inter);
- lolblocks[i].inter = false;
- }
- }
- else
- {
- document.getElementById('tooFuckingLaggyBro').innerHTML = 'Still too laggy, bro.';
- for(var i = 0; i < lolblocks.length; i++)
- {
- lolblock(lolblocks[i]);
- lolblocks[i].inter = setInterval(lolblock, Math.floor(Math.random() * 200) + 400, lolblocks[i]);
- }
- }
- }
- function lolblock(e)
- {
- e.style.fontSize = Math.floor(Math.random() * 200) + '%';
- e.style.left = Math.floor(Math.random() * (document.body.clientWidth - e.offsetWidth)) + 'px';
- e.style.top = Math.floor(Math.random() * (document.body.clientWidth - e.offsetHeight)) + 'px';
- }
- </script>
- <div id="textwrap">
- <div id="textblock"></div>
- <a id="tooFuckingLaggyBro" href="#" onclick="toglolblock();"> Click this if it's a bit laggy ^-^ </a>
- </div>
- <div id="videos"></div>
- <iframe src="" id="youtube" type="application/x-shockwave-flash" width="750" height="450"></iframe>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement