1
0
mirror of https://gitee.com/bookshelfplus/bookshelfplus synced 2025-09-02 23:23:28 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

后台标题小调整

This commit is contained in:
2022-04-02 23:21:50 +08:00
parent a71cbf352a
commit f2f4846437
4 changed files with 16 additions and 9 deletions

View File

@@ -70,15 +70,15 @@ router.get('/dashboard/:group/:page', function (req, res) {
{
name: "仪表盘",
url: "/dashboard/admin/index"
}, {
name: "用户管理",
url: "/dashboard/admin/UserManage"
}, {
name: "书籍管理",
url: "/dashboard/admin/BookManage"
}, {
name: "分类管理",
url: "/dashboard/admin/CategoryManage"
}, {
name: "用户管理",
url: "/dashboard/admin/UserManage"
}
];
} else if (req.params.group === "user") {
@@ -101,6 +101,7 @@ router.get('/dashboard/:group/:page', function (req, res) {
res.render(`dashboard/${req.params.group}/index`, {
title: getPageTitle(req.params.group === "admin" ? "后台管理" : "用户中心"),
headText: req.params.group === "admin" ? "后台管理" : "用户中心",
headSubTextArr: {},
links: navbarLinks,
group: req.params.group,
page: req.params.page,
@@ -113,7 +114,15 @@ router.get('/dashboard/:group/:page', function (req, res) {
(req.params.group === "user" && ["myBookshelf", "myCollection"].indexOf(req.params.page) > -1)) {
res.render(`dashboard/${req.params.group}/manage`, {
title: getPageTitle(req.params.group === "admin" ? "后台管理" : "用户中心"),
headText: req.params.group === "admin" ? "后台管理" : "用户中心",
headSubTextArr: {
// 管理员
"UserManage": "用户管理",
"BookManage": "书籍管理",
"CategoryManage": "分类管理",
// 用户
"myBookshelf": "我的书架",
"myCollection": "我的收藏",
},
links: navbarLinks,
group: req.params.group,
page: req.params.page,

View File

@@ -35,8 +35,7 @@
<body>
<%- include("../component/navbar.html"); %>
<main class="main">
<h1><%= headText %></h1>
<p><%= page %></p>
<h1><%= headSubTextArr[page] || page %></h1>
<div id="container">
<div id="container-controls">页面加载中,请稍候 ...</div>
<div id="container-submit">

View File

@@ -2,7 +2,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title><%= title %></title>
<title><%= headSubTextArr[page] || title %></title>
<link rel="stylesheet" href="/assets/stylesheets/style.css">
<script src="/assets/lib/jquery/3.6.0/jquery.min.js"></script>

View File

@@ -7,10 +7,9 @@
<body>
<%- include("../component/navbar.html"); %>
<main class="main">
<h1><%= headText %></h1>
<h1><%= headSubTextArr[page] || page %></h1>
<div id="container">
<div>
<%= typeof title !=='undefined' ? page : "出错啦"; %>
</div>
</div>
</main>