A simple admin ui without any functionalities
Signed-off-by: Yuan Si <do4suki@gmail.com>
This commit is contained in:
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 321 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 95 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.8 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.5 MiB |
File diff suppressed because one or more lines are too long
@@ -0,0 +1,27 @@
|
||||
{{ define "admin/card.html" }}
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<title>SIF 小助手</title>
|
||||
{{ template "admin/nav/css.html" . }}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="layui-layout layui-layout-admin">
|
||||
{{ template "admin/nav/header.html" . }}
|
||||
{{ template "admin/nav/side.html" . }}
|
||||
|
||||
<div class="layui-body">
|
||||
<div style="padding: 15px;">{{ .url }}</div>
|
||||
</div>
|
||||
|
||||
{{ template "admin/nav/footer.html" . }}
|
||||
</div>
|
||||
<script src="/static/js/layui.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
{{ end }}
|
||||
@@ -0,0 +1,27 @@
|
||||
{{ define "admin/deck.html" }}
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<title>SIF 小助手</title>
|
||||
{{ template "admin/nav/css.html" . }}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="layui-layout layui-layout-admin">
|
||||
{{ template "admin/nav/header.html" . }}
|
||||
{{ template "admin/nav/side.html" . }}
|
||||
|
||||
<div class="layui-body">
|
||||
<div style="padding: 15px;">{{ .url }}</div>
|
||||
</div>
|
||||
|
||||
{{ template "admin/nav/footer.html" . }}
|
||||
</div>
|
||||
<script src="/static/js/layui.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
{{ end }}
|
||||
@@ -0,0 +1,27 @@
|
||||
{{ define "admin/index.html" }}
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<title>SIF 小助手</title>
|
||||
{{ template "admin/nav/css.html" . }}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="layui-layout layui-layout-admin">
|
||||
{{ template "admin/nav/header.html" . }}
|
||||
{{ template "admin/nav/side.html" . }}
|
||||
|
||||
<div class="layui-body">
|
||||
<div style="padding: 15px;">{{ .url }}</div>
|
||||
</div>
|
||||
|
||||
{{ template "admin/nav/footer.html" . }}
|
||||
</div>
|
||||
<script src="/static/js/layui.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
{{ end }}
|
||||
@@ -0,0 +1,113 @@
|
||||
{{ define "admin/login.html" }}
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>SIF 小助手</title>
|
||||
{{ template "admin/nav/css.html" . }}
|
||||
|
||||
<style>
|
||||
body {
|
||||
background: url("/static/images/admin/top-bg.jpg") no-repeat;
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
.login-btn {
|
||||
margin-top: 1%;
|
||||
border: 0px;
|
||||
color: azure;
|
||||
background: #e4007f;
|
||||
}
|
||||
|
||||
.login-btn:hover {
|
||||
color: aliceblue;
|
||||
}
|
||||
|
||||
.layui-input {
|
||||
width: 85%;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="layui-container">
|
||||
<button type="button" class="layui-btn layui-btn-lg layui-btn-primary layui-btn-radius login-btn">点击登录</button>
|
||||
</div>
|
||||
<script src="/static/js/layui.js"></script>
|
||||
<script>
|
||||
layui.use('layer', function () {
|
||||
var $ = layui.$
|
||||
, layer = layui.layer;
|
||||
|
||||
$(".login-btn").click(function () {
|
||||
layer.open({
|
||||
type: 1,
|
||||
area: ['600px', '280px'],
|
||||
title: "登录",
|
||||
content: $('#login-form'),
|
||||
shade: 0
|
||||
})
|
||||
})
|
||||
|
||||
$("#login-submit").click(function () {
|
||||
let area = $("#area option:selected").val();
|
||||
let user = $("#sifuser").val();
|
||||
let pass = $("#sifpass").val();
|
||||
console.log(area)
|
||||
console.log(user)
|
||||
console.log(pass)
|
||||
$.post("/admin/login", { area: area, user: user, pass: pass }, function (data) {
|
||||
if (data.code != 0) {
|
||||
layer.msg(data.message)
|
||||
return
|
||||
}
|
||||
layer.msg(data.message)
|
||||
setTimeout(function () {
|
||||
window.location.href = data.redirect;
|
||||
}, 1500)
|
||||
})
|
||||
})
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
<div id="login-form" style="display: none; padding: 10px;">
|
||||
<form class="layui-form">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">地区</label>
|
||||
<div class="layui-input-block">
|
||||
<select name="area" id="area" lay-verify="required">
|
||||
<option value="86" selected>中国大陆(+86)</option>
|
||||
<option value="852">中国香港(+852)</option>
|
||||
<option value="853">中国澳门(+853)</option>
|
||||
<option value="886">中国台湾(+886)</option>
|
||||
<option value="1">美国(+1)</option>
|
||||
<option value="81">日本(+81)</option>
|
||||
<option value="82">韩国(+82)</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">账号</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="sifuser" id="sifuser" required lay-verify="required" placeholder="请输入账号"
|
||||
autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">密码</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="password" name="sifpass" id="sifpass" required lay-verify="required" placeholder="请输入密码"
|
||||
autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="layui-input-block">
|
||||
<button class="layui-btn" id="login-submit">登录</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</html>
|
||||
{{ end }}
|
||||
@@ -0,0 +1,30 @@
|
||||
{{ define "admin/nav/css.html" }}
|
||||
<link rel="stylesheet" href="/static/css/layui.css">
|
||||
|
||||
<style>
|
||||
.sif-title {
|
||||
font-size: 1.3em;
|
||||
color: aliceblue;
|
||||
}
|
||||
|
||||
.layui-header {
|
||||
background-color: #e4007f !important;
|
||||
}
|
||||
|
||||
.layui-side {
|
||||
background-color: #e4007f;
|
||||
}
|
||||
|
||||
.layui-nav {
|
||||
background-color: #e4007f;
|
||||
}
|
||||
|
||||
.layui-nav-tree .layui-nav-child dd.layui-this,
|
||||
.layui-nav-tree .layui-nav-child dd.layui-this a,
|
||||
.layui-nav-tree .layui-this,
|
||||
.layui-nav-tree .layui-this>a,
|
||||
.layui-nav-tree .layui-this>a:hover {
|
||||
background-color: #ff6699 !important;
|
||||
}
|
||||
</style>
|
||||
{{ end }}
|
||||
@@ -0,0 +1,5 @@
|
||||
{{ define "admin/nav/footer.html" }}
|
||||
<div class="layui-footer">
|
||||
Copyright © 2023 YumeMichi
|
||||
</div>
|
||||
{{ end }}
|
||||
@@ -0,0 +1,23 @@
|
||||
{{ define "admin/nav/header.html" }}
|
||||
<div class="layui-header">
|
||||
<div class="layui-logo layui-hide-xs"><a href="/admin/index"><span class="sif-title">SIF
|
||||
小助手</span></a></div>
|
||||
<ul class="layui-nav layui-layout-left">
|
||||
<li class="layui-nav-item layui-show-xs-inline-block layui-hide-sm" lay-header-event="menuLeft">
|
||||
<i class="layui-icon layui-icon-spread-left"></i>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="layui-nav layui-layout-right">
|
||||
<li class="layui-nav-item layui-hide layui-show-md-inline-block">
|
||||
<a href="javascript:;">
|
||||
<img src="/static/images/admin/ic_launcher.png" class="layui-nav-img">
|
||||
设置
|
||||
</a>
|
||||
<dl class="layui-nav-child">
|
||||
<dd><a href="">个人信息</a></dd>
|
||||
<dd><a href="/admin/logout">登出</a></dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{{ end }}
|
||||
@@ -0,0 +1,16 @@
|
||||
{{ define "admin/nav/side.html" }}
|
||||
<div class="layui-side">
|
||||
<div class="layui-side-scroll">
|
||||
<ul class="layui-nav layui-nav-tree" lay-filter="test">
|
||||
<li class="layui-nav-item {{ if eq .menu 1 }} layui-nav-itemed {{ end }}">
|
||||
<a class="" href="javascript:;">卡片管理</a>
|
||||
<dl class="layui-nav-child">
|
||||
<dd {{ if eq .url "/admin/card" }} class="layui-this" {{ end }}><a href="/admin/card">卡片一览</a></dd>
|
||||
<dd {{ if eq .url "/admin/deck" }} class="layui-this" {{ end }}><a href="/admin/deck">编队管理</a></dd>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user