diff --git a/application/default/controllers/DataController.php b/application/default/controllers/DataController.php index bd888423..3e5b0e89 100755 --- a/application/default/controllers/DataController.php +++ b/application/default/controllers/DataController.php @@ -190,6 +190,8 @@ class DataController extends Zend_Controller_Action */ function browseAction() { + $this->_helper->layout->setLayout('layout-sanji'); + $page=(int)$this->_request->getParam('page'); if (empty($page)) $page=1; $limit=10; @@ -199,8 +201,17 @@ class DataController extends Zend_Controller_Action $sum=$row[0]['count']; $select=$this->db->select(); $select->from('metadata','*')->order('id desc')->limitPage($page,$limit); - $this->view->metadata = $this->db->fetchAll($select); - $this->view->page=new Pagination($sum,$page,$limit); +// $this->view->metadata = $this->db->fetchAll($select); +// Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_text.phtml'); +// $this->view->page=new Pagination($sum,$page,$limit); + + $paginator = Zend_Paginator::factory($select); + $paginator->setCurrentPageNumber($page); + $paginator->setItemCountPerPage($this->view->config->page->max); + $paginator->setView($this->view); + Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_text.phtml'); + $this->view->paginator=$paginator; + } function tagAction() { @@ -547,6 +558,8 @@ class DataController extends Zend_Controller_Action */ function viewAction() { + $this->_helper->layout->setLayout('layout-sanji'); + $id = (int)$this->_request->getParam('id'); $sql="select m.*,s.status,g.id as gid,t.filename,i.doi as datadoi,i.authors,i.author_en,i.publisher,i.publisher_en, date_part('year',i.ts_published) as publish_year from normalmetadata m left join mdstatus s on m.uuid=s.uuid left join thumbnail t on t.id=m.id left join geonetworkmetadata g on m.uuid=g.uuid left join datadoi i on i.uuid=m.uuid where "; diff --git a/application/default/views/scripts/data/browse.phtml b/application/default/views/scripts/data/browse.phtml index d6d3fce2..9679833c 100755 --- a/application/default/views/scripts/data/browse.phtml +++ b/application/default/views/scripts/data/browse.phtml @@ -3,35 +3,55 @@ $this->headTitle($this->config->title->data); $this->headTitle('全部浏览'); $this->headTitle()->setSeparator(' - '); -$this->headLink()->appendStylesheet('/css/metadata.css'); +$this->headLink()->appendStylesheet('/static-sanji/css/data-list.css'); $this->nav[] = array('link'=>"/data/browse",'title'=>'全部浏览'); $this->theme->AppendPlus($this,'colorbox'); ?> -
-render('breadcrumbs.phtml'); ?> +
partial('data/tools.phtml'); ?> +
+
+ paginator as $md) : ?> +
+
+
+ + + +
+
+

escape($md['title']);?>

+

Admin |  100 |  

+

+ ',mb_strlen($md['description'])>200 ? $this->escape(mb_substr($md['description'],0,200,'UTF-8').'...'):$this->escape($md['description']));?> +

+
+
+ 文件大小 + MB +
+ 更多 +
+
+
+
-page->getNavigation(); ?> -
-metadata as $md) : ?> -
- - - -
-

escape($md['title']);?>

-
',mb_strlen($md['description'])>400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']));?>
-
-
- -page->getNavigation(); ?> +
+
+
+
+ +
+
+
+
+ + + \ No newline at end of file diff --git a/application/default/views/scripts/data/index.phtml b/application/default/views/scripts/data/index.phtml index 6af13c00..89bc6484 100755 --- a/application/default/views/scripts/data/index.phtml +++ b/application/default/views/scripts/data/index.phtml @@ -5,51 +5,51 @@ $this->headTitle()->setSeparator(' - '); $this->headLink()->appendStylesheet('/static-sanji/css/data-index.css'); ?>
-
-
专题数据集
-
-
-
-

黑河计划

-
- -
-
-
-

HiWATER

-

克里斯蒂几个垃圾规范可结果看了几个集都十分广泛

-
- -
-
-
-

HiWATER

-

克里斯蒂几个垃圾规范可结果看了几个集都十分广泛

-
- -
-
-
-

黑河计划

-
- -
-
-
-

HiWATER

-

克里斯蒂几个垃圾规范可结果看了几个集都十分广泛

-
- -
-
-
-

HiWATER

-

克里斯蒂几个垃圾规范可结果看了几个集都十分广泛

-
- -
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
数据导航
@@ -59,16 +59,9 @@ $this->headLink()->appendStylesheet('/static-sanji/css/data-index.css'); foreach ($list as $cg){ if($type == 'category'){ $name = empty($cg['name_zh']) ? $cg['name'] : $cg['name_zh']; - $content .= ''; + $content .= ''.$name.''; }else{ - - $content .= ''; + $content .= ''.$cg['name'].''; } } @@ -121,18 +114,18 @@ $this->headLink()->appendStylesheet('/static-sanji/css/data-index.css');

@@ -140,7 +133,7 @@ $this->headLink()->appendStylesheet('/static-sanji/css/data-index.css'); function genCol($keywords){ $content = ""; foreach ($keywords as $keyword){ - $content .= ''; + $content .= '' . $keyword[0] . ''; } return '
'. $content . '
'; } diff --git a/application/default/views/scripts/data/tools.phtml b/application/default/views/scripts/data/tools.phtml index f639a8df..ca4aea5b 100755 --- a/application/default/views/scripts/data/tools.phtml +++ b/application/default/views/scripts/data/tools.phtml @@ -1,11 +1,15 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/htdocs/static-sanji/css/common.css b/htdocs/static-sanji/css/common.css index e6ea315a..bd04b877 100644 --- a/htdocs/static-sanji/css/common.css +++ b/htdocs/static-sanji/css/common.css @@ -73,4 +73,35 @@ footer p .footer-link{ color: #c7c7c7; font-size: 14px; line-height: 66px; +} + +.page{ + margin: 0px; + width: 100%; + text-align: center; +} +.page span{ + margin-right: 7px; + font-size: 14px; + color:#000; + font-weight: lighter; +} +.page span:nth-child(4),.page span:nth-child(5),.page span:nth-child(6),.page span:nth-child(7){ + margin: 0 10px; +} +.page span a{ + color:#000; +} + +.navClass{ + display: inline-block; + width: 100%; + height: 56px; + border-bottom: 2px solid #7e7e7e; + color: #7e7e7e !important; +} +.pageClass{ + color: #d31919 !important; + font-weight: normal; + text-decoration: none !important; } \ No newline at end of file diff --git a/htdocs/static-sanji/css/data-index.css b/htdocs/static-sanji/css/data-index.css index 2bb467be..f1f7b366 100644 --- a/htdocs/static-sanji/css/data-index.css +++ b/htdocs/static-sanji/css/data-index.css @@ -39,7 +39,7 @@ .data-nav,.special-nav{ padding: 0 0 20px 0; border-top:2px solid #f3f3f3; - border-bottom:2px solid #f3f3f3; + /*border-bottom:2px solid #f3f3f3;*/ } .title{ width: 200px; @@ -75,11 +75,13 @@ color: #959595; text-decoration: none; } -.data-warp button{ +.data-warp .a-btn{ + display: inline-block; margin-right: 11px !important; margin-bottom: 10px; font-size: 14px; height: 46px; + line-height: 46px; padding-left: 8px; padding-right: 8px; padding-top: 0; @@ -90,16 +92,15 @@ white-space:nowrap; border-radius: 0; border: 2px solid #f4f4f4; -} -.data-warp button a{ + width: 100%; color: #7e7e7e; text-decoration: none; } -.data-warp button:hover{ +.data-warp .a-btn:hover{ border: 2px solid #f4f4f4; background: #eee; } -.data-warp button:hover a{ +.data-warp .a-btn:hover{ color: #7e7e7e; } .data-warp .col-sm-6,.data-warp .col-sm-12{ @@ -125,7 +126,7 @@ } .data-warp .splBtn:hover{ background: none; - border: 2px solid #f4f4f4; + border: 1px solid #f4f4f4; } .data-warp .col-sm-12 .col-sm-2{ width: 14.5% !important; @@ -156,6 +157,7 @@ } .data-serves{ padding-bottom: 20px; + border-bottom: none; } .server-title{ height: 30px; @@ -168,8 +170,6 @@ height: 50px; line-height: 50px; font-size: 14px; - padding-left: 2%; - background: url("../images/data_03_06.jpg") no-repeat left center; } .data-serves .col-sm-4 a{ color: #959595; diff --git a/htdocs/static-sanji/css/data-list.css b/htdocs/static-sanji/css/data-list.css new file mode 100644 index 00000000..4d56a64f --- /dev/null +++ b/htdocs/static-sanji/css/data-list.css @@ -0,0 +1,178 @@ +h1,h2,h3,h4,h5,h6,p,ul,li,dl,dt,dd,body,ul,li,hr{ + padding:0; + margin:0; +} +li{ + list-style: none; +} +.clear:after{ + display: block; + content: ''; + clear: both; +} +a:hover{ + text-decoration: none; +} +.c-f{ + margin: 28px 0; +} +.product-nav .fication{ + background: #f4f4f4; + height: 56px; +} +.product-nav .fication:nth-child(2){ + margin-top: 1px; + padding-right:28px; + position: relative; + overflow: hidden; +} +.product-nav ul.fication:nth-child(2) span{ + width:20px; + height: 20px; + cursor: pointer; + position: absolute; + right:10px; + top:18px; + background: url('./images/c-down.png') no-repeat center; + background-size: contain; +} +.product-nav ul.fication li{ + line-height: 56px; + margin-left: 20px; + word-break: break-all; + display: -webkit-box; + -webkit-line-clamp: 2; /*限制在一个块元素显示的文本的行数*/ + -webkit-box-orient: vertical; + overflow: hidden4px; + float: left; + color:#a8a8a8; +} +.product-nav ul.fication li a{ + color: #a8a8a8; + font-size: 14px; +} +.product-nav ul.fication li a:hover{ + color:#000; +} +.dropdown{ + margin-top: 30px; + color:#a8a8a8; + font-size: 14px; +} +.pro-list{ + margin:20px 0; +} +.btn-default{ + border-color:transparent !important; + color:#a8a8a8; + font-size: 14px; +} + +/* 列表 */ +.c-img{ + width:240px; + height:220px; + background-size:contain; +} + +.c-img-box{ + padding:8px; +} +.c-list{ + border:1px solid #ccc; + border-radius: 4px; + margin-bottom: 36px; +} +.c-list-box{ + padding-right: 20px; +} +.c-list-box h4{ + margin: 20px 0px; + font-size: 16px; + font-weight: 600; +} +.c-list-box .c-info span{ + display: inline-block; + width: 25px; + height: 15px; + background-size: contain; +} +.c-list-box .c-author{ + background: url('./images/c-author.png') no-repeat center; +} +.c-list-box .c-click{ + background: url('./images/c-click.png') no-repeat center; +} +.c-list-box .c-time{ + background: url('./images/c-time.png') no-repeat center; +} +.c-list-box .c-info { + color: #a6a6a6; + font-size: 12px; +} +.c-list-box .c-info i{ + margin: 0 5px 0 5px; +} +.c-list-box p.c-info{ + margin-bottom: 25px; +} +.c-list-box .c-con{ + line-height: 25px; + padding-bottom: 14px; + border-bottom: 1px dashed #ccc; + word-break: break-all; + display: -webkit-box; + -webkit-line-clamp: 2; /*限制在一个块元素显示的文本的行数*/ + -webkit-box-orient: vertical; + overflow: hidden +} + +.c-left{ + float: left; + line-height: 48px; + font-size: 12px; + color:#a6a6a6; + line-height: 68px; +} +.c-left a{ + display: inline-block; + width: 40px; + height: 12px; + background: url('./images/c-downloads.png') no-repeat center; + background-size: contain; +} + +.c-left em{ + font-style: normal; +} + +.c-right{ + float: right; + width: 108px; + border:1px solid #309fc9; + line-height: 32px; + text-align: center; + font-size: 12px; + margin-top:20px; +} +.c-right:hover{ + background: #309fc9; + color:#fff; +} +#pagination a{ + color:#525252; +} +#pagination a:hover{ + color:#d31919; +} +#pagination ul{ + width:496px; + margin: 0 auto; + font-size: 14px; + color:#525252; + padding-top: 15px; +} +#pagination ul li{ + float:left; + margin:0 8px; +} \ No newline at end of file diff --git a/htdocs/static-sanji/css/new-list.css b/htdocs/static-sanji/css/new-list.css index fd6a2680..6dea9e85 100644 --- a/htdocs/static-sanji/css/new-list.css +++ b/htdocs/static-sanji/css/new-list.css @@ -57,33 +57,4 @@ } .body-warp .list-warp li span{ float: right; -} -.page{ - margin: 15px auto; - width: 500px; -} -.page span{ - margin-right: 7px; - font-size: 14px; - color:#000; - font-weight: lighter; -} -.page span:nth-child(4),.page span:nth-child(5),.page span:nth-child(6),.page span:nth-child(7){ - margin: 0 10px; -} -.page span a{ - color:#000; -} - -.navClass{ - display: inline-block; - width: 100%; - height: 56px; - border-bottom: 2px solid #7e7e7e; - color: #7e7e7e !important; -} -.pageClass{ - color: #d31919 !important; - font-weight: normal; - text-decoration: none !important; } \ No newline at end of file diff --git a/htdocs/static-sanji/images/c-author.png b/htdocs/static-sanji/images/c-author.png new file mode 100644 index 00000000..295d5bd6 Binary files /dev/null and b/htdocs/static-sanji/images/c-author.png differ diff --git a/htdocs/static-sanji/images/c-click.png b/htdocs/static-sanji/images/c-click.png new file mode 100644 index 00000000..2f11d90a Binary files /dev/null and b/htdocs/static-sanji/images/c-click.png differ diff --git a/htdocs/static-sanji/images/c-down.png b/htdocs/static-sanji/images/c-down.png new file mode 100644 index 00000000..07778357 Binary files /dev/null and b/htdocs/static-sanji/images/c-down.png differ diff --git a/htdocs/static-sanji/images/c-downloads.png b/htdocs/static-sanji/images/c-downloads.png new file mode 100644 index 00000000..424e239e Binary files /dev/null and b/htdocs/static-sanji/images/c-downloads.png differ diff --git a/htdocs/static-sanji/images/c-pro.png b/htdocs/static-sanji/images/c-pro.png new file mode 100644 index 00000000..699a25e5 Binary files /dev/null and b/htdocs/static-sanji/images/c-pro.png differ diff --git a/htdocs/static-sanji/images/c-time.png b/htdocs/static-sanji/images/c-time.png new file mode 100644 index 00000000..0d18306a Binary files /dev/null and b/htdocs/static-sanji/images/c-time.png differ diff --git a/htdocs/static-sanji/js/data-list.js b/htdocs/static-sanji/js/data-list.js new file mode 100644 index 00000000..85c556a8 --- /dev/null +++ b/htdocs/static-sanji/js/data-list.js @@ -0,0 +1,9 @@ +const cDown = document.querySelector('.c-down'); +const ul = document.querySelector('.product-nav ul:nth-child(2)'); +cDown.addEventListener('click', function(){ + if(ul.style.height != 'auto'){ + ul.style.height = "auto"; + }else{ + ul.style.height = "56px" + } +}) \ No newline at end of file diff --git a/htdocs/static-sanji/js/index.js b/htdocs/static-sanji/js/index.js index b498ade1..ac1d94e1 100644 --- a/htdocs/static-sanji/js/index.js +++ b/htdocs/static-sanji/js/index.js @@ -30,8 +30,6 @@ $(function() { $(".pagination").find("a[href=\"#" + ref + "\"]").addClass("active"); $('.swiper-container').height('100%'); $('section.panel div.container').each(function(elem){ - console.log($(window).height()); - console.log($(this).height()); $(this).css({position: 'relative', top: ($(window).height() -$(this).height()) / 2 }); }); }, @@ -61,4 +59,8 @@ $(function() { $(".pagination a").on("click",$.scrollify.move); } }); + + $('section.panel div.container').each(function(elem){ + $(this).css({position: 'relative', top: ($(window).height() -$(this).height()) / 2 }); + }); });