25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

179 lines
7.6 KiB

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8" name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
  5. <title>{$tkd.title|parseTpl}</title>
  6. <meta name="keywords" content="{$tkd.keywords|parseTpl}">
  7. <meta name="description" content="{$tkd.description|parseTpl}">
  8. <link rel="stylesheet" href="{$kx.config.resurl}/template/kxmobileno1/css/global.css"/>
  9. <script src="{$kx.config.resurl}/template/kxmobileno1/js/flexible.min.js"></script>
  10. <link rel="shortcut icon" type="image/ico" href="/favicon.ico" />
  11. <meta name="author" content="www.ptcms.com">
  12. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  13. <meta name="renderer" content="webkit">
  14. <meta name="viewport" content="width=device-width" />
  15. <meta name="applicable-device" content="pc">
  16. <meta http-equiv="mobile-agent" content="format=html5; url={$kx.config.mobileurl}__SELF__">
  17. <meta http-equiv="Cache-Control" content="no-siteapp" />
  18. <meta http-equiv="Cache-Control" content="no-transform" />
  19. <link rel="canonical" href="{$kx.config.pcurl}__SELF__" />
  20. <style>
  21. .pt-search{
  22. width:100%;
  23. padding:0.20rem ;
  24. border-radius:0.02rem;
  25. }
  26. .pt-search-box{
  27. width:80vw;
  28. height:0.30rem;
  29. background-color: #f2f2f7;
  30. padding-left: 0.13rem;
  31. }
  32. .pt-recall{
  33. font-size: 0.1rem;
  34. }
  35. .history {
  36. background-color: #fff;
  37. margin: 10px;
  38. padding: 10px;
  39. }
  40. .history h1{
  41. font-size: 16px;
  42. color: #666;
  43. margin-bottom: 10px;
  44. }
  45. .history h1 span{
  46. font-size: 12px;
  47. float: right;
  48. }
  49. .history ul li{
  50. display: inline-block;
  51. background-color: #f0f0f0;
  52. padding: 3px 10px;
  53. border-radius: 4px;
  54. margin: 5px;
  55. }
  56. .pt-pages{
  57. bottom: 0;
  58. height: 50px;
  59. text-align: center;
  60. border-top: 1px solid #E9E9E9;
  61. }
  62. .pt-pages-select{
  63. border-color: #F55!important;
  64. background-color: #F55!important;
  65. color: #fff!important;
  66. }
  67. .pt-pages span {
  68. width: 24px;
  69. height: 24px;
  70. border: 1px solid #fff;
  71. text-align: center;
  72. line-height: 24px;
  73. margin-right: 10px;
  74. }
  75. .flex-item{max-width: 2.65rem}
  76. </style>
  77. </head>
  78. <body>
  79. <form action="{link=novel.search.result}" class="searchForm">
  80. <div class="w100 bg-white flex-wrp flex-between flex-align-center pt-search">
  81. <div class="flex-wrp flex-align-center pt-search-box" style="width: 80vw;">
  82. <img src="{$kx.config.resurl}/template/kxmobileno1/images/search.png" class="mr10 pt-search-icon" >
  83. <input type="text" name="searchkey" class="size12 color4" style="width: 100%" placeholder="请输入您要搜索的关键书名" value="{$searchkey}">
  84. </div>
  85. <div class="pt-recall">取消</div>
  86. </div>
  87. </form>
  88. <!-- 站长推荐 -->
  89. <div class="w100 bg-white lh100 pt-recomment">
  90. {block method="search" name=result searchkey=$searchkey page=$page num=$pagesize}
  91. {block method="pagination" name="paginate" page=$page limit=$pagesize count=$result.count maxpage=50 section=3}
  92. {if $result.count > 0 }
  93. {section loop=$result.items item=$loop}
  94. <div class="pt-recomment-cont">
  95. <div class="flex-wrp pt-recomment-item">
  96. <a href="{link=novel.novel.index novelid=$loop.novel.id pinyin=$loop.novel.pinyin}">
  97. <img src="{$loop.novel.cover}" class="mr15" alt="{$loop.novel.name}">
  98. </a>
  99. <div class="flex-item pt5">
  100. <div class="flex-wrp flex-between">
  101. <div class="size14 color7">
  102. <a title="{$loop.novel.name}" href="{link=novel.novel.index novelid=$loop.novel.id pinyin=$loop.novel.pinyin}">{$loop.novel.name}</a>
  103. </div>
  104. <div class="color2 size14">{$loop.data.mark} <span class="size12">人在追</span></div>
  105. </div>
  106. <div class="size12 compulsory-row mb10 mt10 lh130 color4">{$loop.novel.intro|showIntroLine}</div>
  107. <div class="flex-wrp flex-between">
  108. <div class="color5 size12">
  109. <a title="{$loop.author.name}" href="{link=author.space.index authorid=$loop.author.id pinyin=$loop.author.pinyin name=$loop.author.name}">[ {$loop.author.name} ]</a>
  110. </div>
  111. <div class="pt-recomment-label">
  112. <a title="{$loop.category.name}" href="{link=novel.category.list id=$loop.category.id key=$loop.category.key}">{$loop.category.name}</a>
  113. </div>
  114. </div>
  115. </div>
  116. </div>
  117. </div>
  118. {/section}
  119. {if $paginate.total>1}
  120. <div class="pt-pages">
  121. <div class="pt30 color5">
  122. {if $paginate.prev}
  123. <a href="{link=novel.search.result searchkey=$kx.get.searchkey page=$paginate.prev}"><span><</span></a>
  124. {else}
  125. <span class="disable"><</span>
  126. {/if}
  127. {loop=paginate.items}
  128. <a href="{link=novel.search.result searchkey=$kx.get.searchkey page=$loop.num}">
  129. <span class="{$loop.status|default='','pt-pages-select'}">{$loop.num}</span>
  130. </a>
  131. {/loop}
  132. {if $paginate.next}
  133. <a href="{link=novel.search.result searchkey=$kx.get.searchkey page=$paginate.next}"><span>></span></a>
  134. {else}
  135. <span class="disable">></span>
  136. {/if}
  137. </div>
  138. </div>
  139. {/if}
  140. {else}
  141. <div class="pt-recomment-cont" style="text-align: center;padding: 25px 0;">
  142. <img src="{$kx.config.resurl}/template/kxmobileno1/images/no-data-img.png" style="width: 120px;height: 120px;">
  143. <h1 class="size18 color5 mt10 mb15">没有输入有效关键词</h1>
  144. <span class="size16 ">你也可以去 <a href="/" class="color2">全部作品</a> 找书</span>
  145. </div>
  146. <div class="history">
  147. <h1>历史搜索 <span>清空</span></h1>
  148. <ul></ul>
  149. </div>
  150. {/if}
  151. </div>
  152. <!-- 底部版权 -->
  153. {include file="/system/footer"}
  154. <!-- js -->
  155. <script src="{$kx.config.resurl}/template/kxmobileno1/js/jquery-3.3.1.js"></script>
  156. <script>
  157. var historyStr = window.localStorage.getItem('search_history');
  158. historyList = typeof historyStr === 'string' ? historyStr.split('|||') : [];
  159. $.each(historyList, function (k, v) {
  160. if(v){
  161. $('.history ul').append('<li><a href="{link=novel.search.result}?searchkey=' + encodeURI(v) + '">' + v + '</a></li>');
  162. }
  163. });
  164. $('.searchForm').submit(function () {
  165. historyList.push($('.searchForm input[name=searchkey]').val());
  166. var uniqueArr = [];
  167. $.each(historyList, function(i, el){
  168. if($.inArray(el, uniqueArr) === -1) uniqueArr.push(el);
  169. });
  170. window.localStorage.setItem('search_history', uniqueArr.join('|||'));
  171. });
  172. $('.history h1 span').click(function () {
  173. $('.history ul li').remove();
  174. window.localStorage.removeItem('search_history');
  175. });
  176. </script>
  177. </body>
  178. </html>