zoukankan      html  css  js  c++  java
  • 测试一下代码高亮插件

    测试一下代码高亮插件code snippet,整体感觉还不错。

       1: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
       2: <html xmlns="http://www.w3.org/1999/xhtml">
       3: <head>
       4: <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
       5: <!-- TemplateBeginEditable name="doctitle" -->
       6: <title>无标题文档</title>
       7: <link rel="profile" href="http://gmpg.org/xfn/11" />
       8: <link rel="stylesheet" type="text/css" media="all" href="&lt;?php bloginfo( 'stylesheet_url' ); ?>" />
       9: <!-- TemplateEndEditable -->
      10: <!-- TemplateBeginEditable name="head" -->
      11: <!-- TemplateEndEditable -->
      12: </head>
      13: <body>
      14:     <?php get_header(); ?>
      15:     
      16:     <!--左侧分类 开始--> 
      17:     <div class="left">
      18:         <?php $display_categories = array(1,2,3,4,5); foreach ($display_categories as $category) { ?>
      19:         <?php query_posts("showposts=1&cat=$category"); ?>
      20:  
      21:         <div class="post" id="post-&lt;?php the_ID(); ?>">
      22:             <div class="ttt">
      23:                 <a href="&lt;?php echo get_category_link($category);?>"><?php single_cat_title(); ?></a>
      24:                 <span><?php echo category_description($category); ?></span>
      25:             </div>
      26:             <?php while (have_posts()) : the_post(); ?>
      27:                 <div class="clear">
      28:                     <div class="headline">
      29:                         <?php if( get_post_meta($post->ID, "Image", true) ): ?>
      30:                             <a href="&lt;?php the_permalink() ?>" rel="bookmark"><img src="&lt;?php echo get_post_meta($post->ID, "Image", true); ?>" title="<?php the_title(); ?>" alt="" width="310" height="245" />
      31:                             </a>
      32:                             <?php else: ?>    
      33:                                 <!--如果没有 Image 的自定义字段,则显示主题中自带的图片-->
      34:                                 <a href="&lt;?php the_permalink() ?>" rel="bookmark"><img src="http://t.douban.com/epic/large_107119803_2.jpg" title="&lt;?php the_title(); ?>" alt="" width="310" height="245" /></a>
      35:                         <?php endif; ?>
      36:                         <h3>
      37:                             <a href="&lt;?php the_permalink() ?>" rel="bookmark" title="<<?php the_title(); ?>"><?php the_title(); ?></a>
      38:                         </h3>
      39:                         <div class="txt">
      40:                             <?php the_excerpt(); ?>
      41:                         </div>
      42:                         <div class="from">
      43:                             <span class="pinglun"><?php comments_popup_link('添加评论', '1条评论', '%条评论'); ?></span>
      44:                             作者:<?php the_author_posts_link('') ?> <?php the_time('Y-m-d') ?>
      45:                         </div>
      46:                     </div>
      47:                 </div>
      48:              <?php endwhile; ?>
      49:         </div>
      50:         <?php } ?> 
      51:     </div>
      52:     <!--左侧分类 结束-->
      53:  
      54:  
      55:     <!--中间分类 开始-->
      56:     <div class="cen">
      57:         <?php $display_categories = array(1,2,3,4,5,6,7,8); foreach ($display_categories as $category) { ?>
      58:         <?php query_posts("showposts=1&cat=$category&offset=1")?>
      59:         <div class="cat">
      60:             <?php while (have_posts()) : the_post(); ?>
      61:                 <div class="post" id="post-&lt;?php the_ID(); ?>">
      62:                     <h3>
      63:                         <a href="&lt;?php the_permalink() ?>" rel="bookmark" title="<<?php the_title(); ?>"><?php the_title(); ?></a>
      64:                     </h3>
      65:                     <div class="txt">
      66:                         <?php the_excerpt(); ?>
      67:                     </div>
      68:                     <div class="from">
      69:                         <span class="pinglun"><?php comments_popup_link('添加评论', '1条评论', '%条评论'); ?></span>
      70:                         <?php the_time('Y-m-d') ?>
      71:                     </div>
      72:                 </div>
      73:             <?php endwhile; ?>
      74:         </div>
      75:         <?php } ?> 
      76:      </div>
      77:     <!--中间分类 结束-->
      78:     <?php get_sidebar(); ?>
      79:     <?php get_footer(); ?>
      80: </body>
      81: </html>

    可以不能支持AS,很遗憾。

    作者:codee
    文章千古事,得失寸心知。


  • 相关阅读:
    第八周作业
    第八周上机练习
    第七周上机练习
    第六周作业
    第六周上机练习
    第五周上机练习
    第四周作业
    第四次上机作业
    第三周作业
    第一次上机作业
  • 原文地址:https://www.cnblogs.com/bimgoo/p/2503246.html
Copyright © 2011-2022 走看看