add skins
add skins
This commit is contained in:
79
Shawn/js/core.js
Normal file
79
Shawn/js/core.js
Normal file
@@ -0,0 +1,79 @@
|
||||
$("#share ul").css({
|
||||
"display": "none",
|
||||
"top": "-225px",
|
||||
"opacity": "0"
|
||||
});
|
||||
$(".commentlist li cite a,.outter a").attr("href",
|
||||
function() {
|
||||
var domain_const = "{{blog.domain}}".substring(0, 7) + "";
|
||||
return this.href.replace(domain_const, "")//your domain#####################
|
||||
});
|
||||
$(".commentlist li cite a[href='http://']").each(function() {
|
||||
$(this).replaceWith("<span style='color:#444;border-bottom:1px dotted #aaa'>" + $(this).text() + "</span>")
|
||||
});
|
||||
$(document).ready(function() {
|
||||
//$("#header").html($("#headerf").html());
|
||||
//$(".timeta").html($(".meta").html());
|
||||
|
||||
// set selected navi
|
||||
$("#header-navi li").each(function (i) {
|
||||
if (i < $("#header-navi li").length) {
|
||||
var $it = $(this),
|
||||
locationURL = window.location.pathname + window.location.search;
|
||||
if (i === 0 && (locationURL === "/")) {
|
||||
$it.addClass("current_page_item");
|
||||
return;
|
||||
}
|
||||
if (locationURL.indexOf($it.find("a").attr("href")) > -1 && i !== 0) {
|
||||
$it.addClass("current_page_item");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if ($("input#author:has[value]").length > 0) {
|
||||
$("div.friendly").css("display", "none");
|
||||
$(".authorgra").css("display", "block");
|
||||
var A = '<span style="padding:0 5px;font:bold 10px verdana;color:#888;cursor:pointer;letter-spacing:0" class="infoeditor">(Edit)</span>';
|
||||
$("div#respond").append(A);
|
||||
$(".infoeditor").toggle(function() {
|
||||
$(".friendly").fadeIn();
|
||||
$(".authorgra").css("display", "none")
|
||||
},
|
||||
function() {
|
||||
$(".friendly").css("display", "none");
|
||||
$(".authorgra").fadeIn()
|
||||
})
|
||||
}
|
||||
$(".twitter").click(function() {
|
||||
window.open("http://twitter.com/ansenorg");
|
||||
return false
|
||||
})
|
||||
Util.setTopBar();
|
||||
})
|
||||
function hidetoolbar(){
|
||||
$("#wgToolBar").slideUp(600,function(){
|
||||
$("#showtoolbar").slideDown(600)
|
||||
})
|
||||
}
|
||||
function showtoolbar(){
|
||||
$("#showtoolbar").slideUp(600,function(){
|
||||
$("#wgToolBar").slideDown(600)
|
||||
})
|
||||
}
|
||||
// 点击暧昧文章
|
||||
var showRelatedul = function (id, label, tags) {
|
||||
var $relatedul = $("#relatedul");
|
||||
if ($relatedul.hasClass("hidden")) {
|
||||
if ($("#randomArticles").html() === "") {
|
||||
page.loadRandomArticles();
|
||||
page.loadRelevantArticles(id, label);
|
||||
if (page.tips.externalRelevantArticlesDisplayCount !== 0) {
|
||||
page.loadExternalRelevantArticles(tags);
|
||||
}
|
||||
}
|
||||
$relatedul.slideDown().removeClass("hidden");
|
||||
} else {
|
||||
$relatedul.slideUp().addClass("hidden");
|
||||
}
|
||||
}
|
||||
var common = new Common();
|
1
Shawn/js/core.min.js
vendored
Normal file
1
Shawn/js/core.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
$("#share ul").css({display:"none",top:"-225px",opacity:"0"});$(".commentlist li cite a,.outter a").attr("href",function(){var a="{{blog.domain}}".substring(0,7)+"";return this.href.replace(a,"")});$(".commentlist li cite a[href='http://']").each(function(){$(this).replaceWith("<span style='color:#444;border-bottom:1px dotted #aaa'>"+$(this).text()+"</span>")});$(document).ready(function(){$("#header-navi li").each(function(c){if(c<$("#header-navi li").length){var b=$(this),d=window.location.pathname+window.location.search;if(c===0&&(d==="/")){b.addClass("current_page_item");return}if(d.indexOf(b.find("a").attr("href"))>-1&&c!==0){b.addClass("current_page_item")}}});if($("input#author:has[value]").length>0){$("div.friendly").css("display","none");$(".authorgra").css("display","block");var a='<span style="padding:0 5px;font:bold 10px verdana;color:#888;cursor:pointer;letter-spacing:0" class="infoeditor">(Edit)</span>';$("div#respond").append(a);$(".infoeditor").toggle(function(){$(".friendly").fadeIn();$(".authorgra").css("display","none")},function(){$(".friendly").css("display","none");$(".authorgra").fadeIn()})}$(".twitter").click(function(){window.open("http://twitter.com/ansenorg");return false});Util.setTopBar()});function hidetoolbar(){$("#wgToolBar").slideUp(600,function(){$("#showtoolbar").slideDown(600)})}function showtoolbar(){$("#showtoolbar").slideUp(600,function(){$("#wgToolBar").slideDown(600)})}var showRelatedul=function(d,b,a){var c=$("#relatedul");if(c.hasClass("hidden")){if($("#randomArticles").html()===""){page.loadRandomArticles();page.loadRelevantArticles(d,b);if(page.tips.externalRelevantArticlesDisplayCount!==0){page.loadExternalRelevantArticles(a)}}c.slideDown().removeClass("hidden")}else{c.slideUp().addClass("hidden")}};var common=new Common();
|
185
Shawn/js/ed.js
Normal file
185
Shawn/js/ed.js
Normal file
@@ -0,0 +1,185 @@
|
||||
jQuery(document).ready(function()
|
||||
{
|
||||
$(".commentlist li:even").addClass("alt");
|
||||
$(".commentlist li:odd").addClass("altline");
|
||||
loadjs = false;
|
||||
/*commentuser = $.cookie("comment_user");
|
||||
if (commentuser)
|
||||
{
|
||||
//[user, email, url] = commentuser.split("#@#");
|
||||
data = commentuser.split("#@#");
|
||||
$("#author").val(data[0]);
|
||||
$("#email").val(data[1]);
|
||||
$("#url").val(data[2]);
|
||||
};
|
||||
|
||||
$("#commentform").ajaxForm(
|
||||
{
|
||||
type : "post",
|
||||
dataType : "json",
|
||||
beforeSubmit : function(formData, jqForm, options)
|
||||
{
|
||||
var form = jqForm[0];
|
||||
if (form.author)
|
||||
{
|
||||
if (!form.author.value)
|
||||
{
|
||||
showinfo("Please input your name!");
|
||||
$("#authors")[0].innerHTML = "Name<font color='#FF0000' size='1px'>\u03C7</font>";
|
||||
form.author.focus();
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#authors")[0].innerHTML = "Name<font color='#00CC00' size='1px'><strong>\u221a</strong></font>"
|
||||
}
|
||||
if (!form.email.value)
|
||||
{
|
||||
showinfo("Please input your email address!");
|
||||
$("#emails")[0].innerHTML = "Mail<font color='#FF0000' size='1px'>\u03C7</font>";
|
||||
form.email.focus();
|
||||
return false;
|
||||
}
|
||||
if (form.email.value.search(/^\w+((-\w+)|(\.\w+))*\@{1}\w+\.{1}\w{2,4}(\.{0,1}\w{2}){0,1}/ig) == -1)
|
||||
{
|
||||
showinfo("Please input a correct email address!");
|
||||
form.email.value = "";
|
||||
form.email.focus();
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#emails")[0].innerHTML = "Mail<font color='#00CC00' size='1px'><strong>\u221a</strong></font>"
|
||||
}
|
||||
}
|
||||
if ($("#checkarea").css("display") == "block")
|
||||
{
|
||||
if (!form.checkret.value)
|
||||
{
|
||||
showinfo("Please input validate code, 3Q!");
|
||||
$("#checkcodes")[0].innerHTML = "Code:<font color='#FF0000' size='1px'><strong>\u03C7</strong></font>"
|
||||
form.checkret.focus();
|
||||
return false;
|
||||
}
|
||||
if (isNaN(form.checkret.value))
|
||||
{
|
||||
showinfo("This validate code must be filled with all-numbers, 3Q!");
|
||||
$("#checkcodes")[0].innerHTML = "Code:<font color='#FF0000' size='1px'><strong>\u03C7</strong></font>"
|
||||
form.checkret.value = "";
|
||||
form.checkret.focus();
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#checkcodes")[0].innerHTML = "Code:"
|
||||
}
|
||||
}
|
||||
if (!form.comment.value)
|
||||
{
|
||||
showinfo("Please enter a message!");
|
||||
form.comment.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
$("#submit").attr("disabled", true);
|
||||
return true;
|
||||
}, success : function(data)
|
||||
{
|
||||
$("#submit").attr("disabled", false);
|
||||
if (data[0])
|
||||
{
|
||||
//document.cookie = data[2];
|
||||
showinfo("Submitted successfully!");
|
||||
add_comment(data[1]);
|
||||
$("#s_msg").text("Submitted successfully!");
|
||||
$("#comment").val("");
|
||||
reloadCheckImage();
|
||||
if ($("#checkarea").css("display") == "block")
|
||||
{
|
||||
if ($("#check_type").val() > 0)
|
||||
{
|
||||
get_check_area($("#check_type").val());
|
||||
reloadCheckImage();
|
||||
}
|
||||
}
|
||||
$("#checkret").val("");
|
||||
location = "#comments";
|
||||
//refresh
|
||||
if (data)
|
||||
{
|
||||
$("#commentlist").animate({opacity: 0.4}, 500, function()
|
||||
{
|
||||
$(this).html(data);//;
|
||||
}).animate({opacity : 1}, "slow");
|
||||
}
|
||||
//#refresh
|
||||
}
|
||||
else
|
||||
{
|
||||
if (data[1] == -102)
|
||||
{
|
||||
showinfo("Validate code error, please retry it, 3Q!");
|
||||
reloadCheckImage();
|
||||
$("#checkret").focus();
|
||||
}
|
||||
}
|
||||
}
|
||||
});*/
|
||||
});
|
||||
/*
|
||||
function keyDown()
|
||||
{
|
||||
if (event.ctrlKey && event.keyCode == 13)
|
||||
{
|
||||
document.getElementById("submitCommentButton").click();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
*/
|
||||
function get_check_area(type)
|
||||
{
|
||||
if (type == 1)
|
||||
{
|
||||
$("#check").load("/checkcode/");
|
||||
$("#checkarea").show();
|
||||
}
|
||||
else if (type == 2)
|
||||
{
|
||||
$("#check").html("<img id='checkimg' src='/checkimg/' style='border:0px;padding:0;float:left;margin-right:8px' title='Click here to change Code' onclick='reloadCheckImage();' />");
|
||||
$("#checkarea").show();
|
||||
}
|
||||
}
|
||||
|
||||
function reloadCheckImage()
|
||||
{
|
||||
var img = document.getElementById("checkimg");
|
||||
img.src += "?";
|
||||
}
|
||||
|
||||
//alert
|
||||
function showinfo(msg)
|
||||
{
|
||||
window.alert(msg);
|
||||
}
|
||||
|
||||
//fixed ajax comments.
|
||||
function add_comment(msg)
|
||||
{
|
||||
comment = $(msg);
|
||||
|
||||
if (!loadjs) {
|
||||
$("#comments").prepend(comment).show();
|
||||
|
||||
$.getScript("http://dev.jquery.com/view/trunk/plugins/color/jquery.color.js", function()
|
||||
{
|
||||
comment.animate({backgroundColor: "#fbc7c7"}, "slow").animate({backgroundColor: "white"}, "slow");
|
||||
loadjs = true;
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#comments").prepend(comment);
|
||||
|
||||
comment.animate({backgroundColor: "#fbc7c7"}, "slow").animate({backgroundColor: "white"}, "slow");
|
||||
}
|
||||
}
|
1
Shawn/js/ed.min.js
vendored
Normal file
1
Shawn/js/ed.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
jQuery(document).ready(function(){$(".commentlist li:even").addClass("alt");$(".commentlist li:odd").addClass("altline");loadjs=false});function get_check_area(a){if(a==1){$("#check").load("/checkcode/");$("#checkarea").show()}else{if(a==2){$("#check").html("<img id='checkimg' src='/checkimg/' style='border:0px;padding:0;float:left;margin-right:8px' title='Click here to change Code' onclick='reloadCheckImage();' />");$("#checkarea").show()}}}function reloadCheckImage(){var a=document.getElementById("checkimg");a.src+="?"}function showinfo(a){window.alert(a)}function add_comment(a){comment=$(a);if(!loadjs){$("#comments").prepend(comment).show();$.getScript("http://dev.jquery.com/view/trunk/plugins/color/jquery.color.js",function(){comment.animate({backgroundColor:"#fbc7c7"},"slow").animate({backgroundColor:"white"},"slow");loadjs=true})}else{$("#comments").prepend(comment);comment.animate({backgroundColor:"#fbc7c7"},"slow").animate({backgroundColor:"white"},"slow")}};
|
1248
Shawn/js/javascription.js
Normal file
1248
Shawn/js/javascription.js
Normal file
File diff suppressed because it is too large
Load Diff
1
Shawn/js/javascription.min.js
vendored
Normal file
1
Shawn/js/javascription.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
19
Shawn/js/jquery.min.js
vendored
Normal file
19
Shawn/js/jquery.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
48
Shawn/js/pagenavi.js
Normal file
48
Shawn/js/pagenavi.js
Normal file
@@ -0,0 +1,48 @@
|
||||
function showPageLink(sUrl, iPage, iCount, sAnchor)
|
||||
{
|
||||
var i = 0;
|
||||
i = Math.max(1, iPage - 1);
|
||||
|
||||
if (iPage == 1)
|
||||
{
|
||||
document.write("<span class='pages' style='color:#7D7D7D'>1st</span> ");
|
||||
document.write("<span class='pages' style='color:#7D7D7D'>«</span> ");
|
||||
}
|
||||
else
|
||||
{
|
||||
document.write("<a href=\"" + sUrl + sAnchor + "1\" title='The 1 page'>1st</a> ");
|
||||
document.write("<a href=\"" + sUrl + i + sAnchor + "\" title='Prev page(The " + i + " page)'>«</a> ");
|
||||
}
|
||||
|
||||
if (iPage > 6)
|
||||
{
|
||||
document.write("<span>...</span> ");
|
||||
}
|
||||
|
||||
for (i = Math.max(1, iPage - 5); i < iPage; i++)
|
||||
{
|
||||
document.write("<a href=\"" + sUrl + i + sAnchor + "\" title='The " + i + " page'>" + i + "</a> ");
|
||||
}
|
||||
document.write("<font color='red'>" + iPage + "</font> ");
|
||||
|
||||
for (i = iPage + 1; i <= Math.min(iCount, iPage + 5); i++)
|
||||
{
|
||||
document.write("<a href=\""+sUrl + i + sAnchor + "\" title='The " + i + " page'>" + i + "</a> ");
|
||||
}
|
||||
i = Math.min(iCount, iPage + 1);
|
||||
|
||||
if (iCount > iPage + 5)
|
||||
{
|
||||
document.write("<span>...</span> ");
|
||||
}
|
||||
if (iPage == iCount)
|
||||
{
|
||||
document.write("<span class='pages' style='color:#7D7D7D'>»</span> ");
|
||||
document.write("<span class='pages' style='color:#7D7D7D'>Last</span> ");
|
||||
}
|
||||
else
|
||||
{
|
||||
document.write(" <a href=\"" + sUrl + i + sAnchor + "\" title='Next page(The " + i + " page)'>»</a>");
|
||||
document.write("<a href=\"" + sUrl + iCount + sAnchor + "\" title='Last page(The " + iCount + " page)'>Last</a> ");
|
||||
}
|
||||
}
|
1
Shawn/js/pagenavi.min.js
vendored
Normal file
1
Shawn/js/pagenavi.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
function showPageLink(b,d,e,c){var a=0;a=Math.max(1,d-1);if(d==1){document.write("<span class='pages' style='color:#7D7D7D'>1st</span> ");document.write("<span class='pages' style='color:#7D7D7D'>«</span> ")}else{document.write('<a href="'+b+c+"1\" title='The 1 page'>1st</a> ");document.write('<a href="'+b+a+c+"\" title='Prev page(The "+a+" page)'>«</a> ")}if(d>6){document.write("<span>...</span> ")}for(a=Math.max(1,d-5);a<d;a++){document.write('<a href="'+b+a+c+"\" title='The "+a+" page'>"+a+"</a> ")}document.write("<font color='red'>"+d+"</font> ");for(a=d+1;a<=Math.min(e,d+5);a++){document.write('<a href="'+b+a+c+"\" title='The "+a+" page'>"+a+"</a> ")}a=Math.min(e,d+1);if(e>d+5){document.write("<span>...</span> ")}if(d==e){document.write("<span class='pages' style='color:#7D7D7D'>»</span> ");document.write("<span class='pages' style='color:#7D7D7D'>Last</span> ")}else{document.write(' <a href="'+b+a+c+"\" title='Next page(The "+a+" page)'>»</a>");document.write('<a href="'+b+e+c+"\" title='Last page(The "+e+" page)'>Last</a> ")}};
|
0
Shawn/js/wp-ex-advise.html
Normal file
0
Shawn/js/wp-ex-advise.html
Normal file
Reference in New Issue
Block a user