Permalink
Browse files

fix: labels's background color 标签背景色

  • Loading branch information...
MOxFIVE committed Feb 27, 2016
1 parent d0167eb commit dd1c3a837d300d3d748f8ea4f737ab7a29070f62
Showing with 7 additions and 20 deletions.
  1. +7 −0 source/js/main.js
  2. +0 −10 source/js/mobile.js
  3. +0 −10 source/js/pc.js
View
@@ -149,4 +149,11 @@ require([], function (){
$("#container .left-col .overlay").css({"background-color": colorList[id],"opacity": .3});
//移动端
$("#container #mobile-nav .overlay").css({"background-color": colorList[id],"opacity": .7});
var tags = $(".tagcloud a");
for(var i = 0; i < tags.length; i++){
var num = parseInt(4*Math.random()) + 1;
tags.eq(i).addClass("color" + num);
};
$(".article-category a:nth-child(-n+2)").attr("class", "color5");
});
View
@@ -129,16 +129,6 @@ define([], function(){
}, false);
};
var resetTags = function(){
var tags = $(".tagcloud a");
tags.css({"font-size": "12px"});
for(var i=0,len=tags.length; i<len; i++){
var num = tags.eq(i).html().length % 5 +1;
tags[i].className = "";
tags.eq(i).addClass("color"+num);
}
}
return{
init: function(){
//构造函数需要的参数
View
@@ -17,16 +17,6 @@ define([], function(){
}
})();
var resetTags = function(){
var tags = $(".tagcloud a");
tags.css({"font-size": "12px"});
for(var i=0,len=tags.length; i<len; i++){
var num = tags.eq(i).html().length % 5 +1;
tags[i].className = "";
tags.eq(i).addClass("color"+num);
}
}
var slide = function(idx){
// 修复IE10+切换无效的bug
var $wrap = $(".switch-wrap"),

1 comment on commit dd1c3a8

@MOxFIVE

This comment has been minimized.

Show comment
Hide comment
@MOxFIVE

MOxFIVE Feb 28, 2016

Owner

Revert : c01b544

Owner

MOxFIVE commented on dd1c3a8 Feb 28, 2016

Revert : c01b544

Please sign in to comment.