Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4fb3562
commit b8552e7
Showing
24 changed files
with
1,903 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
<?php echo "<script>var max_num_pages=".$wp_query->max_num_pages.";var now_num_pages=1;</script>"; | ||
if (!isset($_GET["data"])) { get_header(); ?> | ||
<!-- Column 1 /Content --> | ||
|
||
<?php | ||
global $wp_query; | ||
|
||
if ( isset($_GET['order']) && ($_GET['order']=='rand') ) | ||
{ | ||
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; | ||
$args=array( | ||
'orderby' => 'rand', | ||
'paged' => $paged, | ||
); | ||
$arms = array_merge( | ||
$args, | ||
$wp_query->query | ||
); | ||
query_posts($arms); | ||
} | ||
else if ( isset($_GET['order']) && ($_GET['order']=='commented') ) | ||
{ | ||
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; | ||
$args=array( | ||
'orderby' => 'comment_count', | ||
'order' => 'DESC', | ||
'paged' => $paged, | ||
); | ||
$arms = array_merge( | ||
$args, | ||
$wp_query->query | ||
); | ||
query_posts($arms); | ||
} | ||
else if ( isset($_GET['order']) && ($_GET['order']=='alpha') ) | ||
{ | ||
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; | ||
$args=array( | ||
'orderby' => 'title', | ||
'order' => 'ASC', | ||
'paged' => $paged, | ||
); | ||
$arms = array_merge( | ||
$args, | ||
$wp_query->query | ||
); | ||
query_posts($arms); | ||
} ?> | ||
|
||
<!-- Column 1 /Content --> | ||
<div class="postlist"> | ||
<!-- Blog Post --> | ||
<div id="postsbox"> | ||
<?php } $datacount = isset($_GET["data"])?$_GET["data"]:0; echo "<script>var paged=".(isset($_GET["paged"])?$_GET["paged"]:1).";datacount=".$datacount.";</script>" ?> | ||
<?php | ||
$indexint=$datacount; | ||
if (have_posts()) : while (have_posts()) : the_post(); | ||
?> | ||
<div id=<?php echo "blockbdiv".$indexint++; ?> class="blockbdiv" onclick="javascrtpt:window.location.href='<?php the_permalink(); ?>'"> | ||
<div name="blocktopdiv" class="blocktopdiv"> | ||
<img name="blocktopimg" id="blocktopimg" src="<?php echo catch_that_image() ?>" alt=""/> | ||
<div class="topline"><?php the_time('Y-m-d') ?> </div> | ||
<div class="toptags"><?php $category = get_the_category(); echo '<a href="'.get_category_link($category[0]->term_id ).'">'.$category[0]->cat_name.'</a>'; ?></div> | ||
</div> | ||
<div class="blockbottomdiv"> | ||
<div class="bottomtitle"><?php the_title(); ?></div> | ||
<div class="bottomcontent"><?php | ||
$content = get_the_content(); | ||
$content = preg_replace('/<img.*? \/>/','',$content); | ||
$content = str_replace(array("\r\n", "\r", "\n"), "<br/>", $content); | ||
$content = str_replace("<br/><br/>", "<br/>", $content); | ||
$content = str_replace("<br/><br/>", "<br/>", $content); | ||
$contentStart = substr($content,0,5); | ||
if ($contentStart == "<br/>") { | ||
$content = substr($content,5,(strlen($content)-5)); | ||
} | ||
echo $content; | ||
?></div> | ||
</div> | ||
</div> | ||
<?php echo "<script>datacount=".$indexint.";</script>" ?> | ||
<div class="postlisthr"> </div> | ||
<?php endwhile; else : ?> | ||
<p id="nopost">没啦</p> | ||
<?php endif; if (!isset($_GET["data"])) { get_header(); ?> | ||
</div> | ||
<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/ceramictiles.js"></script> | ||
<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/lan.js"></script> | ||
<script>resize();</script> | ||
<!-- Blog Navigation --> | ||
<p><?php if ($wp_query->max_num_pages == 1) { | ||
echo '<div id="loadstatus" value="2">没有更多内容了</div>'; | ||
} else { | ||
echo '<div id="loadstatus" value="0">滚动到页面最下方加载更多内容</div>'; | ||
} ?></p> | ||
</div> | ||
<?php get_footer(); ?> | ||
<?php } //$wp_query->max_num_pages ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
var ceramictiles_setting = { | ||
"tilesbox": "#postsbox", | ||
"tiles": "#blockbdiv", | ||
"datacount": 0, | ||
"intervalwidth": 10, | ||
"intervalheight": 10, | ||
"tileswidth": 310, | ||
"tilesheight": 400 | ||
} | ||
|
||
function ceramictiles_resize(animation = false) { | ||
var screenwidth = document.body.clientWidth; | ||
var datacount = ceramictiles_setting["datacount"]; | ||
var cw = ceramictiles_setting["intervalwidth"]; | ||
var ch = ceramictiles_setting["intervalheight"]; | ||
var x = cw; | ||
var y = ch; | ||
var w = ceramictiles_setting["tileswidth"]; | ||
var h = ceramictiles_setting["tilesheight"]; | ||
var tw = -1; | ||
if (screenwidth <= (w + cw * 4)) { | ||
cw = 0; | ||
//console.log("应用手机版式。"+screenwidth); | ||
} | ||
var wnum = parseInt(screenwidth / (w + cw + cw)); | ||
var hnum = Math.ceil(datacount / wnum); | ||
if (wnum > datacount) { | ||
wnum = datacount; | ||
} | ||
var datanum = 0; | ||
for (var i = 0; i < hnum; i++) { | ||
y = ch + (h + ch + ch) * i; | ||
for (var ii = 0; ii < wnum; ii++) { | ||
x = cw + (w + cw + cw) * ii; | ||
var tiles = $(ceramictiles_setting["tiles"] + (datanum++)); | ||
if (animation == false) { | ||
tiles.css("top", y); | ||
tiles.css("left", x); | ||
} else { | ||
tiles.stop(); | ||
tiles.animate({ | ||
top: y, | ||
left: x | ||
}); | ||
} | ||
if ((i == (hnum - 1)) && (ii == (wnum - 1))) { | ||
tw = (w + cw + cw) * (ii + 1); | ||
} | ||
} | ||
} | ||
y += (h + ch); | ||
var contents = $(ceramictiles_setting["tilesbox"]); | ||
var contentsleft = (screenwidth - tw) / 2; | ||
contents.css("left", contentsleft); | ||
contents.css("width", tw); | ||
contents.css("height", y); | ||
return [tw, y, contentsleft]; | ||
} | ||
|
||
function ceramictiles_resize_old(animation = false) { | ||
var screenwidth = $(window).width(); | ||
var datacount = ceramictiles_setting["datacount"]; | ||
var cw = ceramictiles_setting["intervalwidth"]; | ||
var ch = ceramictiles_setting["intervalheight"]; | ||
var y = ch; | ||
var w = ceramictiles_setting["tileswidth"]; | ||
var h = ceramictiles_setting["tilesheight"]; | ||
var e = 0; | ||
var tw = -1; | ||
if (screenwidth <= (w + cw * 4)) { | ||
cw = 0; | ||
//console.log("应用手机版式。"+screenwidth); | ||
} | ||
for (var i = 0; i < datacount; i++) { | ||
x = cw + (w + cw) * i - e; | ||
if (x > screenwidth - (w + cw) - cw) { | ||
if (tw == -1) { | ||
tw = cw + (w + cw) * i; | ||
} | ||
e += x - cw; | ||
x = cw; | ||
y += (h + ch); | ||
} | ||
var tiles = $(ceramictiles_setting["tiles"] + i); | ||
if (animation == false) { | ||
tiles.css("top", y); | ||
tiles.css("left", x); | ||
} else { | ||
tiles.stop(); | ||
tiles.animate({ | ||
top: y, | ||
left: x | ||
}); | ||
} | ||
} | ||
y += (h + ch); | ||
var contents = $(ceramictiles_setting["tilesbox"]); | ||
var contentsleft = screenwidth / 2 - tw / 2 - cw / 2; | ||
contents.css("left", contentsleft); | ||
contents.css("width", tw); | ||
contents.css("height", y); | ||
return [tw, y, contentsleft]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
<!-- Comment's List --> | ||
<?php | ||
if (isset($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME'])) | ||
die ('Please do not load this page directly. Thanks!'); | ||
?> | ||
<h3>Comments</h3> | ||
<div class="hr dotted clearfix"> </div> | ||
<ol class="commentlist"> | ||
<?php | ||
if (!empty($post->post_password) && $_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) { | ||
// if there's a password | ||
// and it doesn't match the cookie | ||
?> | ||
<li class="decmt-box"> | ||
<p><a href="#addcomment">请输入密码再查看评论内容.</a></p> | ||
</li> | ||
<?php | ||
} else if ( !comments_open() ) { | ||
?> | ||
<li class="decmt-box"> | ||
<p><a href="#addcomment">评论功能已经关闭!</a></p> | ||
</li> | ||
<?php | ||
} else if ( !have_comments() ) { | ||
?> | ||
<li class="decmt-box"> | ||
<p><a href="#addcomment">还没有任何评论,你来说两句吧</a></p> | ||
</li> | ||
<?php | ||
} else { | ||
wp_list_comments('type=comment&callback=aurelius_comment'); | ||
} | ||
?> | ||
</ol> | ||
<div class="hr clearfix"> </div> | ||
<!-- Comment Form --> | ||
<?php | ||
if ( !comments_open() ) : | ||
// If registration required and not logged in. | ||
elseif ( get_option('comment_registration') && !is_user_logged_in() ) : | ||
?> | ||
<p>你必须 <a href="<?php echo wp_login_url( get_permalink() ); ?>">登录</a> 才能发表评论.</p> | ||
<?php else : ?> | ||
<!-- Comment Form --> | ||
<form id="commentform" name="commentform" action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post"> | ||
<h3>发表评论</h3> | ||
<div class="hr dotted clearfix"> </div> | ||
<ul> | ||
<?php if ( !is_user_logged_in() ) : ?> | ||
<li class="clearfix"> | ||
<label for="name">昵称</label> | ||
<input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="23" tabindex="1" /> | ||
</li> | ||
<li class="clearfix"> | ||
<label for="email">电子邮件</label> | ||
<input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="23" tabindex="2" /> | ||
</li> | ||
<li class="clearfix"> | ||
<label for="email">网址(选填)</label> | ||
<input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="23" tabindex="3" /> | ||
</li> | ||
<?php else : ?> | ||
<li class="clearfix">您已登录:<a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="退出登录">退出 »</a></li> | ||
<?php endif; ?> | ||
<li class="clearfix"> | ||
<label for="message">评论内容</label> | ||
<textarea id="message comment" name="comment" tabindex="4" rows="3" cols="40"></textarea> | ||
</li> | ||
<li class="clearfix"> | ||
<!-- Add Comment Button --> | ||
<a href="javascript:void(0);" onClick="Javascript:document.forms['commentform'].submit()" class="button medium black right">发表评论</a> </li> | ||
</ul> | ||
<?php comment_id_fields(); ?> | ||
<?php do_action('comment_form', $post->ID); ?> | ||
</form> | ||
<?php endif; ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?php | ||
/* | ||
Template Name: contract | ||
*/ | ||
?> | ||
<?php get_header(); ?> | ||
<!-- Caption Line --> | ||
<?php if (have_posts()) : the_post(); update_post_caches($posts); ?> | ||
<h2 class="grid_12 caption clearfix"><?php the_title(); ?></h2> | ||
<div class="hr grid_12 clearfix"> </div> | ||
<!-- Column 1 / Content --> | ||
<div class="grid_8"> | ||
<?php the_content(); ?> | ||
<?php comments_template(); ?> | ||
</div> | ||
<?php else : ?> | ||
<div class="grid_8"> | ||
ûÓÐÈκÎÎÄÕ£¡ | ||
</div> | ||
<?php endif; ?> | ||
<!-- Column 2 / Sidebar --> | ||
<div class="grid_4 contact"> | ||
<!-- Adress and Phone Details --> | ||
<h4>Address and Phone</h4> | ||
<div class="hr dotted clearfix"> </div> | ||
<ul> | ||
<li> <strong>Your Company Name</strong><br /> | ||
1458 Sample Road, Redvalley<br /> | ||
City (State) H4Q 1J7<br /> | ||
Country<br /> | ||
<br /> | ||
</li> | ||
<li>USA - (888) 888-8888</li> | ||
<li>Worldwide - (888) 888-8888</li> | ||
</ul> | ||
<!-- Email Addresses --> | ||
<h4>Emails</h4> | ||
<div class="hr dotted clearfix"> </div> | ||
<ul> | ||
<li>General - <a href="mailto:info@yourcompany.com">info@yourcompany.com</a></li> | ||
<li>Sales - <a href="mailto:sales@yourcompany.com">sales@yourcompany.com</a></li> | ||
</ul> | ||
<!-- Social Profile Links --> | ||
<h4>Social Profiles</h4> | ||
<div class="hr dotted clearfix"> </div> | ||
<ul> | ||
<li class="float"><a href="#"><img alt="" src="images/twitter.png" title="Twitter" /></a></li> | ||
<li class="float"><a href="#"><img alt="" src="images/facebook.png" title="Facebook" /></a></li> | ||
<li class="float"><a href="#"><img alt="" src="images/stumbleupon.png" title="StumbleUpon" /></a></li> | ||
<li class="float"><a href="#"><img alt="" src="images/flickr.png" title="Flickr" /></a></li> | ||
<li class="float"><a href="#"><img alt="" src="images/delicious.png" title="Delicious" /></a></li> | ||
</ul> | ||
</div> | ||
<div class="hr grid_12 clearfix"> </div> | ||
<?php get_footer(); ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!-- Footer --> | ||
<!--</div>--> | ||
<div id="foot" class="bannerimgs"> | ||
<div id="bannertw"></div> | ||
<div id="footbox"> | ||
本站部分资源来自网络转载,版权归原作者所有,如果有侵犯到您的权益,请联系本站删除,谢谢!<br> | ||
版权所有 © 2010 <?php bloginfo('name'); ?> | Powered By <a rel="external" title="WordPress主页" target="_blank" class="link" href="http://wordpress.org/">WordPress</a> | "nyaruko-α" Theme by <a title="WordPress主页" target="_blank" href="/yashi">KagurazakaYashi</a> & 0wew0.<br> | ||
<a href="http://www.miitbeian.gov.cn/" target="_blank" title="此处为域名拥有者资料,并非内容提供者信息,请勿使用这些信息干扰他的生活,谢谢理解。如有问题请联系cxchope@163.com。">京ICP备15023313号</a> | ||
</div> | ||
</div> | ||
</div> | ||
<!--end wrapper--> | ||
<?php wp_footer(); ?> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
/* | ||
Template Name: Page without sidebar | ||
*/ | ||
?> | ||
<?php get_header(); ?> | ||
<!-- Column 1 / Content --> | ||
<?php if (have_posts()) : the_post(); update_post_caches($posts); ?> | ||
<div class="grid_12"> | ||
<h4 class="page_title"><?php the_title(); ?></h4> | ||
<div class="hr dotted clearfix"> </div> | ||
<?php the_content(); ?> | ||
<?php comments_template(); ?> | ||
</div> | ||
<?php else : ?> | ||
<div class="grid_12"> | ||
ûÓÐÈκÎÎÄÕ£¡ | ||
</div> | ||
<?php endif; ?> | ||
<div class="hr grid_12 clearfix"> </div> | ||
<?php get_footer(); ?> |
Oops, something went wrong.