Quellcode durchsuchen

Merge remote-tracking branch 'origin/uuhelper' into uuhelper/01

hangb vor 8 Jahren
Ursprung
Commit
63990c3175
24 geänderte Dateien mit 560 neuen und 975 gelöschten Zeilen
  1. 7 12
      jpress-commons/src/main/java/io/jpress/utils/ImageUtils.java
  2. 195 0
      jpress-commons/src/main/java/io/jpress/utils/OperateImage.java
  3. 16 0
      jpress-model/src/main/java/io/jpress/model/Comment.java
  4. 52 7
      jpress-web-admin/src/main/java/io/jpress/admin/controller/_AttachmentController.java
  5. 24 9
      jpress-web-admin/src/main/webapp/WEB-INF/admin/attachment/choose_layer.html
  6. 5 1
      jpress-web-admin/src/main/webapp/WEB-INF/admin/comment/uuHelperCommentList.html
  7. BIN
      jpress-web-core/src/main/webapp/static/jpress/admin/image/defaultUuUserPhoto.png
  8. 13 6
      jpress-web-front/src/main/java/io/jpress/front/controller/CommentController.java
  9. 3 0
      jpress-web-front/src/main/java/io/jpress/front/controller/ContentController.java
  10. 7 7
      jpress-web-template-usoftchina/src/main/webapp/templates/usoftchina/_hot_news.html
  11. 23 74
      jpress-web-template-usoftchina/src/main/webapp/templates/usoftchina/assets/css/main.css
  12. 1 0
      jpress-web-template-usoftchina/src/main/webapp/templates/usoftchina/assets/js/layer/extend/layer.ext.js
  13. 1 0
      jpress-web-template-usoftchina/src/main/webapp/templates/usoftchina/assets/js/layer/layer.js
  14. BIN
      jpress-web-template-usoftchina/src/main/webapp/templates/usoftchina/assets/js/layer/skin/default/icon-ext.png
  15. BIN
      jpress-web-template-usoftchina/src/main/webapp/templates/usoftchina/assets/js/layer/skin/default/icon.png
  16. BIN
      jpress-web-template-usoftchina/src/main/webapp/templates/usoftchina/assets/js/layer/skin/default/loading-0.gif
  17. BIN
      jpress-web-template-usoftchina/src/main/webapp/templates/usoftchina/assets/js/layer/skin/default/loading-1.gif
  18. BIN
      jpress-web-template-usoftchina/src/main/webapp/templates/usoftchina/assets/js/layer/skin/default/loading-2.gif
  19. 6 0
      jpress-web-template-usoftchina/src/main/webapp/templates/usoftchina/assets/js/layer/skin/layer.css
  20. 7 0
      jpress-web-template-usoftchina/src/main/webapp/templates/usoftchina/assets/js/layer/skin/layer.ext.css
  21. 92 227
      jpress-web-template-usoftchina/src/main/webapp/templates/usoftchina/content_news.html
  22. 29 56
      jpress-web-template-usoftchina/src/main/webapp/templates/usoftchina/content_uuhelper.html
  23. 0 245
      jpress-web-template-usoftchina/src/main/webapp/templates/usoftchina/page_version.html
  24. 79 331
      jpress-web-template-usoftchina/src/main/webapp/templates/usoftchina/taxonomy_news.html

+ 7 - 12
jpress-commons/src/main/java/io/jpress/utils/ImageUtils.java

@@ -15,11 +15,13 @@
  */
 package io.jpress.utils;
 
-import java.awt.AlphaComposite;
-import java.awt.Graphics;
-import java.awt.Graphics2D;
-import java.awt.Image;
-import java.awt.Rectangle;
+import com.jfinal.log.Log;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReadParam;
+import javax.imageio.ImageReader;
+import javax.imageio.stream.ImageInputStream;
+import java.awt.*;
 import java.awt.image.BufferedImage;
 import java.io.File;
 import java.io.FileInputStream;
@@ -27,13 +29,6 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.util.Iterator;
 
-import javax.imageio.ImageIO;
-import javax.imageio.ImageReadParam;
-import javax.imageio.ImageReader;
-import javax.imageio.stream.ImageInputStream;
-
-import com.jfinal.log.Log;
-
 public class ImageUtils {
 	private static final Log log = Log.getLog(ImageUtils.class);
 

+ 195 - 0
jpress-commons/src/main/java/io/jpress/utils/OperateImage.java

@@ -0,0 +1,195 @@
+package io.jpress.utils;
+
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReadParam;
+import javax.imageio.ImageReader;
+import javax.imageio.stream.ImageInputStream;
+import javax.imageio.stream.ImageOutputStream;
+import java.awt.*;
+import java.awt.image.BufferedImage;
+import java.io.*;
+import java.net.URL;
+import java.util.Iterator;
+
+/**
+ * Created by 黄诚天 on 2017-09-13.
+ */
+public class OperateImage {
+    // ===源图片路径名称如:c:\1.jpg
+    private String srcpath;
+
+    // ===剪切图片存放路径名称.如:c:\2.jpg
+    private String subpath;
+
+    //源图片数据
+    private BufferedImage sourceImg;
+
+    // ===剪切点x坐标
+    private int x;
+    private int y;
+
+    // ===剪切点宽度
+    private int width;
+    private int height;
+
+    public OperateImage() {
+    }
+
+    public OperateImage(int x, int y, int width, int height) {
+        this.x = x;
+        this.y = y;
+        this.width = width;
+        this.height = height;
+    }
+
+    /**
+     * 对图片裁剪,并把裁剪完蛋新图片保存 。
+     */
+    public File cut(String type) throws IOException {
+        FileInputStream is = null;
+        InputStream inputStream = null;
+        ImageInputStream iis = null;
+
+        try {
+            // 读取图片文件
+            //is = new FileInputStream(srcpath);
+
+            ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
+            ImageOutputStream imageOutput = ImageIO.createImageOutputStream(byteArrayOutputStream);
+            ImageIO.write(this.sourceImg, type, imageOutput);
+            inputStream = new ByteArrayInputStream(byteArrayOutputStream.toByteArray());
+
+            /*
+             * 返回包含所有当前已注册 ImageReader 的 Iterator,这些 ImageReader
+             * 声称能够解码指定格式。 参数:formatName - 包含非正式格式名称 .
+             *(例如 "jpeg" 或 "tiff")等 。
+            */
+            Iterator<ImageReader> it = ImageIO.getImageReadersByFormatName(
+                    type);
+            ImageReader reader = it.next();
+            // 获取图片流
+            iis = ImageIO.createImageInputStream(inputStream);
+
+            /*
+             * <p>iis:读取源.true:只向前搜索 </p>.将它标记为 ‘只向前搜索’。
+             * 此设置意味着包含在输入源中的图像将只按顺序读取,可能允许 reader
+             *  避免缓存包含与以前已经读取的图像关联的数据的那些输入部分。
+            */
+            reader.setInput(iis, true);
+
+            /*
+             * <p>描述如何对流进行解码的类<p>.用于指定如何在输入时从 Java Image I/O
+             * 框架的上下文中的流转换一幅图像或一组图像。用于特定图像格式的插件
+             * 将从其 ImageReader 实现的 getDefaultReadParam 方法中返回
+             * ImageReadParam 的实例。
+            */
+            ImageReadParam param = reader.getDefaultReadParam();
+
+            /*
+             * 图片裁剪区域。Rectangle 指定了坐标空间中的一个区域,通过 Rectangle 对象
+             * 的左上顶点的坐标(x,y)、宽度和高度可以定义这个区域。
+            */
+            Rectangle rect = new Rectangle(x, y, width, height);
+
+            // 提供一个 BufferedImage,将其用作解码像素数据的目标。
+            param.setSourceRegion(rect);
+
+            /*
+             * 使用所提供的 ImageReadParam 读取通过索引 imageIndex 指定的对象,并将
+             * 它作为一个完整的 BufferedImage 返回。
+              */
+            BufferedImage bi = reader.read(0, param);
+
+            // 保存新图片
+            ImageIO.write(bi, type, new File(subpath));
+            File cutImage = new File(subpath);
+
+            return cutImage;
+        } finally {
+            if (is != null) {
+                is.close();
+            }
+
+            if (inputStream != null) {
+                inputStream.close();
+            }
+
+            if (iis != null) {
+                iis.close();
+            }
+        }
+    }
+
+    public static BufferedImage getIconInfo(String iconUrl) {
+        BufferedImage sourceImg = null;
+        try {
+            InputStream murl = new URL(iconUrl).openStream();
+            sourceImg = ImageIO.read(murl);
+            System.out.println(sourceImg.getWidth()); // 源图宽度
+            System.out.println(sourceImg.getHeight()); // 源图高度
+            System.out.println(sourceImg.getWidth() * sourceImg.getHeight());
+            System.out.println(sourceImg.getData());
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+
+
+        return sourceImg;
+    }
+
+    public int getHeight() {
+        return height;
+    }
+
+    public void setHeight(int height) {
+        this.height = height;
+    }
+
+    public String getSrcpath() {
+        return srcpath;
+    }
+
+    public void setSrcpath(String srcpath) {
+        this.srcpath = srcpath;
+    }
+
+    public String getSubpath() {
+        return subpath;
+    }
+
+    public BufferedImage getSourceImg() {
+        return sourceImg;
+    }
+
+    public void setSourceImg(BufferedImage sourceImg) {
+        this.sourceImg = sourceImg;
+    }
+
+    public void setSubpath(String subpath) {
+        this.subpath = subpath;
+    }
+
+    public int getWidth() {
+        return width;
+    }
+
+    public void setWidth(int width) {
+        this.width = width;
+    }
+
+    public int getX() {
+        return x;
+    }
+
+    public void setX(int x) {
+        this.x = x;
+    }
+
+    public int getY() {
+        return y;
+    }
+
+    public void setY(int y) {
+        this.y = y;
+    }
+}

+ 16 - 0
jpress-model/src/main/java/io/jpress/model/Comment.java

@@ -22,7 +22,10 @@ import io.jpress.model.query.ContentQuery;
 import io.jpress.model.query.UserQuery;
 import io.jpress.model.query.VoteQuery;
 
+import java.io.InputStream;
 import java.math.BigInteger;
+import java.net.URL;
+import java.net.URLConnection;
 
 @Table(tableName = "comment", primaryKey = "id")
 public class Comment extends BaseComment<Comment> {
@@ -153,4 +156,17 @@ public class Comment extends BaseComment<Comment> {
 	public boolean isvoted(BigInteger commentId, BigInteger userId, BigInteger uuUserId) {
 		return VoteQuery.me().findCommentCountVote(commentId, userId, uuUserId);
 	}
+
+	public boolean isImageExist(String urlStr) {
+		try {
+			URL url = new URL(urlStr);
+			// 返回一个 URLConnection 对象,它表示到 URL 所引用的远程对象的连接。
+			URLConnection uc = url.openConnection();
+			// 打开的连接读取的输入流。
+			InputStream in = uc.getInputStream();
+			return true;
+		} catch (Exception e) {
+			return false;
+		}
+	}
 }

+ 52 - 7
jpress-web-admin/src/main/java/io/jpress/admin/controller/_AttachmentController.java

@@ -15,19 +15,12 @@
  */
 package io.jpress.admin.controller;
 
-import java.io.File;
-import java.io.IOException;
-import java.math.BigInteger;
-import java.util.Date;
-import java.util.List;
-
 import com.alibaba.fastjson.JSONObject;
 import com.jfinal.aop.Before;
 import com.jfinal.kit.PathKit;
 import com.jfinal.log.Log;
 import com.jfinal.plugin.activerecord.Page;
 import com.jfinal.upload.UploadFile;
-
 import io.jpress.core.JBaseCRUDController;
 import io.jpress.core.interceptor.ActionCacheClearInterceptor;
 import io.jpress.model.Attachment;
@@ -42,6 +35,14 @@ import io.jpress.template.Thumbnail;
 import io.jpress.utils.AttachmentUtils;
 import io.jpress.utils.FileUtils;
 import io.jpress.utils.ImageUtils;
+import io.jpress.utils.OperateImage;
+
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.io.IOException;
+import java.math.BigInteger;
+import java.util.Date;
+import java.util.List;
 
 @RouterMapping(url = "/admin/attachment", viewPath = "/WEB-INF/admin/attachment")
 @Before(ActionCacheClearInterceptor.class)
@@ -116,6 +117,7 @@ public class _AttachmentController extends JBaseCRUDController<Attachment> {
 			String newPath = AttachmentUtils.moveFile(uploadFile);
 			User user = getLoginedUser();
 
+
 			Attachment attachment = new Attachment();
 			attachment.setUserId(user.getId());
 			attachment.setCreated(new Date());
@@ -136,6 +138,49 @@ public class _AttachmentController extends JBaseCRUDController<Attachment> {
 		}
 	}
 
+	public void doUploadCutImage() {
+		String webRoot = PathKit.getWebRootPath();
+		String requestUrlMessage = this.getRequest().getScheme() +"://" + this.getRequest().getServerName() + ":" + this.getRequest().getServerPort();
+		Attachment attachment = AttachmentQuery.me().findById(getParaToBigInteger("sourceId"));
+		int x1 = getParaToInt("x1");
+		int x2 = getParaToInt("x2");
+		int y1 = getParaToInt("y1");
+		int y2 = getParaToInt("y2");
+		int width = x2 - x1;
+		int height = y2 - y1;
+		String srcpath = requestUrlMessage + "/jpress" + attachment.getPath();
+		String type = attachment.getSuffix().substring(1);
+		//新截取的图片名称在原图名称上加上时间戳
+		long time = System.currentTimeMillis();
+		String title = attachment.getTitle().split("\\.")[0] + time + attachment.getSuffix();
+		String subpath = requestUrlMessage + "/jpress" + "/attachment/" + time + attachment.getSuffix();
+		/*srcpath.replaceAll("/","-");*/
+		BufferedImage bufferedImage = OperateImage.getIconInfo(srcpath);
+		OperateImage o = new OperateImage(x1, y1, width, height);
+		//o.setSrcpath(srcpath);
+		o.setSourceImg(bufferedImage);
+		o.setSubpath("D:\\pictest\\" + time + attachment.getSuffix() );
+		try {
+			File cutImage = o.cut(type);
+			/*Attachment cutImage = new Attachment();
+			attachment.setUserId(attachment.getUserId());
+			attachment.setCreated(new Date());
+			attachment.setTitle(title);
+			attachment.setPath("/attachment/" + time + attachment.getSuffix());
+			attachment.setSuffix(attachment.getSuffix());
+			attachment.setMimeType(attachment.getMimeType());
+			cutImage.save();*/
+
+			JSONObject json = new JSONObject();
+			json.put("success", true);
+			json.put("src", getRequest().getContextPath() + attachment.getPath());
+			renderJson(json.toString());
+		} catch (IOException e) {
+			e.printStackTrace();
+			renderJson("success", false);
+		}
+	}
+
 	private void processImage(String newPath) {
 		if (!AttachmentUtils.isImage(newPath))
 			return;

+ 24 - 9
jpress-web-admin/src/main/webapp/WEB-INF/admin/attachment/choose_layer.html

@@ -27,6 +27,15 @@ $(document).ready(function(){
   });
 
     $('.jp-grids-photos').imgAreaSelect({ maxWidth: 200, maxHeight: 170, handles: true });
+
+    $('.jp-grids-photos').imgAreaSelect({
+        onSelectEnd: function (img, selection) {
+            $('input[name="x1"]').val(selection.x1);
+            $('input[name="y1"]').val(selection.y1);
+            $('input[name="x2"]').val(selection.x2);
+            $('input[name="y2"]').val(selection.y2);
+        }
+    });
 });
 
 $('#fine-uploader-gallery').fineUploader({
@@ -46,6 +55,12 @@ $('#fine-uploader-gallery').fineUploader({
                 }
              }
        });
+
+function doUpload(sourceId) {
+    $('#sourceId').attr("value",sourceId);
+    $(".imageForm").submit();
+}
+
 </#macro> 
 <#macro script_import>
 <script src="${CPATH}/static/plugins/fine-uploader/jquery.fine-uploader.js"></script>
@@ -99,12 +114,12 @@ $('#fine-uploader-gallery').fineUploader({
 				</div>
 				<div class="tab-pane active" id="tab_2">
 					<div class="jp-borwer">
-                        <form action="${CPATH}/admin/attachment/doUpload" method="post">
-                            <input type="hidden" name="x1" value="" />
-                            <input type="hidden" name="y1" value="" />
-                            <input type="hidden" name="x2" value="" />
-                            <input type="hidden" name="y2" value="" />
-                            <input type="hidden" name="sourceId" value="" />
+                        <form id="imageForm" action="${CPATH}/admin/attachment/doUploadCutImage" method="post">
+                            <input id="x1" type="hidden" name="x1" value=""/>
+                            <input id="y1" type="hidden" name="y1" value=""/>
+                            <input id="x2" type="hidden" name="x2" value=""/>
+                            <input id="y2" type="hidden" name="y2" value=""/>
+                            <input type="hidden" id="sourceId" name="sourceId" value="" />
                             <!--<input type="submit" name="submit" value="截取" />-->
 
 							<ul class="list-inline list-unstyled list-items">
@@ -112,14 +127,14 @@ $('#fine-uploader-gallery').fineUploader({
 								<#list page.getList() as bean>
 								<li>
 									<#if bean.isImage() >
-										<img src="${CPATH}${bean.path!}" title="${bean.title!}" path="${CPATH}${bean.path!}" class="jp-grids-photos img-responsive" >
+										<img src="${CPATH}${bean.path!}" title="${bean.title!}" path="${CPATH}${bean.path!}" class="jp-grids-photos img-responsive" id="photoId${bean.id}">
 									<#else>
-										<img src="${CPATH}/static/jpress/admin/image/nothumbnail.jpg" title="${bean.title!}" path="${CPATH}${bean.path!}" class="jp-grids-photos img-responsive">
+										<img src="${CPATH}/static/jpress/admin/image/nothumbnail.jpg" title="${bean.title!}" path="${CPATH}${bean.path!}" class="jp-grids-photos img-responsive" id="photoId${bean.id}">
 									</#if>
 									<div class="brower-active-icon" style="display: none">
 										<i class="fa fa-check-square-o fa-2x" aria-hidden="true"></i>
 									</div>
-                                    <button>确定</button>
+                                    <button onclick="doUpload(${bean.id})">确定</button>
 								</li>
 								</#list>
 								</#if>

+ 5 - 1
jpress-web-admin/src/main/webapp/WEB-INF/admin/comment/uuHelperCommentList.html

@@ -108,7 +108,11 @@
                                 <td>
                                     <div class="messageContent">
                                         <div class="leftImg">
-                                            <img src="${(bean.uu_user_avatar)!(bean.user.avatar)!CPATH+'/static/jpress/admin/image/nothumbnail.jpg'}" alt="头像">
+                                            <#if bean?? && bean.uu_user_avatar?? && bean.isImageExist(bean.uu_user_avatar)>
+                                                <img src="${(bean.uu_user_avatar)!}" alt="">
+                                                <#else>
+                                                    <img src="${CPATH}/static/jpress/admin/image/defaultUuUserPhoto.png" alt="">
+                                            </#if>
                                         </div>
                                         <div class="rightContent">
                                             <p>${bean.author!}</p>

BIN
jpress-web-core/src/main/webapp/static/jpress/admin/image/defaultUuUserPhoto.png


+ 13 - 6
jpress-web-front/src/main/java/io/jpress/front/controller/CommentController.java

@@ -15,10 +15,12 @@
  */
 package io.jpress.front.controller;
 
+import com.jfinal.aop.Before;
 import com.jfinal.plugin.activerecord.Page;
 import io.jpress.Consts;
 import io.jpress.core.BaseFrontController;
 import io.jpress.core.cache.ActionCacheManager;
+import io.jpress.core.interceptor.ActionCacheClearInterceptor;
 import io.jpress.model.Comment;
 import io.jpress.model.Content;
 import io.jpress.model.User;
@@ -62,7 +64,6 @@ public class CommentController extends BaseFrontController {
 		}
 
 		BigInteger userId = StringUtils.toBigInteger(CookieUtils.get(this, Consts.COOKIE_LOGINED_USER), null);
-		userId = null;
 		BigInteger uuUserId = getParaToBigInteger("uuUserId");
 
 		// 允许未登录用户评论
@@ -202,7 +203,12 @@ public class CommentController extends BaseFrontController {
 			htmlBuilder.append("<div class=\"message\">");
 			htmlBuilder.append("<div class=\"left\">");
 			htmlBuilder.append("<div class=\"img\">");
-			htmlBuilder.append("<img src=\"/jpress/static/jpress/admin/image/dot.png\" alt=\"用户头像\">");
+			String userImage = comment.getUuUserAvatar();
+			if (!comment.isImageExist(userImage)) {
+				userImage = getPara("CPATH") + "/static/jpress/admin/image/defaultUuUserPhoto.png";
+			}
+
+			htmlBuilder.append("<img src=\""+ userImage +"\"" + " alt=\"\">");
 			htmlBuilder.append("</div>");
 			htmlBuilder.append("</div>");
 			htmlBuilder.append("<div class=\"right\">");
@@ -215,10 +221,10 @@ public class CommentController extends BaseFrontController {
 			String imageUrl = null;
 			if (comment.isvoted(comment.getId(), userId, uuUserId)) {
 				htmlBuilder.append(" voted\" ");
-				imageUrl = "/jpress/static/jpress/admin/image/support.png";
+				imageUrl = getPara("CPATH") + "/static/jpress/admin/image/support.png";
 			} else {
 				htmlBuilder.append("\"");
-				imageUrl = "/jpress/static/jpress/admin/image/hands.png";
+				imageUrl = getPara("CPATH") + "/static/jpress/admin/image/hands.png";
 			}
 
 			htmlBuilder.append(" src="+ imageUrl + " alt=\"\" onclick=\"vote("+ comment.getId()+")\"><em class=\"em" + comment.getId() + "\">" + comment.getVoteUp() + "</em></span>");
@@ -234,10 +240,10 @@ public class CommentController extends BaseFrontController {
 				String sonImageUrl = null;
 				if (sonComment.isvoted(sonComment.getId(), userId, uuUserId)) {
 					htmlBuilder.append(" voted\" ");
-					sonImageUrl = "/jpress/static/jpress/admin/image/support.png";
+					sonImageUrl = getPara("CPATH") + "/static/jpress/admin/image/support.png";
 				} else {
 					htmlBuilder.append("\"");
-					sonImageUrl = "/jpress/static/jpress/admin/image/hands.png";
+					sonImageUrl = getPara("CPATH") + "/static/jpress/admin/image/hands.png";
 				}
 
 				htmlBuilder.append(" src="+ sonImageUrl+ " alt=\"\" onclick=\"vote("+ sonComment.getId()+")\"><em class=\"em" + sonComment.getId() + "\">" + sonComment.getVoteUp() + "</em></span>");
@@ -310,6 +316,7 @@ public class CommentController extends BaseFrontController {
 	}
 
 	//评论点赞接口
+	@Before(ActionCacheClearInterceptor.class)
 	public void vote() {
 		BigInteger commentId = getParaToBigInteger("comment_id");
 		Comment comment = CommentQuery.me().findById(commentId);

+ 3 - 0
jpress-web-front/src/main/java/io/jpress/front/controller/ContentController.java

@@ -15,11 +15,13 @@
  */
 package io.jpress.front.controller;
 
+import com.jfinal.aop.Before;
 import com.jfinal.render.Render;
 import io.jpress.Consts;
 import io.jpress.core.BaseFrontController;
 import io.jpress.core.addon.HookInvoker;
 import io.jpress.core.cache.ActionCache;
+import io.jpress.core.interceptor.ActionCacheClearInterceptor;
 import io.jpress.model.Content;
 import io.jpress.model.Taxonomy;
 import io.jpress.model.Vote;
@@ -198,6 +200,7 @@ public class ContentController extends BaseFrontController {
 	}
 
 	//文章点赞接口
+	@Before(ActionCacheClearInterceptor.class)
 	public void vote() {
 		BigInteger contentId = getParaToBigInteger("content_id");
 		Content content = ContentQuery.me().findById(contentId);

+ 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 {

Datei-Diff unterdrückt, da er zu groß ist
+ 1 - 0
jpress-web-template-usoftchina/src/main/webapp/templates/usoftchina/assets/js/layer/extend/layer.ext.js


Datei-Diff unterdrückt, da er zu groß ist
+ 1 - 0
jpress-web-template-usoftchina/src/main/webapp/templates/usoftchina/assets/js/layer/layer.js


BIN
jpress-web-template-usoftchina/src/main/webapp/templates/usoftchina/assets/js/layer/skin/default/icon-ext.png


BIN
jpress-web-template-usoftchina/src/main/webapp/templates/usoftchina/assets/js/layer/skin/default/icon.png


BIN
jpress-web-template-usoftchina/src/main/webapp/templates/usoftchina/assets/js/layer/skin/default/loading-0.gif


BIN
jpress-web-template-usoftchina/src/main/webapp/templates/usoftchina/assets/js/layer/skin/default/loading-1.gif


BIN
jpress-web-template-usoftchina/src/main/webapp/templates/usoftchina/assets/js/layer/skin/default/loading-2.gif


Datei-Diff unterdrückt, da er zu groß ist
+ 6 - 0
jpress-web-template-usoftchina/src/main/webapp/templates/usoftchina/assets/js/layer/skin/layer.css


Datei-Diff unterdrückt, da er zu groß ist
+ 7 - 0
jpress-web-template-usoftchina/src/main/webapp/templates/usoftchina/assets/js/layer/skin/layer.ext.css


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

@@ -1,257 +1,122 @@
-<#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;
-}
-	/*导航*/
-.breadcrumb-ol li{
-	color: #1e1e1e;
-	height: 68px;
-	line-height: 68px;
-}
-.breadcrumb-ol li a{
-	color: #1e1e1e;
-}
-/*公司动态行业新闻*/
-.hots_news{
-	float: left;
-	margin-top: -30px;
-}
-.allNews{
-	width: 790px;
-	float: left;
-	margin-left: 60px;
-	margin-top: -18px;
-}
-.allNews .newsNav{
-	width: 790px;
-	height: 35px;
-	margin-top: -10px;
-	cursor: pointer;
-}
-.allNews .newsNav .news-item{
-	width: 210px;
-	position: relative;
-	float: left;
-}
-.allNews div.news-item em{
-	display: inline-block;
-	width: 6px;
-	height: 30px;
-	font-style: normal;
-	background: #dcdcdc;
-}
-.allNews div.active em{
-	background: #408eff;
-}
-.allNews div.news-item span{
-	margin-left: 20px;
-	font-size: 24px;
-	font-style: normal;
-	color: #787878;
-	position: absolute;
-	top: -2px;
-	left: 6px;
-}
-.allNews div.active span{
-	color: #1e1e1e;
-}
-.allNews .trade-news h3{
-	font-size: 24px;
-	font-weight: bold;
-	color: #323232;
-	text-align:left;
-	margin: 20px 0;
-}
-.allNews .trade-news p{
-	font-size: 14px;
-	color: #626262;
-	text-indent: 2em;
-	margin: 32px 0;
-}
-.allNews .trade-news h5{
-	font-size: 16px;
-	color: #323232;
-	text-align: left;
-	margin: 32px 0;
-}
-	/*banner图*/
-#banner {
-	background: url("${CTPATH}/images/question/banner.jpg") no-repeat;
-	padding: 88px 0;
-	color: #fff;
-	background-size:100% 100%;
-	margin-top: -1px;
-}
-.banner .container{
-	text-align: center;
-	width: 1190px;
-	margin: 0 auto;
-}
-.banner h3 {
-	font-size: 60px;
-	color: #fff;
-	font-weight: bold;
-}
-.banner .news {
-	width: 250px;
-	height: 50px;
-	font-size: 18px;
-	color: #fff;
-	font-weight: normal;
-	line-height: 50px;
-	border: 1px solid #fff;
-	text-align: center;
-	margin: auto;
-	margin-top: 40px;
-}
+	.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="banner" class="banner">
-	<div class="container">
-		<h3>新闻中心</h3>
-		<div class="news">NEWS INFORMATION</div>
-	</div>
-</section>
 <section id="main">
 	<div class="container" style="background: #fff;">
 		<div class="section-item">
 			<ol class="breadcrumb-ol" disabled="breadcrumb">
-				<li>当前位置:</li>
 				<li><a href="${CPATH}/">首页</a></li>&nbsp;>&nbsp;
-				<li><a href="">关于我们</a></li>&nbsp;>&nbsp;
-				<li>新闻中心</li>
+				<li><a href="${CPATH}/news">新闻中心</a></li>&nbsp;>&nbsp;
+				<li>${content.title!}</li>
 			</ol>
+			<h3>新闻中心</h3>
 			<div class="content" style="padding: 15px 0 50px;">
 				<div class="row">
-					<div class="hots_news">
+					<div class="col-md-3">
 						<#include "_hot_news.html"/>
 					</div>
-					<div class="allNews">
-						<div class="newsNav">
-							<#list content.getTaxonomys() as tax>
-								<#if tax.slug == "companyDynamic">
-									<@jp.taxonomys module="news" orderBy="title asc">
-									<#list taxonomys as taxonomy>
-										<#if taxonomy.title == "公司动态">
-											<div class="news-item active"><em></em><span><a href="${taxonomy.url!}">公司动态</a></span></div>
-										</#if>
-										<#if taxonomy.title == "行业新闻">
-											<div class="news-item "><em></em><span><a href="${taxonomy.url!}">行业新闻</a></span></div>
-										</#if>
-									</#list>
-									</@jp.taxonomys>
-								<#elseif tax.slug == "tradeNews">
-									<@jp.taxonomys module="news" orderBy="title asc">
-									<#list taxonomys as taxonomy>
-										<#if taxonomy.title == "公司动态">
-											<div class="news-item "><em></em><span><a href="${taxonomy.url!}">公司动态</a></span></div>
-										</#if>
-										<#if taxonomy.title == "行业新闻">
-											<div class="news-item active"><em></em><span><a href="${taxonomy.url!}">行业新闻</a></span></div>
-										</#if>
-									</#list>
-									</@jp.taxonomys>
-								</#if>
-							</#list>
-						</div>
-						<!--公司动态-->
-						<div class="company-dynamic"></div>
-						<!--行业新闻-->
-						<div class="trade-news">
-							<h3> ${content.title}</h3>
-							<div class="info">
-								<span class="text-num"><img src="${CTPATH}/images/question/read.png" style="margin-left: 15px;"/> ${content.view_count!'0'}</span>
-								<span class="pull-left text-num">${(content.created?string("yyyy-MM-dd"))!''}</span>
-							</div>
-							<dev>
-								${content.text!}
-							</dev>
+					<div class="col-md-9">
+						<h3>${content.title!}</h3>
+						<p>
+							<span class="text-muted">时间 ${(content.created?string("yyyy-MM-dd HH:mm:ss"))!''}</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'} -->
+							</span>
+						</p>
+						<hr>
+						<div class="news-text">
+							${content.text!}
 						</div>
 						<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>-->
+					</div>
 				</div>
 			</div>
 		</div>

+ 29 - 56
jpress-web-template-usoftchina/src/main/webapp/templates/usoftchina/content_uuhelper.html

@@ -1,4 +1,3 @@
-<!--手机列表页-->
 <#if USER??> <#assign userId=USER.id><#else><#assign userId=0></#if>
 <!DOCTYPE html>
 <html>
@@ -6,6 +5,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{
@@ -132,6 +132,10 @@
             font-size: 14px;
             line-height: 70px;
         }
+        .main .container .footer .footer-section .img img{
+           max-width: 70px;
+            max-height: 70px;
+        }
         .main .container .footer .footer-section .img img.imgUas{
             max-width: 70px;
             max-height: 70px;
@@ -139,7 +143,6 @@
             margin: 0 auto;
         }
         .main .container .footer .footer-section .detail{
-            /*overflow: hidden;*/
         }
         .main .container .footer .footer-section .detail .title{
             overflow: hidden;
@@ -241,10 +244,8 @@
             color: #fff;
         }
     </style>
-    <!--<#macro script>-->
     <script>
     </script>
-    <!--</#macro>-->
 </head>
 <body>
 <div class="main">
@@ -258,8 +259,7 @@
             <div class="readCount">
                 <div>
                     <span>阅读 <em>${content.view_count!'0'}</em></span>
-                    <span><img img class="voteContent <#if content.isvoted(content.id, userId!0, userid!0)>voted</#if>" src="/jpress/static/jpress/admin/image/hands.png" alt="" onclick="voteContent(${content.id})"><em class="voteContentCount">${content.vote_up!'0'}</em></span>
-                    <!--<span><img src="/jpress/static/jpress/admin/image/support.png" alt=""/><em>1</em></span>-->
+                    <span><img img class="voteContent <#if content.isvoted(content.id, userId!0, userid!0)>voted</#if>" src="${CPATH}/static/jpress/admin/image/hands.png" alt="" onclick="voteContent(${content.id})"><em class="voteContentCount">${content.vote_up!'0'}</em></span>
                 </div>
                 <p>${(content.getMetadataByKey("copy_right"))!}</p>
             </div>
@@ -274,7 +274,7 @@
                     <input type="hidden" name="uuUserAvatar" value="${iconurl!}" >
 
                     <div class="footer-header">
-                        <div class="infoMessage"><span>写留言</span><img src="/jpress/static/jpress/admin/image/pen.png" alt=""/></div>
+                        <div class="infoMessage"><span>写留言</span><img src="${CPATH}/static/jpress/admin/image/pen.png" alt=""/></div>
                         <div class="writeMessage">
                             <textarea name="text" id="" cols="30" rows="10"></textarea>
                             <div><button class="cancel">取消</button><button type="submit">提交</button></div>
@@ -289,20 +289,25 @@
                         <div class="message">
                             <div class="left">
                                 <div class="img" >
-                                    <img src="${comment.uu_user_avatar!'/jpress/static/jpress/admin/image/dot.png'}" alt="用户头像">
+                                    <#if comment?? && comment.uu_user_avatar?? && comment.isImageExist(comment.uu_user_avatar)>
+                                        <img src="${(comment.uu_user_avatar)!}" alt="">
+                                    <#else>
+                                        <img src="${CPATH}/static/jpress/admin/image/defaultUuUserPhoto.png" alt="">
+                                    </#if>
+
                                 </div>
                             </div>
                             <div class="right">
                                 <div class="detail">
                                     <div class="title">
                                         <span>${comment.author!} <em>${(comment.created?string("yyyy-MM-dd"))!}</em></span>
-                                        <span><img class="votedUas${comment.id} <#if comment.isvoted(comment.id, userId!0, userid!0)>voted</#if>" src="/jpress/static/jpress/admin/image/hands.png" alt="" onclick="vote(${comment.id})"/><em class="em${comment.id}">${(comment.vote_up)!'0'}</em></span>
+                                        <span><img class="votedUas${comment.id} <#if comment.isvoted(comment.id, userId!0, userid!0)>voted</#if>" src="${CPATH}/static/jpress/admin/image/hands.png" alt="" onclick="vote(${comment.id})"/><em class="em${comment.id}">${(comment.vote_up)!'0'}</em></span>
                                     </div>
                                     <p>${comment.text!}</p>
                                     <#if comment.qc_content ??>
                                         <div class="title reply">
                                             <span>作者回复: <em>${(comment.qc_created?string("yyyy-MM-dd"))!}</em></span>
-                                            <span><img class="votedUas${comment.qc_id} <#if comment.isvoted(comment.qc_id, userId!0, userid!0)>voted</#if>" src="/jpress/static/jpress/admin/image/hands.png" alt="" onclick="vote(${comment.qc_id})"/><em class="em${comment.qc_id}">${(comment.qc_vote_up)!'0'}</em></span>
+                                            <span><img class="votedUas${comment.qc_id} <#if comment.isvoted(comment.qc_id, userId!0, userid!0)>voted</#if>" src="${CPATH}/static/jpress/admin/image/hands.png" alt="" onclick="vote(${comment.qc_id})"/><em class="em${comment.qc_id}">${(comment.qc_vote_up)!'0'}</em></span>
                                         </div>
                                         <p>${comment.qc_content!}</p>
                                     </#if>
@@ -314,79 +319,49 @@
                 </#if>
             </@jp.commentPage>
             </div>
-            <div class="loading"><img src="/jpress/static/jpress/admin/image/loading.png" alt="" class="loadingImg"></div>
+            <div class="loading"><img src="${CPATH}/static/jpress/admin/image/loading.png" alt="" class="loadingImg"></div>
             <div class="pull">下拉加载更多</div>
-            <!--<div class="pull"><a>没有更多数据了</a></div>-->
         </div>
     </div>
 </div>
 </body>
 <script>
     jQuery('html').css('fontSize',$(window).width()/640 * 30);
-//    jQuery(window).load(function () {
-//        jQuery("img").each(function () {
-//            DrawImage(this, 300, 300);
-//        });
-//    });
-//    function DrawImage(ImgD, FitWidth, FitHeight) {
-//        var image = new Image();
-//        image.src = ImgD.src;
-//        if (image.width > 0 && image.height > 0) {
-//            if (image.width / image.height >= FitWidth / FitHeight) {
-//                if (image.width > FitWidth) {
-//                    ImgD.width = FitWidth;
-//                    ImgD.height = (image.height * FitWidth) / image.width;
-//                } else {
-//                    ImgD.width = image.width;
-//                    ImgD.height = image.height;
-//                }
-//            } else {
-//                if (image.height > FitHeight) {
-//                    ImgD.height = FitHeight;
-//                    ImgD.width = (image.width * FitHeight) / image.height;
-//                } else {
-//                    ImgD.width = image.width;
-//                    ImgD.height = image.height;
-//                }
-//            }
-//        }
-//    }
-//    写留言
+
     $('.footer-header>div.infoMessage').click(function () {
         $(this).next('.writeMessage').toggle()
     })
-    //点击取消按钮
     $('.cancel').click(function () {
         $(this).parent().parent('.writeMessage').css('display','none');
         console.log($(this).parent().parent('.writeMessage'))
     })
-//    上拉加载更多
-    var aa = 2,
+    var aa = 1,
     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=3&pagenumber="+aa+"&userId=${userId!0}&uuUserId=${userid!0}", function(result){
             var dom = '';
             if ("" == result.message){
                 $('.pull').text("没有更多数据了");
                 $('.loading').css('display','none');
+                scrollResultMessage = "";
+
             }
             dom += result.message;
             $('.footer-section').append(dom);
         });
 
     };
-    //初始化
     var userId = null;
     var uuUserId = null;
     $(document).ready(function() {
         userId = "${userId!0}"
         uuUserId = "${userid!0}";
-        $('.voted').attr("src","/jpress/static/jpress/admin/image/support.png");
+        $('.voted').attr("src","${CPATH}/static/jpress/admin/image/support.png");
     });
-    //滚动加载方法
+
+    var scrollResultMessage = "初始化状态";
     $(window).scroll(function() {
-        if (($(window).height() + $(window).scrollTop() + 60) >= $(document).height()) {
+        if ("" != scrollResultMessage && ($(window).height() + $(window).scrollTop() + 60) >= $(document).height()) {
             clearTimeout(timers);
             timers = setTimeout(function() {
                 aa++;
@@ -396,36 +371,34 @@
         }
     });
 
-    //点评论赞
     var vote = function(commentid) {
         var imgObj = $(".votedUas"+commentid);
         var emObj = $(".em"+commentid);
         if (imgObj.hasClass("voted")) {
             emObj.text(""+(parseInt(emObj.text())-1));
             imgObj.removeClass("voted");
-            imgObj.attr("src","/jpress/static/jpress/admin/image/hands.png");
+            imgObj.attr("src","${CPATH}/static/jpress/admin/image/hands.png");
         } else {
             emObj.text(""+(parseInt(emObj.text())+1));
             imgObj.addClass("voted");
-            imgObj.attr("src","/jpress/static/jpress/admin/image/support.png")
+            imgObj.attr("src","${CPATH}/static/jpress/admin/image/support.png")
         }
         $.get("${CPATH}/comment/vote?comment_id="+commentid+"&user_id="+userId+"&uu_user_id="+uuUserId, function(result){
             console.log(result.message);
         });
     }
 
-    //点文章赞
     var voteContent = function(contentId) {
         var imgObj = $(".voteContent");
         var emObj = $(".voteContentCount");
         if (imgObj.hasClass("voted")) {
             emObj.text(""+(parseInt(emObj.text())-1));
             imgObj.removeClass("voted");
-            imgObj.attr("src","/jpress/static/jpress/admin/image/hands.png");
+            imgObj.attr("src","${CPATH}/static/jpress/admin/image/hands.png");
         } else {
             emObj.text(""+(parseInt(emObj.text())+1));
             imgObj.addClass("voted");
-            imgObj.attr("src","/jpress/static/jpress/admin/image/support.png")
+            imgObj.attr("src","${CPATH}/static/jpress/admin/image/support.png")
         }
         $.get("${CPATH}/c/vote?content_id="+contentId+"&user_id="+userId+"&uu_user_id="+uuUserId, function(result){
             console.log(result.message);

+ 0 - 245
jpress-web-template-usoftchina/src/main/webapp/templates/usoftchina/page_version.html

@@ -1,245 +0,0 @@
-<#include "_layout.html"/>
-<#macro css>
-    #banner {
-    background: #1c863c;
-    padding: 88px 0;
-    height: 440px;
-    color: #fff;
-    background-size:100% 100%;
-    }
-    .banner .container{
-    text-align: center;
-    width: 1190px;
-    }
-    .banner .text-info{
-    margin-top: 75px;
-    float: left;
-    text-align: left;
-    }
-    .banner .text-info h3 {
-    font-size: 48px;
-    color: #fff;
-    font-weight: bold;
-    }
-    .banner .text-info h4 {
-    margin-top: 34px;
-    font-size: 24px;
-    color: #fff;
-    font-weight: bold;
-    line-height: 30px;
-    }
-    .banner img{
-    float: right;
-    margin-top: -280px;
-    }
-    /*section-main*/
-    #main {
-    width: 100%;
-    text-align: center;
-    margin: 0 auto;
-    text-align: center;
-    }
-    .section-item .content {
-    display: inline-block;
-    width: 1190px;
-    text-align: center;
-    overflow: hidden;
-    }
-    .breadcrumbs .content{
-    text-align: left;
-    }
-    .breadcrumbs ul{
-    overflow: hidden;
-    display: inline-block;
-    text-align: left;
-    }
-    .breadcrumbs ul li{
-    float: left;
-    margin-right: 5px;
-    height: 68px;
-    line-height: 68px;
-    }
-    .breadcrumbs ul li a{
-    color: #1b1b1b;
-    }
-    .section-item h3{
-    font-size: 24px;
-    color: #1b1b1b;
-    padding-top: 50px;
-    }
-    .version h3{
-    font-size: 18px;
-    font-weight: bold;
-    color: #3c54ca;
-    padding-top: 0;
-    }
-    .version .content p{
-    font-size: 14px;
-    color: #787878;
-    margin: 15px 0;
-    }
-    .section1 h3{
-    padding-top: 0;
-    }
-    .section-item .content .left-txt{
-    width: 550px;
-    text-align: left;
-    }
-    .section-item .content .left-txt li{
-    font-size: 14px;
-    margin-bottom: 34px;
-    text-align: left;
-    }
-    .section-item .content .left-txt li a{
-    color: #1e1e1e;
-    }
-    .section-item .content .right-img{
-    float: right;
-    width: 500px;
-    }
-    .section2 {
-    background: #f8f8f8;
-    }
-    .section2 .content .detail{
-    border-bottom: 1px solid #dcdcdc;
-    padding-bottom: 100px;
-    }
-    .section2 .content .detail:last-child{
-    border-bottom: none;
-    }
-    .section2 .content .left-txt h4{
-    margin: 40px 0;
-    font-size: 18px;
-    color: #1e1e1e;
-    }
-    .section2 .content .left-txt p{
-    margin: 30px 0 50px 0;
-    font-size: 14px;
-    color: #1e1e1e;
-    text-indent: 2em;
-    }
-    .section3 .content{
-    margin-bottom: 85px;
-    }
-    .section3 h3{
-    padding: 10px 0 30px 0;
-    }
-    .section3 .content .version-list{
-    margin-bottom: 20px;
-    padding: 10px;
-    width: 1140px;
-    height: 120px;
-    border:1px solid #dcdcdc;
-    }
-    .section3 .content .version-list:hover{
-    border: 1px solid #226ea2;
-    cursor: pointer ;
-    }
-    .section3 .content .version-list:hover p{
-    color: #464646;
-    }
-    .section3 .content .version-list div{
-    text-align: left;
-    }
-    .section3 .content .version-list div span{
-    font-weight: bold;
-    font-size: 14px;
-    color:#205cca;
-    margin-right: 20px;
-    }
-    .section3 .content .version-list div em{
-    font-style: normal;
-    font-size: 14px;
-    color:#787878;
-    }
-    .section3 .content .version-list p{
-    margin: 20px 0 10px 0;
-    padding: 0 50px;
-    font-size: 14px;
-    color:#787878;
-    line-height: 30px;
-    text-align: left;
-    overflow: hidden;
-    word-break: break-all;
-    text-overflow: ellipsis;
-    display: -webkit-box;
-    -moz-box-orient: vertical;
-    -moz-line-clamp: 2;
-    -webkit-box-orient: vertical;
-    -webkit-line-clamp: 2;
-    -o-box-orient: vertical;
-    -o-line-clamp: 2;
-    }
-</#macro>
-<@layout>
-<section id="banner" class="banner">
-    <div class="container">
-        <div class="text-info">
-            <h3>升级公告</h3>
-            <h4>UPDATE ANNOUNCEMENT</h4>
-        </div>
-        <img src="${CTPATH}/images/question/pic3.png" alt="">
-    </div>
-</section>
-<!-- main 主内容 -->
-<section id="main" class="clearfix">
-    <div class="section-item breadcrumbs">
-        <div class="content">
-            <ul>
-                <li><a>当前位置:</a></li>
-                <li><a href="${CPATH}/">首页&nbsp;&gt;</a></li>
-                <li><a href="">服务中心&nbsp;&gt;</a></li>
-                <li><a>升级公告</a></li>
-            </ul>
-        </div>
-    </div>
-    <div class="section-item version">
-        <div class="content">
-            <h3>系统版本 UAS1.2</h3>
-            <p>2017-06-17</p>
-        </div>
-    </div>
-    <div class="section-item section1">
-        <h3>升级概要</h3>
-        <div class="content">
-            <div class="left-txt">
-                <ul>
-                    <li><a href="">1、能否跨域使用?</a></li>
-                </ul>
-            </div>
-        </div>
-    </div>
-    <div class="section-item section2">
-        <h3>升级详情</h3>
-        <div class="content">
-            <div class="detail">
-                <div class="left-txt">
-                    <h4>1、库存新增成本核算功能,更能精准化和合理管理存货的库存成本和发出成本。</h4>
-                    <p>更加精准化管理库存新增成本核算功能,更能精准化和合理管理存货的库存成本和发出成本库存新增成本核算功能,更能精准化和合理管理存货的库存成本和发出成本库存新增成本核算功能,更能精准化和合理管理存货的库存成本和发出成本</p>
-                </div>
-                <div class="right-img">
-                    <img src="" alt="">
-                </div>
-            </div>
-            <div class="detail">
-                <div class="left-txt">
-                    <h4>1、库存新增成本核算功能,更能精准化和合理管理存货的库存成本和发出成本。</h4>
-                    <p>更加精准化管理库存新增成本核算功能,更能精准化和合理管理存货的库存成本和发出成本库存新增成本核算功能,更能精准化和合理管理存货的库存成本和发出成本库存新增成本核算功能,更能精准化和合理管理存货的库存成本和发出成本</p>
-                </div>
-                <div class="right-img">
-                    <img src="" alt="">
-                </div>
-            </div>
-        </div>
-    </div>
-    <div class="section-item section3">
-        <h3>历史版本</h3>
-        <div class="content">
-            <div class="version-list">
-                <div><span>UAS管理系统 1.1版本</span><em>2017-02-01</em></div>
-                <p>1、库存新增成本核算功能,更能精准化和合理管理存货的库存成本和发出成本加精准化管理库存新增成本。2、核算功能,更能精准化和合理管理存货的库存成本和发出成.3、库存新增成本核算功能,更能精准化和合理管理存货的库存成本和发出成本加精准化管理库存新增成本。4、核算功能,更能精准化和合理管理存货的库</p>
-            </div>
-        </div>
-    </div>
-</section>
-</@layout>

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

@@ -1,383 +1,131 @@
 <#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 title = $('.news-detail h3>a');
-	var titleDetail = title.text().slice(0,52)+'...';
-	if (title.text().length>52){
-		title.text(titleDetail);
-	}else{
-		title.text();
+	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 content = $('.news-detail p');
-	var contentDetail = content.text().slice(0,100)+'...';
-	content.text(contentDetail);*/
-
+	});
 	});
 </#macro>
 <#macro css>
 </#macro>
 <@layout>
 <style>
-	#banner {
-		background: url("${CTPATH}/images/question/banner1.jpg") no-repeat;
-		padding: 88px 0;
-		color: #fff;
-		background-size:100% 100%;
-		margin-top: -1px;
-	}
-	.banner .container{
-		text-align: center;
+	.section-item{
 		width: 1190px;
-		margin: 0 auto;
-	}
-	.banner h3 {
-		font-size: 60px;
-		color: #fff;
-		font-weight: bold;
-	}
-	.banner .news {
-		width: 250px;
-		height: 50px;
-		font-size: 18px;
-		color: #fff;
-		font-weight: normal;
-		line-height: 50px;
-		border: 1px solid #fff;
-		text-align: center;
-		margin: auto;
-		margin-top: 40px;
-	}
-
-.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: 200px;
-	max-height: 160px;
-}
-
-.thumbnail-height {
-	width: 160px;
-	opacity: 1;
-	overflow: hidden;
-}
-
-.thumbnail-height img {
-	max-height: 100px;
-}
-
-.thumbnail-news {
-	width: 160px;
-	height: 100px;
-	opacity: 0;
-	overflow: hidden;
-}
-	.breadcrumb-ol ul{
-		list-style: none;
-	}
-	.breadcrumb-ol li{
-		color: #1e1e1e;
-		height: 68px;
-		line-height: 68px;
 	}
-	.breadcrumb-ol li a{
-		color: #1e1e1e;
+	.section-item .content{
+		margin-bottom: 60px;
 	}
-
-	/*公司动态行业新闻*/
-	.hots_news{
-		float: left;
-		margin-top: -30px;
-        width: 300px;
+	.news {
+		display: table;
 	}
-	.allNews{
-		width: 790px;
-		float: left;
-		margin-left: 100px;
-		margin-top: -18px;
+	.new {
+		display: table-row;
 	}
-	.allNews .tradeNews .news-time {
-		position: relative;
+	.new>div {
+		display: table-cell;
+		vertical-align: middle;
+		padding: 15px;
+		border-bottom: 1px solid #ccc;
 	}
-	p.years{
-		font-size: 36px;
-		color: #626262;
-		font-weight: bold;
-		margin: 80px 0 22px 0;
+	.new h5 {
+		font-size: 16px;
+		font-weight: 600;
 	}
-	.tradeNews{
+	.thumbnail-width {
+		height: 100px;
+		opacity: 1;
 		overflow: hidden;
-		margin-top: 50px;
-	}
-	.allNews .newsNav{
-		height: 35px;
-		width: 790px;
-		margin-top: -10px;
-		cursor: pointer;
 	}
-	.allNews .newsNav .news-item{
-		width: 210px;
-		position: relative;
-		float: left;
-	}
-	.allNews div.news-item em{
-		display: inline-block;
-		width: 6px;
-		height: 30px;
-		font-style: normal;
-		background: #dcdcdc;
-	}
-	.allNews div.active em{
-		background: #408eff;
+
+	.thumbnail-width img {
+		max-width: 160px;
 	}
-	.allNews div.news-item span{
-		margin-left: 20px;
-		font-size: 24px;
-		font-style: normal;
-		color: #787878;
-		position: absolute;
-		top: -2px;
-		left: 6px;
+
+	.thumbnail-height {
+		width: 160px;
+		opacity: 1;
+		overflow: hidden;
 	}
-	.allNews div.active span{
-		color: #1e1e1e;
+
+	.thumbnail-height img {
+		max-height: 100px;
 	}
-	.allNews .news-time{
-		float: left;
-		width: 90px;
+
+	.thumbnail-news {
+		width: 160px;
 		height: 100px;
-		background: #626262;
-	}
-	.allNews .news-time>div{
-		position: absolute;
-		top: 15px;
-		left: 25px;
-		color: #fff;
-		font-weight: bold;
-	}
-	.allNews .news-time h3{
-		font-size: 30px;
-	}
-	.allNews .news-time h4{
-		font-size: 20px;
-		margin-top: 10px;
-	}
-	.allNews .thumbnail-img{
-		float: left;
-		margin-right: 40px;
-		line-height: 23px;
-		width: 200px;
-		height: 170px;
-	}
-	.allNews .news-detail{
-		width: 460px;
-		float: left;
-	}
-	.allNews .news-detail h3{
-		width: 460px;
+		opacity: 0;
 		overflow: hidden;
-        line-height: 23px;
-		font-size: 18px;
-		font-weight: bold;
-		color: #323232;
-
-		word-break: break-all;
-		text-overflow: ellipsis;
-		display: -webkit-box;
-		-moz-box-orient: vertical;
-		-moz-line-clamp: 2;
-		-webkit-box-orient: vertical;
-		-webkit-line-clamp: 2;
-		-o-box-orient: vertical;
-		-o-line-clamp: 2;
-	}
-	.allNews .news-detail h3 a{
-		color: #323232;
-	}
-	.allNews .news-detail p{
-        width: 460px;
-        overflow: hidden;
-        line-height: 23px;
-        font-size: 14px;
-        color: #787878;
-        margin: 20px 0 20px 0;
-		word-break: break-all;
-		text-overflow: ellipsis;
-		display: -webkit-box;
-		-moz-box-orient: vertical;
-		-moz-line-clamp: 3;
-		-webkit-box-orient: vertical;
-		-webkit-line-clamp: 3;
-		-o-box-orient: vertical;
-		-o-line-clamp: 3;
-    }
-	.tradeNews:hover{
-		cursor: pointer;
-	}
-	.tradeNews:hover .news-time{
-		background: #408eff;
-	}
-	.tradeNews:hover .news-detail h3 a{
-		color: #2867c2;
 	}
 </style>
-<section id="banner" class="banner">
-	<div class="container">
-		<h3>新闻中心</h3>
-		<div class="news">NEWS INFORMATION</div>
-	</div>
-</section>
 <section id="main">
 	<div class="container" style="background: #fff;">
 		<div class="section-item">
 			<ol class="breadcrumb-ol" disabled="breadcrumb">
-				<li>当前位置:</li>
 				<li><a href="${CPATH}/">首页</a></li>&nbsp;>&nbsp;
-				<li><a href="about">关于我们</a></li>&nbsp;>&nbsp;
 				<li>新闻中心</li>
 			</ol>
-			<!--<h3>新闻中心</h3>-->
+			<h3>新闻中心</h3>
 			<div class="content" style="padding: 15px 0 50px;">
-				<div class="hots_news">
-					<#include "_hot_news.html"/>
-				</div>
-				<div class="allNews">
-					<div class="newsNav">
-						<@jp.taxonomys module="news" orderBy="title asc">
-						<#list taxonomys as taxonomy>
-							<#if taxonomy.title == "公司动态">
-								<div class="news-item <#if ((REQUEST.requestURI?contains(taxonomy.slug)) == (taxonomy.url?contains(taxonomy.slug)))>active</#if>"><em></em><span><a href="${taxonomy.url!}">公司动态</a></span></div>
-							</#if>
-							<#if taxonomy.title == "行业新闻">
-								<div class="news-item <#if ((REQUEST.requestURI?contains(taxonomy.slug)) == (taxonomy.url?contains(taxonomy.slug)))>active</#if>"><em></em><span><a href="${taxonomy.url!}">行业新闻</a></span></div>
-							</#if>
-						</#list>
-						</@jp.taxonomys>
+				<div class="row">
+					<div class="col-md-3">
+						<#include "_hot_news.html"/>
 					</div>
-					<@jp.contentPage pageSize="10" orderBy="created desc">
-					<!--行业新闻-->
-					<div class="trade-news">
-						<#list page.getList() as content>
-							<div class="tradeNews">
-								<div class="news-time">
+					<@jp.contentPage>
+					<div class="col-md-9">
+						<h4><span class="label label-primary">新</span> 新闻资讯</h4>
+						<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>
+									</div>
 									<div>
-										<h3>${(content.created?string("dd"))!''}</h3>
-										<h4>
-											<#if content.created?string("MM") ??>
-												<#switch content.created?string("MM")>
-												  <#case "01">
-													  Jan
-												      <#break>
-												  <#case "02">
-													  Feb
-												      <#break>
-												  <#case "03">
-													  Mar
-											          <#break>
-												  <#case "04">
-													  Apr
-											          <#break>
-												  <#case "05">
-													  May
-											          <#break>
-												  <#case "06">
-													  June
-											          <#break>
-												  <#case "07">
-													  July
-												      <#break>
-												  <#case "08">
-													  Aug
-												       <#break>
-												  <#case "09">
-													  Sept
-											          <#break>
-												  <#case "10">
-													  Oct
-											          <#break>
-												  <#case "11">
-													  Nov
-											          <#break>
-												  <#case "12">
-													  Dec
-											          <#break>
-												</#switch>
-											</#if>
-										</h4>
+										<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'} -->
+										</span>
+										</div>
 									</div>
 								</div>
-								<div class="thumbnail-img">
-										<img class="content-thumbnail" src="${content.thumbnail!(CTPATH+'/images/artitle_img_no.jpg')}" alt="">
-								</div>
-								<div class="news-detail">
-									<h3><a href="${content.url!}">${content.title!}</a></h3>
-									<p>${content.summary!}</p>
-									<span class="pull-left text-num"><img src="${CTPATH}/images/question/read.png" style="padding-right: 10px;"/>${content.view_count!'0'}</span>
-								</div>
-							</div>
-
-							<#if content_has_next>
-								<#if contents[content_index+1].created?string("yy") != content.created?string("yy")>
-									<!--年份分割线-->
-									<p class="years">${contents[content_index+1].created?string("yy")}年</p>
-								</#if>
-							</#if>
-						</#list>
-						<div style="padding: 15px;margin: 30px 0 70px 0;">
+							</#list>
+						</div>
+						<div style="padding: 15px;">
 							<span class="pull-left" style="line-height: 30px;">共 <span class="text-mun">${page.totalRow!'0'}</span> 条</span>
 							<div class="btn-group btn-group-sm pull-right" style="display: inline-block;">
-								<a type="button" <#if page.isFirstPage()> disabled="disabled"</#if> class="btn btn-default" href="${CPATH}/news-${taxonomy.slug!}"><i class="fa fa-angle-double-left"></i> 首页</a>
-								<a type="button" <#if page.isFirstPage()> disabled="disabled"</#if> class="btn btn-default" href="${CPATH}/news-${taxonomy.slug!}-${page.pageNumber - 1}">&lt; 上一页</a>
+								<a type="button" <#if page.isFirstPage()> disabled="disabled"</#if> class="btn btn-default" href="${CPATH}/news"><i class="fa fa-angle-double-left"></i> 首页</a>
+								<a type="button" <#if page.isFirstPage()> disabled="disabled"</#if> class="btn btn-default" href="${CPATH}/news-${page.pageNumber - 1}">&lt; 上一页</a>
 								<a type="button" disabled="disabled" class="btn btn-default">第 <span class="text-mun">${page.pageNumber!'0'}</span> 页</a>
-								<a type="button" <#if page.isLastPage()> disabled="disabled"</#if> class="btn btn-default" href="${CPATH}/news-${taxonomy.slug!}-${page.pageNumber + 1}">下一页 &gt;</a>
-								<a type="button" <#if page.isLastPage()> disabled="disabled"</#if> class="btn btn-default" href="${CPATH}/news-${taxonomy.slug!}-${page.totalPage!'0'}">尾页 <i class="fa fa-angle-double-right"></i></a>
+								<a type="button" <#if page.isLastPage()> disabled="disabled"</#if> class="btn btn-default" href="${CPATH}/news-${page.pageNumber + 1}">下一页 &gt;</a>
+								<a type="button" <#if page.isLastPage()> disabled="disabled"</#if> class="btn btn-default" href="${CPATH}/news-${page.totalPage!'0'}">尾页 <i class="fa fa-angle-double-right"></i></a>
 							</div>
 						</div>
 					</div>
-				</@jp.contentPage>
-				</div>
+				</@jp.contentPage >
 			</div>
 		</div>
 	</div>
+	</div>
 </section>
 </@layout>

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.