feat(templates): 新增绿色主题模版,并设置为默认模版

和文档站点 docs.xxyopen.com 风格保持一致
This commit is contained in:
xiongxiaoyang
2023-10-13 21:21:21 +08:00
parent 00179359bd
commit 255b3f8c4b
575 changed files with 72292 additions and 955 deletions

View File

@ -0,0 +1,112 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link},~{})">
<title th:text="'新闻公共_'+${application.website.name}"></title>
<meta name="keywords" content="新闻公告,小说,小说网,言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,原创网络文学"/>
<meta name="description"
th:content="${application.website.name}+'小说每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+${application.website.name}+'小说!'"/>
<link rel="stylesheet" href="/css/about.css"/>
</head>
<body class="body">
<div th:replace="common/top :: top('')">
</div>
<!--主体 start-->
<div class="main box_center cf">
<div class="my_r" style="width: 960px">
<div class="newsBox">
<ul class="news_list" id="newsList">
</ul>
</div>
<div class="pageBox cf" id="newsPage">
</div>
</div>
</div>
<!--主体 end-->
<div th:replace="common/footer :: footer">
</div>
v
<div th:replace="common/js :: js"></div>
<script src="/javascript/bookdetail.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
search(1, 5);
function search(curr, limit) {
$.ajax({
type: "get",
url: "/news/listByPage",
data: {'curr': curr, 'limit': limit},
dataType: "json",
success: function (data) {
if (data.code == 200) {
var newsList = data.data.list;
if (newsList.length > 0) {
var newsListHtml = "";
for (var i = 0; i < newsList.length; i++) {
var news = newsList[i];
newsListHtml += (" <li>\n" +
" <h5><i class=\"dot\"></i><a href=\"newsInfo-" + news.id + ".html\" >" + news.title + "</a></h5>\n" +
" <p>" + news.createTime + "</p>\n" +
" </li>");
}
$("#newsList").html(newsListHtml);
layui.use('laypage', function () {
var laypage = layui.laypage;
//执行一个laypage实例
laypage.render({
elem: 'newsPage' //注意,这里的 test1 是 ID不用加 # 号
, count: data.data.total //数据总数,从服务端得到,
, curr: data.data.pageNum
, limit: data.data.pageSize
, jump: function (obj, first) {
//obj包含了当前分页的所有参数比如
console.log(obj.curr); //得到当前页,以便向服务端请求对应页的数据。
console.log(obj.limit); //得到每页显示的条数
//首次不执行
if (!first) {
search(obj.curr, obj.limit);
} else {
}
}
});
});
}
} else {
layer.alert(data.msg);
}
},
error: function () {
layer.alert('网络异常');
}
})
}
</script>
</body>
</html>

View File

@ -0,0 +1,41 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link},~{})">
<title th:text="'新闻公告_'+${application.website.name}"></title>
<meta name="keywords" content="新闻公告,小说,小说网,言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,原创网络文学"/>
<meta name="description" th:content="${application.website.name}+'小说每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+${application.website.name}+'小说!'" />
<link rel="stylesheet" href="/css/about.css" />
</head>
<body class="body">
<div th:replace="common/top :: top('')">
</div>
<input type="hidden" id="newsId" th:value="${news.id}"/>
<div class="main box_center cf">
<div class="newsMain cf">
<div class="nav_sub">
当前位置:<a href="/" > 首页 </a> &gt; <a href="/about/news.html" > 新闻公告 </a> &gt; <span th:utext="${news.title}"> </span>
</div>
<div class="channelWrap channelNews cf">
<div class="news_title">
<h2 th:utext="${news.title}"></h2>
<!--while [[...]] corresponds to th:text (i.e. result will be HTML-escaped), [(...)] corresponds to th:utext-->
<p class="from">来源:[[${news.sourceName}]] <span class="time" th:text="'时间'+${#dates.format(news.createTime, 'yy-MM-dd')}"></span> <span class="time" th:text="'阅读量'+${news.readCount}"></span></p>
</div>
<div class="news_info" th:utext="${news.content}">
</div>
</div>
</div>
</div>
<div th:replace="common/footer :: footer">
</div>
</body>
<div th:replace="common/js :: js"></div>
<script src="/javascript/bookdetail.js" type="text/javascript"></script>
<script type="text/javascript">
$.post("/news/addReadCount", {"newsId": $("#newsId").val()}, function () {
});
</script>
</html>