1
0
mirror of https://gitee.com/bookshelfplus/bookshelfplus synced 2025-09-13 20:21:38 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
Files
bookshelfplus/bookshelfplus-frontend/views/component/footer.html

83 lines
4.8 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<div class="footer" style="margin-top: 10vh;">
<hr>
<p>
书栖网 • 2021-2022
<br>
<small>
<br>
本项目是开源项目项目的发展离不开大家的支持欢迎前往项目仓库点亮Star支持我们❤
<br>
<a target="_blank" href="https://gitee.com/bookshelfplus/bookshelfplus"><img
src="/assets/image/svg/gitee.svg" style="height: 1.05em; vertical-align: middle;" /><span
style="vertical-align: middle; margin-left: 3px;">码云</span></a>
<span style="vertical-align: middle;"> · </span>
<a target="_blank" href="https://github.com/bookshelfplus/bookshelfplus"><img
src="/assets/image/svg/github.svg" style="height: 1.08em; vertical-align: middle;" /><span
style="vertical-align: middle; margin-left: 3px;">GitHub</span></a>
<br>
<a href="/status">网站状态检测</a>
·
<a href="/about">关于</a>
·
<a href="/feedback">反馈</a>
</small>
</p>
</div>
<!-- https://gist.github.com/macbookandrew/f33dbbc0aa582d0515919dc5fb95c00a -->
<script>
// 获取网页上的所有文字
// refer: https://www.cnblogs.com/yzeng/p/8268731.html
function getPageText() {
var str = document.documentElement.innerText;
str += "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; // 数字和英文全部包含进去,避免因为部分数字或字母造成大量生成字体
var res = [].filter.call(str, (s, i, o) => o.indexOf(s) == i).sort().join('').trim();
return res;
}
function fontmin(text) {
axios.post('../fontmin/getfont', { text: text, font: "" }, { timeout: 1000 })
.then(function (response) {
// 当接口成功返回时动态设置css
loadFont(response.data.url);
$("html,body").css("transition", ".05s");
setTimeout(() => {
$("html,body").css("opacity", "1");
}, 100)
})
.catch(function (error) {
console.log("字体加载失败", error);
$("html,body").css("transition", ".05s");
setTimeout(() => {
$("html,body").css("opacity", "1");
}, 100)
});
}
function loadFont(fontUrl) {
let styleDom = document.createElement('style');
styleDom.type = 'text/css';
const cssText = `
@font-face {
font-family: bookshelfplusFont;
src: url("${fontUrl}") format("truetype");
}
`
styleDom.appendChild(document.createTextNode(cssText));
document.getElementsByTagName('head')[0].appendChild(styleDom)
console.log("字体加载成功");
}
$(document).ready(function () {
var allText = getPageText();
// console.log(allText);
if ('<%= typeof(minfontOnLoad) === "undefined" ? "true" : minfontOnLoad %>' != "false") {
fontmin(allText);
} else {
// $("html,body").css("opacity", "1");
}
});
</script>
<script>
console.error(`%c请注意未经允许获取网站数据属于【非法获取计算机信息系统数据】需要承担响应法律责任。\n%c以下是《刑法》第二百八十五条节选。\n\n非法获取计算机信息系统数据、非法控制计算机信息系统罪\n根据《中华人民共和国刑法》第二百八十五条规定,非法获取计算机信息系统数据、非法控制计算机信息系统罪,是指违反国家规定,侵入国家事务、国防建设、尖端科学技术领域以外的计算机信息系统或者采用其他技术手段,获取该计算机信息系统中存储、处理或者传输的数据,情节严重的行为。\n刑法第285条第2款明确规定犯本罪的处三年以下有期徒刑或者拘役并处或者单处罚金情节特别严重的处三年以上七年以下有期徒刑并处罚金。\n\n提供侵入、非法控制计算机信息系统程序、工具罪\n根据《中华人民共和国刑法》第二百八十五条规定刑法第285条第1款保护的是国家事务、国防建设、尖端科学技术领域的计算机信息系统。《刑法修正案》第9条第1款在刑法第285条中增加1款作为第2款扩大了对计算机信息系统的保护范围将违反国家规定侵入第1款规定以外的计算机信息系统或者采用其他技术手段获取该计算机信息系统中存储、处理或者传输的数据或者对该计算机信息系统实施非法控制情节严重的行为规定为犯罪。`, "color: red; font-weight: bold;", "color: red; line-height: 1.8em;");
</script>