国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

190 lines
7.0KB

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="{dede:global.cfg_soft_lang/}">
  5. <meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
  6. <title>{dede:field.title/}-{dede:global.cfg_webname/}</title>
  7. <meta name="keywords" content="{dede:field.keywords/}">
  8. <meta name="description" content="{dede:field.description function='html2text(@me)'/}">
  9. <script>const PHPURL = '{dede:field name="phpurl"/}';</script>
  10. <script src="{dede:global.cfg_cmsurl/}/static/web/js/jquery.min.js"></script>
  11. <script src="{dede:global.cfg_cmsurl/}/static/web/js/bootstrap.bundle.min.js"></script>
  12. <link rel="stylesheet" href="{dede:global.cfg_cmsurl/}/static/web/css/bootstrap.min.css">
  13. <link rel="stylesheet" href="{dede:global.cfg_cmsurl/}/static/web/font/css/font-awesome.min.css">
  14. <link rel="stylesheet" href="{dede:global.cfg_cmsurl/}/static/web/css/style.css">
  15. <link rel="shortcut icon" href="{dede:global.cfg_cmsurl/}/static/web/img/favicon.ico">
  16. <script>
  17. var shortname = "{dede:global.art_shortname/}";
  18. var npage = {
  19. dede: field name = 'nowpage' /
  20. };
  21. var totalpage = {
  22. dede: field name = 'totalpage' /
  23. };
  24. var namehand = '{dede:field name='namehand'/}';
  25. var displaytype = '{dede:field name='displaytype'/}';
  26. var gtimer = null;
  27. //大图
  28. function dPlayBig() {
  29. var imgObj = document.getElementById("bigimg");
  30. window.open(imgObj.src);
  31. }
  32. //停止幻灯
  33. function dStopPlay() {
  34. if (gtimer) clearTimeout(gtimer);
  35. else dPlayNext();
  36. }
  37. //开始幻灯
  38. function dStartPlay() {
  39. if (npage != totalpage) {
  40. gtimer = setTimeout("dPlayNext()", 10000);
  41. }
  42. }
  43. //上一张
  44. function dPlayPre() {
  45. if (npage < 2) {
  46. ShowMsg("这是第一页");
  47. } else {
  48. if (npage == 2) {
  49. if (namehand != '') location.href = namehand + shortname;
  50. else location.href = "view.php?aid={dede:field name='id'/}";
  51. } else if (displaytype == 'st' && namehand != '') {
  52. location.href = namehand + "_" + (npage - 1) + shortname;
  53. } else {
  54. location.href = "view.php?aid={dede:field name='id'/}&pageno=" + (npage - 1);
  55. }
  56. }
  57. }
  58. //下一张
  59. function dPlayNext() {
  60. if (npage == totalpage) {
  61. ShowMsg("没有了哦");
  62. } else {
  63. if (displaytype == 'st' && namehand != '') location.href = namehand + "_" + (npage + 1) + shortname;
  64. else location.href = "view.php?aid={dede:field name='id'/}&pageno=" + (npage + 1);
  65. }
  66. }
  67. </script>
  68. </head>
  69. <body>
  70. {dede:include filename='top.htm'/}
  71. {dede:include filename='header.htm'/}
  72. {dede:include filename='navbar.htm'/}
  73. <div class="container">
  74. <div class="position">
  75. <nav aria-label="breadcrumb">
  76. <ol class="breadcrumb mt-3">
  77. <li class="breadcrumb-item">当前位置</li>
  78. {dede:field name='position'/}
  79. </ol>
  80. </nav>
  81. </div>
  82. </div>
  83. <main class="container">
  84. <div class="row">
  85. <div class="col-md-8 article-main">
  86. <h2 class="mt-0 mb-3 zixue">{dede:field.title/}</h2>
  87. <div class="article-meta">
  88. <small>时间:</small>{dede:field.pubdate function="MyDate('Y-m-d',@me)"/}
  89. <small>来源:</small>{dede:field.source/}
  90. <small>作者:</small>{dede:field.writer/}
  91. <small>点击:</small><span id="_count">...</span>次
  92. </div>
  93. <div class="picbox">
  94. {dede:field name='pagestyle' alt='根据不同的页面风格输出不同的头信息' runphp='yes'}
  95. if(@me==3) {
  96. @me = '<ul class="e8">';
  97. }
  98. else if(@me==2) {
  99. @me = "
  100. <div class='mt-3 mb-3 text-center'>
  101. <a href='javascript:dPlayBig();' class='btn btn-success btn-sm'>原始图片</a>
  102. <a href='javascript:dPlayPre();' class='btn btn-success btn-sm'>上一张</a>
  103. <a href='javascript:dPlayNext();' class='btn btn-success btn-sm'>下一张</a>
  104. <a href='javascript:dStopPlay();' class='btn btn-success btn-sm'>自动 / 暂停播放</a>
  105. </div>
  106. ";
  107. } else {
  108. @me = '';
  109. }
  110. {/dede:field}
  111. <!-- 如果使用的是多页单图模式幻灯,把href里的链接改为 javascript:dPlayNext(); 表示点击看下一页 -->
  112. {dede:field name='imgurls' alt='图片输出区'}
  113. [field:pagestyle runphp='yes'] @me= (@me==3 ? '<li>' : '');[/field:pagestyle]
  114. <a href='[field:linkurl/]' [field:pagestyle runphp='yes' ] @me=(@me==3 ? 'class="pic"' : '' ); [/field:pagestyle]>
  115. <img src='[field:imgsrc/]' id='bigimg' [field:imgwidth /] alt='[field:alttext /]'>
  116. </a>
  117. <a href='[field:linkurl/]' [field:pagestyle runphp='yes' ]@me=(@me==3 ? 'class="title"' : '' );[/field:pagestyle]>
  118. [field:title /]
  119. </a>
  120. [field:pagestyle runphp='yes'] @me = (@me==3 ? '</li>' : ''); [/field:pagestyle]
  121. {/dede:field}
  122. {dede:field name='pagestyle' alt='根据不同的风格输出不同的结尾信息' runphp='yes'}
  123. if(@me==3) {
  124. @me = '
  125. </ul>';
  126. }
  127. else if(@me==2) {
  128. @me = "
  129. <script>
  130. dStartPlay();
  131. </script>";
  132. } else {
  133. @me = '';
  134. }
  135. {/dede:field}
  136. </div>
  137. <div class="body py-2">{dede:field.body/}(责任编辑:{dede:adminname/})</div>
  138. <div class="clearfix"></div>
  139. {dede:include comment='文档顶踩模块' filename="widget_article_digg.htm"/}
  140. <div class="row">
  141. <div class="col-md-4 prenext pt-2">
  142. <div class="pagination-previous">{dede:prenext get='pre'/}</div>
  143. <div class="pagination-next mt-2">{dede:prenext get='next'/}</div>
  144. </div>
  145. <div class="col-md-8">
  146. <div class="row actbox">
  147. <ul>
  148. <li>
  149. <i class="fa fa-star-o"></i>
  150. <a href="{dede:field name='phpurl'/}/stow.php?aid={dede:field.id/}" target="_blank">收藏</a>
  151. </li>
  152. <li>
  153. <i class="fa fa-bug"></i>
  154. <a href="javascript:ErrorAddSave({dede:field.id/}, '{dede:field.title/}');">挑错</a>
  155. </li>
  156. <li>
  157. <i class="fa fa-thumbs-o-up"></i>
  158. <a href="{dede:field name='phpurl'/}/recommend.php?aid={dede:field.id/}" target="_blank">推荐</a>
  159. </li>
  160. <li>
  161. <i class="fa fa-print"></i>
  162. <a href="javascript:;" onClick="window.print();">打印</a>
  163. </li>
  164. </ul>
  165. </div>
  166. </div>
  167. </div>
  168. {dede:include comment='文档评论模块' file='widget_article_feedback.htm' /}
  169. </div>
  170. <aside class="col-md-4 article-sidebar">
  171. {dede:include comment='推荐内容' filename="widget_recommend.htm"/}
  172. {dede:include comment='热点内容' filename="widget_hot.htm"/}
  173. {dede:include comment='QR二维码' filename="widget_qrcode.htm"/}
  174. </aside>
  175. </div>
  176. </main>
  177. {dede:include filename="footer.htm"/}
  178. <script>
  179. //页面加载触发
  180. $(document).ready(function() {
  181. //获取文档点击数统计
  182. $.get("{dede:field name='phpurl'/}/count.php?format=json&view=yes&aid={dede:field.id/}&mid=1&cid={dede:field.channel/}",
  183. function(data) {
  184. let result = JSON.parse(data);
  185. $("#_count").html(result.data.click);
  186. })
  187. });
  188. </script>
  189. </body>
  190. </html>