<div class="page-header only-word">
        <div class="content flex-center " style="">
        <div class="container">
            <header class="post-header">
        <h1 class="post-title" style="">Sakurairo页尾美化方法</h1>
        <div class="post-metas">
                            <span>最后更新于 2024-12-30</span>
                                    <a href="https://moecat.cc/author/nicocat/">
                    <span class="meta-author">
                        <img alt='nicocat' src='https://weavatar.com/avatar/1aeca73a20d6fea54d81269e6bc00175745e013f9a221a1ccd9492e2ff726287?s=24&#038;d=mm&#038;r=g' srcset='https://weavatar.com/avatar/1aeca73a20d6fea54d81269e6bc00175745e013f9a221a1ccd9492e2ff726287?s=48&#038;d=mm&#038;r=g 2x' class='avatar avatar-24 photo avatar-small' height='24' width='24' loading='lazy' decoding='async'/>                        nicocat                    </span>
                </a>
                                <span>3616 次阅读</span>
                            </div>
    </header>
            </div>
    </div>
</div>
<h2 class="wp-block-heading" id="h-排面-服务提供商logo阵列">排面（服务提供商logo阵列）</h2>



<p class="wp-block-paragraph">经典的页尾供应商logo阵列，<br>可以移除原有theme_info并替换为典中典的云服务供应商Logo。<br>直接全量引入该javascript即可，<br>如果开启了Pjax移除代码需要添加保活</p>



<p class="wp-block-paragraph">以下Javascript代码是我目前在使用的，<br>使用它们可以移除原有的<code>Theme Sakurairo | Created by Fuukei</code><br>并替换为 <code>Cloudflare Sakurairo 阿里云</code> 并列</p>



<pre class="wp-block-code"><code class="language-javascript">document.querySelectorAll('.theme-info a').forEach(el =&gt; el.remove()); // 移除theme-info
let position = '.site-footer &gt; .site-info';
let ProviderList = `
  &lt;style&gt;
    .provider {
        display: flex;
        align-items: center;
        height: 1em; 
        gap: 5px; 
        text-decoration: none; 
        font-size: 1em; 
        color: inherit; 
    }
    .provider_list {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px; 
        text-align: center;
    }
    .logo-icon {
        height: 1em; 
        width: auto;
        vertical-align: middle;
    }
  &lt;/style&gt;
  &lt;div class="provider_list"&gt;
      &lt;a class="provider" href="http://cloudflare.com" target="_blank" rel="nofollow"&gt;
          &lt;img class="logo-icon" src="https://files.nicocat.cc/wp-content/uploads/2024/10/cf.svg" alt=""&gt;
      &lt;/a&gt;
      &lt;a class="provider" href="https://docs.fuukei.org/" target="_blank" data-v-d5925166="" rel="nofollow"&gt;
          &lt;img class="logo-icon" src="https://files.nicocat.cc/wp-content/uploads/2024/10/theme.webp" alt=""&gt;
          &lt;span style="font-family: Segoe UI Symbol;color:grey"&gt;Sakurairo&lt;/span&gt;
      &lt;/a&gt;
      &lt;a class="provider" href="http://aliyun.com" target="_blank" rel="nofollow"&gt;
          &lt;img class="logo-icon" src="https://files.nicocat.cc/wp-content/uploads/2024/10/aliyun.png" alt=""&gt;
      &lt;/a&gt;
  &lt;/div&gt;
`;
var SiteFooter = document.querySelector(position);
if (SiteFooter) {
    SiteFooter.insertAdjacentHTML('afterend', ProviderList);
}</code></pre>



<p class="wp-block-paragraph">你可以将以下内容添加进设置项的<code>页尾——附加代码</code>中<br></p>



<pre class="wp-block-code"><code class="language-javascript">&lt;script&gt;
document.addEventListener('DOMContentLoaded',function(){
    document.querySelectorAll('.theme-info a').forEach(el =&gt; el.remove()); // 移除theme-info
    
    let position = '.site-footer &gt; .site-info';
    
    let ProviderList = `
      &lt;style&gt;
        .provider {
            display: flex;
            align-items: center;
            height: 1em; 
            gap: 5px; 
            text-decoration: none; 
            font-size: 1em; 
            color: inherit; 
        }
        .provider_list {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px; 
            text-align: center;
        }
        .logo-icon {
            height: 1em; 
            width: auto;
            vertical-align: middle;
        }
      &lt;/style&gt;
      &lt;div class="provider_list"&gt;
          &lt;a class="provider" href="http://cloudflare.com" target="_blank" rel="nofollow"&gt;
              &lt;img class="logo-icon" src="https://files.nicocat.cc/wp-content/uploads/2024/10/cf.svg" alt=""&gt;
          &lt;/a&gt;
          &lt;a class="provider" href="https://docs.fuukei.org/" target="_blank" data-v-d5925166="" rel="nofollow"&gt;
              &lt;img class="logo-icon" src="https://files.nicocat.cc/wp-content/uploads/2024/10/theme.webp" alt=""&gt;
              &lt;span style="font-family: Segoe UI Symbol;color:grey"&gt;Sakurairo&lt;/span&gt;
          &lt;/a&gt;
          &lt;a class="provider" href="http://aliyun.com" target="_blank" rel="nofollow"&gt;
              &lt;img class="logo-icon" src="https://files.nicocat.cc/wp-content/uploads/2024/10/aliyun.png" alt=""&gt;
          &lt;/a&gt;
      &lt;/div&gt;
    `;
    
    var SiteFooter = document.querySelector(position);
    if (SiteFooter) {
        SiteFooter.insertAdjacentHTML('afterend', ProviderList);
    }
})
&lt;/script&gt;</code></pre>



<h2 class="wp-block-heading" id="h-wp小工具区">WP小工具区</h2>



<p class="wp-block-paragraph">Sakurairo的WP小工具区仅在视窗宽度&gt;860px的情况下显示，用户可以通过点击页尾的圆规图标呼出</p>



<p class="wp-block-paragraph">WP小工具区就是呼出的按钮面板顶部那一块，你可以在Wordpress外观设置——小工具那边自定义它</p>



<h2 class="wp-block-heading">旧版Sakurairo页尾</h2>



<p class="wp-block-paragraph">使用以下CSS样式可以将3.0页尾改回Sakurairo页尾样式</p>



<pre class="wp-block-code"><code class="language-css">.site-footer {
    position: relative;
    max-width: unset;
    width: unset;
    margin: unset;
    border-radius: 0;
    z-index: 1;
    box-shadow: unset;
}

body.dark .site-footer {
    background: var(--dark-bg-primary) !important;
}

#page.wrapper {
    padding-bottom: unset!important;
}</code></pre>
