item.html 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. {extend name='api/view/main'}
  2. {block name='title'}{/block}
  3. {block name='content'}
  4. <div class="container">
  5. {notempty name='info'}
  6. <h2>{$info.title|default=''}</h2>
  7. <h3>
  8. <span style="color:#666">{$info.author}</span>
  9. <span style="margin-left:0.4rem">{:date('Y年m月d日',strtotime($info.create_at))}</span>
  10. </h3>
  11. {if $info.show_cover_pic and $info.local_url}<img src="{$info.local_url}" style="width:100%" alt="img">{/if}
  12. <div class='content-text'>{$info.content|raw}</div>
  13. <div class="content-read">阅读 {$info.read_num}</div>
  14. {else}
  15. <div class="info"><h3>404</h3> 访问资源不存在哦!</div>
  16. {/notempty}
  17. </div>
  18. {/block}
  19. {block name='style'}
  20. <style>
  21. html {
  22. width: 100%;
  23. height: 100%;
  24. display: block;
  25. background: white;
  26. }
  27. .container {
  28. width: 90%;
  29. color: #333;
  30. display: block;
  31. margin: .2rem auto;
  32. position: relative
  33. }
  34. .container h2 {
  35. font-size: .8rem;
  36. font-weight: 400;
  37. line-height: 1.5rem
  38. }
  39. .container h3 {
  40. color: #999;
  41. font-size: .6rem;
  42. font-weight: 400;
  43. line-height: 1.5rem;
  44. margin-bottom: .3rem
  45. }
  46. .container .content-read {
  47. color: #999;
  48. font-size: 0.6rem;
  49. text-align: right;
  50. margin-top: 0.5rem;
  51. line-height: 2rem;
  52. padding-bottom: 1rem;
  53. }
  54. .container .content-text {
  55. font-size: .7rem;
  56. line-height: 1.3rem
  57. }
  58. .container .content-text img {
  59. max-width: 100%;
  60. height: auto !important
  61. }
  62. </style>
  63. {/block}