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

177 lines
6.9KB

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