diff options
| author | Unknown <Alee14498@gmail.com> | 2017-10-01 00:24:20 -0400 |
|---|---|---|
| committer | Unknown <Alee14498@gmail.com> | 2017-10-01 00:24:20 -0400 |
| commit | 78f3c0e9893d36e0ce039c2b79ede8a92ebe468a (patch) | |
| tree | 8479930f9372a1e9998b6750651565cf52b81ca8 /apps/skybookmarks/index.html | |
| parent | d8ba59582c137de474789690e777d8c029e08fe6 (diff) | |
| download | windows8online-78f3c0e9893d36e0ce039c2b79ede8a92ebe468a.tar.gz windows8online-78f3c0e9893d36e0ce039c2b79ede8a92ebe468a.tar.bz2 windows8online-78f3c0e9893d36e0ce039c2b79ede8a92ebe468a.zip | |
Adding the code
Diffstat (limited to 'apps/skybookmarks/index.html')
| -rw-r--r-- | apps/skybookmarks/index.html | 275 |
1 files changed, 275 insertions, 0 deletions
diff --git a/apps/skybookmarks/index.html b/apps/skybookmarks/index.html new file mode 100644 index 0000000..c19dd83 --- /dev/null +++ b/apps/skybookmarks/index.html @@ -0,0 +1,275 @@ +<!DOCTYPE html> +<html> +<head> + <meta http-equiv="content-type" content="text/html; charset=utf-8" /> + <meta http-equiv="x-ua-compatible" content="IE=edge"> + <title>SkyBookmarks</title> + <!--Stylesheet that styles the charms bar and the startbutton --> + <link rel="stylesheet" href="css/charms.css"/> + + <!--Script that powers the charms bar--> + <script> +function charms(){ + document.getElementById('charmsbar').style.display='block'; + document.getElementById('datetime').style.display='block'; +} +function destroycharms() { + document.getElementById('charmsbar').style.display='none'; + document.getElementById('datetime').style.display='none'; +} +function start(){ + document.getElementById('startbutton').style.display='block'; +} +function destroystart() { + document.getElementById('startbutton').style.display='none'; +} + </script> + <script src="http://ajax.microsoft.com/ajax/jquery/jquery-1.4.2.min.js" type="text/javascript"></script> + <script type="text/javascript"> + +var int=parseInt;function r(f,t){if(!t){t=f+1;f=0;} +return Math.floor((Math.random()*t)+f);} +var d=m=zi=0;$.fn.d=function(a){return $(this).each(function(){$(this).css("position","absolute").mousedown(function(e){d=$(this);d.css("z-index",++zi);$(a).css("z-index",zi+1);d.x=int(d.css("left"));d.y=int(d.css("top"));d.ex=e.clientX;d.ey=e.clientY;e.preventDefault();});});} +$(document).mousemove(function(e){if(d){m=1;x=e.clientX;y=e.clientY;nx=x-(d.ex-d.x);ny=y-(d.ey-d.y);d.css({"left":nx+"px","top":ny+"px"});}}).click(function(e){if(m)e.preventDefault();d=0;m=0;});var z=0,zf=4;function zm(e){dir=e.detail?e.detail*-1:e.wheelDelta/40;dir=dir<0?1:-1;if(dir>0){z--;}else{z++;} +if(z<-5){z=-5;}else if(z>0){z=0;}else{cols=['CAFFFF','D0FFFF','D5FFFF','DAFFFF','E0FFFF','E5FFFF'] +$('#d').css('background',"-moz-linear-gradient(top, #FFFFFF, #"+cols[Math.abs(z)]+")");if(z==0){$('.d').show();$('.i').width(200).height(64);$('.i img').width(64).height(64);}else{h=64-(Math.abs(z)*2*zf);$('.i img, .i').width(h).height(h);$('.d').hide();} +$('.i').each(function(i){old_left=int($(this).css('left'));old_top=int($(this).css('top'));if(dir>0){dist=((e.clientX>old_left)?e.clientX-old_left:old_left-e.clientX)/zf;new_left=(e.clientX>old_left)?old_left+dist:old_left-dist;dist=((e.clientY>old_top)?e.clientY-old_top:old_top-e.clientY)/zf;new_top=(e.clientY>old_top)?old_top+dist:old_top-dist;}else{dist=((e.clientX>old_left)?e.clientX-old_left:old_left-e.clientX)/(zf-1);new_left=(e.clientX>old_left)?old_left-dist:old_left+dist;dist=((e.clientY>old_top)?e.clientY-old_top:old_top-e.clientY)/(zf-1);new_top=(e.clientY>old_top)?old_top-dist:old_top+dist;} +$(this).css('left',new_left+"px");$(this).css('top',new_top+"px");});sv();}} +var pp=0;var pxy={};function pn(e){if(pp&&!d){$('.i').each(function(){$(this).css('left',((e.clientX-pxy.x)+int($(this).css('left')))+"px");$(this).css('top',((e.clientY-pxy.y)+int($(this).css('top')))+"px");});sv();} +pxy={x:e.clientX,y:e.clientY};} +function sv(){var es={"z":z,"x":pxy.x,"y":pxy.y};var is=[];$(".i:not(#t,.d)").each(function(){s=$(this);o={} +o.u=s.find('a').attr("href");o.x=int(s.css("left"));o.y=int(s.css("top"));o.d=s.find('textarea').val();is.push(o);});es.is=is;localStorage.setItem("u24_e",JSON.stringify(es));} +function l(){ld=localStorage.getItem('u24_e');if(ld==null)return 0;es=$.parseJSON(ld);for(e in es.is){i(es.is[e]);} +z=es.z;if(z<0){$('.d').hide();h=64-(Math.abs(z)*2*zf);$('.i img, .i').width(h).height(h);} +return(es!=null);} +var a;function i(n){a=a||document.createElement('a');a.href=n.u;dm=a.hostname.replace(/^www./,'');var t=n.d;if(!n.d&&a.pathname!='/')t=a.pathname;x=n.x||r(500);y=n.y||r(500);ni=$('#t').hide().clone().addClass('i').removeAttr("id").height(64).mouseup(function(){sv();});ni.css({"top":y+"px","left":x+"px"}).children('a').attr({href:n.u,title:n.u}).children('img').error(function(){$(this).attr("src","u.gif");}).attr('src','http://'+dm+'/favicon.ico').parent().find('b').text(dm).parents().find('textarea').val(t).click(function(e){this.focus();e.preventDefault();}).blur(function(e){e.preventDefault();}).parents().find('.x').click(function(){if(!m){$(this).parent().addClass('d').fadeOut();sv();}}).hide().parent().mouseenter(function(){if(!m&&!z)$(this).children('.x').show();}).mouseleave(function(){if(!m)$(this).children('.x').hide()}).keyup(function(){sv();});ni.appendTo("#d").d('#c').fadeIn(500);} +function p(){localStorage.setItem("u24_e",'{"z":-5,"x":376,"y":319,"is":[{"u":"http://puremango.co.uk","x":1013,"y":256,"d":"SkyTop maker\'s blog"},{"u":"http://reddit.com","x":386,"y":507,"d":""},{"u":"http://facebook.com","x":366,"y":443,"d":""},{"u":"http://bing.com","x":211,"y":108,"d":""},{"u":"http://google.com","x":153,"y":96,"d":""},{"u":"http://news.ycombinator.com","x":332,"y":497,"d":""},{"u":"http://10k.aneventapart.com","x":959,"y":227,"d":""},{"u":"http://news.bbc.co.uk","x":143,"y":147,"d":""},{"u":"http://jquery.com","x":970,"y":309,"d":""},{"u":"http://twitter.com/puremango","x":1075,"y":220,"d":"/puremango"},{"u":"http://reddit.com/r/programming/comments/d13v2/create_a_web_app_under_10kb/","x":1048,"y":313,"d":"/r/programming/comments/d13v2/create_a_web_app_under_10kb/"},{"u":"http://flickr.com","x":185,"y":156,"d":""},{"u":"http://lifehacker.com","x":363,"y":265,"d":""},{"u":"http://digg.com","x":419,"y":453,"d":""},{"u":"http://twitter.com/","x":307,"y":447,"d":""},{"u":"http://ajaxian.com/","x":364,"y":306,"d":""}]}');l();} +$(document).ready(function(){$(window).bind({DOMMouseScroll:zm,mousewheel:zm});$('#d').mousedown(function(){pp=1;$('#d').css('cursor','url("grabbing.cur"), default');}).mousemove(pn).mouseup(function(){pp=0;$('#d').css('cursor','default');});$('INPUT').click(function(){if(!this.c)$(this).select();this.c=true;}).blur(function(){this.c=false;});$('#u').keyup(function(e){if(e.which==13)i({"u":this.value,"d":"edit"})});$('#c #l').click(function(){if(confirm("Reset all bookmarks ?")){saved=localStorage.getItem("u24_e");if(saved!=null){localStorage.removeItem("u24_e");} +$('.i').animate({top:$(document).height()-100,opacity:0},1500,"",function(){$(this).remove();if($('.i:animated').length==0){z=0;p();}});}});$('#c b').click(function(){if($(this).text()=="[+]")$(this).text("[-]");else $(this).text("[+]");$('#cc').slideToggle();});l()||p();}); + </script> + <style> + html,body{ + overflow: hidden; + cursor: default; + font-family: Segoe UI Light; + font-size: 11pt; + margin: 0; + height: 100%; + } + #d{ + cursor: default; + display: block; + background:#FFF; + width: 100%; + height: 100%; + } + #c{ + position: absolute; + // initial z-index to ensure if they expand before they drag anything, it's on top. + z-index: 1; + top: 0; + left: 0; + width: 100%; + padding: 10px 0px 10px 0px; + background: #404040; + color: #FFFFFF; + } + #c u, #c b{ + cursor: pointer; + } + #c b{ + display: block; + width: 20px; + } + #cc{ + display:none; + height: 30px; + padding-top: 5px; + padding-left: 30px; + } + .i{ + background:#FFF; + width: 200px; + height: 64px; + } + .i a{ + cursor: alias; + } + a img{ + margin-right: 2px; + float: left; + } + a .d{ + overflow: hidden; + } + textarea{ + color: #777; + font-size: 8pt; + width: 129px; + height: 46px; + border: none; + overflow: hidden; + } + a{ + color: #000; + text-decoration: none; + } + .x{ + position: absolute; + top: 0; + right: 0px; + width: 20px; + height: 15px; + text-align: center; + background: #AAA; + font-weight: bold; + font-family: Arial; + font-size: 14px; + color: #FFF; + border-bottom: 1px solid #FFF; + border-left: 1px solid #FFF; + } + input{ + width: 300px; + } + label{ + display: block; + float: left; + width: 100px; + } + #c div{ + padding-left: 9px; + float: left; + } + #c div p{ + margin:0; + padding-top: 3px; + } + h1{ + margin:0; + padding:0; + font-size: 15pt; + color: #FFF; + font-family:Segoe UI Light; + font-weight:normal; + } + #u { +margin-left:40px; + background-color: rgba(255, 255, 255, 0.6); + border:none; + width: 500px; + padding: 4px; + font-family:Segoe UI; + font-size:11pt; + } + #u:hover { + background-color: rgba(255, 255, 255, 0.8); +} + #u:focus{ + background-color: rgb(255, 255, 255); +} + #l { + position: absolute; + right:10px; + background-color: rgba(219, 40, 30, 0.7); + border:none; + padding: 4px; + font-family:Segoe UI; + font-size:11pt; +color: rgba(255, 255, 255, 0.9); + } + #l:hover { + background-color: rgba(219, 40, 30, 0.8); +} + #l:active{ + background-color: rgb(219, 40, 30); +} + +#description { +margin-left:20px; +margin-top:4px; +} + </style> +</head> +<body> +<div id="splashscreen"></div> + <!-- controls --> + <header id="c"> + <div><h1>SkyBookmarks</h1></div> + <div><input type="text" id="u" value="http://" /></div> + <div id="description">Your bookmarks, in the sky...</div> +<button id="l">Reset</button> + </header> + <!-- /controls --> + <!-- desktop --> + <section id="d"> + <!-- icon template --> + <div id="t"> + <a target="_blank"> + <img width="64" height="64" border="none" /> + <div class='d'> + <b></b><br /> + <TEXTAREA></TEXTAREA> + </div> + </a> + <div class='x'>X</div> + </div> + <!-- /icon template --> + </section> + <!-- /desktop --> + <!-- CHARMS BAR CODE --> + <div id="hoverarea" onmouseover="charms()" class="hotcorner"> + </div> + <div id="charmsbar" onmouseover="charms()" onmouseout="destroycharms()"> + <img src="../../common/img/charmsbar/search.png" onmouseover="this.src='../../common/img/charmsbar/search-hover.png'" onmouseout="this.src='../../common/img/charmsbar/search.png'"/><br/> + <img src="../../common/img/charmsbar/share.png" onmouseover="this.src='../../common/img/charmsbar/share-hover.png'" onmouseout="this.src='../../common/img/charmsbar/share.png'"/><br/> + <a href="../../start/index.html"><img src="../../common/img/charmsbar/start.png" onmouseover="this.src='../../common/img/charmsbar/start-hover.png'" onmouseout="this.src='../../common/img/charmsbar/start.png'"/></a><br/> + <img src="../../common/img/charmsbar/devices.png" onmouseover="this.src='../../common/img/charmsbar/devices-hover.png'" onmouseout="this.src='../../common/img/charmsbar/devices.png'"/><br/> + <img src="../../common/img/charmsbar/settings.png" onmouseover="this.src='../../common/img/charmsbar/settings-hover.png'" onmouseout="this.src='../../common/img/charmsbar/settings.png'" onclick="settingsc()"/><br/> + </div> + <div id="datetime"> + <img src="../../common/img/charmsbar/network.png" id="iconnetwork" height="24px" width="24px"/> + <img src="../../common/img/charmsbar/battery.png" id="iconbattery"/> + <span id="time"></span> + <script> +<!-- Begin +function clock() { +var digital = new Date(); +var hours = digital.getHours(); +var minutes = digital.getMinutes(); +var seconds = digital.getSeconds(); +var amOrPm = "AM"; +if (hours > 11) amOrPm = "PM"; +if (hours > 12) hours = hours - 12; +if (hours == 0) hours = 12; +if (minutes <= 9) minutes = "0" + minutes; +if (seconds <= 9) seconds = "0" + seconds; +dispTime = hours + ":" + minutes ; +document.getElementById('time').innerHTML = dispTime; +setTimeout("clock()", 1000); +} +window.onmouseover=clock; +// End --> + </script> + <div id="date"> + <script> + + var dayName = new Array ("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday") + + var monName = new Array ("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December") + + var now = new Date + + document.write("" + dayName[now.getDay()] + "<br/>" +"<span id=month>" + monName[now.getMonth()] + " "+now.getDate() +"") + </script> + </div> + </div> + <div id="bottomhoverarea" onmouseover="charms()" class="hotcorner"> + </div> + <div id="starthoverarea" onmouseover="start()" class="hotcorner"> + </div> + <div id="startbutton" onmouseout="destroystart()"> + <a href="../../start/index.html"><img src="../../common/img/charmsbar/startbutton.png"/></a> + </div> +</body> +</html>
\ No newline at end of file |
