Commit e1dfa7b1 by 侯昆

添加视频

1 parent aeb21d9d
......@@ -29,7 +29,7 @@ public class HtmlHelper {
}
public static List<List<String>> paraphBriefToHtml(List<String> brief) {
List<List<String>> partition = Lists.partition(brief, 3);
List<List<String>> partition = Lists.partition(brief, brief.size() % 2 == 0 ? brief.size() /2 : brief.size()/2 + 1 );
List<List<String>> collect = partition.stream().map(
g -> g.stream()
.map(b -> {
......
......@@ -15,14 +15,14 @@
<div class="header-main-left">
<h1>${vo.word}</h1>
<div class="header-main-desc clear">
<div class="word-read pt-0">
<c:forEach var="item" items="${vo.spell}">
<span>【${item}】</span>
<a class="link js-play-voice" href="javascript:;">
<i class="icon icon-shengyin"></i>
</a>
</c:forEach>
</div>
<%--<div class="word-read pt-0">--%>
<%--<c:forEach var="item" items="${vo.spell}">--%>
<%--<span>【${item}】</span>--%>
<%--<a class="link js-play-voice" href="javascript:;">--%>
<%--<i class="icon icon-shengyin"></i>--%>
<%--</a>--%>
<%--</c:forEach>--%>
<%--</div>--%>
<h4>${vo.description}</h4>
</div>
</div>
......@@ -39,7 +39,7 @@
</div>
<c:if test="${vo.brief.size() > 0}">
<div class="row encyclopedias">
<c:forEach var="group" items="<%=Lists.partition(HtmlHelper.baikeBreifToHtml(vo.getBrief()), 7)%>">
<c:forEach var="group" items="<%=Lists.partition(HtmlHelper.baikeBreifToHtml(vo.getBrief()), vo.getBrief().size() % 2 == 0 ? vo.getBrief().size() / 2 : vo.getBrief().size()/2 + 1)%>">
<div class="col-sm-6">
<table>
<tbody>
......@@ -81,7 +81,7 @@
<div class="row list-img">
<c:forEach items="${group}" var="item">
<div class="col-sm-3">
<a>
<a href="/video?file=${item.file}">
<img class="img-fluid" src="${item.file}">
</a>
</div>
......
<%@ page import="com.alibaba.fastjson.JSON" %>
<%@ page import="com.dookay.cihai.app.helper.HtmlHelper" %>
<%@ page import="com.google.common.collect.Lists" %>
<%@ include file="/WEB-INF/jsp/include/taglib.jsp" %>
......@@ -24,13 +23,21 @@
</div>
<div class="header-main-right">
<div class="word-read">
<c:forEach var="item" items="${vo.spell}">
<span>【${item}】</span>
<c:if test="${vo.word eq '象'}">
<span>【xiàng】</span>
<a class="link js-play-voice" href="javascript:;">
<i class="icon icon-shengyin"></i>
</a>
</c:forEach>
</c:if>
</div>
<%--<div class="word-read">--%>
<%--<c:forEach var="item" items="${vo.spell}">--%>
<%--<span>【${item}】</span>--%>
<%--<a class="link js-play-voice" href="javascript:;">--%>
<%--<i class="icon icon-shengyin"></i>--%>
<%--</a>--%>
<%--</c:forEach>--%>
<%--</div>--%>
<c:if test="${vo.brief.size()>0}">
<table>
<tbody>
......@@ -48,10 +55,10 @@
<div class="clear collapse-wrapper">
<div class="collapse" id="header-main-collapse-1">
<img class="img-fluid" src="/static/images/xiang-ziyuan-1.png">
<img class="img-fluid" src="images/xiang-ziyuan-2.png">
<img class="img-fluid" src="/static/images/xiang-ziyuan-2.png">
</div>
<div class="collapse" id="header-main-collapse-2">
<img class="img-fluid" src="/staticimages/xiang-shufa-1.png">
<img class="img-fluid" src="/static/images/xiang-shufa-1.png">
</div>
</div>
</div>
......
......@@ -16,12 +16,20 @@
<h1>${vo.word}</h1>
<div class="header-main-desc clear">
<div class="word-read pt-0">
<c:if test="${vo.spell.length() > 0}">
<span>【 <c:forEach var="item" items="${vo.spell}"> ${item} </c:forEach> 】</span>
<c:choose>
<c:when test="${vo.word eq '中华人民共和国'}">
<span>【Zhōnghuá Rénmín Gònghéguó】</span>
<a class="link js-play-voice" href="javascript:;">
<i class="icon icon-shengyin"></i>
</a>
</c:if>
</c:when>
</c:choose>
<%--<c:if test="${vo.spell.length() > 0}">--%>
<%--<span>【 <c:forEach var="item" items="${vo.spell}"> ${item} </c:forEach> 】</span>--%>
<%--<a class="link js-play-voice" href="javascript:;">--%>
<%--<i class="icon icon-shengyin"></i>--%>
<%--</a>--%>
<%--</c:if>--%>
</div>
<h4>${vo.description}</h4>
</div>
......@@ -39,7 +47,7 @@
</div>
<c:if test="${vo.brief.size() > 0}">
<div class="row encyclopedias">
<c:forEach var="group" items="<%=Lists.partition(HtmlHelper.baikeBreifToHtml(vo.getBrief()), 7)%>">
<c:forEach var="group" items="<%=Lists.partition(HtmlHelper.baikeBreifToHtml(vo.getBrief()), vo.getBrief().size() % 2 == 0 ? vo.getBrief().size() / 2 : vo.getBrief().size()/2 + 1)%>">
<div class="col-sm-6">
<table>
<tbody>
......@@ -610,14 +618,13 @@
</c:if>
</div>
</c:if>
<c:if test="${vo.videos.size() > 0}">
<div class="tab-pane" id="content-detail-tab-1" role="tabpanel">
<c:forEach items="<%=Lists.partition(vo.getVideos(), 4)%>" var="group">
<div class="row list-img">
<c:forEach items="${group}" var="item">
<div class="col-sm-3">
<a>
<a href="/video/file=${item.file}">
<img class="img-fluid" src="${item.file}">
</a>
</div>
......
......@@ -16,14 +16,14 @@
<div class="header-main-left">
<h1>${vo.word}</h1>
<div class="header-main-desc">
<div class="word-read">
<c:if test="${vo.spell.length() > 0}">
<span>【 <c:forEach var="item" items="${vo.spell}"> ${item} </c:forEach> 】</span>
<a class="link js-play-voice" href="javascript:;">
<i class="icon icon-shengyin"></i>
</a>
</c:if>
</div>
<%--<div class="word-read">--%>
<%--<c:if test="${vo.spell.length() > 0}">--%>
<%--<span>【 <c:forEach var="item" items="${vo.spell}"> ${item} </c:forEach> 】</span>--%>
<%--<a class="link js-play-voice" href="javascript:;">--%>
<%--<i class="icon icon-shengyin"></i>--%>
<%--</a>--%>
<%--</c:if>--%>
<%--</div>--%>
<%--<h4>长鼻目象科哺乳动物</h4>--%>
</div>
</div>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!