Changeset 34698
- Timestamp:
- 08/01/09 19:18:17 (4 years ago)
- Files:
-
- 1 modified
-
websites/modoki/index.html (modified) (18 diffs)
Legend:
- Unmodified
- Added
- Removed
-
websites/modoki/index.html
r34451 r34698 10 10 } 11 11 html, body{ 12 height: 100%;13 12 } 14 13 body{ 15 14 color: #333333; 16 15 background: #f6f6f6; 17 font-size: 9pt;16 font-size: 13pt; 18 17 font-family: Arial, Verdana; 18 overflow: none; 19 19 } 20 20 #content{ 21 width: 100%;22 height: 100%;23 21 } 24 22 #header{ 25 23 width: 100%; 26 position: fixed;27 24 height: 25px; 28 top: 0;29 25 color : #412109; 30 26 background: #ffc410; … … 32 28 } 33 29 #footer{ 34 width: 100%;35 position: fixed;36 30 background: #f6f6f6; 37 bottom: 0;31 height: 122px; 38 32 } 39 33 #out{ 40 height: 50px;41 34 border-top: 1px solid #aaaaaa; 42 font-size: 14px; 35 font-size: 12pt; 36 height: 64px; 43 37 background: #f6f6f6; 44 38 clear : both; 45 39 } 46 40 #userInput{ 47 height: 40px;41 width: 100%; 48 42 } 49 43 #multiple{ 50 44 width: 100%; 51 height: 100%;45 height: 40px; 52 46 border: 1px solid #aaa; 53 background: #ffffff;54 47 } 55 48 .user_icon{ … … 57 50 } 58 51 .user_icon img{ 59 width: 16px;60 height: 16px;61 }62 #out img{63 52 width: 32px; 64 53 height: 32px; 54 } 55 #out img{ 56 width: 64px; 57 height: 64px; 65 58 } 66 59 .blocked{ … … 84 77 ul{ 85 78 list-style:none; 86 }79 } 87 80 ul#time_line{ 88 width: 100%; 89 padding-top: 25px; 90 padding-bottom: 115px; 81 overflow: auto; 91 82 } 92 83 ul#time_line li{ 93 height: 16px; 94 width: 99%; 84 height: 32px; 95 85 clear: left; 86 } 87 .odd{ 88 background-color: #f6f6f6; 89 } 90 .even{ 91 background-color: #cccccc; 96 92 } 97 93 .twid{ … … 100 96 #time_line .twtext{ 101 97 overflow: hidden; 102 height:16px; 103 } 104 #out .user_icon{ 105 display: block; 106 float: left; 107 } 108 #out .twid{ 109 display: block; 110 float: left; 111 margin-right: 5px; 112 font-weight: bold; 98 height:32px; 113 99 } 114 100 #time_line .twname{ 115 101 width: 100px; 116 102 overflow: hidden; 117 height: 16px;103 height:32px; 118 104 float:left; 119 105 } 106 #out .user_icon{ 107 display: block; 108 } 120 109 #out .twname{ 110 } 111 #out .twid{ 121 112 float: left; 122 font-weight: bold; 113 display: block; 114 margin-right: 5px; 123 115 } 124 116 #out .twtext{ 125 117 display: block; 126 118 clear: both; 127 margin-left: 36px;119 margin-left: 70px; 128 120 position: relative; 129 top: -16px; 121 top: -48px; 122 font-size: 16pt; 123 overflow : hidden; 124 height: 52px; 125 } 126 #out .odd{ 127 background : none; 128 } 129 #out .even{ 130 background : none; 131 } 132 #out .nameBlock { 133 position: relative; 134 margin-left: 0px; 135 font-weight : bold; 136 height : 1em; 137 overflow : hidden; 130 138 } 131 139 div#tabBox{ … … 170 178 div#option_area{ 171 179 padding-top: 25px; 172 padding-bottom: 165px;180 padding-bottom: 215px; 173 181 display: none; 174 182 } … … 229 237 this._altanative = (new Date).getTime(); 230 238 this._crosspost = 0; 231 this._version = "0.4 1";239 this._version = "0.45"; 232 240 this._max_id = 0; 233 241 this.p_name = ""; … … 264 272 var _tilme_line = content.appendChild(d.createElement("ul")); 265 273 _tilme_line.id = "time_line"; 274 var _tl_height = window.innerHeight - d.getElementById("header").offsetHeight - d.getElementById("footer").offsetHeight - 40; 275 _tilme_line.style.height = _tl_height + "px"; 276 window.addEventListener("resize", function(){ 277 var _tl_height = window.innerHeight - d.getElementById("header").offsetHeight - d.getElementById("footer").offsetHeight - 40; 278 _tilme_line.style.height = _tl_height + "px"; 279 }, false ); 266 280 267 281 //option … … 331 345 _userInput.name = "userInput"; 332 346 333 var _multiple = _userInput.appendChild(d.createElement("textarea")); 347 var _label = _userInput.appendChild(d.createElement("label")); 348 _label.setAttribute("for", "multiple"); 349 350 var _multiple = _label.appendChild(d.createElement("textarea")); 334 351 _multiple.id = "multiple"; 335 352 _multiple.name = "multiple"; 336 353 337 354 _multiple.addEventListener("keypress", function(e){ 338 if( e.which == 13 ){ //if return 339 e.preventDefault(); 355 switch( e.which ){ 356 case 13: 357 e.preventDefault(); 340 358 _self.postTwitter(); 341 359 this.blur(); 342 }else if( e.which == 9){ //if tab 360 break; 361 case 9: 343 362 e.preventDefault(); 344 363 this.blur(); 364 break; 345 365 } 346 366 … … 411 431 lasts[lasts.length-1].className =lasts[lasts.length-1].className.replace(/read|unread/,"blocked"); 412 432 var y = lasts[lasts.length-1].offsetTop; 413 window.scroll(0,y);433 d.getElementById("time_line").scrollTop = y; 414 434 }else{ 415 435 //go to last unread 416 436 line[0].className = line[0].className.replace(/read|unread/,"blocked"); 417 437 var y = line[0].offsetTop; 418 window.scroll(0,y);438 d.getElementById("time_line").scrollTop = y; 419 439 } 420 440 }, … … 485 505 d.getElementById("out").innerHTML = this.nt[0].innerHTML; 486 506 this.nt[0].className = this.nt[0].className.replace(/read|unread/, "blocked read"); 487 window.scroll(0,0); 507 //window.scroll(0,0); 508 d.getElementById("time_line").scrollTop = 0; 488 509 }else{ 489 510 for( var i=0, l=this.nt.length; i<l; i++ ){ … … 493 514 this.nt[i+diff].className = this.nt[i+diff].className.replace(/read|unread/,"blocked"); 494 515 var sc = (this.nt[i+diff].offsetHeight+1) * diff; 495 window.scrollBy(0, sc);516 d.getElementById("time_line").scrollTop += sc; 496 517 break; 497 518 } … … 509 530 node.parentNode.className = node.parentNode.className.replace(/read|unread/, "blocked" ); 510 531 } 511 window.scroll(0,node.offsetTop);532 d.getElementById("out").innerHTML = node.parentNode.innerHTML; 512 533 }, 513 534 postTwitter : function(){ … … 597 618 598 619 /*//debug 620 var rn = function( n ){ 621 var a = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890!@#$%^&*()_+|~'; 622 a = a.split(''); 623 var s=''; 624 var l=a.length; 625 for( var i=0; i<n; i++ ){ 626 s += a[Math.floor(Math.random()*l)]; 627 } 628 return s; 629 }; 599 630 for( var i=0; i<200; i++ ){ 600 631 obj = new Object(); 601 632 obj.id = i; 602 633 obj["user"] = new Object(); 603 obj.user.profile_image_url = "http://s3.amazonaws.com/twitter_production/profile_images/248291925/miku_tome_normal.gif"; 604 obj.user.screen_name = "hoge"; 605 //obj.user.name = "piyo"; 606 obj.user.name = "piyo@piyopiyopiyopiy"; 607 //obj.text = "fugafugafugafugafugafugafugafugafugafugafugafugafugafugafugafugafugafugafugafugafugafugafugafugafugafugafugafugafugafugafugafugafugafugafuga"; 608 obj.text = "������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������" + Math.random(i); 609 //obj.text = "fugafuga" + Math.random(i); 610 611 createLiTag(obj); 634 obj.user.profile_image_url = "https://s3.amazonaws.com/twitter_production/profile_images/333996414/twitterProfilePhoto_bigger.jpg"; 635 obj.user.screen_name = rn(10); 636 obj.user.name = rn(20); 637 obj.text = rn(140); 638 639 createLiTag(obj, i); 612 640 } 613 641 //*/this.getJSON(url); … … 635 663 636 664 var cb = function(data){ 637 for( var i=data.length; i-- > 0; createLiTag(data[i] ) );665 for( var i=data.length; i-- > 0; createLiTag(data[i], i) ); 638 666 var _script = d.getElementsByTagName("script"); 639 667 _script[_script.length-1].parentNode.removeChild(_script[_script.length-1]); 640 668 }; 641 669 642 var createLiTag = function(obj ){670 var createLiTag = function(obj, n){ 643 671 //check obj 644 672 var o = d.getElementById(obj.id); … … 654 682 liTag.className += " fav"; 655 683 } 656 657 684 liTag.addEventListener("click", function(e){ modoki.mousemove(e.target); }, false ); 658 685 … … 663 690 imgTag.src = obj["user"]["profile_image_url"]; 664 691 665 var twidDiv = liTag.appendChild(d.createElement("div")); 692 var nameBlock = liTag.appendChild(d.createElement("div")); 693 nameBlock.className = "nameBlock"; 694 695 var twidDiv = nameBlock.appendChild(d.createElement("div")); 666 696 twidDiv.appendChild(d.createTextNode(obj["user"]["screen_name"] + "/")); 667 697 twidDiv.className = "sub twid"; 668 698 669 var nameDiv = liTag.appendChild(d.createElement("div"));699 var nameDiv = nameBlock.appendChild(d.createElement("div")); 670 700 nameDiv.appendChild(d.createTextNode(obj["user"]["name"])); 671 701 nameDiv.className = "sub twname"; … … 677 707 textDiv.innerHTML = text; 678 708 textDiv.className = "sub twtext"; 709 710 if( n % 2 == 0 ){ 711 nameDiv.className += " even"; 712 textDiv.className += " even"; 713 }else{ 714 nameDiv.className += " odd"; 715 textDiv.className += " odd"; 716 } 717 679 718 }; 680 719 </script>
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)