Browse Source

20220422

pull/61/head
xiaoz 3 years ago
parent
commit
0d057a59d3
  1. 20
      templates/admin/add_category.php
  2. 7
      templates/admin/add_link.php
  3. 9
      templates/admin/add_quick_tpl.php
  4. 34
      templates/admin/edit_category.php
  5. 2
      templates/admin/footer.php
  6. 6
      templates/admin/index.php
  7. 2
      templates/admin/left.php
  8. 52
      templates/admin/setting/api.php
  9. 9
      templates/admin/setting/site.php
  10. 4
      templates/admin/static/add_quick_tpl.css
  11. 71
      templates/admin/static/embed.js
  12. 1
      templates/baisuTwo/css/style.css
  13. 24
      templates/baisuTwo/index.php
  14. 4
      templates/baisuTwo/info.json
  15. 57
      templates/default/index.php
  16. 4
      templates/default/info.json
  17. 5
      templates/default/static/embed.js
  18. 13
      templates/default/static/style.css

20
templates/admin/add_category.php

@ -11,8 +11,8 @@ @@ -11,8 +11,8 @@
</div>
</div>
<!-- 说明提示框END -->
<div class="layui-col-lg12">
<form class="layui-form">
<div class="layui-col-lg6">
<form class="layui-form layui-form-pane">
<div class="layui-form-item">
<label class="layui-form-label">分类名称</label>
<div class="layui-input-block">
@ -27,6 +27,20 @@ @@ -27,6 +27,20 @@
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">父级分类</label>
<div class="layui-input-block">
<select name="fid" lay-verify="">
<option value="0"></option>
<?php foreach ($categorys as $key => $category) {
?>
<option value="<?php echo $category['id']; ?>"><?php echo $category['name']; ?></option>
<?php } ?>
</select>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">权重</label>
<div class="layui-input-block">
@ -49,10 +63,8 @@ @@ -49,10 +63,8 @@
</div>
</div>
<div class="layui-form-item">
<div class="layui-input-block">
<button class="layui-btn" lay-submit lay-filter="add_category">添加</button>
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
</div>
</div>
</form>
</div>

7
templates/admin/add_link.php

@ -5,16 +5,15 @@ @@ -5,16 +5,15 @@
<!-- 内容主体区域 -->
<div class="layui-row content-body">
<div class="layui-col-lg12">
<form class="layui-form">
<form class="layui-form layui-form-pane">
<div class="layui-form-item">
<label class="layui-form-label">URL</label>
<div class="layui-input-block">
<input type="url" id = "url" name="url" required lay-verify="required|url" placeholder="请输入有效链接" autocomplete="off" class="layui-input">
<input id = "url" name="url" required lay-verify="required" placeholder="请输入有效链接" autocomplete="off" class="layui-input">
</div>
</div>
<!-- 添加备用链接 -->
<div class="layui-col-lg12">
<form class="layui-form">
<div class="layui-form-item">
<label class="layui-form-label">备用URL</label>
<div class="layui-input-block">
@ -64,12 +63,10 @@ @@ -64,12 +63,10 @@
</div>
</div>
<div class="layui-form-item">
<div class="layui-input-block">
<button class="layui-btn" lay-submit lay-filter="add_link">添加</button>
<!-- <button class="layui-btn" lay-submit lay-filter="get_link_info">识别</button> -->
<a href="javascript:;" class="layui-btn" onclick="get_link_info()">识别</a>
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
</div>
</div>
</form>
</div>

9
templates/admin/add_quick_tpl.php

@ -11,13 +11,12 @@ @@ -11,13 +11,12 @@
<meta name="HandheldFriendly" content="true">
<title>快速添加</title>
<link rel="stylesheet" type="text/css" href="templates/admin/static/add_quick_tpl.css" />
<link rel="stylesheet" type="text/css" href="https://libs.xiaoz.top/layui/v2.5.4/css/layui.css" />
<link rel="stylesheet" type="text/css" href="static/layui/css/layui.css" />
</head>
<body>
<div class="quick-main">
<div class="title">
<i class="iconfont icon--_tianjia"></i>快速添加当前连接
<i class="iconfont icon--_tianjia"></i>快速添加链接到OneNav
</div>
<form class="layui-form">
<div class="list">
@ -44,11 +43,11 @@ @@ -44,11 +43,11 @@
</div>
<div class="li">
是否私有
<input type="checkbox" lay-skin="switch" lay-text="是|否" name="property" value = "1">
<input type="checkbox" lay-skin="switch" lay-text="是|否" name="property" value = "1" checked>
</div>
</div>
<div class="list">
<textarea name="description" id = "description" placeholder="请输入站点描述(选填)" ></textarea>
<textarea name="description" id = "description" style = "height:64px;" placeholder="请输入站点描述(选填)" ></textarea>
</div>
<div class="list-3">
<button class="close">关闭</button>

34
templates/admin/edit_category.php

@ -11,8 +11,8 @@ @@ -11,8 +11,8 @@
</div>
</div>
<!-- 说明提示框END -->
<div class="layui-col-lg12">
<form class="layui-form">
<div class="layui-col-lg6">
<form class="layui-form layui-form-pane">
<div class="layui-form-item" style = "display:none;">
<label class="layui-form-label">分类ID</label>
<div class="layui-input-block">
@ -22,21 +22,39 @@ @@ -22,21 +22,39 @@
<div class="layui-form-item">
<label class="layui-form-label">分类名称</label>
<div class="layui-input-block">
<input type="text" name="name" required lay-verify="required" value = '<?php echo $category['name']; ?>' placeholder="请输入分类名称" autocomplete="off" class="layui-input">
<input type="text" name="name" required lay-verify="required" value = '<?php echo $category_one['name']; ?>' placeholder="请输入分类名称" autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">父级分类</label>
<div class="layui-input-block">
<select name="fid" lay-verify="">
<option value="<?php echo $category_one['fid']; ?>"><?php echo $category_one['fname']; ?></option>
<?php foreach ($categorys as $key => $category) {
if ( $category['id'] == $category_one['fid'] ) {
continue;
}
?>
<option value="<?php echo $category['id']; ?>"><?php echo $category['name']; ?></option>
<?php } ?>
</select>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">字体图标</label>
<div class="layui-input-block">
<input type="text" name="font_icon" value = '<?php echo $category['font_icon']; ?>' placeholder="请输入字体图标,如:fa fa-bookmark-o" autocomplete="off" class="layui-input">
<input type="text" name="font_icon" value = '<?php echo $category_one['font_icon']; ?>' placeholder="请输入字体图标,如:fa fa-bookmark-o" 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="number" name="weight" min = "0" max = "999" value = "<?php echo $category['weight']; ?>" required lay-verify="required|number" placeholder="权重越高,排名越靠前,范围为0-999" autocomplete="off" class="layui-input">
<input type="number" name="weight" min = "0" max = "999" value = "<?php echo $category_one['weight']; ?>" required lay-verify="required|number" placeholder="权重越高,排名越靠前,范围为0-999" autocomplete="off" class="layui-input">
</div>
</div>
@ -44,21 +62,19 @@ @@ -44,21 +62,19 @@
<div class="layui-form-item">
<label class="layui-form-label">是否私有</label>
<div class="layui-input-block">
<input type="checkbox" name="property" value = "1" lay-skin="switch" <?php echo $category['checked']; ?> lay-text="是|否">
<input type="checkbox" name="property" value = "1" lay-skin="switch" <?php echo $category_one['checked']; ?> lay-text="是|否">
</div>
</div>
<div class="layui-form-item layui-form-text">
<label class="layui-form-label">描述</label>
<div class="layui-input-block">
<textarea name="description" placeholder="请输入内容" class="layui-textarea"><?php echo $category['description']; ?></textarea>
<textarea name="description" placeholder="请输入内容" class="layui-textarea"><?php echo $category_one['description']; ?></textarea>
</div>
</div>
<div class="layui-form-item">
<div class="layui-input-block">
<button class="layui-btn" lay-submit lay-filter="edit_category">更新</button>
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
</div>
</div>
</form>
</div>

2
templates/admin/footer.php

@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
</div>
<script src = 'static/js/jquery.min.js'></script>
<script src = 'static/layui/layui.js'></script>
<script src="static/js/md5.min.js"></script>
<script src="templates/admin/static/embed.js?v=<?php echo $version; ?>"></script>
</body>
</html>

6
templates/admin/index.php

@ -10,6 +10,9 @@ @@ -10,6 +10,9 @@
<div class="layui-col-lg4">
<div class = "admin-msg">当前版本:<?php echo file_get_contents('version.txt'); ?></div>
</div>
<div class="layui-col-lg4">
<div class = "admin-msg">最新版本:<span><span id = "getting">获取中...</span><a href = "https://github.com/helloxz/onenav/releases" title = "下载最新版OneNav" target = "_blank" id="latest_version"></a></span></div>
</div>
<div class="layui-col-lg4">
<div class = "admin-msg">QQ群1:147687134</div>
</div>
@ -34,6 +37,9 @@ @@ -34,6 +37,9 @@
<div class="layui-col-lg4">
<div class = "admin-msg">捐赠地址: <a href="https://dwz.ovh/donation" rel = "nofollow" target="_blank">https://dwz.ovh/donation</a></div>
</div>
<div class="layui-col-lg4">
<div class = "admin-msg">Chrome浏览器扩展: <a href="https://dwz.ovh/4kxn2" title = "适用于Chromium内核的浏览器扩展" rel = "nofollow" target="_blank">https://dwz.ovh/4kxn2</a></div>
</div>
<!-- 日志输出窗口 -->
<div class="layui-col-lg12">

2
templates/admin/left.php

@ -23,7 +23,6 @@ @@ -23,7 +23,6 @@
</ul>
<!-- 系统设置 -->
</ul>
<ul class="layui-nav layui-nav-tree" lay-filter="test">
<li class="layui-nav-item layui-nav-itemed">
<a class="" href="javascript:;">系统设置</a>
@ -31,6 +30,7 @@ @@ -31,6 +30,7 @@
<dd><a href="/index.php?c=admin&page=setting/site">站点设置</a></dd>
<dd><a href="/index.php?c=admin&page=setting/theme">主题设置</a></dd>
<dd><a href="/index.php?c=admin&page=setting/transition_page">过渡页面</a></dd>
<dd><a href="/index.php?c=admin&page=setting/api">获取API</a></dd>
</dl>
</li>
</ul>

52
templates/admin/setting/api.php

@ -0,0 +1,52 @@ @@ -0,0 +1,52 @@
<?php echo $transition_page['control']; ?>
<!-- API页面设置 -->
<?php require_once(dirname(__DIR__).'/header.php'); ?>
<?php include_once(dirname(__DIR__).'/left.php'); ?>
<div class="layui-body">
<!-- 内容主体区域 -->
<div class="layui-row content-body">
<!-- 说明提示框 -->
<div class="layui-col-lg12">
<div class="setting-msg">
API使用说明,请参考:<a href="https://dwz.ovh/viot5" target = "_blank" title = "OneNav API使用说明">https://dwz.ovh/viot5</a>
</div>
</div>
<!-- 说明提示框END -->
<div class="layui-col-lg6">
<form class="layui-form layui-form-pane" action="">
<div class="layui-form-item">
<label class="layui-form-label" style = "width:130px;">用户名</label>
<div class="layui-input-inline">
<input style = "width:400px;" type="text" readonly="readonly" name="username" value = "<?php echo USER; ?>" autocomplete="off" placeholder="OneNav用户名" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label" style = "width:130px;">SecretKey</label>
<div class="layui-input-inline">
<input style = "width:400px;" type="text" readonly="readonly" name="SecretKey" id = "SecretKey" value = "<?php echo $SecretKey; ?>" autocomplete="off" placeholder="OneNav SecretKey" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label" style = "width:130px;">Token</label>
<div class="layui-input-inline">
<input style = "width:400px;" type="text" name="token" id="token" readonly="readonly" autocomplete="off" placeholder="点击下方按钮可以计算Token" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<button class="layui-btn" lay-submit="" lay-filter="create_sk">生成SecretKey</button>
<button class="layui-btn" lay-submit="" lay-filter="change_sk">更换SecretKey</button>
<button class="layui-btn" lay-submit="" lay-filter="cal_token">计算Token</button>
</div>
</form>
</div>
</div>
</div>
<?php include_once(dirname(__DIR__).'/footer.php'); ?>

9
templates/admin/setting/site.php

@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
<?php include_once(dirname(__DIR__).'/left.php'); ?>
<div class="layui-body">
<!-- 内容主体区域 -->
<div class="layui-row content-body">
<div class="layui-row content-body" style="padding-bottom: 3em;">
<!-- 说明提示框 -->
<div class="layui-col-lg12">
<div class="setting-msg">
@ -58,6 +58,13 @@ @@ -58,6 +58,13 @@
</div>
</div>
<div class="layui-form-item layui-form-text">
<label class="layui-form-label">自定义footer</label>
<div class="layui-input-block">
<textarea name = "custom_footer" placeholder="自定义站点底部信息,请填写HTML代码" class="layui-textarea"><?php echo $site['custom_footer']; ?></textarea>
</div>
</div>
<div class="layui-form-item">
<button class="layui-btn" lay-submit="" lay-filter="set_site">保存设置</button>
</div>

4
templates/admin/static/add_quick_tpl.css

@ -59,8 +59,8 @@ @@ -59,8 +59,8 @@
box-sizing: content-box;
}
.quick-main{
width: 400px;
height: 460px;
width: 360px;
height: 420px;
margin: auto;
padding: 20px;
background-color: white;

71
templates/admin/static/embed.js

@ -15,6 +15,7 @@ layui.use(['element','table','layer','form','upload'], function(){ @@ -15,6 +15,7 @@ layui.use(['element','table','layer','form','upload'], function(){
,cols: [[ //表头
{field: 'id', title: 'ID', width:80, sort: true, fixed: 'left'}
,{field: 'name', title: '分类名称', width:160}
,{field: 'fname', title: '父级分类', width:160}
,{field: 'add_time', title: '添加时间', width:160, sort: true,templet:function(d){
var add_time = timestampToTime(d.add_time);
return add_time;
@ -291,6 +292,67 @@ layui.use(['element','table','layer','form','upload'], function(){ @@ -291,6 +292,67 @@ layui.use(['element','table','layer','form','upload'], function(){
return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。
});
//生成token
form.on('submit(create_sk)', function(data){
if( data.field.SecretKey == '' ) {
$.post('/index.php?c=api&method=create_sk',data.field,function(data,status){
//如果添加成功
if(data.code == 0) {
$("#SecretKey").val(data.data);
layer.msg('SecretKey生成完毕!', {icon: 1});
}
else{
layer.msg(data.err_msg, {icon: 5});
}
});
}
else{
layer.msg('SecretKey已经存在!', {icon: 5});
}
//console.log(data.field) //当前容器的全部表单字段,名值对形式:{name: value}
return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。
});
//更换token
form.on('submit(change_sk)', function(data){
if( data.field.SecretKey != '' ) {
$.post('/index.php?c=api&method=create_sk',data.field,function(data,status){
//如果添加成功
if(data.code == 0) {
$("#SecretKey").val(data.data);
layer.msg('SecretKey已更换!', {icon: 1});
}
else{
layer.msg(data.err_msg, {icon: 5});
}
});
}
else{
layer.msg('请先生成SecretKey!', {icon: 5});
}
//console.log(data.field) //当前容器的全部表单字段,名值对形式:{name: value}
return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。
});
//计算token
form.on('submit(cal_token)', function(data){
if( (data.field.SecretKey != '') && (data.field.username != '' ) ) {
let username = data.field.username;
let sk = data.field.SecretKey;
let token = md5(username + sk);
$("#token").val(token);
layer.msg('token计算成功!', {icon: 1});
}
else{
layer.msg('SecretKey为空,请先生成!', {icon: 5});
}
//console.log(data.field) //当前容器的全部表单字段,名值对形式:{name: value}
return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。
});
//添加链接
form.on('submit(add_link)', function(data){
$.post('/index.php?c=api&method=add_link',data.field,function(data,status){
@ -526,3 +588,12 @@ function getQueryVariable(variable) @@ -526,3 +588,12 @@ function getQueryVariable(variable)
}
return(false);
}
//获取最新版本
function get_latest_version(){
$.get("https://git.xiaoz.me/xiaoz/onenav/raw/branch/main/version.txt",function(data,status){
$("#getting").hide();
$("#latest_version").text(data);
});
}
get_latest_version();

1
templates/baisuTwo/css/style.css

@ -1050,6 +1050,7 @@ footer a:hover { @@ -1050,6 +1050,7 @@ footer a:hover {
display: flex;
justify-content: flex-start;
align-items: center;
overflow:hidden;white-space: nowrap;text-overflow: ellipsis;-o-text-overflow:ellipsis;
}
.m-navlist a.list i {
display: block;

24
templates/baisuTwo/index.php

@ -15,7 +15,7 @@ @@ -15,7 +15,7 @@
<meta name="keywords" content="<?php echo $site['keywords']; ?>" />
<meta name="description" content="<?php echo $site['description']; ?>" />
<link rel="stylesheet" type="text/css" href="templates/<?php echo $template; ?>/css/style.css" />
<link rel="stylesheet" href="https://libs.xiaoz.top/font-awesome/4.7.0/css/font-awesome.css">
<link rel="stylesheet" href="static/font-awesome/4.7.0/css/font-awesome.css">
<link rel="stylesheet" type="text/css" href="static/layui/css/layui.css" />
<?php echo $site['custom_header']; ?>
</head>
@ -54,16 +54,29 @@ @@ -54,16 +54,29 @@
<div class="type-list">
<?php
foreach ($categorys as $category) {
foreach ($category_parent as $category) {
$font_icon = empty($category['font_icon']) ? '' : "<i class='{$category['font_icon']}'></i> ";
?>
<div class="list">
<a class="catlist" href="#category-<?php echo $category['id']; ?>">
<a class="catlist" style="overflow:hidden;white-space: nowrap;text-overflow: ellipsis;-o-text-overflow:ellipsis;" href="#category-<?php echo $category['id']; ?>">
<?php echo $font_icon; ?>
<?php echo htmlspecialchars_decode($category['name']); ?>
</a>
<span class="editFid" data-fid = "<?php echo $category['id']; ?>"><i class="iconfont icon-bianji"></i></span>
</div>
<!-- 遍历二级分类-->
<?php foreach (get_category_sub($category['id']) AS $category_sub){
?>
<div class="list" style="padding-left:1em;">
<a class="catlist" style="font-size:12px;font-weight: normal;overflow:hidden;white-space: nowrap;text-overflow: ellipsis;-o-text-overflow:ellipsis;" href="#category-<?php echo $category_sub['id']; ?>">
<i class="<?php echo $category_sub['font_icon']; ?>"></i>
<?php echo htmlspecialchars_decode($category_sub['name']); ?>
</a>
<span class="editFid" data-fid = "<?php echo $category_sub['id']; ?>"><i class="iconfont icon-bianji"></i></span>
</div>
<?php } ?>
<!-- 遍历二级分类END-->
<?php } ?>
<div class="list add" id="addCat">
@ -216,11 +229,14 @@ @@ -216,11 +229,14 @@
<!--底部版权 S-->
<footer>
<?php if( empty( $site['custom_footer']) ){ ?>
© 2022 BaiSu,Powered by
<a target="_blank" href="https://github.com/helloxz/onenav" title="简约导航/书签管理器" rel="nofollow">OneNav</a>
<br> The theme author is
<a href="https://gitee.com/baisucode/onenav" target="_blank">BaiSu</a>
<?php }else{
echo $site['custom_footer'];
} ?>
</footer>
<!--底部版权 E-->
<!--返回顶部 S-->

4
templates/baisuTwo/info.json

@ -2,8 +2,8 @@ @@ -2,8 +2,8 @@
"name":"百素主题2",
"description":"适用于OneNav的百素主题2",
"homepage":"https://gitee.com/baisucode/baisu-two",
"version":"1.0.0",
"update":"2022/04/15",
"version":"1.0.1",
"update":"2022/04/22",
"author":"baisu",
"screenshot":"https://img.rss.ink/imgs/2022/03/cba9f1946776a8f0.png"
}

57
templates/default/index.php

@ -8,11 +8,11 @@ @@ -8,11 +8,11 @@
<meta name="keywords" content="<?php echo $site['keywords']; ?>" />
<meta name="description" content="<?php echo $site['description']; ?>" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel='stylesheet' href='/static/mdui/css/mdui.css'>
<link rel='stylesheet' href='https://libs.xiaoz.top/jQuery-contextMenu/2.9.2/jquery.contextMenu.min.css'>
<link rel="stylesheet" href="https://libs.xiaoz.top/font-awesome/4.7.0/css/font-awesome.css">
<link rel='stylesheet' href='static/mdui/css/mdui.css'>
<link rel='stylesheet' href='static/jQuery-contextMenu/jquery.contextMenu.min.css'>
<link rel="stylesheet" href="static/font-awesome/4.7.0/css/font-awesome.css">
<link rel="stylesheet" href="templates/<?php echo $template; ?>/static/style.css?v=<?php echo $version; ?>">
<script src = '/static/mdui/js/mdui.min.js'></script>
<script src = 'static/mdui/js/mdui.min.js'></script>
<?php echo $site['custom_header']; ?>
</head>
<body class = "mdui-drawer-body-left mdui-appbar-with-toolbar mdui-theme-primary-indigo mdui-theme-accent-pink mdui-loaded">
@ -84,17 +84,43 @@ @@ -84,17 +84,43 @@
<ul class="mdui-list">
<?php
//遍历分类目录并显示
foreach ($categorys as $category) {
foreach ($category_parent as $category) {
//var_dump($category);
$font_icon = empty($category['font_icon']) ? '' : "<i class='{$category['font_icon']}'></i> ";
?>
<div class="mdui-collapse" mdui-collapse>
<div class="mdui-collapse-item">
<div class="mdui-collapse-item-header">
<a href="#category-<?php echo $category['id']; ?>">
<li class="mdui-list-item mdui-ripple">
<div class="mdui-list-item-content category-name"><?php echo $font_icon; ?><?php echo htmlspecialchars_decode($category['name']); ?></div>
<i class="mdui-collapse-item-arrow mdui-icon material-icons">keyboard_arrow_down</i>
</li>
</a>
</div>
<!-- 遍历二级分类 -->
<div class="mdui-collapse-item-body">
<ul>
<?php foreach (get_category_sub( $category['id'] ) AS $category_sub){
?>
<a href="#category-<?php echo $category_sub['id']; ?>">
<li class="mdui-list-item mdui-ripple" style="margin-left:-4.3em;">
<div class="mdui-list-item-content category_sub">
<i>
<i class="<?php echo $category_sub['font_icon']; ?>"></i><?php echo htmlspecialchars_decode($category_sub['name']); ?>
</i>
</div>
</li>
</a>
<?php } ?>
</ul>
</div>
<!-- 遍历二级分类END-->
<?php } ?>
</div>
</div>
<a href="https://www.xiaoz.me/" target="_blank" title="小z博客">
<li class="mdui-list-item mdui-ripple">
<div class="mdui-list-item-content category-name"><i class="fa fa-user-circle"></i> About</div>
@ -156,9 +182,10 @@ @@ -156,9 +182,10 @@
foreach ($links as $link) {
//默认描述
$link['description'] = empty($link['description']) ? '作者很懒,没有填写描述。' : $link['description'];
$id = $link['id'];
//var_dump($link);
?>
<a href="/index.php?c=click&id=<?php echo $link['id']; ?>" target="_blank" title = "<?php echo $link['description']; ?>">
<div class="mdui-col-lg-3 mdui-col-md-4 mdui-col-xs-12 link-space" id = "id_<?php echo $link['id']; ?>" link-title = "<?php echo $link['title']; ?>" link-url = "<?php echo $link['url']; ?>">
<!--定义一个卡片-->
<div class="mdui-card link-line mdui-hoverable">
@ -169,22 +196,18 @@ @@ -169,22 +196,18 @@
</div>
<?php } ?>
<!-- 角标END -->
<a href="/index.php?c=click&id=<?php echo $link['id']; ?>" target="_blank" title = "<?php echo $link['description']; ?>">
<div class="mdui-card-primary" style = "padding-top:16px;">
<div class="mdui-card-primary-title link-title">
<img src="https://favicon.rss.ink/v1/<?php echo base64($link['url']); ?>" alt="HUAN" width="16" height="16">
<span class="link_title"><?php echo $link['title']; ?></span>
</div>
</div>
</a>
<!-- 卡片的内容end -->
<div class="mdui-card-content mdui-text-color-black-disabled" style="padding-top:0px;"><span class="link-content"><?php echo $link['description']; ?></span></div>
</div>
<!--卡片END-->
</div>
</a>
<?php } ?>
<!-- 遍历链接END -->
<?php } ?>
@ -198,14 +221,18 @@ @@ -198,14 +221,18 @@
<!-- footer部分 -->
<!-- 未经作者授权,请勿去掉版权,否则可能影响作者更新代码的积极性或直接放弃维护此项目。 -->
<footer>
<?php if(empty( $site['custom_footer']) ){ ?>
© 2022 Powered by <a target = "_blank" href="https://github.com/helloxz/onenav" title = "简约导航/书签管理器" rel = "nofollow">OneNav</a>.The author is <a href="https://www.xiaoz.me/" target="_blank" title = "小z博客">xiaoz.me</a>
<?php }else{
echo $site['custom_footer'];
} ?>
</footer>
<!-- footerend -->
</body>
<script src = '/static/js/jquery.min.js'></script>
<script src="/static/layer/layer.js"></script>
<script src = 'https://libs.xiaoz.top/jQuery-contextMenu/2.9.2/jquery.contextMenu.min.js'></script>
<script src = 'https://libs.xiaoz.top/clipBoard.js/clipBoard.min.js'></script>
<script src = 'static/js/jquery.min.js'></script>
<script src="static/layer/layer.js"></script>
<script src = 'static/jQuery-contextMenu/jquery.contextMenu.min.js'></script>
<script src = 'static/js/clipBoard.min.js'></script>
<script src = "templates/<?php echo $template; ?>/static/holmes.js"></script>
<script src="templates/<?php echo $template; ?>/static/embed.js?v=<?php echo $version; ?>"></script>
<script>

4
templates/default/info.json

@ -2,8 +2,8 @@ @@ -2,8 +2,8 @@
"name":"OneNav默认主题",
"description":"OneNav默认主题",
"homepage":"https://www.xiaoz.me",
"version":"0.9.18",
"update":"2022/04/13",
"version":"0.9.19",
"update":"2022/04/22",
"author":"xiaoz<xiaoz93@outlook.com>",
"screenshot":"https://img.rss.ink/imgs/2022/03/42ed3ef2c4a50f6d.png"
}

5
templates/default/static/embed.js

@ -245,3 +245,8 @@ function on_search(){ @@ -245,3 +245,8 @@ function on_search(){
// default: alert(event);
// }
// });
//链接跳转
function goto(url) {
window.location.href = url;
}

13
templates/default/static/style.css

@ -146,3 +146,16 @@ footer a{ @@ -146,3 +146,16 @@ footer a{
padding-top: 70px;
margin-top: -70px;
} */
.category_sub{
font-size:14px;
margin-left:0px;
/*padding-left:8px;*/
}
.category_sub i{
padding-right:5px;
}
#drawer{
background-color: #FEFEFE;
box-shadow:1px 0 5px 0 #eeeeee;
}
Loading…
Cancel
Save