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

219 lines
7.2KB

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