Browse Source

默认模板样式调整

tags/6.0.0
tianya 3 years ago
parent
commit
099f8d05d5
24 changed files with 2048 additions and 858 deletions
  1. +13
    -1
      src/plus/count.php
  2. +27
    -32
      src/plus/stow.php
  3. +0
    -8
      src/plus/view.php
  4. +728
    -0
      src/static/css/dede.css
  5. BIN
      src/static/img/admin-logo.png
  6. BIN
      src/static/img/avatar.png
  7. BIN
      src/static/img/logo.gif
  8. BIN
      src/static/img/member_bg.jpg
  9. BIN
      src/static/img/member_home_bg.jpg
  10. +140
    -0
      src/static/js/dede.js
  11. +174
    -253
      src/templets/default/article_article.htm
  12. +44
    -14
      src/templets/default/footer.htm
  13. +23
    -0
      src/templets/default/header.htm
  14. +204
    -266
      src/templets/default/index.htm
  15. +84
    -84
      src/templets/default/list_article.htm
  16. +23
    -0
      src/templets/default/navbar.htm
  17. +79
    -75
      src/templets/default/search.htm
  18. +139
    -53
      src/templets/default/tag.htm
  19. +83
    -72
      src/templets/default/taglist.htm
  20. +10
    -0
      src/templets/default/top.htm
  21. +238
    -0
      src/templets/default/widget_article_feedback.htm
  22. +13
    -0
      src/templets/default/widget_channels.htm
  23. +13
    -0
      src/templets/default/widget_hot.htm
  24. +13
    -0
      src/templets/default/widget_recommend.htm

+ 13
- 1
src/plus/count.php View File

@@ -19,6 +19,7 @@ if(isset($aid)) $arcID = $aid;
$cid = empty($cid)? 1 : intval(preg_replace("/[^-\d]+[^\d]/",'', $cid));
$arcID = $aid = empty($arcID)? 0 : intval(preg_replace("/[^\d]/",'', $arcID));
$format = isset($format)? $format : "";
$maintable = '#@__archives';$idtype='id';
if($aid==0) exit();
@@ -46,7 +47,18 @@ if(!empty($view))
$row = $dsql->GetOne(" SELECT click FROM `{$maintable}` WHERE {$idtype}='$aid' ");
if(is_array($row))
{
echo "document.write('".$row['click']."');\r\n";
if (!empty($format)) {
$result = array(
"code" => 200,
"data" => array(
'click' => $row['click'],
),
);
echo json_encode($result);
} else {
echo "document.write('".$row['click']."');\r\n";
}
}
}
exit();

+ 27
- 32
src/plus/stow.php View File

@@ -1,51 +1,46 @@
<?php
require_once(dirname(__FILE__)."/../include/common.inc.php");
require_once(dirname(__FILE__) . "/../include/common.inc.php");
$aid = ( isset($aid) && is_numeric($aid) ) ? $aid : 0;
$type=empty($type)? "" : HtmlReplace($type,1);
if($aid==0)
{
ShowMsg('文档id不能为空!','javascript:window.close();');
exit();
$aid = (isset($aid) && is_numeric($aid)) ? $aid : 0;
$type = empty($type) ? "" : HtmlReplace($type, 1);
if ($aid == 0) {
ShowMsg('文档id不能为空!', 'javascript:window.close();');
exit();
}
require_once(DEDEINC."/memberlogin.class.php");
require_once(DEDEINC . "/memberlogin.class.php");
$ml = new MemberLogin();
if($ml->M_ID==0)
{
ShowMsg('只有会员才允许收藏操作!','javascript:window.close();');
exit();
if ($ml->M_ID == 0) {
ShowMsg('只有会员才允许收藏操作!', 'javascript:window.close();');
exit();
}
//读取文档信息
$arcRow = GetOneArchive($aid);
if($arcRow['aid']=='')
{
ShowMsg("无法收藏未知文档!","javascript:window.close();");
exit();
if ($arcRow['aid'] == '') {
ShowMsg("无法收藏未知文档!", "javascript:window.close();");
exit();
}
extract($arcRow, EXTR_SKIP);
$title = HtmlReplace($title,1);
$title = HtmlReplace($title, 1);
$aid = intval($aid);
$addtime = time();
if($type==''){
$row = $dsql->GetOne("Select * From `#@__member_stow` where aid='$aid' And mid='{$ml->M_ID}' AND type='' ");
if(!is_array($row))
{
$dsql->ExecuteNoneQuery("INSERT INTO `#@__member_stow`(mid,aid,title,addtime) VALUES ('".$ml->M_ID."','$aid','".addslashes($arctitle)."','$addtime'); ");
}
}else{
$row = $dsql->GetOne("Select * From `#@__member_stow` where type='$type' and (aid='$aid' And mid='{$ml->M_ID}')");
if(!is_array($row)){
$dsql->ExecuteNoneQuery(" INSERT INTO `#@__member_stow`(mid,aid,title,addtime,type) VALUES ('".$ml->M_ID."','$aid','$title','$addtime','$type'); ");
}
if ($type == '') {
$row = $dsql->GetOne("SELECT * FROM `#@__member_stow` WHERE aid='$aid' And mid='{$ml->M_ID}' AND type IS NULL ");
if (!is_array($row)) {
$dsql->ExecuteNoneQuery("INSERT INTO `#@__member_stow`(mid,aid,title,addtime) VALUES ('" . $ml->M_ID . "','$aid','" . addslashes($arctitle) . "','$addtime'); ");
}
} else {
$row = $dsql->GetOne("SELECT * FROM `#@__member_stow` WHERE type='$type' AND (aid='$aid' AND mid='{$ml->M_ID}')");
if (!is_array($row)) {
$dsql->ExecuteNoneQuery("INSERT INTO `#@__member_stow`(mid,aid,title,addtime,type) VALUES ('" . $ml->M_ID . "','$aid','$title','$addtime','$type'); ");
}
}
//更新用户统计
$row = $dsql->GetOne("SELECT COUNT(*) AS nums FROM `#@__member_stow` WHERE `mid`='{$ml->M_ID}' ");
$dsql->ExecuteNoneQuery("UPDATE #@__member_tj SET `stow`='$row[nums]' WHERE `mid`='".$ml->M_ID."'");
$dsql->ExecuteNoneQuery("UPDATE `#@__member_tj` SET `stow`='{$row['nums']}' WHERE `mid`='" . $ml->M_ID . "'");
ShowMsg('成功收藏一篇文档!','javascript:window.close();');
?>
ShowMsg('成功收藏一篇文档!', 'javascript:window.close();');

+ 0
- 8
src/plus/view.php View File

@@ -102,14 +102,6 @@ if($needMoney>0 || $needRank>1)
showmsg('购买失败, 请返回', -1);
exit;
}
#api{{
if(defined('UC_APPID'))
{
include_once DEDEROOT.'/api/uc.func.php';
$row = $dsql->GetOne("SELECT `scores`,`userid` FROM `#@__member` WHERE `mid`='".$cfg_ml->M_ID."'");
uc_credit_note($row['userid'],-$needMoney,'money');
}
#/aip}}
showmsg('购买成功,购买扣点不会重扣金币,谢谢!', '/plus/view.php?aid='.$aid);
exit;


+ 728
- 0
src/static/css/dede.css View File

@@ -0,0 +1,728 @@
/* Copyright 2020 The [ZiXue.CN] Authors. All rights reserved.
license that can be found in the LICENSE file. */

.flink,.flink a,.copyright,.copyright a {
color: white;
}

.copyright {
background-color: #12451F;
padding:.5em;
}

form.search {
display: flex;
width: 100%;
}

/* spec */
ul.spec > li > a > img,.article-spec > a > img {
width: 120px;
}

ul.spec .border-bottom-dashed {
border-bottom: dashed 1px #929292;
}

ul.spec > li .title a {
color: #212529;
}

ul.spec > li .title h4 {
display: inline;
}

ul.spec > li .title .label {
background-color: #B7E9B4;
color: #008E38;
padding: 0 5px;
border-radius: 3px;
}

ul.spec > li .description, ul.spec > li .description a {
color: #868686;
font-size: 16px;
line-height: 24px;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
}

/* 通用列表 */
ul.items > li .type {
background-color: #008E38;
color: white;
font-size: 14px;
height: 18px;
line-height: 18px;
position: relative;
padding: 0 5px;
top: -3px;
margin-right: 10px;
}

ul.items > li .pane {
background-color: #008E38;
width: 10px;
height: 10px;
display: inline-block;
vertical-align: middle;
margin-right: 10px;
margin-bottom: 10px;
}

ul.items > li .caption {
line-height: 32px;
}

ul.items > li .title,ul.items > li .caption a {
display: inline;
line-height: 18px;
color: #212529;
}

ul.items > li .description, ul.items > li .description a {
color: #868686;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
line-height: 26px;
word-break:break-all;
}

ul.items .border-bottom-dashed {
border-bottom: dashed 1px #929292;
}

ul.items > li .label {
border: 1px solid #FF8400;
color: #FF8400;
height: 24px;
border-radius: 3px;
font-size: 12px;
line-height: 24px;
margin-left: 5px;
padding: 0 5px;
}

ul.items > li .label:hover {
border: 1px solid #FF8400;
color: white;
text-decoration-line: none;
background-color: #FF8400;
height: 24px;
border-radius: 3px;
font-size: 12px;
line-height: 24px;
margin-left: 5px;
padding: 0 5px;
}

ul.items > li .source {
font-size: 14px;
}

/* 自学网列表群组 */
.list-group-dede {
text-align: center;
font-size: 16px;
}

.dropdown-dede .dropdown-menu {
width: 100%;
text-align: center;
}

.dropdown-dede .dropdown-menu>.dropdown-item.active {
background-color: white;
color: #FF8400;
}

.dropdown-dede,.dropdown-dede a {
width: 100%;
}

.dropdown-dede,.dropdown-item {
padding: .25rem 1.5rem;
text-align: left;
border-bottom: 1px dashed #D7D7D7;
}

.dropdown-dede,.dropdown-item:last-child {
border-bottom: none;
}

.list-group-dede .list-group-item.active {
z-index: 2;
color: #ff8400;
background-color: white;
}

.list-group-dede {
border: 1px solid #96D6A8;
border-radius: 10px;
}

.list-group-dede .list-group-item {
position: relative;
display: block;
padding: .75rem 1.25rem;
background-color: #fff;
border: none;
font-weight: 600;
border-bottom: 1px dashed #D7D7D7;
}

.list-group-dede .list-group-item.active {
border: none;
border-bottom: 1px dashed #D7D7D7;
}
.list-group-dede .list-group-item+.list-group-item.active {
margin-top: 0px;
}

.list-group-dede .list-group-item:last-child {
border-bottom: none;
}

/* dedecard */
.ddcard,.ddcard-normal {
border: none;
}

.ddcard-normal{
box-shadow: 1px 0px 5px 5px #F2F2F2;
padding: .25em;
}

.ddcard-normal ul {
padding: .5em;
}

.ddcard > .card-header {
background-color: white;
padding: 0;
border-bottom: solid 5px #008E38;
}

.ddcard-normal > .card-header {
background-color: white;
padding: 0;
border-bottom: none;
}
.ddcard-normal > .card-header .caption {
font-size: 18px;
font-weight: 600;
}
.ddcard-normal > .card-header .caption a{
color: #008E38;
}
.ddcard-normal > .card-header .caption::before {
content: " ";
background-color: #008E38;
padding: 4px;
margin-right: 10px;
}

.ddcard > .card-header .caption {
font-size: 18px;
}

.ddcard > .card-header .caption span {
display: inline-block;
background: #008E38;
padding: 5px 15px;
color: white;
margin-bottom: -3px;
}

.ddcard > .card-header .more a,.ddcard-normal > .card-header .more a{
color: #008E38;
font-size: 14px;
line-height: 26px;
}

.ddcard > .list-group {
margin-left: 20px;
}

.ddcard > .list-group .label,.ddcard-normal > .list-group .label {
float: right;
font-size: 14px;
padding: 3px;
color: #12451F;
background-color: #B6E9B4;
border-radius: 3px;
margin-left: 5px;
}

.ddcard-normal > .list-group .time {
color: #C0C0C0;
}

.ddcard-normal > ul > li,.ddcard-normal > ol > li {
border-bottom: dashed 1px #CFCFCF;
list-style: none;
}

.ddcard-normal > ul > li.media img {
width: 75px;
height: 57px;
}

.ddcard-normal > ul > li.media h4 {
font-size: 16px;
}

.ddcard-normal .more {
padding-right: 1.5em;
}


.ddcard-normal > .list-group > li i {
color: #60B983;
}

.ddcard > ul > li,.ddcard > ol > li,.ddcard-normal > ul > li,.ddcard-normal > ol > li {
padding: 5px 0;
color: #C0C0C0;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}

.ddcard > ul > li:nth-child(1),.ddcard > ol > li:nth-child(1),
.ddcard-normal > ul > li:nth-child(1),.ddcard-normal > ol > li:nth-child(1) {
margin-top: 10px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}

.ddcard > ul > li a ,.ddcard > ol > li a,.ddcard-normal > ul > li a ,.ddcard-normal > ol > li a{
color: #272727;
}

.ddcard > ol > li::before,.ddcard-normal > ol > li::before {
background-color: #FF8400;
color: white;
padding: 3px;
margin-left: -10px;
margin-right: 10px;
border-radius: 3px;
}

.ddcard > ol > li:nth-child(1)::before,.ddcard-normal > ol > li:nth-child(1)::before {
content: "1";
background-color: #FF8400;
color: white;
padding: 3px 6px;
margin-left: 0px;
margin-right: 10px;
border-radius: 3px;
width: 6px;
}

.ddcard > ol > li:nth-child(2)::before,.ddcard-normal > ol > li:nth-child(2)::before {
content: "2";
background-color: #FFB400;
color: white;
padding: 3px 5px;
margin-left: 0px;
margin-right: 10px;
border-radius: 3px;
}

.ddcard > ol > li:nth-child(3)::before,.ddcard-normal > ol > li:nth-child(3)::before {
content: "3";
background-color: #FFCC00;
color: white;
padding: 3px 5px;
margin-left: 0px;
margin-right: 10px;
border-radius: 3px;
}

/* 特殊标题 */
h1.dede::before {
content: " ";
background-color: #008E38;
padding: 4px;
margin-right: 10px;
}

h2.dede::before {
content: " ";
background-color: #008E38;
padding: 4px;
margin-right: 10px;
}

h3.dede::before {
content: " ";
background-color: #008E38;
padding: 4px;
margin-right: 10px;
}

h4.dede::before {
content: " ";
background-color: #008E38;
padding: 4px;
margin-right: 10px;
}

h5.dede::before {
content: " ";
background-color: #008E38;
padding: 4px;
margin-right: 10px;
}

h3.dede-box::before {
content: " ";
background-color: #B7E9B4;
padding: 4px;
margin-bottom: 4px;
margin-right: 10px;
display: inline-block;
}

h4.dede-box::before {
content: " ";
background-color: #B7E9B4;
padding: 4px;
margin-bottom: 4px;
margin-right: 10px;
display: inline-block;
}

h5.dede-box::before {
content: " ";
background-color: #B7E9B4;
padding: 4px;
margin-bottom: 4px;
margin-right: 10px;
display: inline-block;
}

/* 导航 */
.nav.dede .nav-link {
color: #858585;
border: solid 1px #858585;
}

.nav.dede .nav-link.active {
color: white;
border: solid 1px #FF8400;
}

.nav.dede .nav-link:hover {
color: white;
background-color: #FF8400;
border: solid 1px #FF8400;
}

.nav.dede .nav-link.disabled {
color: #6c757d;
pointer-events: none;
cursor: default;
}

/* 站点全局导航部分 */
nav.navbar.dede {
padding: 0;
}

nav.navbar.dede .dropdown-item.active, .dropdown-item:active {
color:#ff8400;
text-decoration: none;
background-color:#fff;
}

nav.navbar.dede .navbar-brand{
display: none;
}

nav.navbar.dede .nav-item{
width: 7em;
text-align: center;
padding: .5em 0;
}

nav.navbar.dede .nav-item.active{
background-color: #ff8400;
}

nav.location {
padding: .5em;
border: solid 1px #B5B5B5;
border-radius: 10px;
display: flex;
flex-direction: row;
}

nav.location .caption{
display: inline-block;
line-height: 20px;
font-size: 18px;
font-weight: 600;
color: #008E38;
width: 75px;
text-align: center;
padding: 0 5px 0 5px;
position: relative;
}

nav.location .dede {
padding-inline-start: 0px;
margin-bottom: 0;
}

nav.location .dede li {
float: left;
list-style-type: none;
}

nav.location .dede li .nav-link {
color: #272727;
}

nav.location .dede li.active .nav-link {
color: #ff8400;
}

.dede-title > .dede, .dede-title > .dede-box {
display: inline-block;
}

.dede-title > .items{
display: inline-block;
}

/* 面包屑 */
.position .breadcrumb .breadcrumb-item a {
color: #008E38;
}

/* 滚动到顶部 */
#btnScrollTop {
display: none;
position: fixed;
bottom: 20px;
right: 20px;
z-index: 99;
font-size: 18px;
border: none;
outline: none;
background-color: #EC982C;
color: white;
cursor: pointer;
padding: 10px 15px;
border-radius: 10px;
}

#btnScrollTop:hover {
background-color: #E77817;
}

/*展开搜索*/
.showhide-info .btn-show,.showhide-info .btn-hide{
margin: 20px auto;
}

/*展开状态*/
.showhide-info.show .box {
height: 100%;
}
.showhide-info.show .btn-show{
display: none;
}
.showhide-info.show .btn-hide{
display: block;
}

/*收缩状态*/
.showhide-info.hide .box{
height: 300px;
overflow: hidden;
}
.showhide-info.hide .btn-showhide{
position: relative;
padding-top: 20px;
padding-bottom: 30px;
}
.showhide-info.hide .gradient{
position: absolute;
top: -79px;
left: 0;
height: 80px;
width: 100%;
background-image: -webkit-gradient(linear,left top,left bottom,from(rgba(255,255,255,0)),to(#fff));
background-image: -webkit-linear-gradient(top,rgba(255,255,255,0),#fff);
background-image: linear-gradient(-180deg,rgba(255,255,255,0),#fff);
}
.showhide-info.hide .btn-show{
display: block;
}
.showhide-info.hide .btn-hide{
display: none;
}

/* 文章内容样式 */
.article-main h2 {
line-height: 1.5em;
}

.article-meta small {
color: #868686;
margin-left: 1em;
}

.article-main .body {
word-break: break-all;
}

.article-main .body img,.article-main .body video {
max-width: 100%!important;
height: auto !important;
visibility: visible !important;
}

.article-main .body table {
width: 100% !important;
}

/* 站点头部nav */
.site-nav {
font-size: 14px;
}

.site-nav .title b {
color: #ff8400;
}

.site-nav .user a {
color: #008E38;
}

@media only screen and (max-width: 1199px) {
.ddcard > .card-header .caption span {
font-size: 14px;
}
}


@media only screen and (max-width: 576px) {
.logo {
text-align: center;
}
nav.navbar.dede .nav-item{
width: 100%;
}

nav.navbar.dede .navbar-brand{
display: block;
margin-left: 10px;
}

.dropdown-dede,.dropdown-item {
text-align: center;
}

.ddcard > .card-header .caption span {
font-size: 16px;
}
}

@media only screen and (max-width: 768px) {

nav.navbar.dede .nav-item{
width: 100%;
}

nav.navbar.dede .navbar-brand{
display: block;
margin-left: 10px;
}

.dropdown-dede,.dropdown-item {
text-align: center;
}

.ddcard > .card-header .caption span {
font-size: 14px;
}
}

.digg .comment-container {
width: 200px;
padding: 10px 20px;
border: 1px solid #f2f2f2;
border-radius: 20px;
margin: 0 6px;
cursor: pointer;
}

.digg .comment-container:hover {
background-color: #FFFCE0;
}

.digg .comment-top {
display: flex;
flex-direction: row;
align-items: center;
margin-bottom: 10px;
}

.digg .comment-top-text {
color: #497cf6;
margin-left: 10px;
}

.digg .comment-top-text-danger {
color: #d21d35;
margin-left: 10px;
}

.digg .text-like {
color: #497cf6;
}

.digg .text-unlike {
color: #d21d35
}

.digg .comment-top p {
margin-bottom: unset;
}


.prenext .pagination-previous, .pagination-next {
font-size: 14px;
color: #a6a5a6;
padding: 6px 14px;
border-radius: 34px;
border: 1px solid #f0f0f0;
cursor: pointer;
}

.prenext .pagination-previous:hover, .pagination-next:hover {
color: #c2e5d0;
background-color: #1eac5a;
}

.actbox {
float: right;
padding:10px;
}
.actbox ul {
list-style: none;
}
.actbox ul li {
float: left;
margin-left: 10px;
}

BIN
src/static/img/admin-logo.png View File

Before After
Width: 536  |  Height: 64  |  Size: 24KB

BIN
src/static/img/avatar.png View File

Before After
Width: 300  |  Height: 300  |  Size: 3.1KB

BIN
src/static/img/logo.gif View File

Before After
Width: 216  |  Height: 54  |  Size: 3.3KB

BIN
src/static/img/member_bg.jpg View File

Before After
Width: 1920  |  Height: 620  |  Size: 239KB

BIN
src/static/img/member_home_bg.jpg View File

Before After
Width: 1920  |  Height: 260  |  Size: 234KB

+ 140
- 0
src/static/js/dede.js View File

@@ -0,0 +1,140 @@
/* Copyright 2020 The ZiXue.CN Authors. All rights reserved.
license that can be found in the LICENSE file. */

// 滚动到页面顶部
function gotop() {
$('html, body').animate({ scrollTop: 0 }, 'slow');
}

//读写cookie函数
function GetCookie(c_name)
{
if (document.cookie.length > 0)
{
c_start = document.cookie.indexOf(c_name + "=")
if (c_start != -1)
{
c_start = c_start + c_name.length + 1;
c_end = document.cookie.indexOf(";",c_start);
if (c_end == -1)
{
c_end = document.cookie.length;
}
return unescape(document.cookie.substring(c_start,c_end));
}
}
return null
}

function SetCookie(c_name,value,expiredays)
{
var exdate = new Date();
exdate.setDate(exdate.getDate() + expiredays);
document.cookie = c_name + "=" +escape(value) + ((expiredays == null) ? "" : ";expires=" + exdate.toGMTString()); //使设置的有效时间正确。增加toGMTString()
}

//-------------------------------------------------------------------------------------------
// 全局消息提示框
//-------------------------------------------------------------------------------------------

// 生成一个随机ID
function guid() {
function S4() {
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
}
return (S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4());
}

// 显示对话框,动态创建modal并显示,退出自动销毁窗体
// args是以下结构体
/*
args = {
title : "", // 标题,默认是MuEMS
footer : "", // 底部按钮,可以自定义按钮
noClose : false, // 是否显示右上角关闭按钮,默认显示
}
*/
// 函数会返回一个modalID,通过这个ID可自已定义一些方法
// 这里用到了一个展开语法
// https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Operators/Spread_syntax
function ShowMsg(content, ...args) {
title = "DedeCMS信息提示";
if (typeof content == "undefined") content = "";
modalID = guid();
var footer = `<button type="button" class="btn btn-outline-success" onClick="CloseModal(\'DedeModal${modalID}\')">确定</button>`;
var noClose = false;

if (args.length == 1) {
// 存在args参数
if (typeof args[0].title !== 'undefined' && args[0].title != "") {
title = args[0].title;
}
if (typeof args[0].footer !== 'undefined' && args[0].footer != "") {
footer = args[0].footer;
}
if (typeof args[0].noClose !== 'undefined' && args[0].noClose == true) {
noClose = true;
}
}

footer = footer.replace("~modalID~", modalID);
content = content.replace("~modalID~", modalID);

var modal = `<div id="DedeModal${modalID}" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="DedeModalLabel${modalID}" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content"><div class="modal-header">
<h6 class="modal-title" id="DedeModalLabel${modalID}">${title}</h6>`;
if (!noClose) {
modal += `<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>`;
}
modal += `</div><div class="modal-body">${content}</div><div class="modal-footer">${footer}</div></div></div></div>`;
$("body").append(modal)
$("#DedeModal" + modalID).modal({
backdrop: 'static',
show: true
});
$("#DedeModal" + modalID).on('hidden.bs.modal', function (e) {
$("#DedeModal" + modalID).remove();
})
return modalID;
}

// 隐藏并销毁modal
function CloseModal(modalID) {
$("#" + modalID).modal('hide');
$("#" + modalID).on('hidden.bs.modal', function (e) {
if ($("#" + modalID).length > 0) {
$("#" + modalID).remove();
}
})
}

// 在某个元素内显示alert信息
function ShowAlert(ele, content, type, showtime = 3000) {
let msg = `<div class="alert alert-${type}" role="alert">
${content}
</div>`;
$(ele).html(msg);
$(ele).show();
setTimeout(() => {
$(ele).html("");
}, showtime);
}


// 页面加载触发
$(document).ready(function () {

window.onscroll = function () { scrollFunction() };

function scrollFunction() {
if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
$("#btnScrollTop").show();
} else {
$("#btnScrollTop").hide();
}
}

});

+ 174
- 253
src/templets/default/article_article.htm View File

@@ -1,260 +1,181 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!doctype html>
<html lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={dede:global.cfg_soft_lang/}" />
<title>{dede:field.title/}_{dede:global.cfg_webname/}</title>
<meta name="keywords" content="{dede:field.keywords/}" />
<meta name="description" content="{dede:field.description function='html2text(@me)'/}" />
<link href="{dede:global.cfg_templets_skin/}/style/dedecms.css" rel="stylesheet" media="screen" type="text/css" />
<meta http-equiv="mobile-agent" content="format=xhtml;url={dede:global.cfg_mobileurl/}/view.php?aid={dede:field.id/}">
<script type="text/javascript">if(window.location.toString().indexOf('pref=padindex') != -1){}else{if(/AppleWebKit.*Mobile/i.test(navigator.userAgent) || (/MIDP|SymbianOS|NOKIA|SAMSUNG|LG|NEC|TCL|Alcatel|BIRD|DBTEL|Dopod|PHILIPS|HAIER|LENOVO|MOT-|Nokia|SonyEricsson|SIE-|Amoi|ZTE/.test(navigator.userAgent))){if(window.location.href.indexOf("?mobile")<0){try{if(/Android|Windows Phone|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)){window.location.href="{dede:global.cfg_mobileurl/}/view.php?aid={dede:field.id/}";}else if(/iPad/i.test(navigator.userAgent)){}else{}}catch(e){}}}}</script>
<script language="javascript" type="text/javascript" src="{dede:global.cfg_cmsurl/}/static/js/dedeajax2.js"></script>
<script language="javascript" type="text/javascript">
<!--
function CheckLogin(){
var taget_obj = document.getElementById('_ajax_feedback');
myajax = new DedeAjax(taget_obj,false,false,'','','');
myajax.SendGet2("{dede:global.cfg_cmsurl/}/member/ajax_feedback.php");
DedeXHTTP = null;
}
function postBadGood(ftype,fid)
{
var taget_obj = document.getElementById(ftype+fid);
var saveid = GetCookie('badgoodid');
if(saveid != null)
{
var saveids = saveid.split(',');
var hasid = false;
saveid = '';
j = 1;
for(i=saveids.length-1;i>=0;i--)
{
if(saveids[i]==fid && hasid) continue;
else {
if(saveids[i]==fid && !hasid) hasid = true;
saveid += (saveid=='' ? saveids[i] : ','+saveids[i]);
j++;
if(j==10 && hasid) break;
if(j==9 && !hasid) break;
}
}
if(hasid) { alert('您刚才已表决过了喔!'); return false;}
else saveid += ','+fid;
SetCookie('badgoodid',saveid,1);
}
else
{
SetCookie('badgoodid',fid,1);
}
myajax = new DedeAjax(taget_obj,false,false,'','','');
myajax.SendGet2("{dede:field name='phpurl'/}/feedback.php?aid="+fid+"&action="+ftype+"&fid="+fid);
}
function postDigg(ftype,aid)
{
var taget_obj = document.getElementById('newdigg');
var saveid = GetCookie('diggid');
if(saveid != null)
{
var saveids = saveid.split(',');
var hasid = false;
saveid = '';
j = 1;
for(i=saveids.length-1;i>=0;i--)
{
if(saveids[i]==aid && hasid) continue;
else {
if(saveids[i]==aid && !hasid) hasid = true;
saveid += (saveid=='' ? saveids[i] : ','+saveids[i]);
j++;
if(j==20 && hasid) break;
if(j==19 && !hasid) break;
}
}
if(hasid) { alert("您已经顶过该帖,请不要重复顶帖 !"); return; }
else saveid += ','+aid;
SetCookie('diggid',saveid,1);
}
else
{
SetCookie('diggid',aid,1);
}
myajax = new DedeAjax(taget_obj,false,false,'','','');
var url = "{dede:global.cfg_phpurl/}/digg_ajax.php?action="+ftype+"&id="+aid;
myajax.SendGet2(url);
}
function getDigg(aid)
{
var taget_obj = document.getElementById('newdigg');
myajax = new DedeAjax(taget_obj,false,false,'','','');
myajax.SendGet2("{dede:global.cfg_phpurl/}/digg_ajax.php?id="+aid);
DedeXHTTP = null;
}
-->
</script>
<meta charset="{dede:global.cfg_soft_lang/}">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<script src="{dede:global.cfg_cmsurl/}/static/js/jquery.min.js"></script>
<link rel="stylesheet" href="{dede:global.cfg_cmsurl/}/static/css/bootstrap.min.css">
<link href="{dede:global.cfg_cmsurl/}/static/font-awesome/css/font-awesome.min.css" rel="stylesheet">
<link rel="stylesheet" href="{dede:global.cfg_cmsurl/}/static/css/dede.css">
<link rel="shortcut icon" href="{dede:global.cfg_cmsurl/}/static/img/favicon.png">
<title>{dede:field.title/}_{dede:global.cfg_webname/}</title>
<meta name="keywords" content="{dede:field.keywords/}" />
<meta name="description" content="{dede:field.description function='html2text(@me)'/}" />
</head>
<body class="articleview">
{dede:include filename="head2.htm"/}
<!-- /header -->
<div class="w960 center clear mt1">
<div class="pleft">
<div class="place"> <strong>当前位置:</strong> {dede:field name='position'/} </div>
<!-- /place -->
<div class="viewbox">
<div class="title">
<h2>{dede:field.title/}</h2>
</div>
<!-- /title -->
<div class="info"> <small>时间:</small>{dede:field.pubdate function="MyDate('Y-m-d H:i',@me)"/}<small>来源:</small>{dede:field.source/} <small>作者:</small>{dede:field.writer/} <small>点击:</small>
<script src="{dede:field name='phpurl'/}/count.php?view=yes&aid={dede:field name='id'/}&mid={dede:field name='mid'/}" type='text/javascript' language="javascript"></script>
次</div>
<!-- /info -->
{dede:field.description runphp='yes'}
if(@me<>'' )@me = '
<div class="intro">'.@me.'</div>
';
{/dede:field.description}
<div class="content">
<table width='100%'>
<tr>
<td>
{dede:field.body/}
{dede:field.vote/}
(责任编辑:{dede:adminname/})</td>
</tr>
</table>
</div>
<!-- /content -->
<div class="dede_pages">
<ul class="pagelist">
{dede:pagebreak/}
</ul>
</div>
<center>{dede:qrcode/}</center>
<!-- /pages -->
<!-- //顶踩 -->
<div class="newdigg" id="newdigg">
<div class="diggbox digg_good" onmousemove="this.style.backgroundPosition='left bottom';" onmouseout="this.style.backgroundPosition='left top';" onclick="javascript:postDigg('good',{dede:field.id/})">
<div class="digg_act">顶一下</div>
<div class="digg_num">({dede:field.goodpost/})</div>
<div class="digg_percent">
<div class="digg_percent_bar"><span style="width:{dede:field.goodper/}%"></span></div>
<div class="digg_percent_num">{dede:field.goodper/}%</div>
<body>
{dede:include filename="top.htm"/}
{dede:include filename="header.htm"/}
{dede:include filename="navbar.htm"/}
<div class="container">
<div class="position">
<nav aria-label="breadcrumb">
<ol class="breadcrumb mb-0">
<li class="breadcrumb-item">当前位置</li>
{dede:field name='position'/}
</ol>
</nav>
</div>
<!-- /.position -->
</div>
</div>
<div class="diggbox digg_bad" onmousemove="this.style.backgroundPosition='right bottom';" onmouseout="this.style.backgroundPosition='right top';" onclick="javascript:postDigg('bad',{dede:field.id/})">
<div class="digg_act">踩一下</div>
<div class="digg_num">({dede:field.badpost/})</div>
<div class="digg_percent">
<div class="digg_percent_bar"><span style="width:{dede:field.badper/}%"></span></div>
<div class="digg_percent_num">{dede:field.badper/}%</div>
<main class="container">
<div class="row">
<div class="col-md-8 article-main">
<h2 class="mt-0 mb-3 zixue">{dede:field.title/}</h2>
<div class="article-meta">
<small>时间:</small>{dede:field.pubdate function="MyDate('Y-m-d',@me)"/}
<small>来源:</small>{dede:field.source/}
<small>作者:</small>{dede:field.writer/}
<small>点击:</small><span id="_count">...</span>次
</div>
<div class="body py-2">
{dede:field.body/} (责任编辑:{dede:adminname/})
</div>
<!-- /.body -->
<nav>
<ul class="pagination justify-content-center py-3">
{dede:pagebreak/}
</ul>
</nav>
<div class="clearfix"></div>
{dede:include comment='文档顶踩模块' filename="widget_article_digg.htm"/}
<div class="row">
<div class="col-md-4 prenext pt-2">
<div class="pagination-previous">{dede:prenext get='pre'/}</div>
<div class="pagination-next mt-2">{dede:prenext get='next'/}</div>
</div>
<div class="col-md-8">
<div class="row actbox">
<ul>
<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>
<li><i class="fa fa-bug" aria-hidden="true"></i> <a
href="javascript:ErrorAddSave({dede:field.id/}, '{dede:field.title/}');">挑错</a>
</li>
<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>
<li><i class="fa fa-print" aria-hidden="true"></i> <a href="#"
onClick="window.print();">打印</a></li>
</ul>
</div><!-- /actbox -->
</div>
</div>
{dede:include comment='文档评论模块' file='widget_article_feedback.htm' /}
</div>
<!-- /.article-main -->
<aside class="col-md-4 article-sidebar">
{dede:include comment='推荐内容' filename="widget_recommend.htm"/}
{dede:include comment='热点内容' filename="widget_hot.htm"/}
</aside>
<!-- /.article-sidebar -->
</div>
</main>
<!-- /main -->
{dede:include filename="footer.htm"/}
<script>
//-------------------------------------------------------------------------------------------
// 纠错扩展
//-------------------------------------------------------------------------------------------
// 提交纠错信息
function ErrAddSaveDo(modalID) {
let aid = $("#iptID").val();
let title = $("#iptTitle").val();
let type = $("#selType").val();
let err = $("#iptErr").val();
let erradd = $("#iptErradd").val();
let parms = {
format: "json",
dopost: "saveedit",
aid: aid,
title: title,
type: type,
err: err,
erradd: erradd,
};
$("#btnSubmit").attr("disabled", "disabled");
$.post("{dede:field name='phpurl'/}/erraddsave.php", parms, function () {
CloseModal(modalID);
});
}
// 错误提示
function ErrorAddSave(id, title) {
let content = `
<input type="hidden" value="${id}" class="form-control" id="iptID">
<div class="form-group">
<label for="iptTitle" class="col-form-label">标题:</label>
<input type="text" disabled=true value="${title}" class="form-control" id="iptTitle">
</div>
</div>
</div>
<script language="javascript" type="text/javascript">getDigg({dede:field.id/});</script>
<!-- //顶踩部份的源码结束 -->
<!-- //分享代码开始 -->
{dede:bshare/}
<!-- //分享代码结束 -->
<div class="boxoff"> <strong>------分隔线----------------------------</strong> </div>
<div class="handle">
<div class="context">
<ul>
<li>{dede:prenext get='pre'/}</li>
<li>{dede:prenext get='next'/}</li>
</ul>
</div>
<!-- /context -->
<div class="actbox">
<ul>
<li id="act-fav"><a href="{dede:field name='phpurl'/}/stow.php?aid={dede:field.id/}" target="_blank">收藏</a></li>
<li id="act-err"><a href="{dede:field name='phpurl'/}/erraddsave.php?aid={dede:field.id/}&title={dede:field.title/}" target="_blank">挑错</a></li>
<li id="act-pus"><a href="{dede:field name='phpurl'/}/recommend.php?aid={dede:field.id/}" target="_blank">推荐</a></li>
<li id="act-pnt"><a href="#" onClick="window.print();">打印</a></li>
</ul>
</div>
<!-- /actbox -->
</div>
<!-- /handle -->
</div>
<!-- /viewbox -->
<!-- //AJAX评论区 -->
{dede:include file='ajaxfeedback.htm' /} </div>
<!-- //左边内容结束 -->
<!-- //右边内容开始 -->
<div class="pright"> {dede:memberinfos}
<div class="infos_userinfo">
<dl class="tbox light">
<dt class='light'><strong>发布者资料</strong></dt>
<dd class='light'> <a href="[field:spaceurl /]" class="userface"><img src="[field:face/]" width="52" height="52" /></a> <a href='[field:spaceurl /]' class="username">[field:uname/]</a> <span class="useract"> <a href="[field:spaceurl /]" class="useract-vi">查看详细资料</a> <a href="[field:spaceurl /]&action=guestbook" class="useract-pm">发送留言</a> <a href="[field:spaceurl /]&action=newfriend" class="useract-af">加为好友</a> </span> <span class="userinfo-sp"><small>用户等级:</small>[field:rankname /]</span> <span class="userinfo-sp"><small>注册时间:</small>[field:jointime function="MyDate('Y-m-d H:m',@me)"/]</span> <span class="userinfo-sp"><small>最后登录:</small>[field:logintime function="MyDate('Y-m-d H:m',@me)"/]</span> </dd>
</dl>
</div>
{/dede:memberinfos}
<div class="pright">
<div>
<dl class="tbox">
<dt><strong>栏目列表</strong></dt>
<dd>
<ul class="d6">
{dede:channel type='son' currentstyle="
<li><a href='~typelink~' class='thisclass'>~typename~</a></li>
"}
<li><a href='[field:typeurl/]'>[field:typename/]</a></li>
{/dede:channel}
</ul>
</dd>
</dl>
</div>
<div class="commend mt1">
<dl class="tbox light">
<dt class='light'><strong>推荐内容</strong></dt>
<dd class='light'>
<ul class="d4">
{dede:arclist flag='c' titlelen=42 row=6}
<li><a href="[field:arcurl/]">[field:title/]</a>
<p>[field:description function='cn_substr(@me,80)'/]...</p>
</li>
{/dede:arclist}
</ul>
</dd>
</dl>
</div>
<!-- /commend -->
<div class="hot mt1">
<dl class="tbox light">
<dt class='light'><strong>热点内容</strong></dt>
<dd class='light'>
<ul class="c1 ico2">
{dede:arclist row=10 orderby=click}
<li><a href="[field:arcurl/]">[field:title/]</a></li>
{/dede:arclist}
</ul>
</dd>
</dl>
</div>
</div>
<!-- /pright -->
</div>
{dede:include filename="footer.htm"/}
<!-- /footer -->
<script type="text/javascript">
var contentRtPicAD2 = document.getElementById("contentRtPicAD2");
var stop = contentRtPicAD2.offsetTop - 60,
docBody = document.documentElement || document.body.parentNode || document.body,
hasOffset = window.pageYOffset !== undefined,
scrollTop;
window.onscroll = function (e) {
// cross-browser compatible scrollTop.
scrollTop = hasOffset ? window.pageYOffset : docBody.scrollTop;
<div class="form-group">
<label for="message-text" class="col-form-label">错误类型:</label>
<select id="selType" class="form-control">
<option value="1">错别字(除的、地、得)</option>
<option value="2">成语运用不当</option>
<option value="3">专业术语写法不规则</option>
<option value="4">产品与图片不符</option>
<option value="5">事实年代以及内容错误</option>
<option value="6">技术参数错误</option>
<option value="7">其他</option>
</select>
</div>
<div class="form-group">
<label for="message-text" class="col-form-label">错误内容:</label>
<textarea name="iptErr" class="form-control" id="iptErr"></textarea>
</div>
<div class="form-group">
<label for="message-text" class="col-form-label">修正建议:</label>
<textarea name="optErradd" class="form-control" id="iptErradd"></textarea>
</div>
`;
let footer = `
<button type="button" id="btnSubmit" class="btn btn-success" onClick="ErrAddSaveDo('DedeModal~modalID~')">提交</button>
<button type="button" class="btn btn-outline-success" onClick="CloseModal('DedeModal~modalID~')">确定</button>
`;
ShowMsg(content, {
'footer': footer,
});
}
if (scrollTop >= stop) {
contentRtPicAD2.className = 'stick';
} else {
contentRtPicAD2.className = '';
}
}
</script>
// 页面加载触发
$(document).ready(function () {
// 获取文档点击数统计
$.get("{dede:field name='phpurl'/}/count.php?format=json&view=yes&aid={dede:field.id/}&mid=1", function (data) {
let result = JSON.parse(data);
$("#_count").html(result.data.click);
})
});
</script>
</body>
</html>
</html>

+ 44
- 14
src/templets/default/footer.htm View File

@@ -1,14 +1,44 @@
<!-- //底部模板 -->
<div class="footer w960 center mt1 clear">
<!--
为了支持织梦团队的发展,请您保留织梦内容管理系统的链接信息.
我们对支持织梦团队发展的朋友表示真心的感谢!织梦因您更精彩!
-->
<div class="footer_left"></div>
<div class="footer_body">
<p class="powered">
Powered by <a href="http://www.dedecms.com" title="织梦内容管理系统(DedeCMS)--国内最专业的PHP网站管理系统,轻松建站的首选利器。" target="_blank"><strong>DedeCMS_{dede:global.cfg_version/}</strong></a> &copy; 2004-2020 <a href="http://www.desdev.cn/" target="_blank">DesDev</a> Inc.<br /><div class="copyright">{dede:global.cfg_powerby/}&nbsp;&nbsp;{dede:global.cfg_beian/}</div></p>
<!-- /powered -->
</div>
<div class="footer_right"></div>
</div>
<footer class="bg-success mt-3">
<div class="copyright py-5">
<p class="text-center">
Powered by <a href="http://www.dedecms.com" title="织梦内容管理系统(DedeCMS)--国内最专业的PHP网站管理系统,轻松建站的首选利器。" target="_blank"><strong>DedeCMS_{dede:global.cfg_version/}</strong></a> &copy; 2004-2020 <a href="http://www.desdev.cn/" target="_blank">DesDev</a> Inc. <a href="https://www.dedebiz.com" target="_blank" title="DedeBiz商业技术支持,提供更专业强大的站点应用开发技术">DedeBiz技术支持</a><br />
{dede:global.cfg_powerby/}&nbsp;&nbsp;{dede:global.cfg_beian/}
</p>
</div>
</footer>
<!-- /footer -->
<div class="scroll-top">
<button onclick="gotop()" id="btnScrollTop" title="返回顶部">
<i class="fa fa-chevron-up" aria-hidden="true"></i>
</button>
</div>
<!-- /.scroll-top -->
<script src="{dede:global.cfg_cmsurl/}/static/js/popper.min.js"></script>
<script src="{dede:global.cfg_cmsurl/}/static/js/bootstrap.bundle.js"></script>
<script src="{dede:global.cfg_cmsurl/}/static/js/dede.js"></script>
<script>
// 校验是否登录
function CheckLogin() {
$.get("{dede:global.cfg_cmsurl/}/member/ajax_loginsta.php?format=json",function(data) {
let result = JSON.parse(data);
if (result.code === 200) {
$("#_login").html(`
欢迎,${result.data.username}
<a class="ml-2" href="{dede:global.cfg_cmsurl/}/member/">[会员中心]</a>
<a class="ml-2" href="{dede:global.cfg_cmsurl/}/member/index_do.php?fmdo=login&dopost=exit">[退出]</a>
`);
$("#iptUsername").val(result.data.username);
$("#iptUsername").attr("disabled", "disabled");
$(".areaValidate").hide();
} else {
$(".areaValidate").show();
}
});
}
// 页面加载触发
$(document).ready(function () {
CheckLogin();
});
</script>

+ 23
- 0
src/templets/default/header.htm View File

@@ -0,0 +1,23 @@
<div class="container header">
<header class="pt-3">
<div class="row">
<div class="col-12 col-sm-6 logo"><a href="{dede:global.cfg_cmsurl/}/"><img src="{dede:global.cfg_cmsurl/}/static/img/logo.gif"
alt="{dede:global.cfg_webname/}" srcset=""></a></div>
<div class="col-12 col-sm-6 d-flex justify-content-end">
<div class="input-group py-3">
<form class="search" name="formsearch" action="{dede:global.cfg_cmsurl/}/plus/search.php">
<input type="hidden" name="kwtype" value="0" />
<input name="q" type="text" class="form-control" placeholder="输入搜索关键词">
<div class="input-group-append">
<button class="btn btn-success" type="submit">
<i class="fa fa-search" aria-hidden="true"></i>
</button>
</div>
</form>
</div>
</div>

</div>
</header>
</div>
<!-- /.header -->

+ 204
- 266
src/templets/default/index.htm View File

@@ -1,272 +1,210 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!doctype html>
<html lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={dede:global.cfg_soft_lang/}" />
<title>{dede:global.cfg_webname/}</title>
<meta name="description" content="{dede:global.cfg_description/}" />
<meta name="keywords" content="{dede:global.cfg_keywords/}" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="{dede:global.cfg_templets_skin/}/style/dedecms.css" rel="stylesheet" media="screen" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script language="javascript" type="text/javascript" src="{dede:global.cfg_cmsurl/}/static/js/dedeajax2.js"></script>
<script language="javascript" type="text/javascript" src="{dede:global.cfg_cmspath/}/static/js/jquery.min.js" ></script>
<script language="javascript" type="text/javascript" src="{dede:global.cfg_templets_skin/}/js/pic_scroll.js"></script>
<script language="javascript" type="text/javascript">
<!--
$(function(){
$("a[_for]").mouseover(function(){
$(this).parents().children("a[_for]").removeClass("thisclass").parents().children("dd").hide();
$(this).addClass("thisclass").blur();
$("#"+$(this).attr("_for")).show();
});
$("a[_for=uc_member]").mouseover();
$("a[_for=flink_1]").mouseover();
});
function CheckLogin(){
var taget_obj = document.getElementById('_userlogin');
myajax = new DedeAjax(taget_obj,false,false,'','','');
myajax.SendGet2("{dede:global.cfg_cmspath/}/member/ajax_loginsta.php");
DedeXHTTP = null;
}
-->
</script>
<meta charset="{dede:global.cfg_soft_lang/}">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="{dede:global.cfg_cmsurl/}/static/css/bootstrap.min.css">
<link href="{dede:global.cfg_cmsurl/}/static/font-awesome/css/font-awesome.min.css" rel="stylesheet">
<link rel="stylesheet" href="{dede:global.cfg_cmsurl/}/static/css/dede.css">
<link rel="shortcut icon" href="{dede:global.cfg_cmsurl/}/static/img/favicon.png">
<title>{dede:global.cfg_webname/}</title>
<meta name="keywords" content="{dede:global.cfg_keywords/}">
<meta name="description" content="{dede:global.cfg_description/}">
<style>
.hot-news {
overflow-x: hidden;
overflow-y: scroll;
height: 370px;
-webkit-overflow-scrolling: touch;
overflow: -moz-scrollbars-none;
}
.hot-news::-webkit-scrollbar {
display: none;
}
.hot-news li {
overflow: unset!important;
}
.quick img {
width: 100%;
}
.spec .card {
text-align: center;
}
.spec .card img {
max-width: 200px;
margin: 0 auto;
}
.spec .card-body {
padding: .25em;
}
.carousel-item img {
width: 100% !important;
}
</style>
<script>
const currentNavTypeID = '-1';
</script>
</head>
<body class="index">
{dede:include filename="head.htm"/}
<!-- /header -->
<div class="w960 center clear mt1">
<div class="pleft">
<div class="bignews">
<!--头条-->
<div class="onenews"> {dede:arclist flag='h' limit='0,1' infolen='230'}
<h2><a href="[field:arcurl/]">[field:title/]</a></h2>
<p>[field:info/]...<a href="[field:arcurl/]">[查看全文]</a></p>
{/dede:arclist} </div>
<!-- /onenews -->
<div class="d1"> {dede:arclist flag='h' limit='1,4'}
<div class='d1arc'><a href="[field:arcurl/]">[field:title/]</a></div>
{/dede:arclist} </div>
<!--/头条-->
<div class='newarticle'>最新文章</div>
<ul class="c2 ico1">
<!--最新文档-->
{dede:arclist row=14 titlelen=32 noflag='h'}
<li><a href="[field:arcurl/]">[field:title/]</a></li>
{/dede:arclist}
<!--//最新文档-->
</ul>
</div>
<!-- /bignews -->
<div class="flashnews">
<!-- size: 280px * 192px -->
<script language='javascript'>
linkarr = new Array();
picarr = new Array();
textarr = new Array();
var swf_width=280;
var swf_height=192;
//文字颜色|文字位置|文字背景颜色|文字背景透明度|按键文字颜色|按键默认颜色|按键当前颜色|自动播放时间|图片过渡效果|是否显示按钮|打开方式
var configtg='0xffffff|0|0x3FA61F|5|0xffffff|0xC5DDBC|0x000033|2|3|1|_blank';
var files = "";
var links = "";
var texts = "";
//这里设置调用标记
{dede:arclist flag='f' row='5'}
linkarr[[field:global.autoindex/]] = "[field:arcurl/]";
picarr[[field:global.autoindex/]] = "[field:litpic/]";
textarr[[field:global.autoindex/]] = "[field:title function='html2text(@me)'/]";
{/dede:arclist}
for(i=1;i<picarr.length;i++){
if(files=="") files = picarr[i];
else files += "|"+picarr[i];
}
for(i=1;i<linkarr.length;i++){
if(links=="") links = linkarr[i];
else links += "|"+linkarr[i];
}
for(i=1;i<textarr.length;i++){
if(texts=="") texts = textarr[i];
else texts += "|"+textarr[i];
}
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ swf_width +'" height="'+ swf_height +'">');
document.write('<param name="movie" value="{dede:global.cfg_templeturl /}/default/images/bcastr3.swf"><param name="quality" value="high">');
document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
document.write('<param name="FlashVars" value="bcastr_file='+files+'&bcastr_link='+links+'&bcastr_title='+texts+'&bcastr_config='+configtg+'">');
document.write('<embed src="{dede:global.cfg_templeturl /}/default/images/bcastr3.swf" wmode="opaque" FlashVars="bcastr_file='+files+'&bcastr_link='+links+'&bcastr_title='+texts+'&bcastr_config='+configtg+'&menu="false" quality="high" width="'+ swf_width +'" height="'+ swf_height +'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'); document.write('</object>');
</script>
</div>
<!-- /flashnews -->
<div class="latestnews">
<dl class="tbox light">
<dt class="light"><strong>特别推荐</strong></dt>
<dd class="light">
<ul class="d2 ico2">
{dede:arclist flag='a' row='6' orderby='pubdate'}
<li><span>[field:pubdate function="MyDate('m-d',@me)"/]</span><a href="[field:arcurl/]">[field:title/]</a></li>
{/dede:arclist}
</ul>
</dd>
</dl>
</div>
<!-- /latestnews -->
<div class="picnews">
<dl class="tbox light">
<dt class='light'><strong>图文资讯</strong></dt>
<dd class='light'>
<div class="infiniteCarousel">
<div class="wrapper">
<ul id='imgscroll'>
{dede:arclist row=10 orderby=pubdate type='image.' imgwidth='143' imgheight='106'}
<li><a href="[field:arcurl/]">[field:image/]<span class="title">[field:title/]</span></a></li>
{/dede:arclist}
</ul>
</div>
</div>
</dd>
</dl>
</div>
<!-- /picnews -->
<div class="listbox"> {dede:channelartlist}
<dl class="tbox">
<dt><strong><a href="{dede:field name='typeurl'/}">{dede:field name='typename'/}</a></strong><span class="more"><a href="{dede:field name='typeurl'/}">更多...</a></span></dt>
<dd>
<ul class="d1 ico3">
{dede:arclist titlelen='60' row='8'}
<li><span>[field:pubdate function="MyDate('m-d',@me)"/]</span><a href="[field:arcurl /]">[field:title /]</a></li>
{/dede:arclist}
</ul>
</dd>
</dl>
{/dede:channelartlist} </div>
<!-- /listbox -->
</div>
<!-- /pleft -->
<div class="pright">
<div class="usercenter">
<dl class="tbox light">
<dt class='light'> <strong>互动中心</strong> <span class="label"> <a href="#" _for="uc_digg">踩踩</a> <a href="#" _for="uc_comment">评论</a> <a href="#" _for="uc_member">会员</a> </span> </dt>
<dd id="loading"> 正在载入,请稍候... </dd>
<dd id="uc_digg">
<ul class="f1">
{dede:arclist orderby='scores' row='8' subday='30' titlelen='42'}
<li> <a href="[field:arcurl/]">[field:title/]</a> <span><small>点击:</small>[field:click/]</span> <span><small>评价:</small>[field:scores/]</span></li>
{/dede:arclist}
</ul>
</dd>
<!-- /uc_digg -->
<dd id="uc_comment">
<ul class="f2">
{dede:feedback row='5' titlelen='24' infolen='80'}
<li> <small><a href="#" class="username">[field:username function="(@me=='guest' ? '游客' : @me)"/]</a> 评论 <a href="[field:global.cfg_phpurl/]/feedback.php?aid=[field:aid/]" class="title">[field:title/]</a></small>
<p>[field:msg/]</p>
</li>
{/dede:feedback}
</ul>
</dd>
<!-- /uc_comment -->
<dd id="uc_member" >
<div id="_userlogin">
<div class="userlogin">
<form name="userlogin" action="{dede:global.cfg_memberurl/}/index_do.php" method="POST">
<input type="hidden" name="fmdo" value="login" />
<input type="hidden" name="dopost" value="login" />
<input type="hidden" name="keeptime" value="604800" />
<div class="fb"><span>用户名:</span>
<input type="text" name="userid" size="20" class="ipt-txt" />
<body>
{dede:include filename="top.htm"/}
{dede:include filename="header.htm"/}
{dede:include filename="navbar.htm"/}
<main class="container mt-3">
<div class="row">
<div class="col-12 col-lg-9">
<div class="row">
<div class="col-12 col-lg-4 toutiao mb-3 mb-md-3">
<div class="card ddcard-normal">
<div class="card-header">
<div class="row">
<div class="col-8 caption"><span>推荐头条</span></div>
</div>
</div>
<ul class="list-group list-group-flush">
{dede:arclist flag='h' titlelen='100' typeid='80' row='7' orderby='pubdate'}
<li><i class="fa fa-bookmark-o" aria-hidden="true"></i> <a title="[field:fulltitle/]"
href="[field:arcurl/]">[field:title/]</a>
</li>
{/dede:arclist}
</ul>
</div>
</div>
<!-- /.toutiao -->
<div class="col-12 col-lg-8 litpics mb-3">
<div id="carouselIndex" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
{dede:arclist channelid=1 flag='f' row=6}
<li data-target="#carouselIndex" data-slide-to="[field:global.autoindex function='trim(IndexSub(@me,1))'/]" class="[field:global.autoindex function='IndexActive(@me)'/]"></li>
{/dede:arclist}
</ol>
<div class="carousel-inner">
{dede:arclist channelid=1 flag='f' row=6}
<div class="carousel-item[field:global.autoindex function='IndexActive(@me)'/]">
<a href="[field:arcurl/]" title="[field:fulltitle/]"><img src="[field:litpic/]" class="mr-3" alt="[field:fulltitle/]"></a>
</div>
{/dede:arclist}
</div>
<a class="carousel-control-prev" href="#carouselIndex" role="button"
data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">上一个</span>
</a>
<a class="carousel-control-next" href="#carouselIndex" role="button"
data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">下一个</span>
</a>
</div>
</div>
<!-- /.litpics -->
</div>
</div>
<div class="col-12 col-lg-3 hot mb-3">
<div class="card ddcard-normal">
<div class="card-header">
<div class="row">
<div class="col-6 caption"><span>热文</span></div>
<!-- <div class="col-6 d-flex justify-content-end more"><a href="javascript:;">更多</a></div> -->
</div>
</div>
<ul class="list-group list-group-flush hot-news">
{dede:arclist flag='a' sort='hot' subday='45' titlelen=20 row=16}
<li class="media border-bottom-dashed mt-2 py-2">
<a href="[field:arcurl/]" title="[field:fulltitle/]"><img src="[field:litpic/]" class="mr-3" alt="[field:fulltitle/]"></a>
<div class="media-body row">
<div class="col-12 title">
<a href="[field:arcurl/]" title="[field:fulltitle/]">
<h4 class="mt-0 mb-3">[field:title/]</h4>
<span class="time">[field:pubdate function="MyDate('m-d',@me)"/]</span>
</a>
</div>
</div>
</li>
{/dede:arclist}
</ul>
</div>
</div>
<!-- /.hot -->
</div>
<div class="fb"><span>密码:</span>
<input type="password" name="pwd" size="20" class="ipt-txt" />
<div class="row">
<div class="col-12 col-lg-9 index-left">
<div class="spec">
<div class="col-md-12">
<div class="dede-title">
<h4 class="dede">图文资讯</h4>
</div>
</div>
<div class="col-md-12 mt-3">
<div class="row row-cols-2 row-cols-md-5">
{dede:arclist row=5 orderby=pubdate type='image.'}
<div class="col">
<div class="card border-0">
<a href="[field:arcurl/]" title="[field:fulltitle/]" class="text-body stretched-link"><img
src="[field:litpic/]" class="card-img-top" alt="[field:fulltitle/]">
<div class="card-body">
<h6 class="card-title">[field:title/]</h6>
</div>
</a>
</div>
</div>
{/dede:arclist}
</div>
</div>
</div><!-- /.spec -->
<div class="row">
{dede:channelartlist}
<div class="col-md-6 mt-3">
<div class="card ddcard-normal">
<div class="card-header">
<div class="row">
<div class="col-6 caption"><span><a href="{dede:field name='typeurl'/}">{dede:field name='typename'/}</a></span></div>
<div class="col-6 d-flex justify-content-end more">
<a href="{dede:field name='typeurl'/}">更多</a>
</div>
</div>
</div>
<ul class="list-group list-group-flush">
{dede:arclist titlelen='60' row='8'}
<li><i class="fa fa-bookmark-o" aria-hidden="true"></i> <a
title="[field:fulltitle/]"
href="[field:arcurl/]">[field:title/]</a>
</li>
{/dede:arclist}
</ul>
</div>
</div>
{/dede:channelartlist}
</div>
</div><!-- /.index-left -->
<aside class="col-12 col-lg-3">
{dede:include comment='推荐内容' filename="widget_recommend.htm"/}
{dede:include comment='热点内容' filename="widget_hot.htm"/}
</aside><!-- /aside -->
</div>
{dede:php}
if(preg_match("#2#", $safe_gdopen))
{
echo '
<div class="fb"><span>验证码:</span>
<input type="text" name="vdcode" size="8" class="ipt-txt" />
<img id="vdimgck" align="absmiddle" onClick="this.src=this.src+\'?\'" style="cursor:pointer;margin-left:0px;text-transform:uppercase;" alt="看不清?点击更换" src="'.$cfg_cmspath.'/plus/vdimgck.php"/></div>
';
}
{/dede:php}
<div class="submit">
<button type="submit" class="btn-1">登录</button>
<a href="{dede:global.cfg_memberurl/}/index_do.php?fmdo=user&dopost=regnew" >注册帐号</a> <a href="{dede:global.cfg_memberurl/}/resetpassword.php">忘记密码?</a> </div>
</form>
</div>
</div>
<!-- /userlogin -->
<script language="javascript" type="text/javascript">CheckLogin();</script>
<div class="latestlogin"> <strong>最近登陆的会员</strong>
<ul class="e7">
{dede:memberlist row=6 signlen=30}
<li><a href="[field:spaceurl/]" target="_blank"><img src="[field:face/]" alt='[field:spacename/]' width="52" height="52" />[field:uname/]</a></li>
{/dede:memberlist}
</ul>
</div>
<!-- /latestlogin -->
</dd>
<!-- /uc_member -->
</dl>
</div>
<!-- /usercenter -->
<div class="commend mt1">
<dl class="tbox light">
<dt class='light'><strong>推荐内容</strong></dt>
<dd class='light'>
<ul class="c1 ico2">
{dede:arclist flag='c' titlelen=42 row='16' tagid='dedecms' pagesize='8'}
<li class='dotline'><a href="[field:arcurl/]">[field:title/]</a></li>
{/dede:arclist}
</ul>
</dd>
</dl>
</div>
<!-- /commend -->
<div class="hot mt1">
<dl class="tbox light">
<dt class='light'><strong>本月热点</strong></dt>
<dd class='light'>
<ul class="c1 ico2">
{dede:arclist sort='hot' subday='30' titlelen=42 row=6}
<li class='dotline'><a href="[field:arcurl/]">[field:title/]</a></li>
{/dede:arclist}
</ul>
</dd>
</dl>
</div>
<div class="vote mt1">
<dl class="tbox light">
<dt class='light'><strong>投票调查</strong></dt>
<script language="javascript" src="{dede:global.cfg_cmsurl/}/data/vote/vote_1.js"></script>
</dl>
</div>
<!-- /vote -->
{dede:qrcode/}
</div>
<!-- /pleft -->
</div>
<div class="flink w960 center clear">
<dl class="tbox">
<dt> <strong>友情链接</strong>
<span class="linklabel">
{dede:flinktype type="dedecms"}
<a href="#" _for="flink_[field:id/]">[field:typename/]</a>
{/dede:flinktype}
</span>
<span class="more"> <a href="plus/flink.php">所有链接</a> | <a href="plus/flink_add.php">申请加入</a> </span> </dt>
{dede:flinktype type="dedecms"}
<dd id="flink_[field:id/]">
<ul class="f5">
{dede:flink/}
</ul>
</dd>
{/dede:flinktype}
</dl>
</div>
<!-- /flink -->
<div id="footAD" style="margin:10px auto; width:726px">{dede:mda name='728x90'/}</div>
{dede:include filename="footer.htm"/}
<!-- /footer -->
</main>
<!-- /main -->
{dede:include filename="footer.htm"/}
</body>
</html>

+ 84
- 84
src/templets/default/list_article.htm View File

@@ -1,87 +1,87 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!doctype html>
<html lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={dede:global.cfg_soft_lang/}" />
<title>{dede:field.title/}_{dede:global.cfg_webname/}</title>
<meta name="keywords" content="{dede:field name='keywords'/}" />
<meta name="description" content="{dede:field name='description' function='html2text(@me)'/}" />
<link href="{dede:global.cfg_templets_skin/}/style/dedecms.css" rel="stylesheet" media="screen" type="text/css" />
<meta http-equiv="mobile-agent" content="format=xhtml;url={dede:global.cfg_mobileurl/}/list.php?tid={dede:field.id/}">
<script type="text/javascript">if(window.location.toString().indexOf('pref=padindex') != -1){}else{if(/AppleWebKit.*Mobile/i.test(navigator.userAgent) || (/MIDP|SymbianOS|NOKIA|SAMSUNG|LG|NEC|TCL|Alcatel|BIRD|DBTEL|Dopod|PHILIPS|HAIER|LENOVO|MOT-|Nokia|SonyEricsson|SIE-|Amoi|ZTE/.test(navigator.userAgent))){if(window.location.href.indexOf("?mobile")<0){try{if(/Android|Windows Phone|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)){window.location.href="{dede:global.cfg_mobileurl/}/list.php?tid={dede:field.id/}";}else if(/iPad/i.test(navigator.userAgent)){}else{}}catch(e){}}}}</script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<script src="{dede:global.cfg_cmsurl/}/static/js/jquery.min.js"></script>
<link rel="stylesheet" href="{dede:global.cfg_cmsurl/}/static/css/bootstrap.min.css">
<link href="{dede:global.cfg_cmsurl/}/static/font-awesome/css/font-awesome.min.css" rel="stylesheet">
<link rel="stylesheet" href="{dede:global.cfg_cmsurl/}/static/css/dede.css">
<link rel="shortcut icon" href="{dede:global.cfg_cmsurl/}/static/img/favicon.png">
<title>{dede:field.title/}_{dede:global.cfg_webname/} - {dede:global.cfg_welcome/}</title>
<meta name="keywords" content="{dede:field.keywords/}" />
<meta name="description" content="{dede:field.description function='html2text(@me)'/}" />
</head>
<body class="articlelist">
{dede:include filename="head.htm"/}
<!-- /header -->
<div class="w960 center clear mt1">
<div class="pleft">
<div class="place"> <strong>当前位置:</strong> {dede:field name='position'/} </div>
<!-- /place -->
<div class="listbox">
<ul class="e2">
{dede:list pagesize='10'}
<li> [field:array runphp='yes']@me = (empty(@me['litpic']) ? "" : "<a href='{@me['arcurl']}' class='preview'><img src='{@me['litpic']}'/></a>"); [/field:array]
[<b>[field:typelink/]</b>] <a href="[field:arcurl/]" class="title">[field:title/]</a> <span class="info"> <small>日期:</small>[field:pubdate function="GetDateTimeMK(@me)"/] <small>点击:</small>[field:click/] <small>好评:</small>[field:scores/] </span>
<p class="intro"> [field:description/]... </p>
</li>
{/dede:list}
</ul>
</div>
<!-- /listbox -->
<div class="dede_pages">
<ul class="pagelist">
{dede:pagelist listitem="info,index,end,pre,next,pageno,option" listsize="5"/}
</ul>
</div>
<!-- /pages -->
</div>
<!-- /pleft -->
<div class="pright">
<div>
<dl class="tbox">
<dt><strong>栏目列表</strong></dt>
<dd>
<ul class="d6">
{dede:channel type='son' currentstyle="
<li><a href='~typelink~' class='thisclass'>~typename~</a></li>
"}
<li><a href='[field:typeurl/]'>[field:typename/]</a></li>
{/dede:channel}
</ul>
</dd>
</dl>
</div>
<div class="commend">
<dl class="tbox light">
<dt class='light'><strong>推荐内容</strong></dt>
<dd class='light'>
<ul class="d4">
{dede:arclist flag='c' titlelen=42 row=6}
<li><a href="[field:arcurl/]">[field:title/]</a>
<p>[field:description function='cn_substr(@me,80)'/]...</p>
</li>
{/dede:arclist}
</ul>
</dd>
</dl>
</div>
<!-- /commend -->
<div class="hot mt1 light">
<dl class="tbox">
<dt class='light'><strong>热点内容</strong></dt>
<dd class='light'>
<ul class="c1 ico2">
{dede:arclist row=10 orderby=click}
<li><a href="[field:arcurl/]">[field:title/]</a></li>
{/dede:arclist}
</ul>
</dd>
</dl>
</div>
{dede:qrcode/}
</div>
<!-- /pright -->
</div>
{dede:include filename="footer.htm"/}
<!-- /footer -->
<body>
{dede:include filename="top.htm"/}
{dede:include filename="header.htm"/}
{dede:include filename="navbar.htm"/}
<div class="container">
<div class="position">
<nav aria-label="breadcrumb">
<ol class="breadcrumb mb-0">
<li class="breadcrumb-item">当前位置</li>
{dede:field name='position'/}
</ol>
</nav>
</div>
<!-- /.position -->
</div>
<main class="container">
<div class="row">
<div class="col-md-8 list-main">
<ul class="list-unstyled items">
{dede:list pagesize='10'}
<li class="media border-bottom-dashed">
<div class="media-body row mt-2 py-2">
<div class="col-12 caption">
<a href="[field:arcurl/]">
<h4 class="title">[field:code/] [field:title/]</h4>
</a>
</div>
<div class="col-12 description">
<a href="[field:arcurl/]">[field:description/]...
</a>
</div>
<div class="col-12 source text-right">
发布时间:[field:pubdate function="MyDate('y-m-d',@me)"/]
</div>
</div>
</li>
{/dede:list}
</ul>
<nav>
<ul class="pagination justify-content-center py-3">
{dede:pagelist listitem="info,index,end,pre,next,pageno" listsize="1"/}
</ul>
</nav>
</div>
<!-- /.list-main -->
<aside class="col-md-4 article-sidebar">
{dede:include comment='栏目列表' filename="widget_channels.htm"/}
{dede:include comment='推荐内容' filename="widget_recommend.htm"/}
{dede:include comment='热点内容' filename="widget_hot.htm"/}
</aside>
<!-- /.article-sidebar -->
</div>
</main>
<!-- /main -->
{dede:include filename="footer.htm"/}
</body>
</html>
</html>

+ 23
- 0
src/templets/default/navbar.htm View File

@@ -0,0 +1,23 @@
<nav class="navbar navbar-expand-md navbar-dark bg-success zixue">
<div class="container">
<a class="navbar-brand" href="#"></a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbars"
aria-controls="navbars" aria-expanded="false" aria-label="展开导航">
<span class="navbar-toggler-icon"></span>
</button>

<div class="collapse navbar-collapse" id="navbars">
<ul class="navbar-nav mr-auto">
<li class="nav-item">
<a class="nav-link" href="{dede:global.cfg_cmsurl/}/">首页</a>
</li>
{dede:channel type='top' row='10' currentstyle="<li class='nav-item'><a class='nav-link active' href='~typelink~' ~rel~><span>~typename~</span></a></li>"}
<li class="nav-item">
<a class="nav-link" href="[field:typeurl/]" typeid=[field:id/]>[field:typename/]</a>
</li>
{/dede:channel}
</ul>
</div>
</div>
</nav>
<!--/.navbar-->

+ 79
- 75
src/templets/default/search.htm View File

@@ -1,79 +1,83 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!doctype html>
<html lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={dede:global.cfg_soft_lang/}" />
<title>搜索页_{dede:global.cfg_webname/}</title>
<meta name="keywords" content="{dede:field name='keywords'/}" />
<meta name="description" content="{dede:field name='description' function='html2text(@me)'/}" />
<link href="{dede:global.cfg_templets_skin/}/style/dedecms.css" rel="stylesheet" media="screen" type="text/css" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<script src="{dede:global.cfg_cmsurl/}/static/js/jquery.min.js"></script>
<link rel="stylesheet" href="{dede:global.cfg_cmsurl/}/static/css/bootstrap.min.css">
<link href="{dede:global.cfg_cmsurl/}/static/font-awesome/css/font-awesome.min.css" rel="stylesheet">
<link rel="stylesheet" href="{dede:global.cfg_cmsurl/}/static/css/dede.css">
<link rel="shortcut icon" href="{dede:global.cfg_cmsurl/}/static/img/favicon.png">
<title>搜索页_{dede:global.cfg_webname/} - {dede:global.cfg_welcome/}</title>
<meta name="keywords" content="{dede:field name='keywords'/}" />
<meta name="description" content="{dede:field name='description' function='html2text(@me)'/}" />
</head>
<body class="articlelist" style="min-width:1000px">
<div class="header_top">
<div class="center">
<span id="time" class="time">织梦CMS - 轻松建站从此开始!</span>
<div class="toplinks"><a href="{dede:global.cfg_cmsurl/}/plus/heightsearch.php" target="_blank">高级搜索</a>|<a href="{dede:global.cfg_cmsurl/}/data/sitemap.html" target="_blank">网站地图</a>|<a href="{dede:global.cfg_cmsurl/}tags.php">TAG标签</a><a href="{dede:global.cfg_dataurl/}/rssmap.html" class="rss">RSS订阅</a><span>[<a href="" onclick="this.style.behavior='url(#default#homepage)';this.setHomePage('{dede:global.cfg_basehost/}');">设为首页</a>] [<a href="javascript:window.external.AddFavorite('{dede:global.cfg_basehost/}','{dede:global.cfg_webname/}')">加入收藏</a>]</span> <a href="{dede:global.cfg_cmsurl/}">返回首页</a></div>
</div>
</div>
<div class="search_header">
<h1><a href="{dede:global.cfg_basehost/}"><img src="{dede:global.cfg_templets_skin/}/images/logo.gif" height="54" width="216" alt="{dede:global.cfg_webname/}"/></a> </h1>
<div class="search_box">
<form>
<input name="q" type="text" id="search-keyword" value="{dede:global name='keyword' function='RemoveXSS(@me)'/}" onfocus="if(this.value=='在这里搜索...'){this.value='';}" onblur="if(this.value==''){this.value='在这里搜索...';}" />
<select name="searchtype" id="search-option">
<option value="title" selected='1'>检索标题</option>
<option value="titlekeyword">智能模糊</option>
</select>
<button type="submit" class="search-submit">搜索</button>
<a href="heightsearch.php">高级搜索</a>
</form>
</div>
<div id="searchTopBanner" style="float:right; margin:10px"><script src='{dede:global.cfg_cmsurl/}/plus/ad_js.php?aid=18' language='javascript'></script> </div>
</div><!-- //top -->
<!-- /header -->
<div class="resultbar">搜索 <strong class="fc_03c">{dede:global name='keyword' function='RemoveXSS(@me)'/}</strong> 的结果 </div>
<div class="result_content">
<div class="sidebar">
<h2>相关搜索</h2>
<ul>
<li>{dede:likewords num='8'/}</li>
</ul>
<div class="sidebar_banner"><script src='{dede:global.cfg_cmsurl/}/plus/ad_js.php?aid=16' language='javascript'></script></div>
<body>
{dede:include filename="top.htm"/}
{dede:include filename="header.htm"/}
{dede:include filename="navbar.htm"/}
<div class="container">
<div class="position">
<nav aria-label="breadcrumb">
<ol class="breadcrumb mb-0">
<li class="breadcrumb-item">当前位置</li>
<li class="breadcrumb-item"><a href="{dede:global.cfg_cmsurl/}/">主页</a></li>
<li class="breadcrumb-item">搜索 <strong class="fc_03c">{dede:global name='keyword' function='RemoveXSS(@me)'/}</strong> 的结果</li>
</ol>
</nav>
</div>
<!-- /.position -->
</div>
<div class="resultlist">
<ul>
{dede:list perpage='20'}
<li>
<h3><a href="[field:arcurl/]" target="_blank">[field:title/]</a></h3>
<p>[field:description/]...</p>
<span>
<a href="[field:arcurl/]">[field:global.cfg_basehost/][field:arcurl/]</a>
<small>分类:</small><a href="[field:typeurl/]" target="_blank">[field:typename/]</a>
<small>点击:</small>[field:click/]
<small>日期:</small>[field:stime/]
</span>
</li>
{/dede:list}
</ul>
<div class="fl dede_pages">
<ul class="pagelist">
{dede:pagelist listsize='4'/}
</ul>
</div><!-- /pages -->
</div><!-- /listbox -->
</div>
<div class="footer center mt1 clear">
<!--
为了支持织梦团队的发展,请您保留织梦内容管理系统的链接信息.
我们对支持织梦团队发展的朋友表示真心的感谢!织梦因您更精彩!
-->
<div class="footer_left"></div>
<div class="footer_body">
<p class="powered">
Powered by <a href="http://www.dedecms.com" title="织梦内容管理系统(DedeCMS)--国内最专业的PHP网站管理系统,轻松建站的首选利器。" target="_blank"><strong>DedeCMS{dede:global.cfg_version/}</strong></a> &copy; 2004-2020 <a href="http://www.desdev.cn/" target="_blank">DesDev</a> Inc.<br /><div class="copyright">{dede:global.cfg_powerby/}&nbsp;&nbsp;{dede:global.cfg_beian/}</div></p>
<!-- /powered -->
</div>
<div class="footer_right"></div>
</div>
<!-- /footer -->
<main class="container">
<div class="row">
<div class="col-md-8 list-main">
<ul class="list-unstyled items">
{dede:list pagesize='10'}
<li class="media border-bottom-dashed">
<div class="media-body row mt-2 py-2">
<div class="col-12 caption">
<a href="[field:arcurl/]">
<h4 class="title">[field:code/] [field:title/]</h4>
</a>
</div>
<div class="col-12 description">
<a href="[field:arcurl/]">[field:description/]...
</a>
</div>
</div>
</li>
{/dede:list}
</ul>
<nav>
<!-- <ul class="pagination justify-content-center py-3"> -->
{dede:pagelist listitem="info,index,end,pre,next,pageno" listsize="1"/}
<!-- </ul> -->
</nav>
</div>
<!-- /.list-main -->
<aside class="col-md-4 article-sidebar">
{dede:include comment='推荐内容' filename="widget_recommend.htm"/}
{dede:include comment='热点内容' filename="widget_hot.htm"/}
</aside>
<!-- /.article-sidebar -->
</div>
</main>
<!-- /main -->
{dede:include filename="footer.htm"/}
</body>
</html>
</html>

+ 139
- 53
src/templets/default/tag.htm View File

@@ -1,57 +1,143 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!doctype html>
<html lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={dede:global.cfg_soft_lang/}" />
<title>{dede:field.title/}_{dede:global.cfg_webname/}</title>
<meta name="keywords" content="{dede:field name='keywords'/}" />
<meta name="description" content="{dede:field name='description' function='html2text(@me)'/}" />
<link href="{dede:global.cfg_templets_skin/}/style/dedecms.css" rel="stylesheet" media="screen" type="text/css" />
<script language="javascript" type="text/javascript" src="{dede:global.cfg_cmsurl/}/static/js/dedeajax2.js"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<script src="{dede:global.cfg_cmsurl/}/static/js/jquery.min.js"></script>
<link rel="stylesheet" href="{dede:global.cfg_cmsurl/}/static/css/bootstrap.min.css">
<link href="{dede:global.cfg_cmsurl/}/static/font-awesome/css/font-awesome.min.css" rel="stylesheet">
<link rel="stylesheet" href="{dede:global.cfg_cmsurl/}/static/css/dede.css">
<link rel="shortcut icon" href="{dede:global.cfg_cmsurl/}/static/img/favicon.png">
<title>{dede:field.title/}_{dede:global.cfg_webname/} - {dede:global.cfg_welcome/}</title>
<meta name="keywords" content="{dede:field.keywords/}" />
<meta name="description" content="{dede:field.description function='html2text(@me)'/}" />
<script>
const currentNavTypeID = '{dede:field.id/}';
</script>
<style>
.tags {
padding-top: 10px;
}
.tags a {
float: left;
margin: 5px 10px;
}
.tagc1 {
color: darkolivegreen;
}
.tagc2 {
color: blue;
}
.tagc3 {
color: blueviolet;
}
.tagc4 {
color: brown;
}
.tagc5 {
color: cadetblue;
}
.tagc6 {
color: green;
}
.tagc7 {
color: coral;
}
.tagc8 {
color: cornflowerblue;
}
.tagc9 {
color: black;
}
}
.tagc9 {
color: deeppink;
}
</style>
</head>
<body class="tagspage">
{dede:include filename="head.htm"/}
<!-- /header -->
<div class="w960 clear center mt1">
<div class="sp-title"><h2>TAG标签</h2></div>
<div class="tags_list">
<dl class="tbox">
<dt><strong>最新标签</strong></dt>
<dd>
{dede:tag row='60' sort='new'}
<a href='[field:link/]' class='tagc[field:highlight /]'>[field:tag /]</a>
{/dede:tag}
</dd>
</dl>
</div>
<div class="tags_list mt1">
<dl class="tbox">
<dt><strong>当月热门标签</strong></dt>
<dd>
{dede:tag row='60' sort='month'}
<a href='[field:link/]' class='tagc[field:highlight /]'>[field:tag /]</a>
{/dede:tag}
</dd>
</dl>
</div>
<div class="tags_list mt1">
<dl class="tbox">
<dt><strong>随机标签</strong></dt>
<dd>
{dede:tag row='100' sort='rand'}
<a href='[field:link/]' class='tagc[field:highlight /]'>[field:tag /]</a>
{/dede:tag}
</dd>
</dl>
</div>
</div>
{dede:include filename="footer.htm"/}
<!-- /footer -->
<body>
{dede:include filename="top.htm"/}
{dede:include filename="header.htm"/}
{dede:include filename="navbar.htm"/}
<div class="container">
<div class="position">
<nav aria-label="breadcrumb">
<ol class="breadcrumb mb-0">
<li class="breadcrumb-item">当前位置</li>
<li class="breadcrumb-item">TAG标签</li>
</ol>
</nav>
</div>
<!-- /.position -->
</div>
<main class="container">
<div class="row">
<div class="col-md-12 list-main">
<div class="card ddcard-normal">
<div class="card-header">
<div class="row">
<div class="col-8 caption"><span>最新标签</span></div>
</div>
</div>
<div class="tags">
{dede:tag row='120' sort='new'}
<a href='[field:link/]' class='tagc[field:highlight /]'>[field:tag /]</a>
{/dede:tag}
</div>
</div>
<div class="card ddcard-normal mt-3">
<div class="card-header">
<div class="row">
<div class="col-8 caption"><span>当月热门标签</span></div>
</div>
</div>
<div class="tags">
{dede:tag row='120' sort='month'}
<a href='[field:link/]' class='tagc[field:highlight /]'>[field:tag /]</a>
{/dede:tag}
</div>
</div>
<div class="card ddcard-normal mt-3">
<div class="card-header">
<div class="row">
<div class="col-8 caption"><span>随机标签</span></div>
</div>
</div>
<div class="tags">
{dede:tag row='120' sort='rand'}
<a href='[field:link/]' class='tagc[field:highlight /]'>[field:tag /]</a>
{/dede:tag}
</div>
</div>
</div>
<!-- /.list-main -->
</div>
</main>
<!-- /main -->
{dede:include filename="footer.htm"/}
</body>
</html>
</html>

+ 83
- 72
src/templets/default/taglist.htm View File

@@ -1,78 +1,89 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!doctype html>
<html lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={dede:global.cfg_soft_lang/}" />
<title>{dede:field.title/}_{dede:global.cfg_webname/}</title>
<meta name="keywords" content="{dede:field name='keywords'/}" />
<meta name="description" content="{dede:field name='description' function='html2text(@me)'/}" />
<link href="{dede:global.cfg_templets_skin/}/style/dedecms.css" rel="stylesheet" media="screen" type="text/css" />
<script language="javascript" type="text/javascript" src="{dede:global.cfg_cmsurl/}/static/js/dedeajax2.js"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<script src="{dede:global.cfg_cmsurl/}/static/js/jquery.min.js"></script>
<link rel="stylesheet" href="{dede:global.cfg_cmsurl/}/static/css/bootstrap.min.css">
<link href="{dede:global.cfg_cmsurl/}/static/font-awesome/css/font-awesome.min.css" rel="stylesheet">
<link rel="stylesheet" href="{dede:global.cfg_cmsurl/}/static/css/dede.css">
<link rel="shortcut icon" href="{dede:global.cfg_cmsurl/}/static/img/favicon.png">
<title>{dede:field.title/}_{dede:global.cfg_webname/} - {dede:global.cfg_welcome/}</title>
<meta name="keywords" content="{dede:field.keywords/}" />
<meta name="description" content="{dede:field.description function='html2text(@me)'/}" />
<script>
const currentNavTypeID = '{dede:field.id/}';
</script>
</head>
<body class="articlelist">
{dede:include filename="head.htm"/}
<!-- /header -->
<body>
{dede:include filename="top.htm"/}
{dede:include filename="header.htm"/}
<div class="w960 center clear mt1">
<div class="pleft">
<div class="place">
<strong>当前位置:</strong>:<a href="{dede:global.cfg_cmsurl/}/">主页</a> &gt; <a href='tags.php'>TAG标签</a> &gt; {dede:field.title /}
</div><!-- /place -->
<div class="listbox">
<ul class="e2">
{dede:list orderby='sortrank' pagesize='10'}
<li>
[field:array runphp='yes']@me = (empty(@me['litpic']) ? "" : "<a href='{@me['arcurl']}' class='preview'><img src='{@me['litpic']}'/></a>"); [/field:array]
<a href="[field:arcurl/]" class="title">[field:title/]</a>
<span class="info">
<small>日期:</small>[field:pubdate function="GetDateTimeMK(@me)"/]
<small>点击:</small>[field:click/]
<small>好评:</small>[field:scores/]
</span>
<p class="intro">
[field:description/]...
</p>
</li>
{/dede:list}
</ul>
</div><!-- /listbox -->
<div class="dede_pages">
<ul class="pagelist">
{dede:pagelist listitem="info,index,end,pre,next,pageno" listsize="5"/}
</ul>
</div><!-- /pages -->
</div><!-- /pleft -->
<div class="pright">
<div class="commend">
<dl class="tbox">
<dt><strong>推荐内容</strong></dt>
<dd>
<ul class="d4">
{dede:arclist flag='c' titlelen=42 row=6}
<li><a href="[field:arcurl/]">[field:title/]</a>
<p>[field:description function='cn_substr(@me,80)'/]...</p>
</li>{/dede:arclist}
</ul>
</dd>
</dl>
</div><!-- /commend -->
<div class="hot mt1">
<dl class="tbox">
<dt><strong>热点内容</strong></dt>
<dd>
<ul class="c1 ico2">
{dede:arclist row=10 orderby=click}
<li><a href="[field:arcurl/]">[field:title/]</a></li>
{/dede:arclist}
</ul>
</dd>
</dl>
</div>
</div><!-- /pright -->
</div>
{dede:include filename="footer.htm"/}
<!-- /footer -->
{dede:include filename="navbar.htm"/}
<div class="container">
<div class="position">
<nav aria-label="breadcrumb">
<ol class="breadcrumb mb-0">
<li class="breadcrumb-item">当前位置</li>
<li class="breadcrumb-item"><a href='/tags.php'>TAG标签</a></li>
<li class="breadcrumb-item">{dede:field.title /}</li>
</ol>
</nav>
</div>
<!-- /.position -->
</div>
<main class="container">
<div class="row">
<div class="col-md-8 list-main">
<ul class="list-unstyled items">
{dede:list pagesize='10'}
<li class="media border-bottom-dashed">
<div class="media-body row mt-2 py-2">
<div class="col-12 caption">
<a href="[field:arcurl/]">
<h4 class="title">[field:code/] [field:title/]</h4>
</a>
</div>
<div class="col-12 description">
<a href="[field:arcurl/]">[field:description/]...
</a>
</div>
<div class="col-12 source text-right">
发布时间:[field:pubdate function="MyDate('y-m-d',@me)"/]
</div>
</div>
</li>
{/dede:list}
</ul>
<nav>
<ul class="pagination justify-content-center py-3">
{dede:pagelist listitem="info,index,end,pre,next,pageno" listsize="1"/}
</ul>
</nav>
</div>
<!-- /.list-main -->
<aside class="col-md-4 article-sidebar">
{dede:include comment='推荐内容' filename="widget_recommend.htm"/}
{dede:include comment='热点内容' filename="widget_hot.htm"/}
</aside>
<!-- /.article-sidebar -->
</div>
</main>
<!-- /main -->
{dede:include filename="footer.htm"/}
</body>
</html>
</html>

+ 10
- 0
src/templets/default/top.htm View File

@@ -0,0 +1,10 @@
<nav class="site-nav bg-light py-2">
<div class="container">
<div class="row">
<div class="col-12 d-flex justify-content-end user" id="_login">
<a href="{dede:global.cfg_memberurl/}/login.php">登录</a>
<a class="ml-3" href="{dede:global.cfg_memberurl/}/index_do.php?fmdo=user&dopost=regnew">注册</a>
</div>
</div>
</div>
</nav>

+ 238
- 0
src/templets/default/widget_article_feedback.htm View File

@@ -0,0 +1,238 @@
{dede:comment text="内容评论模块"/}
<div class="comment mt-3">
<h4>发表评论</h4>
<div id="feedback-alert">
</div>
<div class="content">
<textarea cols="60" id="iptMsg" name="msg" rows="5" class="form-control"
placeholder="说点什么吧,请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论"></textarea>
</div>
<div class="post">
<div class="dcmp-userinfo" id="_ajax_feedback">
<div class="form-row">
<div class="col-md-6 mb-3">
<label for="iptUsername">用户名</label>
<input type="text" class="form-control" id="iptUsername">
</div>
<div class="col-md-6 mb-3 areaValidate" style="display: none;">
<label for="iptValidate">验证码</label>
<div class="input-group">
<input type="text" class="form-control" id="iptValidate" style="text-transform:uppercase;">
<img src="{dede:global.cfg_cmspath/}/plus/vdimgck.php" id="validateimg" style="cursor:pointer;"
onclick="this.src='{dede:global.cfg_cmspath/}/plus/vdimgck.php?'+new Date().getTime()+Math.round(Math.random() * 10000)"
title="点击我更换图片" alt="点击我更换图片" />
</div>
</div>
</div>
<div class="form-group">
<div class="form-check">
<input type="checkbox" value="1" name="notuser" id="iptAny" class="form-check-input" />
<label class="form-check-label" for="iptAny">
匿名评论?
</label>
</div>
</div>
</div>
<div class="dcmp-submit">
<button class="btn btn-success" type="button" onClick='SendFeedback()'>发表评论</button>
</div>
</div>

<div class="feedbacks">
{dede:feedback}
<div class="media">
<img class="face" src="[field:face/]" class="mr-3">
<div class="media-body">
<div class="feedback-content">[field:msg /]</div>
<div class="feedback-infos">
<span class="feedback-basic">
[field:username function="(@me=='guest' ? '游客' : @me)"/]
<small>[field:dtime function="MyDate('Y-m-d',@me)"/]</small>
<a href="javascript:ReplyFeedback([field:id/])">[回复]</a> <a href="javascript:LoadReplyFeedbacks([field:id/])">[field:replycount /]条回复</a>
</span>
<div class="feedback-action">
<a href="javascript:GoodFeedback([field:id/], [field:good/])"><span id="feedbackGood[field:id/]">[field:good/]</span> <i class="fa fa-thumbs-up" aria-hidden="true"></i></a>
</div>
</div>
<div class="_feedback_reply mt-1" for="[field:id/]">
</div>
<div class="feedback_replies" for="[field:id/]">
</div>
</div>
</div>
{/dede:feedback}
</div>
</div>
<style>
.feedbacks .face {
width: 36px;
height: 36px;
border-radius: 50%;
border: solid 1px #DDD;
}

.feedbacks .media {
border-bottom: solid 1px #DDD;
padding-top: 10px;
}

.feedbacks .feedback_replies .media {
border-top: solid 1px #DDD;
border-bottom:none;
}

.feedbacks .media-body {
padding: 0 1em .5em 1em;
}

.feedbacks .media-body small{
color: #999;
}
.feedbacks .feedback-action {
float: right;
}
.feedbacks .feedback-basic a,.feedbacks .feedback-action a {
color: #F1813F;
font-size: 14px;
}

.feedbacks ._feedback_reply .alert {
margin-bottom: 0;
}
@media only screen and (max-width: 576px) {
.feedbacks .feedback-action {
float: none;
}
}
</style>
<script async>


// 发表评论
function SendFeedback() {
let feedback = {
action: "send",
comtype: "comments",
aid: "{dede:field name='id'/}",
msg: $("#iptMsg").val(),
username: $("#iptUsername").val(),
validate: $("#iptValidate").val(),
notuser: $("#iptAny").is(":checked") ? "1" : "",
};

$.post("{dede:field name='phpurl'/}/feedback.php", feedback, function (data) {
let result = JSON.parse(data);
if (result.code === 200) {
ShowAlert("#feedback-alert", result.msg, "success");
$("#iptMsg").val("");
$("#iptValidate").val("");
($("#iptUsername").attr("disabled") !== "disabled") && $("#iptUsername").val("");
$("#validateimg").attr("src", '{dede:global.cfg_cmspath/}/plus/vdimgck.php?' + new Date().getTime() + Math.round(Math.random() * 10000));
} else {
ShowAlert("#feedback-alert", `评论失败:${result.msg}`, "danger");
$("#validateimg").attr("src", '{dede:global.cfg_cmspath/}/plus/vdimgck.php?' + new Date().getTime() + Math.round(Math.random() * 10000));
}
});
}

// 进行回复,回复必须登录
function SendReplyFeedback(fid) {
let content = $(`._feedback_reply[for="${fid}"]`).find(".iptReplyContent").val();
let reply = {
action : "send",
comtype : "reply",
fid : fid,
msg : content,
}
$.post("{dede:field name='phpurl'/}/feedback.php", reply, function (data) {
let result = JSON.parse(data);
if (result.code === 200) {
ShowAlert(`._feedback_reply[for="${fid}"]`, result.msg, "success");
} else {
ShowAlert(`._feedback_reply[for="${fid}"]`, `评论失败:${result.msg}`, "danger");
}
})
$(`._feedback_reply[for="${fid}"]`).find(".btnSend").attr("disabled", "disabled");
}

// 回复某个评论
function ReplyFeedback(fid) {
let replyPannel = `<div class="form-group mt-2">
<div class="input-group">
<input type="text" class="form-control iptReplyContent">
<button class="btn btn-success btnSend" type="button" onClick='SendReplyFeedback(${fid})'>回复</button>
</div>
</div>`;
$.get("{dede:global.cfg_cmsurl/}/member/ajax_loginsta.php?format=json", function(data) {
let result = JSON.parse(data);
if (result.code !== 200) {
$(`._feedback_reply`).html("");
ShowAlert(`._feedback_reply[for="${fid}"]`,
'回复需要登录会员中心,您可以<a href="{dede:global.cfg_cmsurl/}/member/login.php">[点击登录]</a>后再来回复。', 'warning', 5000);
} else {
$(`._feedback_reply`).html("");
$(`._feedback_reply[for="${fid}"]`).html(replyPannel);
}
});
$(`._feedback_reply[for="${fid}"]`).html('<i class="fa fa-spinner fa-spin" aria-hidden="true"></i>');

}

// 加载回复评论
function LoadReplyFeedbacks(fid) {
$(`.feedback_replies[for="${fid}"]`).html('<i class="fa fa-spinner fa-spin" aria-hidden="true"></i>');

$.get("{dede:field name='phpurl'/}/feedback.php", {
"aid" : "{dede:field name='id'/}",
"fid" : fid,
}, function (data) {
let result = JSON.parse(data);
let tpl = `
<div class="media">
<img class="face" src="~face~">
<div class="media-body">
<div class="feedback-content">~msg~</div>
<div class="feedback-infos">
<span class="feedback-basic">
~username~
<small>~dtimestr~</small>
</span>
<div class="feedback-action">
<a href="javascript:GoodFeedback(~id~, ~good~)"><span id="feedbackGood~id~">~good~</span> <i class="fa fa-thumbs-up" aria-hidden="true"></i></a>
</div>
</div>
</div>
</div>
`;
if (result.code === 200) {
$(`.feedback_replies[for="${fid}"]`).html("");
for (let i = 0; i < result.data.length; i++) {
const feedback = result.data[i];
let rs = tpl;
for (const key in feedback) {
if (feedback.hasOwnProperty(key)) {
rs = rs.replace(new RegExp(`~${key}~`,"gm"), feedback[key])
}
}
$(`.feedback_replies[for="${fid}"]`).append(rs);
}
}
})
}

// 赞
function GoodFeedback(fid, g) {
let good = {
action : "send",
feedbacktype : "good",
good : g,
fid : fid,
}
$.post("{dede:field name='phpurl'/}/feedback.php", good, function (data) {
let result = JSON.parse(data);
$(`#feedbackGood${fid}`).html(result.data);
console.log(result);
})
}
</script>

+ 13
- 0
src/templets/default/widget_channels.htm View File

@@ -0,0 +1,13 @@
<div class="card ddcard">
<div class="card-header">
<div class="row">
<div class="col-12 caption"><span>栏目列表</span></div>
</div>
</div>
<ul class="list-group list-group-flush">
{dede:channel type='son' currentstyle="<li><a href='~typelink~' class='active'>~typename~</a></li>"}
<li><a href="[field:typeurl/]" title="[field:typename/]">[field:typename/]</a></li>
{/dede:channel}
</ul>
</div>
<!-- /.ddcard -->

+ 13
- 0
src/templets/default/widget_hot.htm View File

@@ -0,0 +1,13 @@
<div class="card ddcard pt-3">
<div class="card-header">
<div class="row">
<div class="col-12 caption"><span>热点内容</span></div>
</div>
</div>
<ul class="list-group list-group-flush">
{dede:arclist orderby=click titlelen=42 row=10}
<li><a href="[field:arcurl/]" title="[field:fulltitle/]">[field:title/]</a></li>
{/dede:arclist}
</ul>
</div>
<!-- /.ddcard -->

+ 13
- 0
src/templets/default/widget_recommend.htm View File

@@ -0,0 +1,13 @@
<div class="card ddcard pt-3">
<div class="card-header">
<div class="row">
<div class="col-12 caption"><span>推荐内容</span></div>
</div>
</div>
<ul class="list-group list-group-flush">
{dede:arclist flag='c' titlelen=42 row=10}
<li><a href="[field:arcurl/]" title="[field:fulltitle/]">[field:title/]</a></li>
{/dede:arclist}
</ul>
</div>
<!-- /.ddcard -->

Loading…
Cancel
Save