人人商城

home.html 2.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. {template 'common/header'}
  2. <style type="text/css">
  3. body{
  4. font:{$_W['styles']['fontsize']} {$_W['styles']['fontfamily']};
  5. color:{if empty($_W['styles']['fontcolor'])}#555{else}{$_W['styles']['fontcolor']}{/if};
  6. padding:0;
  7. margin:0;
  8. background-image:url('{if empty($_W['styles']['indexbgimg'])}./themes/default/images/bg_index.jpg{else}{$_W['styles']['indexbgimg']}{/if}');
  9. background-size:cover;
  10. background-color:{if empty($_W['styles']['indexbgcolor'])}#fbf5df{else}{$_W['styles']['indexbgcolor']}{/if};
  11. {$_W['styles']['indexbgextra']}
  12. }
  13. a{color:{$_W['styles']['linkcolor']}; text-decoration:none;}
  14. {$_W['styles']['css']}
  15. .home-container{width:58%;overflow:hidden;margin:.6em .3em;}
  16. .home-container .box-item{float:left;display:block;text-decoration:none;outline:none;width:5em;height:6em;margin:.1em;background:rgba(0, 0, 0, 0.3);text-align:center;color:#ccc;}
  17. .home-container i{display:block;height:45px; margin: 5px auto; font-size:35px; padding-top:10px; width:45px;}
  18. .home-container span{color:{$_W['styles']['fontnavcolor']};display:block; width:90%; margin:0 5%; overflow:hidden; height:20px; line-height:20px;}
  19. .footer{color:#dddddd;}
  20. .home-container ul li{background-color:rgba(0, 0, 0, 0.3);padding:0 10px;margin:1%;display: inline-block;height:45px;width:100%;}
  21. .home-container ul li a{text-decoration: none;}
  22. .home-container .title{color:#ccc;}
  23. .home-container .createtime{color:#999;font-size:12px}
  24. </style>
  25. <div class="home-container clearfix">
  26. {data func="site_navs" item="row"}
  27. {$row['html']}
  28. {/data}
  29. <!-- 该分类下文章-start -->
  30. {if $_GPC['c'] == 'home' && !empty($_GPC['t'])}
  31. <ul class="list list-unstyled">
  32. {loop $category_list $cid $category}
  33. {data func="site_article" cid=$cid return="true" assign="result"}
  34. {loop $result['list'] $row}
  35. <li>
  36. <a href="{$row['linkurl']}">
  37. <div class="title">{php echo cutstr($row['title'],10,1);}</div>
  38. <div class="createtime">{php echo date('Y-m-d H:i:s', $row['createtime'])}</div>
  39. </a>
  40. </li>
  41. {/loop}
  42. {/loop}
  43. </ul>
  44. {/if}
  45. <!-- 该分类下文章-start -->
  46. <ul class="list list-unstyled">
  47. {data module="site" func="site_article" cid="$cid" assign="result" return="true"}
  48. {loop $result['list'] $row}
  49. <li>
  50. <a href="{$row['linkurl']}">
  51. <div class="title">{php echo cutstr($row['title'],40,1);}</div>
  52. <div class="createtime">{php echo date('Y-m-d H:i:s', $row['createtime'])}</div>
  53. </a>
  54. </li>
  55. {/loop}
  56. </ul>
  57. </div>
  58. {template 'common/footer'}