Browse Source

20220608

pull/85/head
xiaoz 2 years ago
parent
commit
5b5277f097
  1. 63
      templates/admin/login.old.php
  2. 125
      templates/admin/login.php
  3. 129
      templates/admin/setting/theme.php
  4. 1
      templates/admin/static/css/link.css
  5. 236
      templates/admin/static/css/link.scss
  6. 1
      templates/admin/static/css/new.css
  7. 220
      templates/admin/static/css/new.scss
  8. 49
      templates/admin/static/embed.js
  9. BIN
      templates/admin/static/image/backgroundLogin.png
  10. BIN
      templates/admin/static/image/bg.png
  11. 1
      templates/admin/static/image/bg.svg
  12. BIN
      templates/admin/static/image/copyright-fill.png
  13. 1
      templates/admin/static/style.css

63
templates/admin/login.old.php

@ -0,0 +1,63 @@
<!DOCTYPE html>
<html lang="zh-cn" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>OneNav后台登录</title>
<meta name="generator" content="EverEdit" />
<meta name="author" content="" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel='stylesheet' href='static/layui/css/layui.css'>
<link rel='stylesheet' href='templates/admin/static/style.css'>
<style>
body{
/* background:url(templates/admin/static/bg.jpg); */
background-color:rgba(0, 0, 51, 0.8);
}
</style>
</head>
<body>
<div class="layui-container">
<div class="layui-row">
<div class="login-logo">
<h1>登录OneNav</h1>
</div>
<div class="layui-col-lg4 layui-col-md-offset4" style ="margin-top:4em;">
<form class="layui-form layui-form-pane" action="">
<div class="layui-form-item">
<label class="layui-form-label"><i class="layui-icon layui-icon-username"></i></label>
<div class="layui-input-block">
<input type="text" name="user" required lay-verify="required" placeholder="请输入用户名" autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label"><i class="layui-icon layui-icon-password"></i></label>
<div class="layui-input-block">
<input type="password" name="password" required lay-verify="required" placeholder="请输入密码" autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<button class="layui-btn" lay-submit lay-filter="login" style = "width:100%;">登录</button>
</div>
<div class="layui-form-item layui-hide-sm layui-hide-md layui-hide-lg">
<button class="layui-btn" lay-submit lay-filter="mobile_login" style = "width:100%;">手机登录</button>
</div>
</form>
</div>
</div>
</div>
<script src = 'static/js/jquery.min.js'></script>
<script src = 'static/layui/layui.js'></script>
<script src="templates/admin/static/embed.js"></script>
</body>
</html>

125
templates/admin/login.php

@ -1,63 +1,102 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="zh-cn" xmlns="http://www.w3.org/1999/xhtml"> <html lang="en">
<head> <head>
<meta charset="utf-8" /> <meta charset="UTF-8">
<title>OneNav后台登录</title> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="EverEdit" /> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="" /> <link rel="stylesheet" href="./templates/admin/static/css/new.css">
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel='stylesheet' href='static/layui/css/layui.css'> <link rel='stylesheet' href='static/layui/css/layui.css'>
<link rel='stylesheet' href='templates/admin/static/style.css'> <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<style> <title>OneNav管理员登录</title>
body{ <script>
/* background:url(templates/admin/static/bg.jpg); */ window.onload = function () {
background-color:rgba(0, 0, 51, 0.8); document.querySelector(".login").style.opacity = 1;
} }
</script>
</style>
</head> </head>
<body>
<div class="layui-container"> <body class="login">
<div class="layui-row"> <div class="root">
<div class="login-logo"> <section class="left">
<h1>登录OneNav</h1> <img class="cover" src="./templates/admin/static/image/backgroundLogin.png" />
</section>
<section class="right">
<!-- PC版的样式 -->
<h2>OneNav后台管理系统</h2>
<div class="login_frame">
<div class="login_box">
<h4>管理登录</h4>
<h6>亲爱的管理员欢迎回来!</h6>
<form action="" method="post">
<div class="inp">
<span class="label">用户名</span>
<input type="text" id = "user" name="user" placeholder="请输入账号" />
</div> </div>
<div class="layui-col-lg4 layui-col-md-offset4" style ="margin-top:4em;"> <div class="inp">
<form class="layui-form layui-form-pane" action=""> <span class="label">用户密码</span>
<div class="layui-form-item"> <input type="password" id = "password" name="password" placeholder="请输入密码" />
<label class="layui-form-label"><i class="layui-icon layui-icon-username"></i></label>
<div class="layui-input-block">
<input type="text" name="user" required lay-verify="required" placeholder="请输入用户名" autocomplete="off" class="layui-input">
</div> </div>
<div class="submit">
<input type="submit" lay-submit lay-filter="new_login" class="submit" value="登录">
</div> </div>
<div class="layui-form-item"> </form>
<label class="layui-form-label"><i class="layui-icon layui-icon-password"></i></label>
<div class="layui-input-block">
<input type="password" name="password" required lay-verify="required" placeholder="请输入密码" autocomplete="off" class="layui-input">
</div> </div>
</div> </div>
</section>
<div class="layui-form-item">
<button class="layui-btn" lay-submit lay-filter="login" style = "width:100%;">登录</button>
</div> </div>
<div class="mobile">
<div class="layui-form-item layui-hide-sm layui-hide-md layui-hide-lg"> <!-- 手机版的样式 -->
<button class="layui-btn" lay-submit lay-filter="mobile_login" style = "width:100%;">手机登录</button> <h1>OneNav</h1>
<form action="" method="post">
<div class="inp">
<span class="label">用户名</span>
<input type="text" id = "m_user" name="user" placeholder="请输入账号" />
</div> </div>
<div class="inp">
<span class="label">用户密码</span>
</form> <input type="password" id = "m_password" name="password" placeholder="请输入密码" />
</div> </div>
<div class="submit">
<input type="submit" lay-submit lay-filter="new_mobile_login" class="submit" value="登录">
</div> </div>
</form>
</div> </div>
<footer>© 2022 Powered by <a style = "color:#FFFFFF;padding-left:6px;" href = "https://www.onenav.top/" target = "_blank" title = "开源免费书签管理系统"> OneNav</a></footer>
</body>
<script>
//自己封装的弹出框
function alt(text) {
const t = document.createElement("div")
t.innerText = text;
Object.assign(t.style, {
position: 'fixed',
maxWidth: '300px',
top: '50px',
left: '0px',
right: '0px',
margin: '0 auto',
color: '#000',
background: '#fff',
boxShadow: '0px 3px 4px rgba(197, 197, 197, 0.115)',
padding: '15px 20px',
borderRadius: '8px',
transition: 'all .5s',
opacity: 0,
transform: 'translateY(-10px)'
})
document.body.append(t)
setTimeout(_ => {
t.style.transform = 'translateY(10px)'
t.style.opacity = 1;
}, 100)
setTimeout(_ => {
t.style.transform = 'translateY(-10px)'
t.style.opacity = 0;
}, 3000)
}
</script>
<script src = 'static/js/jquery.min.js'></script> <script src = 'static/js/jquery.min.js'></script>
<script src = 'static/layui/layui.js'></script> <script src = 'static/layui/layui.js'></script>
<script src="templates/admin/static/embed.js"></script> <script src="templates/admin/static/embed.js"></script>
</body>
</html> </html>

129
templates/admin/setting/theme.php

@ -3,11 +3,14 @@
<?php include_once(dirname(__DIR__).'/left.php'); ?> <?php include_once(dirname(__DIR__).'/left.php'); ?>
<div class="layui-body"> <div class="layui-body">
<!-- 内容主体区域 --> <!-- 内容主体区域 -->
<div class="layui-row content-body place-holder"> <div class="layui-row content-body place-holder" id = "layer-photos">
<!-- 说明提示框 --> <!-- 说明提示框 -->
<div class="layui-col-lg12"> <div class="layui-col-lg12">
<div class="setting-msg"> <div class="setting-msg">
主题更换及设置说明,请参考:<a href="https://dwz.ovh/yoyaf" target = "_blank" title = "主题更换及设置说明">https://dwz.ovh/yoyaf</a> <p>1. 主题更换及设置说明,请参考:<a href="https://dwz.ovh/yoyaf" target = "_blank" title = "主题更换及设置说明">https://dwz.ovh/yoyaf</a></p>
<p>2. 为了分摊服务器成本,主题下载和更新需要订阅用户才能使用,敬请谅解!订阅地址:<a href="https://dwz.ovh/69h9q" rel="nofollow" target="_blank" title="购买订阅服务">https://dwz.ovh/69h9q</a></p>
<p>3. 部分主题来自其它开源项目,OneNav仅做适配,主题版权归原作者所有</p>
<p>4. 主题提交请联系QQ:446199062</p>
</div> </div>
</div> </div>
<!-- 说明提示框END --> <!-- 说明提示框END -->
@ -22,7 +25,7 @@
<legend style = "font-size:24px;"><?php echo $key; ?> - <?php echo $theme['info']->version ?></legend> <legend style = "font-size:24px;"><?php echo $key; ?> - <?php echo $theme['info']->version ?></legend>
<!-- 主题图片 --> <!-- 主题图片 -->
<div class = "screenshot"><p><img src="<?php echo $theme['info']->screenshot; ?>" alt=""></p></div> <div class = "screenshot"><p><img layer-src="<?php echo $theme['info']->screenshot; ?>" src="<?php echo $theme['info']->screenshot; ?>" alt=""></p></div>
<!-- 主题图片END --> <!-- 主题图片END -->
<p> <p>
@ -30,9 +33,10 @@
<button type="button" class="layui-btn layui-btn-sm" onclick = "set_theme('<?php echo $key; ?>')">使用</button> <button type="button" class="layui-btn layui-btn-sm" onclick = "set_theme('<?php echo $key; ?>')">使用</button>
<button type="button" class="layui-btn layui-btn-sm" onclick = "theme_detail('<?php echo $key; ?>')">详情</button> <button type="button" class="layui-btn layui-btn-sm" onclick = "theme_detail('<?php echo $key; ?>')">详情</button>
<button type="button" class="layui-btn layui-btn-sm" onclick = "theme_config('<?php echo $key; ?>')">参数设置</button> <button type="button" class="layui-btn layui-btn-sm" onclick = "theme_config('<?php echo $key; ?>')">参数设置</button>
<button type="button" class="layui-btn layui-btn-sm" onclick = "update_theme('<?php echo $key; ?>','<?php echo $theme['info']->version; ?>')">更新</button>
<button type="button" class="layui-btn layui-btn-sm layui-btn-danger" onclick = "delete_theme('<?php echo $key; ?>')">删除</button> <button type="button" class="layui-btn layui-btn-sm layui-btn-danger" onclick = "delete_theme('<?php echo $key; ?>')">删除</button>
<?php if( $current_them == $key ) { ?> <?php if( $current_them == $key ) { ?>
<button type="button" class="layui-btn layui-btn-sm layui-btn-danger">当前主题</button> <button type="button" class="layui-btn layui-btn-sm layui-btn-danger">当前</button>
<?php } ?> <?php } ?>
</div> </div>
@ -43,6 +47,36 @@
<?php } ?> <?php } ?>
</div> </div>
</div> </div>
<hr>
<!-- 在线主题 -->
<div class="layui-col-lg12">
<h2 style = "padding-bottom:16px;padding-top:8px;">在线主题:</h2>
<div class="layui-row layui-col-space24">
<?php foreach ($theme_list as $key => $theme) {
//var_dump($theme['info']->name);
?>
<!-- 在线主题列表 -->
<div class="layui-col-lg3 layui-col-md6 layui-col-sm12">
<fieldset style = "padding:1em;border:0px;height:280px;border:1px dashed #1E9FFF;box-shadow: 2px 2px 3px #888888;color:#666666">
<legend style = "font-size:24px;"><?php echo $key; ?> - <?php echo $theme->version ?></legend>
<!-- 主题图片 -->
<div class = "screenshot"><p><img layer-src="<?php echo $theme->screenshot; ?>" src="<?php echo $theme->screenshot; ?>" alt=""></p></div>
<!-- 主题图片END -->
<p>
<div class="layui-btn-group">
<button type="button" class="layui-btn layui-btn-sm" onclick = "down_theme('<?php echo $key; ?>','download')">下载</button>
<!-- <button type="button" class="layui-btn layui-btn-sm" onclick = "theme_detail_online('<?php echo $key; ?>')">详情</button> -->
</div>
</p>
</fieldset>
</div>
<!-- 主题列表END -->
<?php } ?>
</div>
</div>
<!-- 在线主题END -->
</div> </div>
</div> </div>
<?php include_once(dirname(__DIR__).'/footer.php'); ?> <?php include_once(dirname(__DIR__).'/footer.php'); ?>
@ -58,6 +92,15 @@ function theme_detail(name){
content:'/index.php?c=admin&page=setting/theme_detail&name=' + name content:'/index.php?c=admin&page=setting/theme_detail&name=' + name
}); });
} }
function theme_detail_online(name){
layer.open({
title: name,
type:2,
area: ['60%', '59%'],
content:'/index.php?c=admin&page=setting/theme_detail&name=' + name
});
}
//主题参数设置 //主题参数设置
function theme_config(name){ function theme_config(name){
layer.open({ layer.open({
@ -81,4 +124,82 @@ function set_theme(name) {
} }
}); });
} }
function down_theme(name,type) {
//请求订阅接口,并获取key、value
var index = layer.load(1);
// $.ajax({
// 'url': '/index.php?c=api&method=check_subscribe',
// 'type': 'GET',
// 'async': false,
// success:function(result) {
// }
// });
$.get("/index.php?c=api&method=check_subscribe",function(result,status){
if( result.code == 200 ) {
var key = result.data.key;
var value = result.data.value;
//继续下载主题
$.get("/index.php?c=api&method=down_theme",{name:name,key:key,value:value,type:type},function(data,status){
//如果下载成功
if( data.code == 200 ) {
layer.closeAll('loading');
layer.msg(data.msg, {icon: 1});
//重载当前页面
setTimeout(() => {
window.location.reload();
}, 2000);
}
else{
layer.closeAll('loading');
layer.msg(data.msg, {icon: 5});
}
});
}
else{
layer.closeAll('loading');
layer.msg(result.msg, {icon: 5});
}
});
}
//更新主题
function update_theme(name,version){
//获取远程主题最新版本号
var index = layer.load(1);
var infourl = "https://onenav.xiaoz.top/themes/" + name + "/info.json";
$.ajax({
type:"HEAD",
async:true,
url:infourl,
statusCode: {
200: function() {
$.get("https://onenav.xiaoz.top/themes/" + name + "/info.json",function(data,status){
let new_version = data.version;
if ( version >= new_version ) {
layer.closeAll('loading');
layer.msg('已经是最新版本,无需更新!', {icon: 5});
}
else{
down_theme(name,'update');
}
});
},
403:function() {
layer.closeAll('loading');
layer.msg('更新失败,权限不足!', {icon: 5});
},
404:function() {
layer.closeAll('loading');
layer.msg('更新失败,远程服务器上不存在此主题!', {icon: 5});
}
}
});
}
layer.photos({
photos: '#layer-photos'
,anim: 5 //0-6的选择,指定弹出图片动画类型,默认随机(请注意,3.0之前的版本用shift参数)
});
</script> </script>

1
templates/admin/static/css/link.css

@ -0,0 +1 @@
*{margin:0;padding:0}.root{position:absolute;width:100vw;height:100%;background:#292929;border-radius:0px 0px 0px 0px;display:flex;align-items:center;justify-content:center}.root>h2{position:absolute;top:20px;left:20px;color:#fff}.info-box{margin:30px;width:700px;transition:all .5s;background:#f1f1f1;border-radius:16px 16px 16px 16px;opacity:1;padding:30px}.info-box>h3{font-size:26px;font-family:OPPOSans-Bold, OPPOSans;font-weight:bold;color:#000000;line-height:34px}.info-box>ul{margin-top:20px;list-style:none}.info-box>ul>li{margin-top:30px;display:flex}.info-box>ul>li>span:nth-child(1){flex-shrink:0;width:120px;height:34px;font-size:24px;font-family:Source Han Sans CN-Bold, Source Han Sans CN;font-weight:bold;color:#232323;line-height:34px}.info-box>ul>li>span:nth-child(2),.info-box>ul>li>div{width:100%;display:flex;margin-left:50px;font-size:24px;font-family:Source Han Sans CN-Regular, Source Han Sans CN;font-weight:400;color:#232323;line-height:34px}footer{width:100%;position:absolute;z-index:9;bottom:10px;display:flex;font-size:12px;align-items:center;justify-content:center;color:#9e9e9e}footer>img{margin-right:5px;width:20px;height:20px}[link]{display:flex;align-items:center}[link]>a{max-width:calc(100% - 140px);white-space:nowrap;text-overflow:ellipsis;overflow:hidden;color:#0676d1 !important}[tips]{font-size:20px;font-family:Source Han Sans CN-Regular, Source Han Sans CN;font-weight:400;color:#464646 !important;line-height:34px}.next{margin-top:30px;display:flex;justify-content:flex-end}.next>button{width:96px;height:48px;background:#0088ea;border:none;border-radius:8px 8px 8px 8px;opacity:1;font-family:Source Han Sans CN-Regular, Source Han Sans CN;font-weight:400;color:#ffffff;line-height:24px;transition:all 0.3s}.next>button:hover{background-color:#3a96e2}.load{display:none}.load>span{position:relative;top:-2px}.loads{position:relative;top:4px;display:inline-block;width:20px;height:20px;animation:ss 2s linear infinite}@keyframes ss{to{transform:rotate(0deg)}from{transform:rotate(-360deg)}}.copy{margin-left:10px;position:relative;height:24px}.copy>svg{pointer-events:none}@media screen and (max-width: 800px){.info-box{width:calc(100vw - 30px) !important}.info-box>h3{font-size:16px;font-family:OPPOSans-Bold, OPPOSans;font-weight:bold;color:#000000;line-height:34px}.info-box>ul{margin-top:20px;list-style:none}.info-box>ul>li{margin-top:10px;display:flex}.info-box>ul>li>span:nth-child(1){flex-shrink:0;width:70px;height:34px;font-size:14px;font-family:Source Han Sans CN-Bold, Source Han Sans CN;font-weight:bold;color:#232323}.info-box>ul>li>span:nth-child(2),.info-box>ul>li>div{width:100%;max-height:60px;text-overflow:ellipsis;overflow:hidden;display:flex;margin-left:15px !important;font-size:14px;line-height:20px;font-family:Source Han Sans CN-Regular, Source Han Sans CN;font-weight:400;color:#232323;align-items:center}[link]{display:flex;align-items:center}[link]>a{max-width:calc(100% - 40px) !important;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;color:#0676d1 !important}.next{margin-top:30px;display:flex;justify-content:flex-end}.next>button{width:96px;height:35px;background:#0088ea;border:none;border-radius:8px 8px 8px 8px;opacity:1;font-weight:400;color:#ffffff;line-height:24px;transition:all 0.3s}.next>button:hover{background-color:#3a96e2}}

236
templates/admin/static/css/link.scss

@ -0,0 +1,236 @@
* {
margin: 0;
padding: 0;
}
.root {
position: absolute;
width: 100vw;
height:100%;
background: #292929;
border-radius: 0px 0px 0px 0px;
display: flex;
align-items: center;
justify-content: center;
> h2 {
position: absolute;
top: 20px;
left: 20px;
color: #fff;
}
}
.info-box {
margin: 30px;
width: 700px;
transition: all .5s;
background: #f1f1f1;
border-radius: 16px 16px 16px 16px;
opacity: 1;
padding: 30px;
> h3 {
font-size: 26px;
font-family: OPPOSans-Bold, OPPOSans;
font-weight: bold;
color: #000000;
line-height: 34px;
}
> ul {
margin-top: 20px;
list-style: none;
> li {
margin-top: 30px;
display: flex;
> span:nth-child(1) {
flex-shrink: 0;
width: 120px;
height: 34px;
font-size: 24px;
font-family: Source Han Sans CN-Bold, Source Han Sans CN;
font-weight: bold;
color: #232323;
line-height: 34px;
}
> span:nth-child(2),
> div {
width: 100%;
display: flex;
margin-left: 50px;
font-size: 24px;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #232323;
line-height: 34px;
}
}
}
}
footer {
width: 100%;
position: absolute;
z-index: 9;
bottom: 10px;
display: flex;
font-size: 12px;
align-items: center;
justify-content: center;
color: #9e9e9e;
> img {
margin-right: 5px;
width: 20px;
height: 20px;
}
}
[link] {
display: flex;
align-items: center;
> a {
max-width: calc(100% - 140px);
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
color: #0676d1 !important;
}
}
[tips] {
font-size: 20px;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #464646 !important;
line-height: 34px;
}
.next {
margin-top: 30px;
display: flex;
justify-content: flex-end;
> button {
width: 96px;
height: 48px;
background: #0088ea;
border: none;
border-radius: 8px 8px 8px 8px;
opacity: 1;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #ffffff;
line-height: 24px;
transition: all 0.3s;
&:hover {
background-color: #3a96e2;
}
}
}
.load {
display: none;
> span {
position: relative;
top: -2px;
}
}
.loads {
position: relative;
top: 4px;
display: inline-block;
width: 20px;
height: 20px;
animation: ss 2s linear infinite;
}
@keyframes ss {
to {
transform: rotate(0deg);
}
from {
transform: rotate(-360deg);
}
}
.copy {
margin-left: 10px;
position: relative;
height: 24px;
> svg {
pointer-events: none;
}
}
@media screen and (max-width: 800px) {
.info-box {
width: calc(100vw - 30px) !important;
// min-width: 376px;
> h3 {
font-size: 16px;
font-family: OPPOSans-Bold, OPPOSans;
font-weight: bold;
color: #000000;
line-height: 34px;
}
> ul {
margin-top: 20px;
list-style: none;
> li {
margin-top: 10px;
display: flex;
> span:nth-child(1) {
flex-shrink: 0;
width: 70px;
height: 34px;
font-size: 14px;
font-family: Source Han Sans CN-Bold, Source Han Sans CN;
font-weight: bold;
color: #232323;
}
> span:nth-child(2),
> div {
width: 100%;
max-height: 60px;
text-overflow: ellipsis;
overflow: hidden;
display: flex;
margin-left: 15px !important;
font-size: 14px;
line-height: 20px;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #232323;
align-items: center;
}
}
}
}
[link] {
display: flex;
align-items: center;
> a {
max-width: calc(100% - 40px) !important;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
color: #0676d1 !important;
}
}
.next {
margin-top: 30px;
display: flex;
justify-content: flex-end;
> button {
width: 96px;
height: 35px;
background: #0088ea;
border: none;
border-radius: 8px 8px 8px 8px;
opacity: 1;
font-weight: 400;
color: #ffffff;
line-height: 24px;
transition: all 0.3s;
&:hover {
background-color: #3a96e2;
}
}
}
}

1
templates/admin/static/css/new.css

@ -0,0 +1 @@
*{margin:0;padding:0}.login{opacity:0;width:100vw;height:100vh;background:url("../image/bg.svg") no-repeat center/cover;display:flex;align-items:center;justify-content:center}.login>.root{position:absolute;width:70%;height:600px;transition:all 0.3s;box-shadow:0px 0px 10px rgba(250,250,250,0.227);border-radius:15px;overflow:hidden;display:flex}.login>.root .left{transition:all 0.3s;position:relative;width:50%;background:#000}.login>.root .left>.cover{position:absolute;display:block;width:100%;height:100%;object-fit:cover}.login>.root .right{transition:all 0.5s;min-width:550px;width:50%;display:flex;flex-direction:column;background:#fbfbfb}.login>.root .right>h2{margin:40px 20px 0px;text-align:center;font-size:32px;font-family:Source Han Sans CN-Bold, Source Han Sans CN;font-weight:bold;color:#2a2a2a;line-height:48px}.login>.root .right>h2:hover{color:#0088ea}.login>.root .right .login_frame{display:flex;justify-content:center}.login>.root .right .login_box{margin-top:100px;padding:20px;width:320px;height:300px;background:#ffffff;box-shadow:0px 3px 8px 1px rgba(0,0,0,0.16);border-radius:16px 16px 16px 16px;opacity:1}.login>.root .right .login_box>h4{width:411px;height:24px;font-size:24px;font-family:Source Han Sans CN-Regular, Source Han Sans CN;font-weight:400;color:#000000;line-height:24px}.login>.root .right .login_box>h6{margin-top:10px;width:411px;height:24px;font-size:16px;font-family:Helvetica Neue-常规体, Helvetica Neue;font-weight:normal;color:#323232;line-height:24px;margin-bottom:30px}.login>.root .right .login_box>form>.inp{margin-bottom:15px;display:flex;flex-direction:column}.login>.root .right .login_box>form>.inp>.label{height:16px;font-size:12px;font-family:Source Han Sans CN-Bold, Source Han Sans CN;font-weight:bold;color:#1a1a1a;line-height:16px;margin-bottom:5px}.login>.root .right .login_box>form>.inp>input{width:calc(100% - 30px);height:35px;border-radius:8px 8px 8px 8px;opacity:1;outline:none;border:1px solid #bfbfbf;padding:0px 15px}.login>.root .right .login_box>form>.submit{margin-top:25px}.login>.root .right .login_box>form>.submit>input{width:100%;height:40px;background:#0088ea;outline:none;border:1px solid #0088ea;border-radius:8px;font-size:16px;font-family:Source Han Sans CN-Regular, Source Han Sans CN;font-weight:400;color:#ffffff}.login .mobile{display:none}@media screen and (max-width: 1278px){.login .left{display:none}.login .right{min-width:100% !important;width:100%}}@media screen and (max-width: 658px){.login .root{display:none !important}.login .mobile{width:100%;height:100%;position:absolute;display:block}.login .mobile>h1{margin:20px;color:#ffffff}.login .mobile>form{position:relative;margin:15px;padding:15px;margin-top:100px}.login .mobile>form>.inp{margin-bottom:15px;display:flex;flex-direction:column}.login .mobile>form>.inp>.label{height:16px;font-size:13px;font-family:Source Han Sans CN-Bold, Source Han Sans CN;font-weight:bold;color:#1a1a1a;line-height:16px;margin-bottom:5px;color:#ffffff}.login .mobile>form>.inp>input{width:calc(100% - 30px);height:40px;border-radius:8px 8px 8px 8px;opacity:1;outline:none;border:1px solid #bfbfbf;padding:0px 15px}.login .mobile>form>.submit{margin-top:25px}.login .mobile>form>.submit>input{width:100%;height:40px;background:#0088ea;outline:none;border:1px solid #0088ea;border-radius:8px;font-size:16px;font-family:Source Han Sans CN-Regular, Source Han Sans CN;font-weight:400;color:#ffffff}}footer{width:100%;position:absolute;z-index:9;bottom:10px;display:flex;font-size:12px;align-items:center;justify-content:center;color:#9e9e9e}footer>img{margin-right:5px;width:20px;height:20px}

220
templates/admin/static/css/new.scss

@ -0,0 +1,220 @@
* {
margin: 0;
padding: 0;
}
.login {
opacity: 0;
width: 100vw;
height: 100vh;
background: url("../image/bg.png") no-repeat center/cover;
display: flex;
align-items: center;
justify-content: center;
> .root {
position: absolute;
width: 70%;
height: 600px;
transition: all 0.3s;
box-shadow: 0px 0px 10px rgba(250, 250, 250, 0.227);
border-radius: 15px;
overflow: hidden;
display: flex;
.left {
transition: all 0.3s;
position: relative;
width: 50%;
background: #000;
> .cover {
position: absolute;
display: block;
width: 100%;
height: 100%;
object-fit: cover;
}
}
.right {
transition: all 0.5s;
min-width: 550px;
width: 50%;
display: flex;
flex-direction: column;
background: rgb(251, 251, 251);
> h2 {
margin: 40px 20px 0px;
text-align: center;
font-size: 32px;
font-family: Source Han Sans CN-Bold, Source Han Sans CN;
font-weight: bold;
color: #2a2a2a;
line-height: 48px;
&:hover {
color: #0088ea;
}
}
.login_frame {
display: flex;
justify-content: center;
}
.login_box {
margin-top: 100px;
padding: 20px;
width: 320px;
height: 300px;
background: #ffffff;
box-shadow: 0px 3px 8px 1px rgba(0, 0, 0, 0.1599999964237213);
border-radius: 16px 16px 16px 16px;
opacity: 1;
> h4 {
width: 411px;
height: 24px;
font-size: 24px;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #000000;
line-height: 24px;
}
> h6 {
margin-top: 10px;
width: 411px;
height: 24px;
font-size: 16px;
font-family: Helvetica Neue-常规体, Helvetica Neue;
font-weight: normal;
color: #323232;
line-height: 24px;
margin-bottom: 30px;
}
> form {
> .inp {
margin-bottom: 15px;
display: flex;
flex-direction: column;
> .label {
height: 16px;
font-size: 12px;
font-family: Source Han Sans CN-Bold, Source Han Sans CN;
font-weight: bold;
color: #1a1a1a;
line-height: 16px;
margin-bottom: 5px;
}
> input {
width: calc(100% - 30px);
height: 35px;
border-radius: 8px 8px 8px 8px;
opacity: 1;
outline: none;
border: 1px solid #bfbfbf;
padding: 0px 15px;
}
}
> .submit {
margin-top: 25px;
> input {
width: 100%;
height: 40px;
background: #0088ea;
outline: none;
border: 1px solid #0088ea;
border-radius: 8px;
font-size: 16px;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #ffffff;
}
}
}
}
}
}
.mobile {
display: none;
}
@media screen and (max-width: 1278px) {
.left {
display: none;
}
.right {
min-width: 100% !important ;
width: 100%;
}
}
@media screen and (max-width: 658px) {
.root {
display: none !important;
}
.mobile {
width: 100%;
height: 100%;
position: absolute;
display: block;
> h1 {
margin: 20px;
color: #ffffff;
}
> form {
position: relative;
margin: 15px;
padding: 15px;
margin-top:100px;
> .inp {
margin-bottom: 15px;
display: flex;
flex-direction: column;
> .label {
height: 16px;
font-size: 13px;
font-family: Source Han Sans CN-Bold, Source Han Sans CN;
font-weight: bold;
color: #1a1a1a;
line-height: 16px;
margin-bottom: 5px;
color: #ffffff;
}
> input {
width: calc(100% - 30px);
height: 40px;
border-radius: 8px 8px 8px 8px;
opacity: 1;
outline: none;
border: 1px solid #bfbfbf;
padding: 0px 15px;
}
}
> .submit {
margin-top: 25px;
> input {
width: 100%;
height: 40px;
background: #0088ea;
outline: none;
border: 1px solid #0088ea;
border-radius: 8px;
font-size: 16px;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #ffffff;
}
}
}
}
}
}
footer {
width: 100%;
position: absolute;
z-index: 9;
bottom: 10px;
display: flex;
font-size: 12px;
align-items: center;
justify-content: center;
color: #9e9e9e;
> img {
margin-right: 5px;
width: 20px;
height: 20px;
}
}

49
templates/admin/static/embed.js

@ -269,6 +269,29 @@ layui.use(['element','table','layer','form','upload','iconHhysFa'], function(){
return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。 return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。
}); });
//新的登录
form.on('submit(new_login)', function(data){
//获取用户名
var user = $("#user").val();
//获取密码
var password = $("#password").val();
if ( user == '' || password == '' ) {
layer.msg('用户名或密码不能为空!', {icon: 5});
return false;
}
$.post('/index.php?c=login&check=login',{user:user,password:password},function(data,status){
//如果添加成功
if(data.code == 0) {
window.location.href = '/index.php?c=admin';
}
else{
layer.msg(data.err_msg, {icon: 5});
}
});
//console.log(data.field) //当前容器的全部表单字段,名值对形式:{name: value}
return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。
});
//初始化设置onenav密码 //初始化设置onenav密码
form.on('submit(init_onenav)', function(data){ form.on('submit(init_onenav)', function(data){
console.log(data.field.username); console.log(data.field.username);
@ -322,6 +345,30 @@ layui.use(['element','table','layer','form','upload','iconHhysFa'], function(){
return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。 return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。
}); });
//新的手机登录
form.on('submit(new_mobile_login)', function(data){
//获取用户名
var user = $("#m_user").val();
//获取密码
var password = $("#m_password").val();
if ( user == '' || password == '' ) {
layer.msg('用户名或密码不能为空!', {icon: 5});
return false;
}
$.post('/index.php?c=login&check=login',{user:user,password:password},function(data,status){
//如果登录成功
if(data.code == 0) {
window.location.href = '/';
}
else{
layer.msg(data.err_msg, {icon: 5});
}
});
console.log(data.field) //当前容器的全部表单字段,名值对形式:{name: value}
return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。
});
//筛选链接 //筛选链接
form.on('submit(screen_link)', function(data){ form.on('submit(screen_link)', function(data){
fid = data.field.fid; fid = data.field.fid;
@ -333,7 +380,7 @@ layui.use(['element','table','layer','form','upload','iconHhysFa'], function(){
var tableIns = table.render({ var tableIns = table.render({
elem: '#link_list' elem: '#link_list'
,height: 520 ,height: 520
,url: 'index.php?c=api&method=link_list' //数据接口 ,url: 'index.php?c=api&method=q_category_link' //数据接口
,method: 'post' ,method: 'post'
,page: true //开启分页 ,page: true //开启分页
,toolbar: '#linktool' ,toolbar: '#linktool'

BIN
templates/admin/static/image/backgroundLogin.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

BIN
templates/admin/static/image/bg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

1
templates/admin/static/image/bg.svg

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 12 KiB

BIN
templates/admin/static/image/copyright-fill.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

1
templates/admin/static/style.css

@ -113,6 +113,7 @@
.screenshot img{ .screenshot img{
max-width: auto; max-width: auto;
max-height: 200px; max-height: 200px;
max-width:96%;
} }
#progress{ #progress{

Loading…
Cancel
Save