国内流行的内容管理系统(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.

178 lines
6.8KB

  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='head.htm'/}
  72. <div class="container py-3">
  73. <div class="row">
  74. <div class="col-md-12">
  75. <div class="position rounded">
  76. <nav aria-label="breadcrumb">
  77. <ol class="breadcrumb">
  78. <li class="breadcrumb-item">当前位置</li>
  79. {dede:field name='position'/}
  80. </ol>
  81. </nav>
  82. </div>
  83. </div>
  84. </div>
  85. </div>
  86. <main class="container py-3">
  87. <div class="row">
  88. <div class="col-md-9 article-main">
  89. <h2>{dede:field.title/}</h2>
  90. <div class="article-meta">
  91. <span>时间:{dede:field.pubdate function="MyDate('Y-m-d',@me)"/}</span>
  92. <span>来源:{dede:field.source/}</span>
  93. <span>作者:{dede:field.writer/}</span>
  94. <span>点击:<i id="_count">...</i>次</span>
  95. </div>
  96. <div class="picbox py-3">
  97. {dede:field name='pagestyle' alt='根据不同的页面风格输出不同的头信息' runphp='yes'}
  98. if (@me==3) {
  99. @me = '<ul class="e8">';
  100. }
  101. else if (@me==2) {
  102. @me = "
  103. <div class='text-center mb-3'>
  104. <a href='javascript:dPlayBig();' class='btn btn-success'>原始图片</a>
  105. <a href='javascript:dPlayPre();' class='btn btn-success'>上一张</a>
  106. <a href='javascript:dPlayNext();' class='btn btn-success'>下一张</a>
  107. <a href='javascript:dStopPlay();' class='btn btn-success'>自动 / 暂停播放</a>
  108. </div>
  109. ";
  110. } else {
  111. @me = '';
  112. }
  113. {/dede:field}
  114. <!-- 如果使用的是多页单图模式幻灯,把href里的链接改为 javascript:dPlayNext(); 表示点击看下一页 -->
  115. {dede:field name='imgurls' alt='图片输出区'}
  116. [field:pagestyle runphp='yes'] @me= (@me==3 ? '<li>' : '');[/field:pagestyle]
  117. <a href='[field:linkurl/]' [field:pagestyle runphp='yes' ] @me=(@me==3 ? 'class="pic"' : '' ); [/field:pagestyle]><img src='[field:imgsrc/]' id='bigimg' [field:imgwidth/] alt='[field:alttext/]'></a>
  118. <a href='[field:linkurl/]' [field:pagestyle runphp='yes' ]@me=(@me==3 ? 'class="title"' : '' );[/field:pagestyle]>[field:title/]</a>
  119. [field:pagestyle runphp='yes'] @me = (@me==3 ? '</li>' : ''); [/field:pagestyle]
  120. {/dede:field}
  121. {dede:field name='pagestyle' alt='根据不同的风格输出不同的结尾信息' runphp='yes'}
  122. if (@me==3) {
  123. @me = '
  124. </ul>';
  125. }
  126. else if (@me==2) {
  127. @me = "
  128. <script>
  129. dStartPlay();
  130. </script>";
  131. } else {
  132. @me = '';
  133. }
  134. {/dede:field}
  135. </div>
  136. <div class="py-3">{dede:field.body/}</div>
  137. <div class="py-3">责任编辑:{dede:adminname/}</div>
  138. <div class="clearfix"></div>
  139. <div class="row">
  140. <div class="col-md-4 prenext">
  141. <div class="pagination-previous mb-3">{dede:prenext get='pre'/}</div>
  142. <div class="pagination-next">{dede:prenext get='next'/}</div>
  143. </div>
  144. <div class="col-md-8">
  145. <div class="row actbox">
  146. <ul>
  147. <li><i class="fa fa-star-o"></i><a href="{dede:field name='phpurl'/}/stow.php?aid={dede:field.id/}" target="_blank">收藏</a></li>
  148. <li><i class="fa fa-bug"></i><a href="javascript:ErrorAddSave({dede:field.id/}, '{dede:field.title/}');">挑错</a></li>
  149. <li><i class="fa fa-thumbs-o-up"></i><a href="{dede:field name='phpurl'/}/recommend.php?aid={dede:field.id/}" target="_blank">推荐</a></li>
  150. <li><i class="fa fa-print"></i><a href="javascript:;" onClick="window.print();">打印</a></li>
  151. </ul>
  152. </div>
  153. </div>
  154. </div>
  155. {dede:include comment='文档顶踩模块' filename='widget_article_digg.htm'/}
  156. {dede:include comment='文档评论模块' file='widget_article_feedback.htm'/}
  157. </div>
  158. <div class="col-md-3">
  159. {dede:include comment='推荐文档' filename='widget_recommend.htm'/}
  160. {dede:include comment='热点文档' filename='widget_hot.htm'/}
  161. {dede:include comment='QR二维码' filename='widget_qrcode.htm'/}
  162. </div>
  163. </div>
  164. </main>
  165. {dede:include filename='foot.htm'/}
  166. <script>
  167. //页面加载触发
  168. $(document).ready(function() {
  169. //获取文档点击数统计
  170. $.get("{dede:field name='phpurl'/}/count.php?format=json&view=yes&aid={dede:field.id/}&mid=1&cid={dede:field.channel/}",
  171. function(data) {
  172. let result = JSON.parse(data);
  173. $("#_count").html(result.data.click);
  174. })
  175. });
  176. </script>
  177. </body>
  178. </html>