|
|
@@ -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>
|