修复一些bug
This commit is contained in:
parent
d02fcd843b
commit
d672d77a4a
20
README.md
20
README.md
|
@ -1,11 +1,16 @@
|
||||||
qnloft-onenav
|
qnloft-onenav
|
||||||
|
|
||||||
PHP + SQLite ,书签管理系统,网址导航系统
|
PHP + SQLite ,书签管理系统,网址导航系统
|
||||||
|
|
||||||
中文 | [English](./README_EN.md)
|
参考文档:
|
||||||
|
|
||||||
|
- [hugo 主题Demo](https://bioit.top/#friendlink)
|
||||||
|
- [hugo 主题文档](https://www.yuque.com/shenweiyan/cookbook/webstack-hugo)
|
||||||
|
- [onenav 参考文档](https://doc.xiaoz.org/books/onenav/page/7f100#bkmrk-%E7%9B%AE%E5%BD%95%E7%BB%93%E6%9E%84)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
OneNav是一款开源免费的书签(导航)管理程序,使用使用PHP + SQLite 3开发,界面简洁,安装简单,使用方便。OneNav可帮助你将浏览器书签集中式管理,解决跨设备、跨平台、跨浏览器之间同步和访问困难问题,做到一处部署,随处访问。
|
一款开源免费的书签(导航)管理程序,使用使用PHP + SQLite 3开发,界面简洁,安装简单,使用方便。OneNav可帮助你将浏览器书签集中式管理,解决跨设备、跨平台、跨浏览器之间同步和访问困难问题,做到一处部署,随处访问。
|
||||||
|
|
||||||
![](https://i.bmp.ovh/imgs/2020/12/40f222b7da7a89c9.png)
|
![](https://i.bmp.ovh/imgs/2020/12/40f222b7da7a89c9.png)
|
||||||
|
|
||||||
|
@ -23,7 +28,6 @@ OneNav是一款开源免费的书签(导航)管理程序,使用使用PHP +
|
||||||
|
|
||||||
![](https://i.bmp.ovh/imgs/2020/12/abba0af566f3c16a.png)
|
![](https://i.bmp.ovh/imgs/2020/12/abba0af566f3c16a.png)
|
||||||
|
|
||||||
> **特别声明:未经作者允许,请勿将OneNav进行获利行为或进行商业行为,亦不得用于非法用途,否则自行承担相应法律责任!!!**
|
|
||||||
|
|
||||||
## 功能特色
|
## 功能特色
|
||||||
|
|
||||||
|
@ -80,13 +84,3 @@ ___
|
||||||
|
|
||||||
* [https://dwz.ovh/qxsul](https://dwz.ovh/qxsul)
|
* [https://dwz.ovh/qxsul](https://dwz.ovh/qxsul)
|
||||||
|
|
||||||
## 鸣谢
|
|
||||||
|
|
||||||
感谢`@百素`/`@itushan`的代码贡献及主题开发,以及其它OneNav贡献者和使用者,名字太多无法一一列举,还请谅解。
|
|
||||||
|
|
||||||
OneNav诞生离不开以下项目,在此表示感谢(排名不分先后)。
|
|
||||||
|
|
||||||
* [WebStackPage](https://github.com/WebStackPage/WebStackPage.github.io)
|
|
||||||
* [LayUI](https://github.com/sentsin/layui)
|
|
||||||
* [Medoo](https://github.com/catfan/Medoo)
|
|
||||||
* [MDUI](https://github.com/zdhxiong/mdui)
|
|
||||||
|
|
BIN
data/onenav.db3
BIN
data/onenav.db3
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 5.0 KiB |
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
Binary file not shown.
After Width: | Height: | Size: 10 KiB |
File diff suppressed because it is too large
Load Diff
|
@ -505,7 +505,7 @@
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="url-content d-flex align-items-center">
|
<div class="url-content d-flex align-items-center">
|
||||||
<div class="url-img mr-2 d-flex align-items-center justify-content-center">
|
<div class="url-img mr-2 d-flex align-items-center justify-content-center">
|
||||||
<img class="lazy" src="assets/images/logos/%e8%af%ad%e9%9b%80.jpg" data-src="assets/images/logos/%e8%af%ad%e9%9b%80.jpg" onerror="javascript:this.src='assets\/images\/logos\/default.webp'" alt="语雀">
|
<img class="lazy" src="assets/images/logos/logo-collapsed@2x.png" data-src="assets/images/logos/%e8%af%ad%e9%9b%80.jpg" onerror="javascript:this.src='assets\/images\/logos\/default.webp'" alt="语雀">
|
||||||
</div>
|
</div>
|
||||||
<div class="url-info flex-fill">
|
<div class="url-info flex-fill">
|
||||||
<div class="text-sm overflowClip_1">
|
<div class="text-sm overflowClip_1">
|
||||||
|
@ -5552,6 +5552,7 @@
|
||||||
if ($('#sidebar').hasClass('show') && !$(this).hasClass('change-href')) {
|
if ($('#sidebar').hasClass('show') && !$(this).hasClass('change-href')) {
|
||||||
$('#sidebar').modal('toggle');
|
$('#sidebar').modal('toggle');
|
||||||
}
|
}
|
||||||
|
console.info($(this).attr("href").substr(0, 1))
|
||||||
if ($(this).attr("href").substr(0, 1) == "#") {
|
if ($(this).attr("href").substr(0, 1) == "#") {
|
||||||
$("html, body").animate({
|
$("html, body").animate({
|
||||||
scrollTop: $($(this).attr("href")).offset().top - 90
|
scrollTop: $($(this).attr("href")).offset().top - 90
|
||||||
|
|
|
@ -95,9 +95,9 @@
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</a>
|
</a>
|
||||||
<a href="" class="logo-collapsed">
|
<a href="" class="logo-collapsed">
|
||||||
<img src="templates/qnloft/assets/images/bt.png" height="40" class="logo-light" alt="在线工具网">
|
<img src="templates/qnloft/assets/images/logos/qnLogo.png" height="40" class="logo-light" alt="青柠炸机街">
|
||||||
<img src="templates/qnloft/assets/images/bt.png" height="40" class="logo-dark d-none"
|
<img src="templates/qnloft/assets/images/logos/qnLogo_dark.png" height="40" class="logo-dark d-none"
|
||||||
alt="在线工具网">
|
alt="青柠炸机街">
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -399,6 +399,14 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<?php
|
||||||
|
function extractHost($url)
|
||||||
|
{
|
||||||
|
$parsedUrl = parse_url($url);
|
||||||
|
return isset($parsedUrl['host']) ? $parsedUrl['host'] : null;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
<!-- 头部内容 end -->
|
<!-- 头部内容 end -->
|
||||||
<!-- 内容 -->
|
<!-- 内容 -->
|
||||||
<div id="content" class="content-site customize-site">
|
<div id="content" class="content-site customize-site">
|
||||||
|
@ -413,7 +421,8 @@
|
||||||
?>
|
?>
|
||||||
<div class="d-flex flex-fill">
|
<div class="d-flex flex-fill">
|
||||||
<h4 class="text-gray text-lg mb-4">
|
<h4 class="text-gray text-lg mb-4">
|
||||||
<i class="site-tag iconfont icon-tag icon-lg mr-1" id="<?php echo $f_category['id']; ?>"></i>
|
<i class="site-tag iconfont icon-tag icon-lg mr-1"
|
||||||
|
id="category-<?php echo $f_category['id']; ?>"></i>
|
||||||
<?php echo htmlspecialchars_decode($f_category['name']); ?>
|
<?php echo htmlspecialchars_decode($f_category['name']); ?>
|
||||||
</h4>
|
</h4>
|
||||||
</div>
|
</div>
|
||||||
|
@ -422,19 +431,21 @@
|
||||||
<?php foreach ($links as $link) {
|
<?php foreach ($links as $link) {
|
||||||
//默认描述
|
//默认描述
|
||||||
$link['description'] = empty($link['description']) ? '作者很懒,没有填写描述。' : $link['description'];
|
$link['description'] = empty($link['description']) ? '作者很懒,没有填写描述。' : $link['description'];
|
||||||
|
$webIcon = extractHost($link['url']);
|
||||||
|
// var_dump("https://api.iowen.cn/favicon/" + $webIcon + ".png");
|
||||||
?>
|
?>
|
||||||
<div class="url-card col-6 col-sm-6 col-md-4 col-xl-5a col-xxl-6a">
|
<div class="url-card col-6 col-sm-6 col-md-4 col-xl-5a col-xxl-6a">
|
||||||
<div class="url-body default">
|
<div class="url-body default">
|
||||||
<a href="<?php echo $link['url']; ?>" target="_blank" data-id=""
|
<a href="<?php echo $link['url']; ?>" target="_blank" data-id=""
|
||||||
data-url="<?php echo $link['url']; ?>" class="card no-c mb-4" data-toggle="tooltip"
|
data-url="<?php echo $link['url']; ?>" class="card no-c mb-4" data-toggle="tooltip"
|
||||||
data-placement="bottom" data-original-title="<?php echo $link['title']; ?>">
|
data-placement="bottom" data-original-title="<?php echo $link['description']; ?>">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="url-content d-flex align-items-center">
|
<div class="url-content d-flex align-items-center">
|
||||||
<div class="url-img mr-2 d-flex align-items-center justify-content-center">
|
<div class="url-img mr-2 d-flex align-items-center justify-content-center">
|
||||||
<img class="lazy"
|
<img class="lazy"
|
||||||
src="https://favicon.rss.ink/v1/<?php echo base64($link['url']); ?>"
|
src="https://api.iowen.cn/favicon/<?php echo $webIcon ?>.png"
|
||||||
data-src="https://favicon.rss.ink/v1/<?php echo base64($link['url']); ?>"
|
data-src="https://api.iowen.cn/favicon/<?php echo $webIcon ?>.png"
|
||||||
onerror="javascript:this.src='assets\/images\/logos\/default.webp'"
|
onerror="javascript:this.src='templates/qnloft/assets/images/logos/default.webp'"
|
||||||
alt="<?php echo $link['title']; ?>">
|
alt="<?php echo $link['title']; ?>">
|
||||||
</div>
|
</div>
|
||||||
<div class="url-info flex-fill">
|
<div class="url-info flex-fill">
|
||||||
|
@ -467,7 +478,8 @@
|
||||||
<!-- 遍历 二级节点 -->
|
<!-- 遍历 二级节点 -->
|
||||||
<div class="d-flex flex-fill">
|
<div class="d-flex flex-fill">
|
||||||
<h4 class="text-gray text-lg mb-4">
|
<h4 class="text-gray text-lg mb-4">
|
||||||
<i class="site-tag iconfont icon-tag icon-lg mr-1" id="<?php echo $c_category['id']; ?>"></i>
|
<i class="site-tag iconfont icon-tag icon-lg mr-1"
|
||||||
|
id="category-<?php echo $c_category['id']; ?>"></i>
|
||||||
<?php echo htmlspecialchars_decode($c_category['name']); ?>
|
<?php echo htmlspecialchars_decode($c_category['name']); ?>
|
||||||
</h4>
|
</h4>
|
||||||
</div>
|
</div>
|
||||||
|
@ -477,19 +489,21 @@
|
||||||
<?php foreach ($c_links as $link) {
|
<?php foreach ($c_links as $link) {
|
||||||
//默认描述
|
//默认描述
|
||||||
$link['description'] = empty($link['description']) ? '作者很懒,没有填写描述。' : $link['description'];
|
$link['description'] = empty($link['description']) ? '作者很懒,没有填写描述。' : $link['description'];
|
||||||
|
$webIcon = extractHost($link['url']);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<div class="url-card col-6 col-sm-6 col-md-4 col-xl-5a col-xxl-6a">
|
<div class="url-card col-6 col-sm-6 col-md-4 col-xl-5a col-xxl-6a">
|
||||||
<div class="url-body default">
|
<div class="url-body default">
|
||||||
<a href="<?php echo $link['url']; ?>" target="_blank" data-id=""
|
<a href="<?php echo $link['url']; ?>" target="_blank" data-id=""
|
||||||
data-url="<?php echo $link['url']; ?>" class="card no-c mb-4" data-toggle="tooltip"
|
data-url="<?php echo $link['url']; ?>" class="card no-c mb-4" data-toggle="tooltip"
|
||||||
data-placement="bottom" data-original-title="<?php echo $link['title']; ?>">
|
data-placement="bottom" data-original-title="<?php echo $link['description']; ?>">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="url-content d-flex align-items-center">
|
<div class="url-content d-flex align-items-center">
|
||||||
<div class="url-img mr-2 d-flex align-items-center justify-content-center">
|
<div class="url-img mr-2 d-flex align-items-center justify-content-center">
|
||||||
<img class="lazy"
|
<img class="lazy"
|
||||||
src="https://favicon.rss.ink/v1/<?php echo base64($link['url']); ?>"
|
src="https://api.iowen.cn/favicon/<?php echo $webIcon ?>.png"
|
||||||
data-src="https://favicon.rss.ink/v1/<?php echo base64($link['url']); ?>"
|
data-src="https://api.iowen.cn/favicon/<?php echo $webIcon ?>.png"
|
||||||
onerror="javascript:this.src='assets\/images\/logos\/default.webp'"
|
onerror="javascript:this.src='templates/qnloft/assets/images/logos/default.webp'"
|
||||||
alt="<?php echo $link['title']; ?>">
|
alt="<?php echo $link['title']; ?>">
|
||||||
</div>
|
</div>
|
||||||
<div class="url-info flex-fill">
|
<div class="url-info flex-fill">
|
||||||
|
@ -617,13 +631,29 @@
|
||||||
if ($('#sidebar').hasClass('show') && !$(this).hasClass('change-href')) {
|
if ($('#sidebar').hasClass('show') && !$(this).hasClass('change-href')) {
|
||||||
$('#sidebar').modal('toggle');
|
$('#sidebar').modal('toggle');
|
||||||
}
|
}
|
||||||
|
console.info($(this).attr("href"))
|
||||||
if ($(this).attr("href").substr(0, 1) == "#") {
|
if ($(this).attr("href").substr(0, 1) == "#") {
|
||||||
|
// 检查是否有有效的 href 值
|
||||||
|
var targetHref = $(this).attr("href");
|
||||||
|
|
||||||
|
if (targetHref) {
|
||||||
|
// 检查是否选择到了有效的元素
|
||||||
|
var $targetElement = $(targetHref);
|
||||||
|
|
||||||
|
if ($targetElement.length > 0) {
|
||||||
|
// 执行滚动动画
|
||||||
$("html, body").animate({
|
$("html, body").animate({
|
||||||
scrollTop: $($(this).attr("href")).offset().top - 90
|
scrollTop: $targetElement.offset().top - 90
|
||||||
}, {
|
}, {
|
||||||
duration: 500,
|
duration: 500,
|
||||||
easing: "swing"
|
easing: "swing"
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
console.error("找不到目标元素:" + targetHref);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
console.error("缺少有效的 href 属性值");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ($(this).hasClass('go-search-btn')) {
|
if ($(this).hasClass('go-search-btn')) {
|
||||||
$('#search-text').focus();
|
$('#search-text').focus();
|
||||||
|
|
Loading…
Reference in New Issue