page.html 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>{$page.post_title}</title>
  5. <meta name="keywords" content="{$page.post_keywords}"/>
  6. <meta name="description" content="{$page.post_excerpt}">
  7. <include file="public@head"/>
  8. <style>
  9. #article_content img {
  10. height: auto !important;
  11. max-width: 100%;
  12. }
  13. </style>
  14. <hook name="before_head_end"/>
  15. </head>
  16. <body class="body-white">
  17. <include file="public@nav"/>
  18. <div class="container tc-main">
  19. <div class="row">
  20. <div class="col-md-9">
  21. <div class="tc-box article-box">
  22. <h2>{$page.post_title|default=''}</h2>
  23. <hr>
  24. <div id="article_content">
  25. {$page.post_content|default=''}
  26. </div>
  27. </div>
  28. </div>
  29. <div class="col-md-3">
  30. <widget name="hottest_articles">
  31. <div class="tc-box">
  32. <div class="headtitle">
  33. <h2>{$widget.title}</h2>
  34. </div>
  35. <div class="ranking">
  36. <php>
  37. $hot_articles=[];
  38. </php>
  39. <ul class="list-unstyled">
  40. <portal:articles limit="5" order="post.post_hits DESC"
  41. categoryIds="$widget.vars.hottest_articles_category_id">
  42. <php>$top=$key<3?"top3":"";</php>
  43. <li class="{$top}">
  44. <i>{$key+1}</i>
  45. <a title="{$vo.post_title}"
  46. href="{:cmf_url('portal/Article/index',array('id'=>$vo['id']))}">
  47. {$vo.post_title}
  48. </a>
  49. </li>
  50. </portal:articles>
  51. </ul>
  52. </div>
  53. </div>
  54. </widget>
  55. <widget name="last_articles">
  56. <div class="tc-box">
  57. <div class="headtitle">
  58. <h2>{$widget.title}</h2>
  59. </div>
  60. <div class="posts">
  61. <portal:articles limit="5" order="post.published_time DESC"
  62. categoryIds="$widget.vars.last_articles_category_id">
  63. <dl class="dl-horizontal">
  64. <dt>
  65. <a class="img-wraper"
  66. href="{:cmf_url('portal/Article/index',array('id'=>$vo.id))}">
  67. <if condition="empty($vo.more.thumbnail)">
  68. <img src="__TMPL__/public/assets/images/default_tupian4.png"
  69. class="img-responsive" alt="{$vo.post_title}"/>
  70. <else/>
  71. <img src="{:cmf_get_image_url($vo.more.thumbnail)}"
  72. class="img-responsive" alt="{$vo.post_title}"/>
  73. </if>
  74. </a>
  75. </dt>
  76. <dd>
  77. <a href="{:cmf_url('portal/Article/index',array('id'=>$vo['id']))}">{$vo.post_title}</a>
  78. </dd>
  79. </dl>
  80. </portal:articles>
  81. </div>
  82. </div>
  83. </widget>
  84. </div>
  85. </div>
  86. <include file="public@footer"/>
  87. </div>
  88. <include file="public@scripts"/>
  89. <hook name="before_body_end"/>
  90. </body>
  91. </html>