试用后感言:
Alist网盘的作者代码更新速度很快,不过目前该网盘V3版本前端兼容性太差了,电脑端浏览器都没问题,但移动端,真的相当拉跨,只有kiwi browser或移动版chrome是正常没有任何毛病的,其它的浏览器都有或多或少毛病,有的垃圾移动端浏览器都用不了alist,期待作者的后续修复
>alist-github<—>alist官网<—>alist网盘挂载说明<
安装及配置
安装命令:
docker run -d \
--name=alist \
-v alist宿主机目录:/opt/alist/data \
-v alist宿主机目录/storage:/opt/alist/data/storage \
-p 宿主机端口:5244 \
--restart=always \
xhofe/alist:latest
安装好后:
- 查看容器日志里username/password或username/passwd获取:账号密码
输入账号密码,进入alist后台:
- 设置/前端,修改账号密码
- 账号/添加,类型选择本地,根目录路径填:/opt/alist/data/storage,虚拟路径就是名称例如:/网盘,随便填
隐藏文件配置:
/\/隐藏文件夹名称/i /\/隐藏文件.后缀/i ( 例如:/\/生活记录.mp4/i )
美化
例如我的美化及页面修改代码:
自定义头部代码:
<script src=”https://polyfill.io/v3/polyfill.min.js?features=String.prototype.replaceAll”></script>
<p style=”text-align: center;”><span style=”color: #000000;”><strong>(✿◕‿◕✿)><a style=”color: #000000;” href=”https://www.pcl06605523399.top:9043/” target=”_blank” rel=”noopener”>导航主页</a>—<a style=”color: #000000;” href=”/影视” target=”_blank” rel=”noopener”>视频</a>—<a style=”color: #000000;” href=”/@login?redirect=/@manage”>管理界面</a><(✿◕‿◕✿)</strong></span></p>
<style>
.notify-render .hope-close-button{
display: none;
}
.hope-stack.hope-c-dhzjXW.hope-c-PJLV.hope-c-PJLV-ihYBJPK-css {display: none !important;}
.obj-box.hope-stack.hope-c-dhzjXW.hope-c-PJLV.hope-c-PJLV-igScBhH-css {
background-color: rgba(255, 255, 255, 0.2) !important;
}
.hope-c-PJLV-ijgzmFG-css{
background-color: rgba(255, 255, 255, 0.2) !important;
}
.footer {
display: none !important;
}
</style>
自定义内容代码:
<style>#Snow{position:fixed;top:0;left:0;width:100%;height:100%;z-index:99999;background:RGB(225,225,225,0.1);pointer-events:none}</style>
<p>
<canvas id=”Snow” width=”1366″ height=”274″></canvas>
</p>
<p>
<script>(function() {
var requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame ||
function(callback) {
window.setTimeout(callback, 1000 / 60);
};
window.requestAnimationFrame = requestAnimationFrame;
})();
(function() {
var flakes = [],
canvas = document.getElementById(“Snow”),
ctx = canvas.getContext(“2d”),
flakeCount = 200,
mX = -100,
mY = -100
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
function snow() {
ctx.clearRect(0, 0, canvas.width, canvas.height);
for (var i = 0; i < flakeCount; i++) {
var flake = flakes[i],
x = mX,
y = mY,
minDist = 150,
x2 = flake.x,
y2 = flake.y;
var dist = Math.sqrt((x2 – x) * (x2 – x) + (y2 – y) * (y2 – y)),
dx = x2 – x,
dy = y2 – y;
if (dist < minDist) {
var force = minDist / (dist * dist),
xcomp = (x – x2) / dist,
ycomp = (y – y2) / dist,
deltaV = force / 2;
flake.velX -= deltaV * xcomp;
flake.velY -= deltaV * ycomp;
} else {
flake.velX *= 0.98;
if (flake.velY <= flake.speed) {
flake.velY = flake.speed
}
flake.velX += Math.cos(flake.step += .05) * flake.stepSize;
}
ctx.fillStyle = “rgba(255,255,255,” + flake.opacity + “)”;
flake.y += flake.velY;
flake.x += flake.velX;
if (flake.y >= canvas.height || flake.y <= 0) {
reset(flake);
}
if (flake.x >= canvas.width || flake.x <= 0) {
reset(flake);
}
ctx.beginPath();
ctx.arc(flake.x, flake.y, flake.size, 0, Math.PI * 2);
ctx.fill();
}
requestAnimationFrame(snow);
};
function reset(flake) {
flake.x = Math.floor(Math.random() * canvas.width);
flake.y = 0;
flake.size = (Math.random() * 3) + 2;
flake.speed = (Math.random() * 1) + 0.5;
flake.velY = flake.speed;
flake.velX = 0;
flake.opacity = (Math.random() * 0.5) + 0.3;
}
function init() {
for (var i = 0; i < flakeCount; i++) {
var x = Math.floor(Math.random() * canvas.width),
y = Math.floor(Math.random() * canvas.height),
size = (Math.random() * 3) + 2,
speed = (Math.random() * 1) + 0.5,
opacity = (Math.random() * 0.5) + 0.3;
flakes.push({
speed: speed,
velY: speed,
velX: 0,
x: x,
y: y,
size: size,
stepSize: (Math.random()) / 30 * 1,
step: 0,
angle: 180,
opacity: opacity
});
}
snow();
};
document.addEventListener(“mousemove”, function(e) {
mX = e.clientX,
mY = e.clientY
});
window.addEventListener(“resize”, function() {
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
});
init();
})();</script>
</p>
<style>
.hope-ui-light .hope-c-PJLV-iiBaxsN-css{
background: rgba(255,255,255,0.8)!important;
}
.hope-ui-light .hope-c-kvTTWD-hYRNAb-variant-filled{
background: rgba(255,255,255,0.5)!important;
}
.hope-ui-light .hope-c-PJLV-ikEIIxw-css{
background: rgba(255,255,255,0.5)!important;
}
</style>
<style>
body{
background-image: url(“/d/public/background/xj7v.jpg”) !important;
background-repeat:no-repeat;background-size:cover;background-attachment:fixed;background-position-x:center;
}
body:before{
content:”;
position:fixed;
z-index:-1;
top:0;
right:0;
bottom:0;
left:0;
background:url(/d/public/background/xj7v.jpg) center 0 no-repeat;
background-size:cover;
}
</style>
<!–top.js–>
<script type=”text/javascript” src=”/d/public/topjs/jquery.min.js”></script>
<script type=”text/javascript” src=”/d/public/topjs/go-top.js”></script>
免费壁纸api接口及其它api接口
<!–top.js–>
<script type=”text/javascript” src=”/d/public/topjs/jquery.min.js”></script>
<script type=”text/javascript” src=”/d/public/topjs/go-top.js”></script>
以上是回到顶部的js脚本代码,请把这js脚本 目录下3个文件都下载下来并放到你的Alist网盘目录下,/d/public/topjs这是js脚本的路径,自行修改
完整美化代码示例
-
自定义头部(head)
<!–Alist V3建议添加的,已经默认添加了,如果你的没有建议加上–>
<script src=”https://polyfill.io/v3/polyfill.min.js?features=String.prototype.replaceAll”></script>
<!–引入字体,全局字体使用–>
<link rel=”stylesheet” href=”https://npm.elemecdn.com/lxgw-wenkai-webfont@1.1.0/lxgwwenkai-regular.css” />
<!– Font6,自定义底部使用和看板娘使用的图标和字体文件–>
<link type=’text/css’ rel=”stylesheet” href=”https://npm.elemecdn.com/font6pro@6.0.1/css/fontawesome.min.css” media=’all’>
<link href=”https://npm.elemecdn.com/font6pro@6.0.1/css/all.min.css” rel=”stylesheet”>
<!–音乐播放器所用的文件–>
<!– require APlayer –>
<link rel=”stylesheet” href=”https://npm.elemecdn.com/aplayer@1.10.1/dist/APlayer.min.css”>
<script src=”https://npm.elemecdn.com/aplayer@1.10.1/dist/APlayer.min.js”></script>
<!– require MetingJS –>
<script src=”https://npm.elemecdn.com/meting@2.0.1/dist/Meting.min.js”></script>
<style>
/* 去除通知栏 右上角 X */
.notify-render .hope-close-button{
display: none;
}
/*白天背景图*/
.hope-ui-light{
background-image: url(“http://pic.rmb.bdstatic.com/bjh/7569b014a1abafd5481298763300ae1d.png”) !important;
background-repeat:no-repeat;background-size:cover;background-attachment:fixed;background-position-x:center;
}
/*夜间背景图*/
.hope-ui-dark {
background-image: url(http://pic.rmb.bdstatic.com/bjh/ebe942a9de49856f389c65f25a338335.png) !important;
background-repeat:no-repeat;background-size:cover;background-attachment:fixed;background-position-x:center;
}
/*主列表白天模式透明*/
.obj-box.hope-stack.hope-c-dhzjXW.hope-c-PJLV.hope-c-PJLV-igScBhH-css {
background-color: rgba(255, 255, 255, 0.5) !important;
}
/*主列表夜间模式透明*/
.obj-box.hope-stack.hope-c-dhzjXW.hope-c-PJLV.hope-c-PJLV-iigjoxS-css {
background-color:rgb(0 0 0 / 70%)!important;
}
/*readme白天模式透明*/
.hope-c-PJLV.hope-c-PJLV-ikSuVsl-css{
background-color: rgba(255, 255, 255, 0.5) !important;
}
/*readme夜间模式透明*/
.hope-c-PJLV.hope-c-PJLV-iiuDLME-css {
background-color:rgb(0 0 0 / 70%)!important;
}
/*顶部右上角切换按钮透明*/
.hope-c-ivMHWx-hZistB-cv.hope-icon-button{
background-color: rgba(255, 255, 255, 0.3) !important;
}
/*右下角侧边栏按钮透明*/
.hope-c-PJLV-ijgzmFG-css{
background-color: rgba(255, 255, 255, 0.5) !important;
}
/*顶部右上角白天夜间模式切换按钮都透明*/
.hope-ui-light .hope-c-ivMHWx-hZistB-cv.hope-icon-button {
background-color: rgba(255, 255, 255, 0.3)!important;
}
.hope-ui-dark .hope-c-ivMHWx-hZistB-cv.hope-icon-button {
background-color:rgb(0 0 0 / 10%)!important;
}
/*右下角侧边栏按钮白天夜间模式都透明*/
.hope-ui-light .hope-c-PJLV-ijgzmFG-css {
background-color: rgba(255, 255, 255, 0.5)!important;
}
.hope-ui-dark .hope-c-PJLV-ijgzmFG-css {
background-color:rgb(0 0 0 / 50%)!important;
}
/*白天模式代码块透明*/
.hope-ui-light pre{
background-color: rgba(255, 255, 255, 0.1) !important;
}
/*夜间模式代码块透明*/
.hope-ui-dark pre {
background-color: rgba(255, 255, 255, 0) !important;
}
/*白天模式 搜索主体+毛玻璃*/
.hope-ui-light .hope-c-PJLV-iiBaxsN-css{
background-color: rgba(255,255,255,0.2)!important;
backdrop-filter: blur(10px)!important;
}
/*白天模式 搜索栏输入框+毛玻璃*/
.hope-ui-light .hope-c-kvTTWD-hYRNAb-variant-filled{
background-color: rgba(255,255,255,0.2)!important;
backdrop-filter: blur(10px)!important;
}
/*白天模式 搜索按钮+毛玻璃*/
.hope-ui-light .hope-c-PJLV-ikEIIxw-css{
background-color: rgba(255,255,255,0.2)!important;
backdrop-filter: blur(10px)!important;
padding: var(–hope-space-1)!important;
}
/*夜间模式搜索主体+毛玻璃*/
.hope-ui-dark .hope-c-PJLV-iiBaxsN-css{
background-color: rgb(0 0 0 / 10%)!important;
backdrop-filter: blur(10px)!important;
}
/*夜间模式搜索栏+毛玻璃*/
.hope-ui-dark .hope-c-kvTTWD-hYRNAb-variant-filled{
background-color: rgb(0 0 0 / 10%)!important;
backdrop-filter: blur(10px)!important;
}
/*夜间模式 搜索按钮+毛玻璃*/
.hope-ui-dark .hope-c-PJLV-ikEIIxw-css{
background-color: rgb(0 0 0 / 10%)!important;
backdrop-filter: blur(10px)!important;
padding: var(–hope-space-1)!important;
}
/*底部CSS,.APP .tanle这三个一起的*/
dibu {
border-top: 0px;
position: absolute;
bottom: 0;
width: 100%;
margin: 0px;
padding: 0px;
}
.App {
min-height: 85vh;
}
.table {
margin: auto;
}
/*去掉底部*/
.footer {
display: none !important;
}
/*全局字体*/
*{font-family:LXGW WenKai}
*{font-weight:bold}
body {font-family: LXGW WenKai;}
/*渐变背景CSS*/
#canvas-basic {
position: fixed;
display: block;
width: 100%;
height: 100%;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: -999;
}
</style>
<!–看板娘 -自定义大小,隐藏对话框和对话框高度–>
<style type=”text/css”>
#waifu #live2d {
height: 350px!important;
width: 350px!important;
}
#waifu-tips {
top: -60px;
/*display:none !important;隐藏对话框*/
}
</style>
<!–看板娘加载指定模型–>
<script>
localStorage.setItem(‘modelId’, ‘7’);
localStorage.setItem(‘modelTexturesId’, ‘3’);
</script>
<!–自己选左右–>
<script src=”https://api.itggg.cn/live2dnew/left/index.js”></script>
<script src=”https://api.itggg.cn/live2dnew/right/index.js”></script>
<!–以下四个两个主用两个备用的,选一条使用即可–>
<!–自己选左右–>
<script src=”https://api.itggg.cn/live2dnew/left/index.js”></script>
<script src=”https://api.itggg.cn/live2dnew/right/index.js”></script>
<!–备用的,自己选左右–>
<script src=”https://luluossfile.lulufind.com/work/teacher_u20221017ce7b5991_1666420843832_19934968_file.js”></script>
<script src=”https://luluossfile.lulufind.com/work/teacher_u20221017bb6d7454_1666420849979_19584065_file.js”></script>
-
自定义内容(body)代码:
<!–延迟加载–>
<!–如果要写自定义内容建议都加到这个延迟加载的范围内–>
<div id=”customize” style=”display: none;”>
<div>
<!–音乐播放器–>
<meting-js fixed=”true” autoplay=”false” theme=”#409EFF” list-folded=”true” auto=”QQ音乐或者网易云的链接”></meting-js>
<br />
<center class=”dibu”>
<div style=” line-height: 20px;font-size: 9pt;font-weight: bold;”>
<span>
“
<span style=”color: rgb(13, 109, 252); font-weight: bold;” id=”hitokoto”>
<a href=”#” id=”hitokoto_text”>
“生如夏花之绚烂,死如秋叶之静美”
</a>
</span> “
</span>
<p style=”margin-left: 10rem;font-size: 8pt;”>
<small>
—— Anwen’s Cloud
</small>
</p>
</div>
<div style=”font-size: 13px; font-weight: bold;”>
<span class=”nav-item”>
<a class=”nav-link” href=”xxxxxxxxxx”
target=”_blank”>
<i class=”fab fa-qq” style=”color:#409EFF” aria-hidden=”true”>
</i>
QQ |
</a>
</span>
<span class=”nav-item”>
<a class=”nav-link” href=”mailto:xxxxx@foxmail.com” target=”_blank”>
<i class=”fa-duotone fa-envelope-open” style=”color:#409EFF” aria-hidden=”true”>
</i>
邮箱 |
</a>
</span>
<span class=”nav-item”>
<a class=”nav-link” href=”xxxxxx” target=”_blank”>
<i class=”fas fa-edit” style=”color:#409EFF” aria-hidden=”true”>
</i>
博客 |
</a>
</span>
<span class=”nav-item”>
<a class=”nav-link” href=”xxxxxxxx” target=”_blank”>
<i class=”fas fa-comment-lines” style=”color:#409EFF;” aria-hidden=”true”>
</i>
留言 |
</a>
</span>
<span class=”nav-item”>
<a class=”nav-link” href=”xxxxxxx” target=”_blank”>
<i class=”fa fa-cloud-download” style=”color:#409EFF;” aria-hidden=”true”>
</i>
云盘 |
</a>
</span>
<!–后台入口–>
<span class=”nav-item”>
<a class=”nav-link” href=”/@manage” target=”_blank”>
<i class=”fa-solid fa-folder-gear” style=”color:#409EFF;” aria-hidden=”true”>
</i>
管理 |
</a>
</span>
<!–版权,请尊重作者–>
<span class=”nav-item”>
<a class=”nav-link” href=”https://github.com/Xhofe/alist” target=”_blank”>
<i class=”fa-solid fa-copyright” style=”color:#409EFF;” aria-hidden=”true”>
</i>
Alist
</a>
</span>
<br />
</div>
</center>
<br />
<br />
</div>
<!–一言API–>
<script src=”https://v1.hitokoto.cn/?encode=js&select=%23hitokoto” defer></script>
<!–延迟加载范围到这里结束–>
</div>
<!–延迟加载配套使用JS–>
<script>
let interval = setInterval(() => {
if (document.querySelector(“.footer”)) {
document.querySelector(“#customize”).style.display = “”;
clearInterval(interval);
}
}, 200);
</script>
<!– 渐变背景初始化,如果要使用渐变背景把下面的那一行注释去掉即可–>
<!– 下面的几行都是渐变的一套,自定义头部内还有一个关联的自定义CSS –>
<!–<canvas id=”canvas-basic”></canvas> –>
<script src=”https://npm.elemecdn.com/granim@2.0.0/dist/granim.min.js”></script>
<script>
var granimInstance = new Granim({
element: ‘#canvas-basic’,
direction: ‘left-right’,
isPausedWhenNotInView: true,
states : {
“default-state”: {
gradients: [
[‘#a18cd1’, ‘#fbc2eb’],
[‘#fff1eb’, ‘#ace0f9’],
[‘#d4fc79’, ‘#96e6a1’],
[‘#a1c4fd’, ‘#c2e9fb’],
[‘#a8edea’, ‘#fed6e3’],
[‘#9890e3’, ‘#b1f4cf’],
[‘#a1c4fd’, ‘#c2e9fb’],
[‘#fff1eb’, ‘#ace0f9’]
]
}
}
});
</script>