Browse Source

阅读量和新闻中心老版

huangct 8 years ago
parent
commit
0134d57898

+ 7 - 7
jpress-web-template-usoftchina/src/main/webapp/templates/usoftchina/_hot_news.html

@@ -1,21 +1,21 @@
 <div class="hot-news">
-    <div class="news-item"><em></em><span>热点新闻</span></div>
+    <h4><span class="label label-danger">热</span> &nbsp;&nbsp;热门文章</h4>
     <div>
         <@jp.contents module="news" orderBy="view_count">
         <ol class="list-unstyled">
             <#list contents as content>
                 <li>
                     <h5>
-                        <a href="${content.url!}">${content.title!}</a>
+                        <span class="list-order">${content_index+1}</span> <a href="${content.url!}">${content.title!}</a>
                     </h5>
-                    <div class="info">
-                        <span class="pull-right text-num">${(content.created?string("yyyy-MM-dd"))!''}</span>
-                        <span class="pull-left text-num"><img src="${CTPATH}/images/question/read.png" style="margin-left: 15px;"/> ${content.view_count!'0'}</span>
+                    <div>
+                        <span class="text-num" style="font-size: 12px;">${(content.created?string("yyyy-MM-dd"))!''}</span>
+                        <span class="pull-right text-num" style="font-size: 12px;"><i class="fa fa-eye" style="margin-left: 15px;"></i> ${content.view_count!'0'}</span>
                     </div>
-                    <!--<p class="text-muted" style="font-size: 12px;line-height: 20px;height: 40px;overflow: hidden;">${content.summary!}</p>-->
+                    <p class="text-muted" style="font-size: 12px;line-height: 20px;height: 40px;overflow: hidden;">${content.summary!}</p>
                 </li>
             </#list>
         </ol>
     </@jp.contents>
-    </div>
+</div>
 </div>

+ 23 - 74
jpress-web-template-usoftchina/src/main/webapp/templates/usoftchina/assets/css/main.css

@@ -1,10 +1,10 @@
 /* common */
 body {
 	font-family: 'Open Sans', 'Microsoft Yahei';
-    text-rendering: optimizeLegibility !important;
-    -webkit-font-smoothing: antialiased !important;
-    color: #636b72;
-    /*background: #f5f5fa;*/
+	text-rendering: optimizeLegibility !important;
+	-webkit-font-smoothing: antialiased !important;
+	color: #636b72;
+	/*background: #f5f5fa;*/
 }
 h3,h4,p,ul,ol{
 	margin: 0;
@@ -148,9 +148,9 @@ input::-webkit-input-placeholder{
 	background: transparent url("../../images/nav/search2.png") no-repeat;
 }
 .input-group .form-control:first-child{
-	 border-top-right-radius: 15px;
-	 border-bottom-right-radius: 15px;
-	 margin-top: 5px;
+	border-top-right-radius: 15px;
+	border-bottom-right-radius: 15px;
+	margin-top: 5px;
 	margin-left: 20px;
 	border: none;
 	background: #3c3c3c;
@@ -221,11 +221,6 @@ footer .txt-left{
 	overflow: hidden;
 
 }
-footer .txt-left span.phone em{
-	font-size: 24px;
-	color: #e6e6e6;
-	font-style: normal;
-}
 .item-list>li{
 	display: inline-block;
 	margin: 70px 114px 0 0;
@@ -238,7 +233,7 @@ footer .txt-left span.phone em{
 }
 .item-list>li.qrcode{
 	margin: 70px 120px 0 0;
- }
+}
 .item-list>li:last-child{
 	margin-right: 0;
 }
@@ -335,13 +330,13 @@ footer .txt2{
 	background: url("../../images/sidebar/icon_2_2.png") no-repeat;
 }
 /*.sidebar-content .img3{*/
-	/*display: inline-block;*/
-	/*width: 32px;*/
-	/*height: 32px;*/
-	/*background: url("../../images/sidebar/icon_3.png") no-repeat;*/
+/*display: inline-block;*/
+/*width: 32px;*/
+/*height: 32px;*/
+/*background: url("../../images/sidebar/icon_3.png") no-repeat;*/
 /*}*/
 /*.sidebar-content a:hover .img3{*/
-	/*background: url("../../images/sidebar/icon_3_2.png") no-repeat;*/
+/*background: url("../../images/sidebar/icon_3_2.png") no-repeat;*/
 /*}*/
 .sidebar-content .img4{
 	display: inline-block;
@@ -405,10 +400,10 @@ footer .txt2{
 #sidebar .sidebar-content li.go-top span{
 	padding-bottom: 18px;
 }
- .sidebar-menu p{
-	 line-height: 28px;
-	 text-align: left;
-	 padding-left: 18px;
+.sidebar-menu p{
+	line-height: 28px;
+	text-align: left;
+	padding-left: 18px;
 }
 #sidebar .sidebar-content li:hover .sidebar-menu{
 	display: block;
@@ -448,33 +443,19 @@ footer .txt2{
 }
 
 /* hot news */
-.hot-news .news-item{
-	position: relative;
-}
-.hot-news .news-item em{
-	display: inline-block;
-	width: 6px;
-	height: 30px;
-	font-style: normal;
-	background: #ff0000;
-}
-.hot-news .news-item span{
-	margin-left: 20px;
-	font-size: 24px;
-	font-style: normal;
-	color: #1e1e1e;
-	position: absolute;
-	top: -2px;
-	left: 6px;
-}
 .hot-news h4{
 	margin-top: 10px;
 }
 .hot-news {
+	border: 1px solid #ccc;
 	padding: 0 10px;
 }
+.hot-news ol {
+}
 .hot-news li h5{
+	margin-top: 20px;
 	margin-bottom: 0;
+	padding: 5px 0;
 	width: 100%;
 	overflow: hidden;
 	text-overflow: ellipsis;
@@ -484,38 +465,6 @@ footer .txt2{
 	line-height: 20px;
 	font-weight: 600;
 }
-.hot-news li{
-	margin-top: 14px;
-	width: 300px;
-	height: 56px;
-	border-bottom: 1px solid #d2d2d2;
-}
-.hot-news li:hover a{
-	color: #2867c2;
-}
-.hot-news li:last-child{
-	border-bottom: none;
-}
-.hot-news li div.info{
-	margin-top: 5px;
-	font-size: 12px;
-	overflow: hidden;
-	margin-left: -15px;
-}
-.hot-news li div.info .text-num{
-	font-size: 12px;
-	text-align: left;
-}
-.hot-news li a{
-	color: #323232;
-	font-size: 16px;
-	font-weight: bold;
-	margin: 12px 0 14px 0;
-}
-.hot-news li span{
-	color: #a0a0a0;
-	font-size: 12px;
-}
 .hot-news li .list-order {
 	display: inline-block;
 	width: 20px;
@@ -538,7 +487,7 @@ footer .txt2{
 	border-radius: 4px;
 }
 .breadcrumb-ol>li {
-	display: inline-block
+	display: inline-block;
 }
 /*解决方案*/
 .solution .section-2 {

+ 74 - 74
jpress-web-template-usoftchina/src/main/webapp/templates/usoftchina/content_news.html

@@ -1,80 +1,80 @@
-<#include "_layout.html"/> 
+<#include "_layout.html"/>
 <#macro script_import>
 	<script src="${CPATH}/counter?cid=${content.id!}"></script>
-</#macro> 
+</#macro>
 <#macro css>
 </#macro>
 <@layout>
 <style>
-.news {
-	display: table;
-}
-.new {
-	display: table-row;
-}
-.new>div {
-	display: table-cell;
-	vertical-align: middle;
-	padding: 15px;
-	border-bottom: 1px solid #ccc;
-}
-.new h5 {
-	font-size: 16px;
-	font-weight: 600;
-}
+	.news {
+		display: table;
+	}
+	.new {
+		display: table-row;
+	}
+	.new>div {
+		display: table-cell;
+		vertical-align: middle;
+		padding: 15px;
+		border-bottom: 1px solid #ccc;
+	}
+	.new h5 {
+		font-size: 16px;
+		font-weight: 600;
+	}
 
-.news-text img {
-	max-width: 100%;
-}
-.content .content-toggle{
-	display: inline-block;
-	overflow: hidden;
-	margin-top: 50px;
-	width: 805px;
-	float: left;
-}
-.content .content-toggle .p-toggle{
-	color: #1e1e1e;
-	float: left;
-}
-.content .content-toggle .p2-toggle{
-	color: #1e1e1e;
-	float: right;
-}
-.content>h1 {
-	margin: 40px 0;
-	font-size: 30px;
-	color: #204da9;
-}
-.content>p {
-	margin-top: 0;
-	margin-bottom: 32px;
-	font-size: 14px;
-	color: #969696;
-}
-.content .content-toggle p{
-	float: left;
-	margin-left: 0px;
-	text-align: left;
-}
-.content .content-toggle  p.p2-toggle{
-	float: right;
-}
-.content .content-toggle a{
-	font-size: 14px;
-	color: #1e1e1e;
-}
-.content .content-toggle p a{
-	display: inline-block;
-	width: 180px;
-	text-overflow: ellipsis;
-	overflow: hidden;
-	white-space: nowrap;
-}
-.content .content-toggle p a:hover{
-	cursor: pointer;
-	color: #3e3e3e;
-}
+	.news-text img {
+		max-width: 100%;
+	}
+	.content .content-toggle{
+		display: inline-block;
+		overflow: hidden;
+		margin-top: 50px;
+		width: 805px;
+		float: left;
+	}
+	.content .content-toggle .p-toggle{
+		color: #1e1e1e;
+		float: left;
+	}
+	.content .content-toggle .p2-toggle{
+		color: #1e1e1e;
+		float: right;
+	}
+	.content>h1 {
+		margin: 40px 0;
+		font-size: 30px;
+		color: #204da9;
+	}
+	.content>p {
+		margin-top: 0;
+		margin-bottom: 32px;
+		font-size: 14px;
+		color: #969696;
+	}
+	.content .content-toggle p{
+		float: left;
+		margin-left: 0px;
+		text-align: left;
+	}
+	.content .content-toggle  p.p2-toggle{
+		float: right;
+	}
+	.content .content-toggle a{
+		font-size: 14px;
+		color: #1e1e1e;
+	}
+	.content .content-toggle p a{
+		display: inline-block;
+		width: 180px;
+		text-overflow: ellipsis;
+		overflow: hidden;
+		white-space: nowrap;
+	}
+	.content .content-toggle p a:hover{
+		cursor: pointer;
+		color: #3e3e3e;
+	}
 </style>
 <section id="main">
 	<div class="container" style="background: #fff;">
@@ -107,13 +107,13 @@
 						<div class="content-toggle">
 							<p class="p-toggle">
 								<@jp.previous>
-									<a href="${previous.url!}">上一篇:${previous.title!}</a>
-								</@jp.previous>
+								<a href="${previous.url!}">上一篇:${previous.title!}</a>
+							</@jp.previous>
 							</p>
 							<p class="p2-toggle">
 								<@jp.next>
-									<a href="${next.url!}">下一篇:${next.title!}</a>
-								</@jp.next>
+								<a href="${next.url!}">下一篇:${next.title!}</a>
+							</@jp.next>
 							</p>
 						</div>
 					</div>

+ 2 - 1
jpress-web-template-usoftchina/src/main/webapp/templates/usoftchina/content_uuhelper.html

@@ -6,6 +6,7 @@
     <meta charset="UTF-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0,maximum-scale=1.0, user-scalable=no">
     <script type="text/javascript" src="${CTPATH}/assets/js/jquery.min.js"></script>
+    <script src="${CPATH}/counter?cid=${content.id!}"></script>
     <title></title>
     <style>
         .main{
@@ -374,7 +375,7 @@
     timers = null;
     //加载数据
     var LoadingDataFn = function() {
-        $.get("${CPATH}/comment/lazyLoad?contId=${(content.id)!}&pagesize=1&pagenumber="+aa+"&userId=${userId!0}&uuUserId=${userid!0}", function(result){
+        $.get("${CPATH}/comment/lazyLoad?contId=${(content.id)!}&CPATH=${CPATH!}&pagesize=1&pagenumber="+aa+"&userId=${userId!0}&uuUserId=${userid!0}", function(result){
             var dom = '';
             if ("" == result.message){
                 $('.pull').text("没有更多数据了");

+ 72 - 72
jpress-web-template-usoftchina/src/main/webapp/templates/usoftchina/taxonomy_news.html

@@ -1,75 +1,75 @@
 <#include "_layout.html"/>
 <#macro script_import>
 	<script src="${CTPATH}/assets/js/jquery.min.js"></script>
-</#macro> 
+</#macro>
 <#macro script>
-$(document).ready(function() {
+	$(document).ready(function() {
 	var thumbnails = $(".content-thumbnail");
 	$.each(thumbnails, function(k, v) {
-		var me = $(v);
-		var width = me.width(), height = me.height();
-		if(width/height > 16/10) {
-			me.parent().addClass("thumbnail-height");
-			me.parent().removeClass("thumbnail-news");
-		} else {
-			me.parent().addClass("thumbnail-width");
-			me.parent().removeClass("thumbnail-news");
-		}
+	var me = $(v);
+	var width = me.width(), height = me.height();
+	if(width/height > 16/10) {
+	me.parent().addClass("thumbnail-height");
+	me.parent().removeClass("thumbnail-news");
+	} else {
+	me.parent().addClass("thumbnail-width");
+	me.parent().removeClass("thumbnail-news");
+	}
+	});
 	});
-});
 </#macro>
 <#macro css>
 </#macro>
 <@layout>
 <style>
-.section-item{
-	width: 1190px;
-}
-.section-item .content{
-	margin-bottom: 60px;
-}
-.news {
-	display: table;
-}
-.new {
-	display: table-row;
-}
-.new>div {
-	display: table-cell;
-	vertical-align: middle;
-	padding: 15px;
-	border-bottom: 1px solid #ccc;
-}
-.new h5 {
-	font-size: 16px;
-	font-weight: 600;
-}
-.thumbnail-width {
-	height: 100px;
-	opacity: 1;
-	overflow: hidden;
-}
+	.section-item{
+		width: 1190px;
+	}
+	.section-item .content{
+		margin-bottom: 60px;
+	}
+	.news {
+		display: table;
+	}
+	.new {
+		display: table-row;
+	}
+	.new>div {
+		display: table-cell;
+		vertical-align: middle;
+		padding: 15px;
+		border-bottom: 1px solid #ccc;
+	}
+	.new h5 {
+		font-size: 16px;
+		font-weight: 600;
+	}
+	.thumbnail-width {
+		height: 100px;
+		opacity: 1;
+		overflow: hidden;
+	}
 
-.thumbnail-width img {
-	max-width: 160px;
-}
+	.thumbnail-width img {
+		max-width: 160px;
+	}
 
-.thumbnail-height {
-	width: 160px;
-	opacity: 1;
-	overflow: hidden;
-}
+	.thumbnail-height {
+		width: 160px;
+		opacity: 1;
+		overflow: hidden;
+	}
 
-.thumbnail-height img {
-	max-height: 100px;
-}
+	.thumbnail-height img {
+		max-height: 100px;
+	}
 
-.thumbnail-news {
-	width: 160px;
-	height: 100px;
-	opacity: 0;
-	overflow: hidden;
-}
+	.thumbnail-news {
+		width: 160px;
+		height: 100px;
+		opacity: 0;
+		overflow: hidden;
+	}
 </style>
 <section id="main">
 	<div class="container" style="background: #fff;">
@@ -90,25 +90,25 @@ $(document).ready(function() {
 						<hr />
 						<div class="news">
 							<#list page.getList() as content>
-							<div class="new">
-								<div style="width: 120px;">
-									<div class="thumbnail-news">
-										<img class="content-thumbnail" src="${content.thumbnail!(CTPATH+'/images/artitle_img_no.jpg')}" alt="新闻缩略图"/>
+								<div class="new">
+									<div style="width: 120px;">
+										<div class="thumbnail-news">
+											<img class="content-thumbnail" src="${content.thumbnail!(CTPATH+'/images/artitle_img_no.jpg')}" alt="新闻缩略图"/>
+										</div>
 									</div>
-								</div>
-								<div>
-									<h5><a href="${content.url!}">${content.title!}</a></h5>
-									<p>${content.summary!}</p>
-									<div class="text-muted">
-										<span class="pull-left">${(content.created?string("yyyy-MM-dd HH:mm"))!''} </span>
-										<span class="pull-right text-num">
+									<div>
+										<h5><a href="${content.url!}">${content.title!}</a></h5>
+										<p>${content.summary!}</p>
+										<div class="text-muted">
+											<span class="pull-left">${(content.created?string("yyyy-MM-dd HH:mm"))!''} </span>
+											<span class="pull-right text-num">
 											<i class="fa fa-eye" style="margin-left: 15px;"></i> ${content.view_count!'0'}
-											<!-- <i class="fa fa-thumbs-o-up" style="margin-left: 15px;"></i> ${content.vote_up!'0'}
-											<i class="fa fa-commenting-o" style="margin-left: 15px;"></i> ${content.comment_count!'0'} -->
+												<!-- <i class="fa fa-thumbs-o-up" style="margin-left: 15px;"></i> ${content.vote_up!'0'}
+                                                <i class="fa fa-commenting-o" style="margin-left: 15px;"></i> ${content.comment_count!'0'} -->
 										</span>
+										</div>
 									</div>
 								</div>
-							</div>
 							</#list>
 						</div>
 						<div style="padding: 15px;">
@@ -122,10 +122,10 @@ $(document).ready(function() {
 							</div>
 						</div>
 					</div>
-					</@jp.contentPage >
-				</div>
+				</@jp.contentPage >
 			</div>
 		</div>
 	</div>
+	</div>
 </section>
 </@layout>