Browse Source

update

pull/81/head
xiaoz 2 years ago
parent
commit
62fdbd88e9
  1. 46
      templates/admin/click.php
  2. 4
      templates/admin/setting/transition_page.php
  3. 5
      templates/admin/static/embed.js

46
templates/admin/click.php

@ -21,6 +21,10 @@ @@ -21,6 +21,10 @@
padding-top:1em;
padding-bottom:1em;
}
#menu{
width:100%;
background-color: #343a40!important;
}
</style>
<?php echo $site['custom_header']; ?>
<?php
@ -42,21 +46,29 @@ @@ -42,21 +46,29 @@
?>
</head>
<body>
<!-- 顶部导航菜单 -->
<nav class="navbar navbar-expand-md bg-dark navbar-dark">
<a class="navbar-brand" href="/"><?php echo $site['title']; ?></a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsibleNavbar">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="collapsibleNavbar">
<ul class="navbar-nav">
<!-- 输出自定义菜单 -->
<?php echo $transition_page['menu']; ?>
<!-- 输出自定义菜单END -->
</ul>
</div>
</nav>
<!-- 顶部导航菜单END -->
<div id="menu">
<div class="container">
<div class = "row">
<div class="col-sm-8 offset-sm-2">
<!-- 顶部导航菜单 -->
<nav class="navbar navbar-expand-md bg-dark navbar-dark">
<a class="navbar-brand" href="/"><?php echo $site['title']; ?></a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsibleNavbar">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="collapsibleNavbar">
<ul class="navbar-nav">
<!-- 输出自定义菜单 -->
<?php echo $transition_page['menu']; ?>
<!-- 输出自定义菜单END -->
</ul>
</div>
</nav>
<!-- 顶部导航菜单END -->
</div>
</div>
</div>
</div>
<div class="container" style = "margin-top:2em;">
<!-- 广告1 -->
<div class= "row">
@ -139,10 +151,10 @@ @@ -139,10 +151,10 @@
<div class="col-sm-8 offset-sm-2">
<hr>
<div class="xcdn-footer">
<?php if( empty($transition_page['footer']) ){ ?>
<?php if( empty($site['custom_footer']) ){ ?>
&copy;2022 Powered by <a href="https://www.xiaoz.me/" title = "小z博客" rel = "nofollow" target = "_blank">xiaoz</a>
<?php }else{
echo $transition_page['footer'];
echo $site['custom_footer'];
} ?>
</div>
</div>

4
templates/admin/setting/transition_page.php

@ -46,12 +46,12 @@ @@ -46,12 +46,12 @@
</div>
</div>
<div class="layui-form-item layui-form-text">
<!-- <div class="layui-form-item layui-form-text">
<label class="layui-form-label">自定义footer,支持HTML(订阅可用)</label>
<div class="layui-input-block">
<textarea name = "footer" placeholder="请参考帮助文档进行设置!" rows = "4" class="layui-textarea"><?php echo $transition_page['footer']; ?></textarea>
</div>
</div>
</div> -->
<div class="layui-form-item layui-form-text">
<label class="layui-form-label">广告1(订阅可用)</label>

5
templates/admin/static/embed.js

@ -452,15 +452,18 @@ layui.use(['element','table','layer','form','upload','iconHhysFa'], function(){ @@ -452,15 +452,18 @@ layui.use(['element','table','layer','form','upload','iconHhysFa'], function(){
//保存站点设置
form.on('submit(set_transition_page)', function(data){
var index = layer.load(1);
$.post('/index.php?c=api&method=set_transition_page',data.field,function(data,status){
if(data.code == 0) {
layer.closeAll('loading');
layer.msg(data.data, {icon: 1});
}
else{
layer.closeAll('loading');
layer.msg(data.err_msg, {icon: 5});
}
});
console.log(data.field) //当前容器的全部表单字段,名值对形式:{name: value}
//console.log(data.field) //当前容器的全部表单字段,名值对形式:{name: value}
return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。
});

Loading…
Cancel
Save