点击展开更新日志

2025

title

xxxxx

nexttime

会有些什么呢(❁´◡`❁)

源起

自然是因为人生的意义在于折腾为了呈现更好的效果,于是参考多方大佬的教程,加到了站点上,毕竟有些修改是基于主题文件做的调整,为了更新之后也能迅速更新,因此整理一下。

如果不小心引起了大佬的不悦,请联系删除。

致谢

感谢以下佬的教程指导,非常建议直接看原出处文档的:

Akilarの糖果屋
Fomalhaut🥝

一图流

  1. 新建文件 <BlogRoot>/source/css/one_pic.css,添加内容:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    /* 页脚与头图透明 */
    #footer {
    background: transparent !important;
    }
    #page-header {
    background: transparent !important;
    }

    /* 白天模式遮罩透明 */
    #footer::before {
    background: transparent !important;
    }
    #page-header::before {
    background: transparent !important;
    }

    /* 夜间模式遮罩透明 */
    [data-theme="dark"] #footer::before {
    background: transparent !important;
    }
    [data-theme="dark"] #page-header::before {
    background: transparent !important;
    }
  2. 在主题配置文件<BlogRoot>/_config.butterfly.yml文件中的inject配置项的head子项引用:

    1
    <link rel="stylesheet" href="/css/one_pic.css" media="defer" onload="this.media='all'">
  3. 修改主题配置文件背景配置,index_imgfooter_bg配置项取消头图与页脚图的加载项避免冗余加载

    1
    2
    3
    4
    5
    6
    7
    8
    # The banner image of home page
    index_img:

    # Footer Background
    footer_bg: false

    # 设置背景
    background: /img/bg.png