关于Alist网盘点美化

发布时间:2024年01月22日

前言:

近期心血来潮想搭建个个人的媒体服务器,在处理好域名及内网后看着Alist网盘总感觉少了点什么,故尝试对其进行简单美化。

本次美化纯取悦自己,该随笔不一定有下文。

目前仅做了背景的相关改动,其余的慢慢摸索,其他终端的背景设置以右端显示,实际效果一般,播放器的引用还在摸索中,有机会再完善。

由于本人比较懒,代码全塞前端了,具体如下:

<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" />
<style>
?? ?/*白天*/
?? ?.hope-ui-light{
?? ?background-image:url(https://images6.alphacoders.com/132/1327487.png) !important;
?? ?background-attachment: fixed;
?? ?background-position: 100%;
?? ?background-size: cover;
?? ?background-color: rgba(255, 255, 255, 0.1) !important;
?? ?}
?? ?/*黑夜*/
?? ?.hope-ui-dark{
?? ?background-image:url(https://images2.alphacoders.com/743/743487.jpg) !important;
?? ?background-attachment: fixed;
?? ?background-position: 100%;
?? ?background-size: cover;
?? ?background-color: rgba(255, 255, 255, 0) !important;
?? ?border-top: #768ba2 !important;
?? ?}
?? ?/*列表*/
?? ?.hope-c-PJLV-igScBhH-css {
?? ?background-color:#ffffff70 !important;
?? ?box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.09) !important;
?? ?border-radius: 0.5rem !important;
?? ?padding: 0.75rem !important;
?? ?backdrop-filter: blur(8px)!important;
?? ?}
?? ?.hope-c-PJLV-iigjoxS-css {
?? ?background-color:#ffffff33 !important;
?? ?box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.09) !important;
?? ?border-radius: 0.5rem !important;
?? ?padding: 0.75rem !important;
?? ?backdrop-filter: blur(8px)!important;
?? ?}
?? ?.hope-c-kvTTWD-hYRNAb-variant-filled {
?? ?background-color:#ffffff00 !important;
?? ?}
??? .hope-c-PJLV-ijgzmFG-css {
?? ?background-color:#ffffff70 !important;
?? ?}
??? .hope-c-hOYTCS {
?? ?background-color:#66ccff88 !important;
?? ?}
??? .aplayer-lrc {
?? ?background-color:#ffffff70 !important;
?? ?}
??? .aplayer {
?? ?background-color:#ffffff70 !important;
?? ?}
</style>

鼠标点击出随机颜色的爱心:

<!--鼠标点击出随机颜色的爱心-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
 
<body>
    <!-- 网页鼠标点击特效(爱心) -->
    <script type="text/javascript">
         ! function (e, t, a) {
            function r() {
                for (var e = 0; e < s.length; e++) s[e].alpha <= 0 ? (t.body.removeChild(s[e].el), s.splice(e, 1)) : (s[
                        e].y--, s[e].scale += .004, s[e].alpha -= .013, s[e].el.style.cssText = "left:" + s[e].x +
                    "px;top:" + s[e].y + "px;opacity:" + s[e].alpha + ";transform:scale(" + s[e].scale + "," + s[e]
                    .scale + ") rotate(45deg);background:" + s[e].color + ";z-index:99999");
                requestAnimationFrame(r)
            }
            function n() {
                var t = "function" == typeof e.onclick && e.onclick;
                e.onclick = function (e) {
                    t && t(), o(e)
                }
            }
 
            function o(e) {
                var a = t.createElement("div");
                a.className = "heart", s.push({
                    el: a,
                    x: e.clientX - 5,
                    y: e.clientY - 5,
                    scale: 1,
                    alpha: 1,
                    color: c()
                }), t.body.appendChild(a)
            }
 
            function i(e) {
                var a = t.createElement("style");
                a.type = "text/css";
                try {
                    a.appendChild(t.createTextNode(e))
                } catch (t) {
                    a.styleSheet.cssText = e
                }
                t.getElementsByTagName("head")[0].appendChild(a)
            }
 
            function c() {
                return "rgb(" + ~~(255 * Math.random()) + "," + ~~(255 * Math.random()) + "," + ~~(255 * Math
                    .random()) + ")"
            }
            var s = [];
            e.requestAnimationFrame = e.requestAnimationFrame || e.webkitRequestAnimationFrame || e
                .mozRequestAnimationFrame || e.oRequestAnimationFrame || e.msRequestAnimationFrame || function (e) {
                    setTimeout(e, 1e3 / 60)
                }, i(
                    ".heart{width: 10px;height: 10px;position: fixed;background: #f00;transform: rotate(45deg);-webkit-transform: rotate(45deg);-moz-transform: rotate(45deg);}.heart:after,.heart:before{content: '';width: inherit;height: inherit;background: inherit;border-radius: 50%;-webkit-border-radius: 50%;-moz-border-radius: 50%;position: fixed;}.heart:after{top: -5px;}.heart:before{left: -5px;}"
                ), n(), r()
        }(window, document);
    </script>

去掉底部的?Powered by Alist:

 

<!--去掉底部Powered by Alist--->
<style>
.footer span,.footer a:nth-of-type(1){
  display:none;
}
</style>

横向文字滚动:

<marquee>
<b id="nr">(。・?・)ノ゙嗨,欢迎来到我的小破站。帅气漂亮的小哥哥小姐姐</b> 
</marquee></div>

炫彩文字:

<style>#nr{font-size:20px;margin: 0;background: -webkit-linear-gradient(left,#ffffff,#ff0000 6.25%,#ff7d00 12.5%,#ffff00 18.75%,#00ff00 25%,#00ffff 31.25%,#0000ff 37.5%,#ff00ff 43.75%,#ffff00 50%,#ff0000 56.25%,#ff7d00 62.5%,#ffff00 68.75%,#00ff00 75%,#00ffff 81.25%,#0000ff 87.5%,#ff00ff 93.75%,#ffff00 100%);-webkit-background-clip: text;-webkit-text-fill-color: transparent;background-size: 200% 100%;animation: masked-animation 2s infinite linear;}@keyframes masked-animation {0% {background-position: 0 0;}100% {background-position: -100%, 0;}}</style><div style="background-color:#333;border-radius:25px;box-shadow:0px 0px 5px #f200ff;padding:5px;margin-top:10px;margin-bottom:0px;"><marquee>
<b id="nr">(。・?・)ノ゙嗨,欢迎来到我的小破站。帅气漂亮的小哥哥小姐姐</b> </marquee></div>

运行的alist设置例子:

<!--开站时间开始-->       
<center>
        <br />
  </span>
            <span class="nav-item">
                <a class="nav-link" href="https://nodepanels.com/share/server?auth=c3ce0f96aab24a63b88044dede67165d&key=MzkxZjI4OTI0ODJmNDg5MWFjZDFlZDI2ZmUwYTJiYTR8bDEzMTQ0QHFxLmNvbXxqYzhidHd4bmZueDQ=" target="_blank">
             <span id="timeDate">载入天数...</span><span id="times">载入时分秒...</span> <script language="javascript"> 
    var now = new Date();
    function createtime(){
        var grt= new Date("04/17/2022 00:00:00");/*---这里是网站的启用时间--*/
        now.setTime(now.getTime()+250);
        days = (now - grt ) / 1000 / 60 / 60 / 24;
        dnum = Math.floor(days);
        hours = (now - grt ) / 1000 / 60 / 60 - (24 * dnum);
        hnum = Math.floor(hours);
        if(String(hnum).length ==1 ){hnum = "0" + hnum;}
        minutes = (now - grt ) / 1000 /60 - (24 * 60 * dnum) - (60 * hnum);
        mnum = Math.floor(minutes);
        if(String(mnum).length ==1 ){mnum = "0" + mnum;}
        seconds = (now - grt ) / 1000 - (24 * 60 * 60 * dnum) - (60 * 60 * hnum) - (60 * mnum);
        snum = Math.round(seconds);
        if(String(snum).length ==1 ){snum = "0" + snum;}
        document.getElementById("timeDate").innerHTML = "??本站已稳定运行"+dnum+"天";
        document.getElementById("times").innerHTML = hnum + "小时" + mnum + "分" + snum + "秒";
    }
    setInterval("createtime()",250); 
</script> 

<!--去掉底部Powered by Alist--->
<style>
.footer span,.footer a:nth-of-type(1){
  display:none;
}
</style>
<!--鼠标点击出随机颜色的爱心-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
 
<body>
    <!-- 网页鼠标点击特效(爱心) -->
    <script type="text/javascript">
         ! function (e, t, a) {
            function r() {
                for (var e = 0; e < s.length; e++) s[e].alpha <= 0 ? (t.body.removeChild(s[e].el), s.splice(e, 1)) : (s[
                        e].y--, s[e].scale += .004, s[e].alpha -= .013, s[e].el.style.cssText = "left:" + s[e].x +
                    "px;top:" + s[e].y + "px;opacity:" + s[e].alpha + ";transform:scale(" + s[e].scale + "," + s[e]
                    .scale + ") rotate(45deg);background:" + s[e].color + ";z-index:99999");
                requestAnimationFrame(r)
            }
            function n() {
                var t = "function" == typeof e.onclick && e.onclick;
                e.onclick = function (e) {
                    t && t(), o(e)
                }
            }
 
            function o(e) {
                var a = t.createElement("div");
                a.className = "heart", s.push({
                    el: a,
                    x: e.clientX - 5,
                    y: e.clientY - 5,
                    scale: 1,
                    alpha: 1,
                    color: c()
                }), t.body.appendChild(a)
            }
 
            function i(e) {
                var a = t.createElement("style");
                a.type = "text/css";
                try {
                    a.appendChild(t.createTextNode(e))
                } catch (t) {
                    a.styleSheet.cssText = e
                }
                t.getElementsByTagName("head")[0].appendChild(a)
            }
 
            function c() {
                return "rgb(" + ~~(255 * Math.random()) + "," + ~~(255 * Math.random()) + "," + ~~(255 * Math
                    .random()) + ")"
            }
            var s = [];
            e.requestAnimationFrame = e.requestAnimationFrame || e.webkitRequestAnimationFrame || e
                .mozRequestAnimationFrame || e.oRequestAnimationFrame || e.msRequestAnimationFrame || function (e) {
                    setTimeout(e, 1e3 / 60)
                }, i(
                    ".heart{width: 10px;height: 10px;position: fixed;background: #f00;transform: rotate(45deg);-webkit-transform: rotate(45deg);-moz-transform: rotate(45deg);}.heart:after,.heart:before{content: '';width: inherit;height: inherit;background: inherit;border-radius: 50%;-webkit-border-radius: 50%;-moz-border-radius: 50%;position: fixed;}.heart:after{top: -5px;}.heart:before{left: -5px;}"
                ), n(), r()
        }(window, document);
    </script>
<!--看板娘 - 黑猫-->
    <script src="https://eqcn.ajz.miesnfu.com/wp-content/plugins/wp-3d-pony/live2dw/lib/L2Dwidget.min.js"></script>
    <script>
      L2Dwidget.init({
        "model": {
          jsonPath: "https://unpkg.com/live2d-widget-model-hijiki/assets/hijiki.model.json", <!--这里改模型,前面后面都要改-->
          "scale": 1
        },
        "display": {
          "position": "left", <!--设置看板娘的上下左右位置-->
          "width": 100,
          "height": 200,
          "hOffset": 0,
          "vOffset": 0
        },
        "mobile": {
          "show": true,
          "scale": 0.5
        },
        "react": {
          "opacityDefault": 0.7, <!--设置透明度-->
          "opacityOnHover": 0.2
        }
      });
      window.onload = function() {
        $("#live2dcanvas").attr("style", "position: fixed; opacity: 0.7; left: 70px; bottom: 0px; z-index: 1; pointer-events: none;")
      }
    </script>
  </div>

<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" />
<style>
    /*白天*/
    .hope-ui-light{
    background-image:url(https://images6.alphacoders.com/132/1327487.png) !important;
    background-attachment: fixed;
    background-position: 100%;
    background-size: cover;
    background-color: rgba(255, 255, 255, 0.1) !important;
    }
    /*黑夜*/
    .hope-ui-dark{
    background-image:url(https://images2.alphacoders.com/743/743487.jpg) !important;
    background-attachment: fixed;
    background-position: 100%;
    background-size: cover;
    background-color: rgba(255, 255, 255, 0) !important;
    border-top: #768ba2 !important;
    }
    /*列表*/
    .hope-c-PJLV-igScBhH-css {
    background-color:#ffffff70 !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.09) !important;
    border-radius: 0.5rem !important;
    padding: 0.75rem !important;
    backdrop-filter: blur(8px)!important;
    }
    .hope-c-PJLV-iigjoxS-css {
    background-color:#ffffff33 !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.09) !important;
    border-radius: 0.5rem !important;
    padding: 0.75rem !important;
    backdrop-filter: blur(8px)!important;
    }
    .hope-c-kvTTWD-hYRNAb-variant-filled {
    background-color:#ffffff00 !important;
    }
    .hope-c-PJLV-ijgzmFG-css {
    background-color:#ffffff70 !important;
    }
    .hope-c-hOYTCS {
    background-color:#66ccff88 !important;
    }
    .aplayer-lrc {
    background-color:#ffffff70 !important;
    }
    .aplayer {
    background-color:#ffffff70 !important;
    }
</style>

<style>#nr{font-size:20px;margin: 0;background: -webkit-linear-gradient(left,#ffffff,#ff0000 6.25%,#ff7d00 12.5%,#ffff00 18.75%,#00ff00 25%,#00ffff 31.25%,#0000ff 37.5%,#ff00ff 43.75%,#ffff00 50%,#ff0000 56.25%,#ff7d00 62.5%,#ffff00 68.75%,#00ff00 75%,#00ffff 81.25%,#0000ff 87.5%,#ff00ff 93.75%,#ffff00 100%);-webkit-background-clip: text;-webkit-text-fill-color: transparent;background-size: 200% 100%;animation: masked-animation 2s infinite linear;}@keyframes masked-animation {0% {background-position: 0 0;}100% {background-position: -100%, 0;}}</style><div style="background-color:#333;border-radius:25px;box-shadow:0px 0px 5px #f200ff;padding:5px;margin-top:10px;margin-bottom:0px;"><marquee>
<b id="nr">(。・?・)ノ゙嗨,需要技术远程安装请添加微信号:</b> </marquee></div>

文章来源:https://blog.csdn.net/2301_81547508/article/details/135747215
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。