From 5d38fb5f0d8e94dc9425f71862a59ceb3c526dfd Mon Sep 17 00:00:00 2001
From: 1549469775 <1549469775@qq.com>
Date: Fri, 22 Jul 2022 12:05:03 +0800
Subject: [PATCH] ff
---
route.txt | 4 ++--
source/plugins/index.ts | 2 +-
template/helper/flush.pug | 1 +
template/helper/form_security.pug | 2 ++
template/helper/helper.pug | 4 ++++
template/helper/rain.pug | 1 +
template/helper/ui.pug | 6 +-----
template/layout/layout.pug | 1 +
template/views/about.pug | 6 ++++++
template/views/include/form_security.pug | 2 --
template/views/index.pug | 2 +-
template/views/login.pug | 4 ++--
12 files changed, 22 insertions(+), 13 deletions(-)
create mode 100644 template/helper/form_security.pug
create mode 100644 template/helper/helper.pug
delete mode 100644 template/views/include/form_security.pug
diff --git a/route.txt b/route.txt
index e994c36..0abea62 100644
--- a/route.txt
+++ b/route.txt
@@ -1,4 +1,4 @@
-/home/topuser/桌面/demo/hapi-demo/source/route/api对应路径:
+D:\1XYX\demo\hapi-demo\source\route\api对应路径:
不需权限 : GET /api/{path*}
需要权限 : GET /api/v1/upload
需要权限 : POST /api/v1/upload/upload
@@ -7,7 +7,7 @@
不需权限 : POST /api/v1/user/login
需要权限 : DELETE /api/v1/user/del
需要权限 : GET /api/v1/user/userinfo
-/home/topuser/桌面/demo/hapi-demo/source/route/views对应路径:
+D:\1XYX\demo\hapi-demo\source\route\views对应路径:
不需权限(提供无需验证): GET /404
不需权限 : GET /css
不需权限(提供无需验证): GET /
diff --git a/source/plugins/index.ts b/source/plugins/index.ts
index 9027f17..d6c8937 100644
--- a/source/plugins/index.ts
+++ b/source/plugins/index.ts
@@ -38,7 +38,7 @@ export default [
// 需要设置auth是try或者true才行
const isLogin = request.auth.isAuthenticated;
// @ts-ignore
- console.log(isLogin, request.path, request.response.variety);
+ // console.log(isLogin, request.path, request.response.variety);
let user;
if(isLogin){
const { id } = request.auth.credentials;
diff --git a/template/helper/flush.pug b/template/helper/flush.pug
index 6855fe5..a58db37 100644
--- a/template/helper/flush.pug
+++ b/template/helper/flush.pug
@@ -1,3 +1,4 @@
+//- 服务器反馈UI
if flash&&flash.error
.toast-container.top-0.end-0.p-3
each item in flash.error
diff --git a/template/helper/form_security.pug b/template/helper/form_security.pug
new file mode 100644
index 0000000..9ea5c53
--- /dev/null
+++ b/template/helper/form_security.pug
@@ -0,0 +1,2 @@
+if crumb
+
\ No newline at end of file
diff --git a/template/helper/helper.pug b/template/helper/helper.pug
new file mode 100644
index 0000000..223d6ec
--- /dev/null
+++ b/template/helper/helper.pug
@@ -0,0 +1,4 @@
+mixin css(href)
+ link(rel="stylesheet" href="/public/"+href)
+mixin script(src)
+ script(src="/public/"+src)
diff --git a/template/helper/rain.pug b/template/helper/rain.pug
index 388d74f..bdba81f 100644
--- a/template/helper/rain.pug
+++ b/template/helper/rain.pug
@@ -1,3 +1,4 @@
+//- 下雨UI
canvas(id="snow") 不支持canvas
style
| canvas#snow { position: absolute; z-index: -1; top: 0; left: 0; opacity: 0.5; }
diff --git a/template/helper/ui.pug b/template/helper/ui.pug
index 08fd717..68a5a94 100644
--- a/template/helper/ui.pug
+++ b/template/helper/ui.pug
@@ -1,8 +1,4 @@
-mixin css(href)
- link(rel="stylesheet" href="/public/"+href)
-mixin script(src)
- script(src="/public/"+src)
-
+//- 站点导航栏
mixin header()
nav.navbar.navbar-expand-lg.bg-light
.container
diff --git a/template/layout/layout.pug b/template/layout/layout.pug
index 7801169..04fd2eb 100644
--- a/template/layout/layout.pug
+++ b/template/layout/layout.pug
@@ -1,4 +1,5 @@
doctype html
+include @/helper/helper.pug
include @/helper/ui.pug
html(lang="zh-cn")
diff --git a/template/views/about.pug b/template/views/about.pug
index 6c5a2bc..6d6540a 100644
--- a/template/views/about.pug
+++ b/template/views/about.pug
@@ -50,3 +50,9 @@ block content
//- li https://getbase.org/
//- li https://tooltt.com/html2pug/
//- li https://www.pugjs.cn/language/conditionals.html
+ //- li https://bulma.io/
+ //- https://picturepan2.github.io/spectre/index.html
+ //- http://v3.getuikit.work/doc/v3/components/offcanvas.html
+ //- https://github.com/pure-css/pure
+ //- https://semantic-ui.com/
+ //- https://github.com/transitive-bullshit/check-links/blob/master/lib/check-link.js
\ No newline at end of file
diff --git a/template/views/include/form_security.pug b/template/views/include/form_security.pug
deleted file mode 100644
index 9ea5c53..0000000
--- a/template/views/include/form_security.pug
+++ /dev/null
@@ -1,2 +0,0 @@
-if crumb
-
\ No newline at end of file
diff --git a/template/views/index.pug b/template/views/index.pug
index e664ce3..9bf807f 100644
--- a/template/views/index.pug
+++ b/template/views/index.pug
@@ -9,4 +9,4 @@ block head
block content
.container
- sad
+ div sda
diff --git a/template/views/login.pug b/template/views/login.pug
index 02d59a5..b23614b 100644
--- a/template/views/login.pug
+++ b/template/views/login.pug
@@ -23,7 +23,7 @@ block content
input(type='text', name="username", placeholder='请输入用户名')
input(type='email', name="email",placeholder='请输入邮箱')
input(type='password', name="password",placeholder='请输入密码')
- include include/form_security.pug
+ include @/helper/form_security.pug
button 注册
.form-container.sign-in-container
form(action='/login' method='post')
@@ -38,7 +38,7 @@ block content
span 填写您的账户
input(type='text',name="username" , placeholder='请输入邮箱')
input(type='password',name="password" , placeholder='请输入密码')
- include include/form_security.pug
+ include @/helper/form_security.pug
a(href='#') 忘记密码?
button 登录
.overlay-container