diff --git a/app/api/controller/Article.php b/app/api/controller/Article.php
new file mode 100644
index 000000000..925f0f386
--- /dev/null
+++ b/app/api/controller/Article.php
@@ -0,0 +1,148 @@
+ $article_category['data'],
+ ];
+ return ApiService::ApiDataReturn(SystemBaseService::DataReturn($result));
+ }
+
+ /**
+ * 分类文章列表
+ * @author Devil
+ * @blog http://gong.gg/
+ * @version 1.0.0
+ * @date 2021-11-08
+ * @desc description
+ */
+ public function DataList()
+ {
+ // 参数
+ $params = $this->data_post;
+
+ // 分页
+ $number = 10;
+ $page = max(1, isset($this->data_post['page']) ? intval($this->data_post['page']) : 1);
+
+ // 条件
+ $where = ArticleService::ArticleWhere($params);
+
+ // 获取总数
+ $total = ArticleService::ArticleTotal($where);
+ $page_total = ceil($total/$number);
+ $start = intval(($page-1)*$number);
+
+ // 获取列表
+ $data_params = [
+ 'm' => $start,
+ 'n' => $number,
+ 'where' => $where,
+ ];
+ $data = ArticleService::ArticleList($data_params);
+
+ // 返回数据
+ $result = [
+ 'total' => $total,
+ 'page_total' => $page_total,
+ 'data' => $data['data'],
+ ];
+ return ApiService::ApiDataReturn(SystemBaseService::DataReturn($result));
+ }
+
+ /**
+ * 文章详情
+ * @author Devil
+ * @blog http://gong.gg/
+ * @version 1.0.0
+ * @date 2021-11-08
+ * @desc description
+ */
+ public function Detail()
+ {
+ // 获取文章
+ if(!empty($this->data_request['id']))
+ {
+ // 获取数据
+ $id = intval($this->data_request['id']);
+ $params = [
+ 'where' => [
+ 'is_enable' => 1,
+ 'id' => $id,
+ ],
+ 'field' => 'id,title,title_color,jump_url,content,access_count,article_category_id,seo_title,seo_keywords,seo_desc,add_time',
+ 'm' => 0,
+ 'n' => 1,
+ ];
+ $data = ArticleService::ArticleList($params);
+ if(!empty($data['data'][0]))
+ {
+ // 访问统计
+ ArticleService::ArticleAccessCountInc(['id'=>$id]);
+
+ // 返回数据
+ $result = [
+ 'data' => $data['data'][0],
+ 'category_list' => $article_category['data'],
+ ];
+ $ret = SystemBaseService::DataReturn($result);
+ } else {
+ $ret = DataReturn('文章不存在或已删除', -1);
+ }
+ } else {
+ $ret = DataReturn('文章ID有误', -1);
+ }
+ return ApiService::ApiDataReturn($ret);
+ }
+}
+?>
\ No newline at end of file
diff --git a/app/index/controller/Article.php b/app/index/controller/Article.php
index 9b812449c..1976121aa 100755
--- a/app/index/controller/Article.php
+++ b/app/index/controller/Article.php
@@ -36,11 +36,12 @@ class Article extends Common
}
/**
- * [Index 文章详情]
- * @author Devil
- * @blog http://gong.gg/
- * @version 0.0.1
- * @datetime 2016-12-06T21:31:53+0800
+ * 文章详情
+ * @author Devil
+ * @blog http://gong.gg/
+ * @version 1.0.0
+ * @date 2021-11-08
+ * @desc description
*/
public function Index()
{
@@ -77,8 +78,11 @@ class Article extends Common
}
// 获取分类
- $article_category_content = ArticleService::ArticleCategoryListContent();
- MyViewAssign('category_list', $article_category_content['data']);
+ $article_category = ArticleService::ArticleCategoryList();
+ MyViewAssign('category_list', $article_category['data']);
+
+ // 上一篇、下一篇
+ MyViewAssign('last_next_data', ArticleService::ArticleLastNextData($id));
// seo
$seo_title = empty($article['seo_title']) ? $article['title'] : $article['seo_title'];
@@ -93,7 +97,7 @@ class Article extends Common
}
// 钩子
- $this->PluginsHook($id, $article);
+ $this->PluginsContentHook($id, $article);
MyViewAssign('article', $article);
return MyView();
@@ -105,7 +109,104 @@ class Article extends Common
}
/**
- * 钩子处理
+ * 文章分类
+ * @author Devil
+ * @blog http://gong.gg/
+ * @version 1.0.0
+ * @date 2021-11-08
+ * @desc description
+ */
+ public function Category()
+ {
+ // 条件
+ $where = ArticleService::ArticleWhere($this->data_request);
+
+ // 总数
+ $total = ArticleService::ArticleTotal($where);
+
+ // 分页
+ $page_params = [
+ 'number' => $this->page_size,
+ 'total' => $total,
+ 'where' => $this->data_request,
+ 'page' => $this->page,
+ 'url' => MyUrl('index/article/category'),
+ ];
+ $page = new \base\Page($page_params);
+
+ // 获取列表
+ $data_params = [
+ 'm' => $page->GetPageStarNumber(),
+ 'n' => $this->page_size,
+ 'where' => $where,
+ ];
+ $ret = ArticleService::ArticleList($data_params);
+
+ // 获取分类
+ $article_category = ArticleService::ArticleCategoryList();
+ MyViewAssign('category_list', $article_category['data']);
+
+ // 分类信息
+ $category_info = ArticleService::ArticleCategoryInfo($this->data_request, $article_category['data']);
+ MyViewAssign('category_info', $category_info);
+
+ // 浏览器名称
+ MyViewAssign('home_seo_site_title', SeoService::BrowserSeoTitle(empty($category_info) ? '所有文章' : $category_info['name'], 1));
+
+ // 基础参数赋值
+ MyViewAssign('page_html', $page->GetPageHtml());
+ MyViewAssign('data_list', $ret['data']);
+ MyViewAssign('params', $this->data_request);
+
+ // 钩子
+ $this->PluginsCategoryHook($ret['data'], $this->data_request);
+ return MyView();
+ }
+
+ /**
+ * 分类钩子处理
+ * @author whats
+ * @version 1.0.0
+ * @date 2019-04-22
+ * @desc description
+ * @param [array] $data [文章内容]
+ * @param [array] $params [输入参数]
+ */
+ private function PluginsCategoryHook(&$data, $params = [])
+ {
+ $hook_arr = [
+ // 分类内容顶部钩子
+ 'plugins_view_article_category_top',
+
+ // 分类底部钩子
+ 'plugins_view_article_category_bottom',
+
+ // 分类内容顶部钩子
+ 'plugins_view_article_category_content_top',
+
+ // 分类内容底部钩子
+ 'plugins_view_article_category_content_botton',
+
+ // 分类左侧内部顶部钩子
+ 'plugins_view_article_category_left_inside_top',
+
+ // 分类左侧内部底部钩子
+ 'plugins_view_article_category_left_inside_botton',
+ ];
+ foreach($hook_arr as $hook_name)
+ {
+ MyViewAssign($hook_name.'_data', MyEventTrigger($hook_name,
+ [
+ 'hook_name' => $hook_name,
+ 'is_backend' => false,
+ 'data' => &$data,
+ 'params' => $params,
+ ]));
+ }
+ }
+
+ /**
+ * 内容钩子处理
* @author whats
* @version 1.0.0
* @date 2019-04-22
@@ -113,7 +214,7 @@ class Article extends Common
* @param [int] $article_id [文章id]
* @param [array] $article [文章内容]
*/
- private function PluginsHook($article_id, &$article)
+ private function PluginsContentHook($article_id, &$article)
{
$hook_arr = [
// 文章内容顶部钩子
diff --git a/app/index/view/default/article/category.html b/app/index/view/default/article/category.html
new file mode 100644
index 000000000..3ae192eae
--- /dev/null
+++ b/app/index/view/default/article/category.html
@@ -0,0 +1,165 @@
+{{include file="public/header" /}}
+
+
+{{include file="public/header_top_nav" /}}
+
+
+{{include file="public/nav_search" /}}
+
+
+{{include file="public/header_nav" /}}
+
+
+{{include file="public/goods_category" /}}
+
+
+{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
+
+ plugins_view_article_category_top
+
+{{/if}}
+{{if !empty($plugins_view_article_category_top_data) and is_array($plugins_view_article_category_top_data)}}
+ {{foreach $plugins_view_article_category_top_data as $hook}}
+ {{if is_string($hook) or is_int($hook)}}
+ {{$hook|raw}}
+ {{/if}}
+ {{/foreach}}
+{{/if}}
+
+
+
+
+
+ {{if !empty($category_info)}}
+
+
{{$category_info.name}}
+
+
+ {{/if}}
+
+
+ {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
+
+ plugins_view_article_category_content_top
+
+ {{/if}}
+ {{if !empty($plugins_view_article_category_content_top_data) and is_array($plugins_view_article_category_content_top_data)}}
+ {{foreach $plugins_view_article_category_content_top_data as $hook}}
+ {{if is_string($hook) or is_int($hook)}}
+ {{$hook|raw}}
+ {{/if}}
+ {{/foreach}}
+ {{/if}}
+
+
+ {{if !empty($data_list)}}
+
+
+
+ {{foreach $data_list as $v}}
+ -
+ {{$v.title}}
+ {{$v.add_time}}
+
+ {{/foreach}}
+
+
+
+
+
+
{{$page_html|raw}}
+ {{else /}}
+ {{include file="public/not_data" /}}
+ {{/if}}
+
+
+ {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
+
+ plugins_view_article_category_content_botton
+
+ {{/if}}
+ {{if !empty($plugins_view_article_category_content_botton_data) and is_array($plugins_view_article_category_content_botton_data)}}
+ {{foreach $plugins_view_article_category_content_botton_data as $hook}}
+ {{if is_string($hook) or is_int($hook)}}
+ {{$hook|raw}}
+ {{/if}}
+ {{/foreach}}
+ {{/if}}
+
+
+
+
+
+
+
+ {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
+
+ plugins_view_article_category_left_inside_top
+
+ {{/if}}
+ {{if !empty($plugins_view_article_category_left_inside_top_data) and is_array($plugins_view_article_category_left_inside_top_data)}}
+ {{foreach $plugins_view_article_category_left_inside_top_data as $hook}}
+ {{if is_string($hook) or is_int($hook)}}
+ {{$hook|raw}}
+ {{/if}}
+ {{/foreach}}
+ {{/if}}
+
+
+ {{if !empty($category_list)}}
+
+
+
+
+
文章分类
+
+
+ {{foreach $category_list as $v}}
+ -
+ {{$v.name}}
+
+ {{/foreach}}
+
+
+
+ {{/if}}
+
+
+ {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
+
+ plugins_view_article_category_left_inside_botton
+
+ {{/if}}
+ {{if !empty($plugins_view_article_category_left_inside_botton_data) and is_array($plugins_view_article_category_left_inside_botton_data)}}
+ {{foreach $plugins_view_article_category_left_inside_botton_data as $hook}}
+ {{if is_string($hook) or is_int($hook)}}
+ {{$hook|raw}}
+ {{/if}}
+ {{/foreach}}
+ {{/if}}
+
+
+
+
+ 侧栏导航
+
+
+
+
+
+{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
+
+ plugins_view_article_category_bottom
+
+{{/if}}
+{{if !empty($plugins_view_article_category_bottom_data) and is_array($plugins_view_article_category_bottom_data)}}
+ {{foreach $plugins_view_article_category_bottom_data as $hook}}
+ {{if is_string($hook) or is_int($hook)}}
+ {{$hook|raw}}
+ {{/if}}
+ {{/foreach}}
+{{/if}}
+
+
+{{include file="public/footer" /}}
+
\ No newline at end of file
diff --git a/app/index/view/default/article/index.html b/app/index/view/default/article/index.html
index d4d8be9ae..ec839b91d 100755
--- a/app/index/view/default/article/index.html
+++ b/app/index/view/default/article/index.html
@@ -27,10 +27,10 @@
{{/if}}
-
+
-
+
{{$article.title}}
发布时间:{{$article.add_time}}
@@ -56,6 +56,31 @@
{{$article.content|raw}}
+
+
+
+
+
+
上一篇:
+ {{if !empty($last_next_data['last'])}}
+
{{$last_next_data.last.title}}
+
{{$last_next_data.last.add_time}}
+ {{else /}}
+
没有符合条件的文章
+ {{/if}}
+
+
+
下一篇:
+ {{if !empty($last_next_data['next'])}}
+
{{$last_next_data.next.title}}
+
{{$last_next_data.next.add_time}}
+ {{else /}}
+
没有符合条件的文章
+ {{/if}}
+
+
+
+
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
@@ -72,10 +97,10 @@
-
+
-
+
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
plugins_view_article_detail_left_inside_top
@@ -89,33 +114,26 @@
{{/foreach}}
{{/if}}
-
+
{{if !empty($category_list)}}
-
- {{foreach $category_list as $v}}
-
- -
-
-
- -
-
- {{if !empty($v.items)}}
-
- {{foreach $v.items as $vs}}
- -
- {{$vs.title}}
-
- {{/foreach}}
-
- {{/if}}
-
-
-
- {{/foreach}}
+
+
+
+
+
文章分类
+
+
+ {{foreach $category_list as $v}}
+ -
+ {{$v.name}}
+
+ {{/foreach}}
+
+
{{/if}}
-
+
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
plugins_view_article_detail_left_inside_botton
diff --git a/app/index/view/default/index/index.html b/app/index/view/default/index/index.html
index b89cdb30f..e24f06e88 100755
--- a/app/index/view/default/index/index.html
+++ b/app/index/view/default/index/index.html
@@ -82,12 +82,10 @@
diff --git a/app/index/view/default/safety/index.html b/app/index/view/default/safety/index.html
index e5e640afa..d5a18f9ff 100755
--- a/app/index/view/default/safety/index.html
+++ b/app/index/view/default/safety/index.html
@@ -40,7 +40,7 @@
{{/if}}
{{/if}}
{{if !empty($v['tips'])}}
-
{{$v.tips}}
+
{{$v.tips}}
{{/if}}
{{if empty($data[$v['type']]) and empty($v['msg'])}}
diff --git a/app/route/route.config b/app/route/route.config
index 698f585da..28cea961a 100644
--- a/app/route/route.config
+++ b/app/route/route.config
@@ -41,6 +41,7 @@ Route::rule('buy', 'index/buy/index', 'GET|POST');
Route::post('buy-add', 'index/buy/add');
// 文章
+Route::get('article-category'.$ds.'[:id]', 'index/article/category');
Route::get('article'.$ds.':id', 'index/article/index');
// 页面设计
diff --git a/app/service/ArticleService.php b/app/service/ArticleService.php
index ee4c2d1f9..ca901b3aa 100755
--- a/app/service/ArticleService.php
+++ b/app/service/ArticleService.php
@@ -72,18 +72,41 @@ class ArticleService
$n = isset($params['n']) ? intval($params['n']) : 10;
$data = Db::name('Article')->field($field)->where($where)->order($order_by)->limit($m, $n)->select()->toArray();
+ return DataReturn('处理成功', 0, self::DataHandle($data));
+ }
+
+ /**
+ * 数据处理
+ * @author Devil
+ * @blog http://gong.gg/
+ * @version 1.0.0
+ * @date 2021-11-09
+ * @desc description
+ * @param [array] $data [文章数据]
+ */
+ public static function DataHandle($data)
+ {
if(!empty($data))
{
- $category_names = Db::name('ArticleCategory')->where(['id'=>array_column($data, 'article_category_id')])->column('name', 'id');
+ // 字段列表
+ $keys = ArrayKeys($data);
+
+ // 分类名称
+ if(in_array('article_category_id', $keys))
+ {
+ $category_names = Db::name('ArticleCategory')->where(['id'=>array_column($data, 'article_category_id')])->column('name', 'id');
+ }
+
foreach($data as &$v)
{
// url
- $v['url'] = MyUrl('index/article/index', ['id'=>$v['id']]);
+ $v['url'] = (APPLICATION == 'web') ? MyUrl('index/article/index', ['id'=>$v['id']]) : '/pages/article-detail/article-detail?id='.$v['id'];
// 分类名称
if(isset($v['article_category_id']))
{
- $v['article_category_name'] = isset($category_names[$v['article_category_id']]) ? $category_names[$v['article_category_id']] : '';
+ $v['article_category_name'] = (!empty($category_names) && isset($category_names[$v['article_category_id']])) ? $category_names[$v['article_category_id']] : '';
+ $v['category_url'] = (APPLICATION == 'web') ? MyUrl('index/article/category', ['id'=>$v['article_category_id']]) : '/pages/article-category/article-category?id='.$v['article_category_id'];
}
// 内容
@@ -117,7 +140,7 @@ class ArticleService
}
}
}
- return DataReturn('处理成功', 0, $data);
+ return $data;
}
/**
@@ -133,6 +156,31 @@ class ArticleService
return (int) Db::name('Article')->where($where)->count();
}
+ /**
+ * 条件
+ * @author Devil
+ * @blog http://gong.gg/
+ * @version 1.0.0
+ * @date 2021-11-08
+ * @desc description
+ * @param [array] $params [输入参数]
+ */
+ public static function ArticleWhere($params = [])
+ {
+ // 默认条件
+ $where = [
+ ['is_enable', '=', 1],
+ ];
+
+ // 分类id
+ if(!empty($params['id']))
+ {
+ $where[] = ['article_category_id', '=', intval($params['id'])];
+ }
+
+ return $where;
+ }
+
/**
* 文章保存
* @author Devil
@@ -250,37 +298,6 @@ class ArticleService
}
}
- /**
- * 获取分类和所有文章
- * @author Devil
- * @blog http://gong.gg/
- * @version 1.0.0
- * @date 2018-10-19
- * @desc description
- * @param [array] $params [输入参数]
- */
- public static function ArticleCategoryListContent($params = [])
- {
- $data = Db::name('ArticleCategory')->field('id,name')->where(['is_enable'=>1])->order('id asc, sort asc')->select()->toArray();
- if(!empty($data))
- {
- foreach($data as &$v)
- {
- $items = Db::name('Article')->field('id,title,title_color')->where(['article_category_id'=>$v['id'], 'is_enable'=>1])->select()->toArray();
- if(!empty($items))
- {
- foreach($items as &$vs)
- {
- // url
- $vs['url'] = MyUrl('index/article/index', ['id'=>$vs['id']]);
- }
- }
- $v['items'] = $items;
- }
- }
- return DataReturn('处理成功', 0, $data);
- }
-
/**
* 文章访问统计加1
* @author Devil
@@ -312,10 +329,58 @@ class ArticleService
{
$field = empty($params['field']) ? '*' : $params['field'];
$order_by = empty($params['order_by']) ? 'sort asc' : trim($params['order_by']);
-
$data = Db::name('ArticleCategory')->where(['is_enable'=>1])->field($field)->order($order_by)->select()->toArray();
-
- return DataReturn('处理成功', 0, $data);
+ return DataReturn('处理成功', 0, self::CategoryDataHandle($data));
+ }
+
+ /**
+ * 分类处理
+ * @author Devil
+ * @blog http://gong.gg/
+ * @version 1.0.0
+ * @date 2021-11-08
+ * @desc description
+ * @param [array] $data [分类数据]
+ */
+ public static function CategoryDataHandle($data)
+ {
+ if(!empty($data))
+ {
+ foreach($data as &$v)
+ {
+ $v['url'] = (APPLICATION == 'web') ? MyUrl('index/article/category', ['id'=>$v['id']]) : '/pages/article-category/article-category?id='.$v['id'];
+ }
+ }
+ return $data;
+ }
+
+ /**
+ * 获取分类信息
+ * @author Devil
+ * @blog http://gong.gg/
+ * @version 1.0.0
+ * @date 2021-11-08
+ * @desc description
+ * @param [array] $params [输入参数]
+ * @param [array] $data [指定分类数据列表]
+ */
+ public static function ArticleCategoryInfo($params = [], $data = [])
+ {
+ // 数据不存在则读取
+ if(!empty($params['id']))
+ {
+ if(empty($data))
+ {
+ $data = Db::name('ArticleCategory')->where(['is_enable'=>1,'id'=>intval($params['id'])])->field('*')->order('sort asc')->select()->toArray();
+ } else {
+ $temp = array_column($data, null, 'id');
+ $data = array_key_exists($params['id'], $temp) ? [$temp[$params['id']]] : [];
+ }
+ } else {
+ $data = [];
+ }
+ $data = self::CategoryDataHandle($data);
+ return (empty($data) || empty($data[0])) ? null : $data[0];
}
/**
@@ -511,5 +576,39 @@ class ArticleService
}
return DataReturn('删除失败', -100);
}
+
+ /**
+ * 上一篇、下一篇数据
+ * @author Devil
+ * @blog http://gong.gg/
+ * @version 1.0.0
+ * @date 2021-11-09
+ * @desc description
+ * @param [int] $article_id [文章id]
+ */
+ public static function ArticleLastNextData($article_id)
+ {
+ // 指定字段
+ $field = 'id,title,add_time';
+
+ // 上一条数据
+ $where = [
+ ['is_enable', '=', 1],
+ ['id', '<', $article_id],
+ ];
+ $last = self::DataHandle(Db::name('Article')->where($where)->field($field)->order('id desc')->limit(1)->select()->toArray());
+
+ // 上一条数据
+ $where = [
+ ['is_enable', '=', 1],
+ ['id', '>', $article_id],
+ ];
+ $next = self::DataHandle(Db::name('Article')->where($where)->field($field)->order('id asc')->limit(1)->select()->toArray());
+
+ return [
+ 'last' => empty($last) ? [] : $last[0],
+ 'next' => empty($next) ? [] : $next[0],
+ ];
+ }
}
?>
\ No newline at end of file
diff --git a/public/static/index/default/css/article.css b/public/static/index/default/css/article.css
index 302891e86..e6be4eaf1 100755
--- a/public/static/index/default/css/article.css
+++ b/public/static/index/default/css/article.css
@@ -1,35 +1,100 @@
-.article-sidebar, .article-header, .am-accordion-gapped .am-accordion-title{padding: 0;}
-.article-content{padding-top: 10px;}
-.article-header{text-align: center;}
-.article-header .am-article-divider{margin: 10px 0 20px 0;}
-.article-header .am-article-meta{margin-top: 5px;}
-.article-header .am-article-meta span:not(:first-child){margin-left: 15px;}
-.article-nav-button{position: fixed; z-index: 10; bottom: 70px; right: 10px;-webkit-box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);-moz-box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);}
-.am-offcanvas-bar:after{background: #eee;}
-.article-sidebar ul li{margin-top: 0;}
-.article-sidebar ul li a{font-size: 12px; padding: 5px;}
-.article-content .am-accordion-content{padding: 5px;}
-.am-nav-header{padding: 8px 5px 5px 5px; font-weight: 500;}
-.am-accordion-gapped dl:first-child{margin-top: 0;}
-.am-accordion-gapped dl:last-child{margin-bottom: 0;}
-.am-accordion-gapped .am-accordion-title:after{margin-top: -6px;}
-.am-accordion-gapped .am-accordion-title, .am-accordion-gapped .am-accordion-item, .am-accordion-gapped .am-accordion-item.am-active{border-color: #eee;}
-.article-content img { max-width: 100%; }
-
+.article-content img {
+ max-width: 100%;
+}
+.article-header .am-article-divider {
+ margin: 15px 0 20px 0;
+}
+.article-header .am-article-meta {
+ margin-top: 5px;
+}
+.article-header .am-article-meta span:not(:first-child) {
+ margin-left: 15px;
+}
+.article-nav-button {
+ position: fixed;
+ z-index: 10;
+ bottom: 70px;
+ right: 10px;
+ -webkit-box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
+ -moz-box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
+ box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
+}
+.am-offcanvas-bar:after {
+ background: transparent;
+}
+.article-sidebar ul li {
+ margin-top: 0;
+}
+.article-sidebar ul li a {
+ font-size: 12px;
+ padding: 8px 10px;
+}
+.article-sidebar .am-panel,
+.category-content-list li {
+ border-color: #eee !important;
+}
+.article-sidebar .am-panel {
+ -webkit-box-shadow: none;
+ -moz-box-shadow: none;
+ box-shadow: none;
+}
+.category-list li a.am-active {
+ background-color: #eee;
+ color: #d2364c;
+}
+.category-content-list li:first-child {
+ border-top: 0;
+}
+.last-next-data .text-tips {
+ color: #999;
+}
@media only screen and (min-width: 641px) {
- .article-sidebar .am-offcanvas{display: block; position: static; background: none;}
- .article-sidebar .am-offcanvas-bar{position: static; width: auto; background: none; -webkit-transform: translate3d(0, 0, 0); -ms-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0);}
- .article-sidebar ul li:not(:last-child){border-bottom: 1px solid #f5f5f5;}
- .am-accordion-gapped{margin: 0 15px 0 0;}
- .article-sidebar { padding-left: 5px; }
+ .article-sidebar .am-offcanvas {
+ display: block;
+ position: static;
+ background: none;
+ }
+ .article-sidebar .am-offcanvas-bar {
+ position: static;
+ width: auto;
+ background: none;
+ -webkit-transform: translate3d(0, 0, 0);
+ -ms-transform: translate3d(0, 0, 0);
+ transform: translate3d(0, 0, 0);
+ }
+ .article-sidebar ul li:not(:last-child) {
+ border-bottom: 1px solid #f1f1f1;
+ }
+ .am-accordion-gapped {
+ margin: 0 15px 0 0;
+ }
+ .article-sidebar {
+ padding-left: 5px !important;
+ }
}
@media only screen and (min-width: 1025px) {
- .article-sidebar { padding-left: 0; }
+ .article-sidebar {
+ padding-left: 0 !important;
+ }
}
@media only screen and (max-width: 640px) {
- .article-right{padding: 0 5px;}
- .article-sidebar .am-offcanvas-bar{background: #f9f9f9;}
- .article-sidebar ul li:not(:last-child){border-bottom: 1px solid #eee;}
- .am-accordion-gapped{margin: 0;}
- .article-sidebar ul li a{padding-left: 20px;}
+ .article-right {
+ padding: 0 5px;
+ }
+ .article-sidebar .am-offcanvas-bar {
+ background: #f9f9f9;
+ }
+ .article-sidebar ul li:not(:last-child) {
+ border-bottom: 1px solid #eee;
+ }
+ .am-accordion-gapped {
+ margin: 0;
+ }
+ .last-next-data .am-fl,
+ .last-next-data .am-fr {
+ float: none !important;
+ }
+ .last-next-data .am-fr {
+ margin-top: 10px;
+ }
}
diff --git a/public/static/index/default/css/index.css b/public/static/index/default/css/index.css
index 66f867b0b..c858f6171 100755
--- a/public/static/index/default/css/index.css
+++ b/public/static/index/default/css/index.css
@@ -17,7 +17,7 @@ ul, li, ol {list-style: none;}
.banner-mixed{position: relative;border-top:1px solid #F5F5F5 ;border-bottom: 1px #f5f5f5 solid;overflow: hidden;}
.banner-news-title{position: absolute;left:10px;padding-right:10px;border-right:1px solid #eee ;}
.banner-news li,#banner-news li a{height: 30px;line-height:30px; font-size: 12px;}
-.banner-news{max-width:1200px; margin:0px auto; overflow:hidden; height:30px;width:100%; text-align:left;color:#fff;}
+.banner-news{max-width:1200px; margin:0px auto; overflow:hidden; height:30px;width:100%; text-align:left;}
.news-category-name { line-height: 11px; max-width: 50px; }
.banner-news li {padding:0 10px 0 80px;}
.mod-vip{display: none;}