Changeset 1835
- Timestamp:
- 11/01/09 22:44:24 (13 years ago)
- Location:
- themes/wellington
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
themes/wellington/js/wellington.js
r1806 r1835 1 1 $(document).ready(function(){ 2 //fontResizer('80%','100%','120%');3 // $("a").niceTitle();4 2 $("p.field:last").addClass("content"); 5 $("p.form-help").text("Les commentaires comprennent la syntaxe Wiki. Utilisez-la à bon escient."); 6 7 /*var link = $('<a href="#">' + $('.litribune h2').text() + '</a>').click(function() { 8 $('.litribune fieldset').show(200); 9 $('#tribnick').focus(); 10 $(this).parent().html($(this).text()); 11 return false; 12 }); 13 $('.litribune h2').empty().append(link); 14 $('.litribune fieldset').hide();*/ 15 3 //$("p.form-help").text("Les commentaires comprennent la syntaxe Wiki. Utilisez-la à bon escient."); 16 4 }); 17 5 … … 27 15 $('#sidebar .litribune fieldset').hide(); 28 16 }); 29 30 31 // Developed by fluidByte (http://www.fluidbyte.net)32 function fontResizer(smallFont,medFont,largeFont)33 {34 function clearSelected() { $(".smallFont").removeClass("curFont"); $(".medFont").removeClass("curFont"); $(".largeFont").removeClass("curFont"); }35 function saveState(curSize) { var date = new Date(); date.setTime(date.getTime()+(7*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); document.cookie = "fontSizer"+"="+curSize+expires+"; path=/"; }36 37 $(".smallFont").click(function(){ $('html').css('font-size', smallFont); clearSelected(); $(".smallFont").addClass("curFont"); saveState(smallFont); });38 39 $(".medFont").click(function(){ $('html').css('font-size', medFont); clearSelected(); $(".medFont").addClass("curFont"); saveState(medFont); });40 41 $(".largeFont").click(function(){ $('html').css('font-size', largeFont); clearSelected(); $(".largeFont").addClass("curFont"); saveState(largeFont); });42 43 function getCookie(c_name) { if (document.cookie.length>0) { c_start=document.cookie.indexOf(c_name + "="); if (c_start!=-1) { c_start=c_start + c_name.length+1; c_end=document.cookie.indexOf(";",c_start); if (c_end==-1) c_end=document.cookie.length; return unescape(document.cookie.substring(c_start,c_end)); } } return ""; }44 45 var savedSize = getCookie('fontSizer');46 47 if (savedSize!="") { $('html').css('font-size', savedSize); switch (savedSize) { case smallFont: $(".smallFont").addClass("curFont"); break; case medFont: $(".medFont").addClass("curFont"); break; case largeFont: $(".largeFont").addClass("curFont"); break; default: $(".medFont").addClass("curFont"); } }48 else { $('html').css('font-size', medFont); $(".medFont").addClass("curFont"); }49 }50 17 51 18 … … 66 33 }); 67 34 } 68 69 70 /*71 * jQuery niceTitle plugin72 * Version 1.00 (1-SEP-2009)73 * @author leeo(IT北瓜)74 * @requires jQuery v1.2.6 or later75 *76 * Examples at: http://imleeo.com/jquery-example/jQuery.niceTitle.html77 * Copyright (c) 2009-2010 IT北瓜www.imleeo.com78 * Dual licensed under the MIT and GPL licenses:79 * http://www.opensource.org/licenses/mit-license.php80 * http://www.gnu.org/licenses/gpl.html81 82 *History:83 *Version 1.00 (1-SEP-2009) The first release84 *Version 1.10 (7-SEP-2009) Fixed the bug in IE when change parameter "bgColor"(add code: line: 68,69)85 *Version 1.20 (14-SEP-2009) Hide the <img />'s alt and title attributes if <a> includes an image.(code: line: 21,46-53,84-87)86 */87 ;(function($) {88 $.fn.niceTitle = function(options){89 var opts = $.extend({}, $.fn.niceTitle.defaults, options);90 var _self = this, _imgAlt = "", _imgTitle = "", _hasImg = false, _imgObj;91 this.initialize = function(_opts){92 var htmlStr = "";93 if(jQuery.browser.msie){//如果是IE浏览器,则通过css来产生圆角效果94 htmlStr = '<div id="niceTitle">' +95 '<span>' +96 '<span class="r1"></span>' +97 '<span class="r2"></span>' +98 '<span class="r3"></span>' +99 '<span class="r4"></span>' +100 '</span>' +101 '<div id="niceTitle-ie"><p><em></em></p></div>' +102 '<span>' +103 '<span class="r4"></span>' +104 '<span class="r3"></span>' +105 '<span class="r2"></span>' +106 '<span class="r1"></span>' +107 '</span>' +108 '</div>';109 }else{110 htmlStr = '<div id="niceTitle"><p><em></em></p></div>';111 }112 $(_self).mouseover(function(e){113 this.tmpTitle = this.title;//等价于$(this).attr("title");114 this.tmpHref = this.href;//等价于$(this).attr("href");115 _imgObj = $(this).find("img");116 if(_imgObj.length > 0){117 _imgAlt = _imgObj.attr("alt");118 _imgObj.attr("alt", "");119 _imgTitle = _imgObj.attr("title");120 _imgObj.attr("title", "");121 _hasImg = true;122 }123 var _length = _opts.urlSize;124 this.tmpHref = (this.tmpHref.length > _length ? this.tmpHref.toString().substring(0,_length) + "..." : this.tmpHref);125 this.title = "";//等价于$(this).attr("title", "");126 $(htmlStr).appendTo("body").find("p").prepend(this.tmpTitle + "<br />").css({"color": _opts.titleColor}).find("em").text(this.tmpHref).css({"color": _opts.urlColor});127 var obj = $('#niceTitle');128 obj.css({129 "position":"absolute",130 "text-align":"left",131 "padding":"5px",132 "opacity": _opts.opacity,133 "top": (e.pageY + _opts.y) + "px",134 "left": (e.pageX + _opts.x) + "px",135 "z-index": _opts.zIndex,136 "max-width": _opts.maxWidth + "px",137 "width": "auto !important",138 "width": _opts.maxWidth + "px",139 "min-height": _opts.minHeight + "px",140 "-moz-border-radius": _opts.radius + "px",141 "-webkit-border-radius": _opts.radius + "px"142 });143 if(!jQuery.browser.msie){//如果不是IE浏览器144 obj.css({"background": _opts.bgColor});145 }else{//Version 1.10修正IE下改变背景颜色146 $('#niceTitle span').css({"background-color": _opts.bgColor, "border-color": _opts.bgColor});147 $('#niceTitle-ie').css({"background": _opts.bgColor, "border-color": _opts.bgColor});148 }149 obj.show('fast');150 }).mouseout(function(){151 this.title = this.tmpTitle;152 $('#niceTitle').remove();153 if(_hasImg){154 _imgObj.attr("alt", _imgAlt);155 _imgObj.attr("title", _imgTitle);156 }157 }).mousemove(function(e){158 $('#niceTitle').css({159 "top": (e.pageY + _opts.y) + "px",160 "left": (e.pageX + _opts.x) + "px"161 });162 });163 return _self;164 };165 this.initialize(opts);166 };167 $.fn.niceTitle.defaults = {168 x: 10,169 y: 20,170 urlSize: 30,171 bgColor: "#000",172 titleColor: "#FFF",173 urlColor: "#F60",174 zIndex: 999,175 maxWidth: 250,176 minHeight: 30,177 opacity: 0.8,178 radius: 8179 };180 })(jQuery); -
themes/wellington/wellington.css
r1806 r1835 181 181 /* Met en évidence les citations */ 182 182 blockquote { 183 color:# 888a85;183 color:#babdb6; 184 184 border-left:3px solid #555753; 185 185 padding-left:5px; … … 362 362 text-shadow: #eeeeec 0px 0px 5px; 363 363 } 364 365 #content-info h2 a {text-shadow:none;} 366 364 367 #content-info p { 365 368 … … 464 467 text-shadow:0 1px #111; 465 468 margin:0 0 15px 0; 466 color:# babdb6;469 color:#d3d7cf; 467 470 } 468 471 … … 490 493 .footnotes { 491 494 color:#888a85; 495 margin:0 0 1.5em 0; 492 496 } 493 497 .footnotes h4 { … … 498 502 499 503 .footnotes p{ 504 margin:0; 500 505 padding:0 5px; 501 506 font-size:85%; … … 540 545 } 541 546 542 #attachments ul li {padding:8px 0 8px 3 2px;}547 #attachments ul li {padding:8px 0 8px 34px;} 543 548 #attachments ul li a{border:none;} 544 549 #attachments li.audio {background:transparent url(img/mime/audio-x-generic.png) no-repeat scroll left center;} … … 604 609 } 605 610 606 611 #pings dl {} 607 612 #pings p {} 608 613 #pings .first { } 609 614 #pings .odd { } 610 615 #pings .me { } 611 616 #pr dl { } 612 617 #pr dd { } 613 618 … … 645 650 height:100%; 646 651 } 647 652 .field input:hover,.field textarea:hover,.field input:focus,.field textarea:focus { 648 653 color:#eeeeec; 649 654 border-color:#ad7FA8; … … 675 680 8. SIDEBAR 676 681 ------------------------------------------------------------- */ 677 678 682 #sidebar {} 683 #sidebar a{} 679 684 #sidebar a:hover{} 680 685 #sidebar ul{ … … 695 700 border:none; 696 701 } 697 702 #sidebar h2 { 698 703 color:#eeeeec; 699 704 text-shadow: #eeeeec 0px 0px 5px; … … 703 708 margin-top:10px; 704 709 } 705 710 #sidebar h3 { 706 711 color:#babdb6; 707 712 text-shadow: #babdb6 0px 0px 5px; … … 830 835 background-image :none; 831 836 } 832 .tag0{ font-size: 85%;}833 834 .tag20{ font-size: 95%;}835 .tag30{ font-size: 100%;}836 837 .tag50{ font-size: 110%;}838 839 840 841 .tag90,{ font-size: 130%;}842 837 .tag0 { font-size: 85%;} 838 .tag10 { font-size: 90%;} 839 .tag20 { font-size: 95%;} 840 .tag30 { font-size: 100%;} 841 .tag40 { font-size: 105%;} 842 .tag50 { font-size: 110%;} 843 .tag60 { font-size: 115%;} 844 .tag70 { font-size: 120%;} 845 .tag80 { font-size: 125%;} 846 .tag90 { font-size: 130%;} 847 .tag100 { font-size: 135%;} 843 848 844 849 /* messages d'erreur */
Note: See TracChangeset
for help on using the changeset viewer.