页脚金色Halo

Halo设置 -> 代码注入 -> 全局Head 中注入

<script>
  /* Halo Pro */
  document.addEventListener('DOMContentLoaded', function () {
    const link = document.querySelector('footer a[href*="https://halo.run"]');
    if(link) {
      link.textContent = 'Halo Pro ' + '[[${site.version}]]';
    }

    const themePlus2 = document.querySelector('footer a[href*="https://github.com/zsjy/halo-theme-dream2.0-plus"]');
    if(themePlus2) {
      themePlus2.textContent = 'Dream2 Plus ' + '[[${theme.spec.version}]]';
    }
  });
</script>

<style>
    /* 页脚的链接文本动画效果 */
    @keyframes maskedAnimation {
        0% {
            background-position: 0 0;
        }
        100% {
            background-position: -100% 0;
        }
    }

    footer .footer-copyright {
        font-weight: bold;
        background-image: -webkit-linear-gradient(left, #ffdd00, #3e2f08 25%, #ffdd00 50%, #3e2f08 75%, #ffdd00);
        -webkit-text-fill-color: transparent;
        -webkit-background-clip: text;
        -webkit-background-size: 200% 100%;
        -webkit-animation: maskedAnimation 1s infinite linear;
    }
</style>

侧边栏金色Halo

Halo设置 -> 代码注入 -> 全局Head 中注入

<script>
    /* Halo Pro */
    document.addEventListener('DOMContentLoaded', function () {
        const link = document.querySelector('footer a[href*="https://halo.run"]');
        /*页脚的halo*/
        if(link) {
           link.textContent = 'Halo Pro ' + '[[${site.version}]]';
        }
        /*页脚的主题信息*/
        const themePlus2 = document.querySelector('footer a[href*="https://github.com/zsjy/halo-theme-dream2.0-plus"]');
        if(themePlus2) {
           themePlus2.textContent = 'Dream2 Plus ' + '[[${theme.spec.version}]]';
        }

        /*侧边栏内halo信息元素ID*/
        const link = document.getElementById("halo-version-span");
        if(link) {
          link.textContent = '博客:Halo Pro ' + '[[${site.version}]]';
        }
        /*侧边栏内主题信息元素ID*/
        const themePlus2 = document.getElementById('theme-version-span');
        if(themePlus2) {
          themePlus2.textContent = '主题:Dream2.0 Plus ' + '[[${theme.spec.version}]]';
        }
    });
</script>

<style>
    /* 页脚的链接文本动画效果 */
    @keyframes maskedAnimation {
        0% {
            background-position: 0 0;
        }
        100% {
            background-position: -100% 0;
        }
    }
    footer .footer-copyright,
    #halo-version-span,
    #theme-version-span {
        font-weight: bold;
        background-image: -webkit-linear-gradient(left, #ffdd00, #3e2f08 25%, #ffdd00 50%, #3e2f08 75%, #ffdd00);
        -webkit-text-fill-color: transparent;
        -webkit-background-clip: text;
        -webkit-background-size: 200% 100%;
        -webkit-animation: maskedAnimation 1s infinite linear;
    }
</style>

侧边栏信息

主题 -> 侧边栏配置 -> 侧边栏展示

  • 模块类型:公告模块与自定义模块均可使用。

  • 侧边栏内容:

<b>站点信息:</b>
<div style="display: flex; align-items: center;color: var(--main);margin-top: 10px;">
  <i class="hc-dongtaitiaocha ri-news-line" style="color: var(--theme);font-size: 1.3em;margin-right:5px;"></i>
  <b><span id="halo-version-span"></span></b>
</div>

<div style="display: flex; align-items: center;color: var(--main);margin-top: 10px;">
  <i class="hc-zhuti1 ri-t-shirt-2-line" style="color: var(--theme);font-size: 1.3em;margin-right:5px;"></i>
  <b><span id="theme-version-span"></span></b>
</div>

<!-- 当不需要站点隐私策略时,下方内容全部删除即可。 -->
<div style="display: flex; align-items: center;color: var(--main);margin-top: 10px;">
  <i class="hc-yinsizhengce ri-git-repository-private-line" style="color: var(--theme);font-size: 1.3em;margin-right:5px;"></i>
  <div>
		点击查看本站<a style="cursor: var(--cursor-pointer);    color: var(--theme) !important;" href="/privacy-policy" title="隐私政策"><b>隐私政策</b></a>  
  </div>
</div>

<i class="hc-为本站使用的 iconfont图标,请根据实际需求替换为相应的图标类名。或者保留 ri-前缀的 class内容以使用内置图标。