北海的鱼 - 美化教程 https://blog.qsuu.cn/category/meihua/ zh-CN Mon, 16 Oct 2023 11:04:00 +0800 Mon, 16 Oct 2023 11:04:00 +0800 Cuteen主题侧边栏添加百度一下 https://blog.qsuu.cn/archives/42.html https://blog.qsuu.cn/archives/42.html Mon, 16 Oct 2023 11:04:00 +0800 北海的鱼 找到下方位置,添加以下代码
路径/Cuteen/include/sidebar.php
Test

<!-- 百度一下 -->
<section class="sidebar-comment-box card mt-4">
<div class="px-3 py-2 my-2 d-flex align-items-center border-bottom">
<svg t="1676984611515" class="icon icon-20 me-1" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="13091" width="200" height="200"><path d="M852.6 367.6c16.3-36.9 32.1-90.7 32.1-131.8 0-109.1-119.5-147.6-314.5-57.9-161.4-10.8-316.8 110.5-355.6 279.7 46.3-52.3 117.4-123.4 183-151.7C316.1 378.3 246.7 470 194 565.6c-31.1 56.9-66 148.8-66 217.5 0 147.9 139.3 129.8 270.4 63 47.1 23.1 99.8 23.4 152.5 23.4 145.7 0 276.4-81.4 325.2-219H694.9c-78.8 132.9-295.2 79.5-295.2-71.2h493.2c9.6-65.4-2.5-143.6-40.3-211.7zM224.8 648.3c26.6 76.7 80.6 143.8 150.4 185-133.1 73.4-259.9 43.6-150.4-185z m174-163.3c3-82.7 75.4-142.3 156-142.3 80.1 0 153 59.6 156 142.3h-312z m276.8-281.4c32.1-15.4 72.8-33 108.8-33 47.1 0 81.4 32.6 81.4 80.6 0 30-11.1 73.5-21.9 101.8-39.3-63.5-98.9-122.4-168.3-149.4z" p-id="13092" data-spm-anchor-id="a313x.7781069.0.i5" class="" fill="#1296db"></path></svg>
                <span>百度一下</span>
                <span class="ios"></span></div>
<div class="px-3 searchs">
<mip-form method="get" url="https://www.baidu.com/s" class="mip-element mip-layout-container">
<form action="https://www.baidu.com/s" method="GET" target="_blank">
<input type="text" name="wd" validatetarget="q" validatetype="must" placeholder="关键词:小熊博客" value="blog.qsuu.cn">
<div target="q">关键词:北海的鱼</div>
<input type="submit" value="搜索">
</form><font size=1.5>点击搜索,可帮助本站seo优化!</font>
</mip-form>
</div></section>

下方代码,后台添加css

/*侧栏百度一下*/
.searchs {padding-top:8px;padding-bottom:0px;padding-right:10px;padding-left:10px;
overflow: hidden;transition: all 0.3s;border-radius: 4px;position: relative;margin: 0px 0px 15px 0px;}.mip-layout-container, .mip-layout-fixed-height {margin: 0px 0px 0px 0px;display: block;position: relative;}mip-form form {position: relative;}.searchs input[type="text"] {border: #45B6F7 1px solid;border-radius: 4px;width: calc( 100% - 2px );}mip-form input[type='text'], mip-form input[type='input'], mip-form input[type='datetime'], mip-form input[type='email'], mip-form input[type='number'], mip-form input[type='tel'], mip-form input[type='url'] {padding-right: 30px;}.searchs input {outline: none;}mip-form input, mip-form textarea, mip-form select {border: 1px solid #f1f1f1;padding: 6px;display: block;box-sizing: border-box;-webkit-box-sizing: border-box;resize: none;font-size: 16px;}mip-form div {display: none;color: #ec1f5c;font-size: 13px;text-align: left;padding: 0 10% 0 3%;}.searchs input[type="submit"] {position: absolute;right: 2px;top: 2px;background-color: #45B6F7;color: #fff;font-size: 13px;margin: 2px;height: 30px;line-height: 30px;padding: 0 10px;}mip-form input[type='submit'] {border: 1px solid #f1f1f1;border-radius: 5px;color: #333;background-color: #d8d7d7;}.searchs input {outline: none;}.tit {background-color: #FF5E52;position: relative;top: -15px;display: inline-block;color: #fff;padding: 4px 15px;font-size: 14px;}.tit strong {font-weight: normal;}.tit {background-color: #FF5E52;position: relative;top: -15px;display: inline-block;color: #fff;padding: 4px 15px;font-size: 13px;}
]]>
0 https://blog.qsuu.cn/archives/42.html#comments https://blog.qsuu.cn/feed/category/meihua/archives/42.html
文章自动内链和自动添加标签 https://blog.qsuu.cn/archives/41.html https://blog.qsuu.cn/archives/41.html Thu, 20 Jul 2023 14:39:00 +0800 北海的鱼 教程开始

WordPress网站做SEO优化时,内链是一个很重要的因素,而我们平时都是手动为文章添加内链,这样会牺牲一些时间,其实我们可以让网站自动为文章生成标签,并且为标签自动添加内链。以前有一款插件 WP Keyword Link ,但是刚才没搜索到,其实我们还可以使用纯代码实现这个功能。

本文所有内容均添加到子比目录下functions.php文件里面

WordPress文章自动添加标签的代码

它的用途是在你写完这篇文章发布的时候,自动检测你这篇文章中有的关键字,然后把这个关键字转成标签给你添加进去,这个貌似需要在后台发布文章才可以生效,也可以在前台编辑完文章发布,然后到后台再发布一遍。

add_action('save_post', 'auto_add_tags');
function auto_add_tags()
{
    $tags         = get_tags(array('hide_empty' => false));
    $post_id      = get_the_ID();
    $post_content = get_post($post_id)->post_content;
    if ($tags) {
        foreach ($tags as $tag) {
            // 如果文章内容出现了已使用过的标签,自动添加这些标签
            if (strpos($post_content, $tag->name) !== false) {
                wp_set_post_tags($post_id, $tag->name, true);
            }

        }
    }
}

Wordpress自动为标签添加内链的代码

它的用途就是你在写这篇文章的时候,如果添加了标签,它会自动把文章内含有标签的字添加成内链。

//WordPress文章关键词自动内链 大白博客
function tag_sort($a, $b){
  if ( $a->name == $b->name ) return 0;
  return ( strlen($a->name) > strlen($b->name) ) ? -1 : 1;
}
function tag_link($content){
  $match_num_from = 1;  //一个标签少于几次不链接
  $match_num_to = 1;  //一个标签最多链接几次
  $posttags = get_the_tags();
  if ($posttags) {
    usort($posttags, "tag_sort");
    foreach($posttags as $tag) {
      $link = get_tag_link($tag->term_id);
      $keyword = $tag->name;
      //链接代码
      $cleankeyword = stripslashes($keyword);
      $url = "<a href=\"$link\" title=\"".str_replace('%s',addcslashes($cleankeyword, '$'),__('更多关于 %s 的文章-大白博客'))."\"";
      $url .= ' target="_blank"';
      $url .= ">".addcslashes($cleankeyword, '$')."</a>";
      $limit = rand($match_num_from,$match_num_to);
      //不链接代码
      $content = preg_replace( '|(<a[^>]+>)(.*)<pre.*?>('.$ex_word.')(.*)<\/pre>(</a[^>]*>)|U'.$case, '$1$2%&&&&&%$4$5', $content);
      $content = preg_replace( '|(<img)(.*?)('.$ex_word.')(.*?)(>)|U'.$case, '$1$2%&&&&&%$4$5', $content);
      $cleankeyword = preg_quote($cleankeyword,'\'');
      $regEx = '\'(?!((<.*?)|(<a.*?)))('. $cleankeyword . ')(?!(([^<>]*?)>)|([^>]*?</a>))\'s' . $case;
      $content = preg_replace($regEx,$url,$content,$limit);
      $content = str_replace( '%&&&&&%', stripslashes($ex_word), $content);
    }
  }
  return $content;
}
add_filter('the_content','tag_link',1);

直接放主题目录下functions.php文件里面。

]]>
0 https://blog.qsuu.cn/archives/41.html#comments https://blog.qsuu.cn/feed/category/meihua/archives/41.html
zibll主题给你的首页侧边栏增加10条或者更多轮播广告位 文字版+图片版 https://blog.qsuu.cn/archives/32.html https://blog.qsuu.cn/archives/32.html Thu, 16 Mar 2023 16:21:50 +0800 北海的鱼 文字版轮播+图片轮播
时间可以自己调整
文字版代码

[acc status="close" title="代码"]

<style>
  .advertise-container {
    width: 100%;
    height: 100px;
    overflow: hidden;
    position: relative;
    text-align: center;
  }
  .advertise-container .advertise-item {
    width: 100%;
    height: 100px;
    position: absolute;
    top: 0;
    left: 0;
  }
  .advertise-container a {
    display: inline-block;
    width: 100%;
    height: 100%;
    line-height: 100px;
    color: #000;
    font-weight: bold;
    text-decoration: none;
    font-size: 24px;
    animation: pulse 2s ease infinite;
    background: transparent;
  }
  @keyframes pulse {
    0% {
      color: #000;
    }
    50% {
      color: #f00;
    }
    100% {
      color: #000;
    }
  }
</style>

<div class="advertise-container">
  <a href="https://www.baidu.com" target="_blank">
    <div class="advertise-item">广告位1</div>
  </a>
  <a href="https://www.baidu.com" target="_blank">
    <div class="advertise-item">广告位2</div>
  </a>
  <a href="https://www.baidu.com" target="_blank">
    <div class="advertise-item">广告位3</div>
  </a>
  <a href="https://www.baidu.com" target="_blank">
    <div class="advertise-item">广告位4</div>
  </a>
  <a href="https://www.baidu.com" target="_blank">
    <div class="advertise-item">广告位5</div>
  </a>
  <a href="https://www.baidu.com" target="_blank">
    <div class="advertise-item">广告位6</div>
  </a>
  <a href="https://www.baidu.com" target="_blank">
    <div class="advertise-item">广告位7</div>
  </a>
  <a href="https://www.baidu.com" target="_blank">
    <div class="advertise-item">广告位8</div>
  </a>
  <a href="https://www.baidu.com" target="_blank">
    <div class="advertise-item">广告位9</div>
  </a>
  <a href="https://www.baidu.com" target="_blank">
    <div class="advertise-item">广告位10</div>
  </a>
</div>

<script>
  var advertise = document.querySelectorAll('.advertise-item');
  var index = 0;
  setInterval(function() {
    advertise.forEach(function(item) {
      item.style.display = 'none';
    })
    if (index >= advertise.length) {
      index = 0;
    }
    advertise[index].style.display = 'block';
    index++;
  }, 2000)
</script>

[/acc]
图片版

[acc status="close" title="代码"]

<style>
  .advertise-container {
    width: 100%;
    height: 100px;
    overflow: hidden;
    position: relative;
  }
  .advertise-container .advertise-item {
    width: 100%;
    height: 100px;
    position: absolute;
    top: 0;
    left: 0;
    object-fit: cover;
  }
  .advertise-container a {
    display: inline-block;
    width: 100%;
    height: 100%;
    line-height: 100px;
    color: #000;
    font-weight: bold;
    text-decoration: none;
    font-size: 24px;
    animation: pulse 2s ease infinite;
    background: transparent;
    text-align: center;
  }
  .advertise-container img {
    width: 100%;
    height: 100%;
  }
  @keyframes pulse {
    0% {
      color: #000;
    }
    50% {
      color: #f00;
    }
    100% {
      color: #000;
    }
  }
</style>

<div class="advertise-container">
  <a href="https://www.baidu.com" target="_blank">
    <div class="advertise-item"><img src="https://www.baidu.com/img/baidu_jgylogo3.gif" alt="广告位1"></div>
  </a>
  <a href="https://www.baidu.com" target="_blank">
    <div class="advertise-item"><img src="图片链接" alt="广告位2"></div>
  </a>
  <a href="https://www.baidu.com" target="_blank">
    <div class="advertise-item"><img src="图片链接" alt="广告位3"></div>
  </a>
  <a href="https://www.baidu.com" target="_blank">
    <div class="advertise-item"><img src="图片链接" alt="广告位4"></div>
  </a>
  <a href="https://www.baidu.com" target="_blank">
    <div class="advertise-item"><img src="https://www.baidu.com/img/baidu_jgylogo3.gif" alt="广告位5"></div>
  </a>
  <a href="https://www.baidu.com" target="_blank">
    <div class="advertise-item"><img src="https://www.baidu.com/img/baidu_jgylogo3.gif" alt="广告位6"></div>
  </a>
  <a href="https://www.baidu.com" target="_blank">
    <div class="advertise-item"><img src="https://www.baidu.com/img/baidu_jgylogo3.gif" alt="广告位7"></div>
  </a>
  <a href="https://www.baidu.com" target="_blank">
    <div class="advertise-item"><img src="https://www.baidu.com/img/baidu_jgylogo3.gif" alt="广告位8"></div>
  </a>
  <a href="https://www.baidu.com" target="_blank">
    <div class="advertise-item"><img src="https://www.baidu.com/img/baidu_jgylogo3.gif" alt="广告位9"></div>
  </a>
  <a href="https://www.baidu.com" target="_blank">
    <div class="advertise-item"><img src="https://www.baidu.com/img/baidu_jgylogo3.gif" alt="广告位10"></div>
  </a>
</div>

<script>
  var advertise = document.querySelectorAll('.advertise-item');
  var index = 0;
  setInterval(function() {
    advertise.forEach(function(item) {
      item.style.display = 'none';
    })
    if (index >= advertise.length) {
      index = 0;
    }
    advertise[index].style.display = 'block';
    index++;
  }, 2000)
</script>

[/acc]
放在任意侧边栏即可

]]>
0 https://blog.qsuu.cn/archives/32.html#comments https://blog.qsuu.cn/feed/category/meihua/archives/32.html
zibll子比主题首页大图搜索框 https://blog.qsuu.cn/archives/31.html https://blog.qsuu.cn/archives/31.html Thu, 16 Mar 2023 16:01:00 +0800 北海的鱼 北海的鱼

食用教程

首先在主题目录下创建func.php文件,有的人可能已经有此文件了。
在func.php添加如下代码即可

[acc status="close" title="php代码"]

<?php

add_action('wp_head', 'zibll_Add_ons_newindex');
function zibll_Add_ons_newindex() {
if(is_home()){
?>

<!--新首页开始-->
<div id="page-wrapper">
<div class="home-banner por">
<section class="section" style="height: calc(100vh - 220px);max-height: 600px;">
<div class="video-wrapper">
<video autoplay="" playsinline="" loop="" muted="" src="https://zsg-1251454718.cos.ap-beijing.myqcloud.com/%E8%AE%B0%E5%BD%95%E7%AC%94%E8%AE%B0.mp4">
</video>
</div>
<div class="video-overlay">
</div>
</section>
<div class="wrapper poa" style="top: 20%;">
<div class="home-banner-content Onecad_clearfix">
<div class="slogan-text por fl">
<p><?php echo get_bloginfo('name'); ?><i class="iblock poa corner" style="background:url(//s1si.com/wp-content/themes/zibll/img/hot.svg) no-repeat;"></i></p>
<p class="promote-sub-title line-one">已发布<span style="display: inline-block;overflow: hidden;line-height: 34px;vertical-align: -9px;">
<em id="goal-works" value="5351266" style="font-style: normal;">
<ps style="color: #26d6c8;"><?php $count_posts = wp_count_posts(); echo $published_posts =$count_posts->publish;?></ps>
</em>
</span>篇文章内容</p>
</div>
</div>
<div class="home-banner-search por searchv2-top-m">
<div class="primary-menus" style=" position: unset;transform: translate(1px, 1px);">
<div class="cont">
<div class="left-cont">
<form class="search" id="search_4" action="/?s=" method="get" target="_blank">
<input type="text" name="s" class="s" placeholder="输入关键词 按回车搜索">
<button type="submit" name="" class="btn">
站内搜索
</button>
</form>
<div class="tag"><a href="/?s=源码" target="_blank">源码</a><a href="/?s=模板 " target="_blank">模板</a><a href="/?s=插件" target="_blank">插件</a><a href="/?s=软件" target="_blank">软件</a></div>

</div>
</div>
</div>
</div>
</div>
<!-- 头部快速链接导航 -->

</div>
</div>
<div id="home-row-qukuai" class=" home_row home_row_1 module-qukuai " style="background-color:;">
<div class="wrapper">
<div class="home-row-left content-area ">
<div class="sort jitheme_radius" style="margin-top:-80px ;">
<ul class="sort-config">
<li>
<div class="sort-config-item">
<img class="sort-config-icon" src="//www.ytshopcn.com/img/提示.svg" >
<a href="https://s1si.com/forums" target="_blank"><p class="sort-config-title">社区

</p> </a>
<span class="sort-config-desc">S14社区论坛</span>
</div></li> <li>
<div class="sort-config-item">
<img class="sort-config-icon" src="//www.ytshopcn.com/img/文章.svg" >
<a href="https://s1si.com/forum/146.html" target="_blank"><p class="sort-config-title">消息

</p> </a>
<span class="sort-config-desc">网站最新消息</span>
</div></li> <li>
<div class="sort-config-item">
<img class="sort-config-icon" src="//www.ytshopcn.com/img/图片.svg" >
<a href="https://s1si.com/forum/263.html" target="_blank"><p class="sort-config-title">建议

</p> </a>
<span class="sort-config-desc">网站文章需求建议</span>
</div></li> <li>
<div class="sort-config-item">
<img class="sort-config-icon" src="//www.ytshopcn.com/img/安全.svg" >
<a href="https://s1si.com/user/vip" target="_blank"><p class="sort-config-title">会员

</p> </a>
<span class="sort-config-desc">开通会员页面</span>
</div></li> <li>
<div class="sort-config-item">
<img class="sort-config-icon" src="//www.ytshopcn.com/img/注意.svg" >
<a href="https://s1si.com/user/" target="_blank"><p class="sort-config-title">用户中心

</p> </a>
<span class="sort-config-desc">用户中心页面</span>
</div></li> </ul>
</div>
</div>
</div>
</div>

<style scoped>
#page-wrapper {
padding-bottom:16px;
margin-top:-16px;
}

.left-cont a, .sort-config span,.wrapper p,.sort jitheme_radius ul,.sort jitheme_radius li {
border: 0;
font-family: inherit;
/*font-size: 100%;*/
font-style: inherit;
font-weight: inherit;
margin: 0;
outline: 0;
padding: 0;
vertical-align: baseline;
word-wrap: break-word;
box-sizing: border-box;
}

.por {
position: relative;
}
.home-banner {
position: relative;
/* z-index: 1; */
background-position: 0 100%;
animation: gradient 12s ease-in-out infinite;
}
.home-banner .section {
position: relative;
width: 100%;
overflow: hidden;
/* max-height: 600px; */
/* height: calc(100vh - 220px); */
}
.home-banner .section .video-wrapper {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
position: absolute;
overflow: hidden;
z-index: 0;
}
.home-banner .section .video-wrapper video {
visibility: visible;
pointer-events: none;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
height: 100%;
width: 100%;
object-fit: cover;
}
canvas, img, video {
max-width: 100%;
height: auto;
box-sizing: border-box;
}
audio, canvas, iframe, img, svg, video {
vertical-align: middle;
}
.home-banner .section .video-overlay {
height: 100%;
width: 100%;
top: 0;
left: 0;
position: absolute;
background: rgba(45,47,54,.15);
}
.poa {
color: #fff;
}
.slogan-text.por.fl {
/* margin-left: 200px; */
text-align: center;
width: 100%;
margin-bottom: 50px;
}
.fl {
float: left;
}
.por {
position: relative;
}
.home-banner-content .slogan-text p:nth-of-type(1) {
font-weight: 600;
font-size: 28px;
line-height: 46px;
letter-spacing: 6px;
text-shadow: 0 2px 4px rgb(0 0 0 / 25%);
margin-bottom: 20px;
}
.home-banner .corner {
width: 28px;
height: 21px;
position: absolute;
border-radius: 4px;
margin: 0px;
/* left: 340px; */
/* top: 10px; */
}
.home-banner-content .slogan-text p {
font-size: 18px;
line-height: 24px;
letter-spacing: 2px;
font-weight: 600;
text-shadow: 0 2px 4px rgb(0 0 0 / 25%);
}
.Onecad_clearfix:after {
content: '';
clear: both;
display: block;
height: 0;
visibility: hidden;
font-size: 0;
line-height: 0;
}
.home_row {
position: relative;
margin-bottom: 24px /* border-bottom:1px dashed rgba(255, 255, 255, 0.3); */;
}
.home_row > div {
display: flex;
margin: 0 auto;
max-width: 100%;
position: relative;
margin-top: 16px;
}
.wrapper {
/*width: 1300px;*/
width: 1170px;
}
.poa {
position: absolute;
width: calc(100% - 200px);
margin: 0 100px;
}
.home-row-left.content-area {
max-width: 100%;
}
.b2-content .content-area, .post-style-2 .content-area, .archive .content-area {
margin: 0 auto;
}
.content-area {
width: 100%;
max-width: 100%;
}
.sort, .jitheme_slide_jb, .jitheme_radius {
border-radius: 10px;
}

.sort {
position: relative;
z-index: 3;
padding: 26px;
background: rgba(255,255,255,0.1);
/* border: 1px solid #797c80; */
/* -webkit-box-shadow: 0 40px 75px 0 rgb(57 60 67 / 8%); */
/* box-shadow: 0 40px 75px 0 rgb(57 60 67 / 8%); */
-webkit-backdrop-filter: blur(10px);
backdrop-filter: blur(10px);
}
.sort-config {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: justify;
-ms-flex-pack: justify;
justify-content: space-between;
}
.jitheme-pages-vip ol, ul, li {
list-style: none;
}
.sort-config>li {
-webkit-box-flex: 1;
-ms-flex: 1;
flex: 1;
overflow: hidden;
height: 100%;
}
.sort-config-item {
display: block;
height: 100%;
}
.sort-config-item img {
float: left;
width: 62px;
height: 62px;
margin-right: 12px;
}
a, a:active, a:visited {
text-decoration: none;
transition: all .2s;
}
.sort-config-title {
line-height: 34px;
font-size: 18px;
font-weight: 600;
color: var(--main-color);
-webkit-transition: .3s;
transition: .3s;
}
.sort-config-desc {
float: left;
line-height: 22px;
font-size: 14px;
color: #8e8e8e;
}
.hidden {
display: none !important;
}
.home-banner-search {
width: 50%;
/* margin-left: 209px; */
height: auto;
margin: auto;
}
.left-cont {
border: 5px solid rgb(255 255 255 / 18%);
border-radius: 30px;
}
.home-banner-search form>input {
width: 100%;
height: 50px;
background: #fff;
border: none;
padding: 18px 22px;
font-size: 14px;
color: #333;
border-radius: 30px;
}
.home-banner-search input, textarea {
border-radius: 0px;
}
button, input[class="s"] {
-webkit-appearance: none;
outline: none;
-webkit-tap-highlight-color: rgba(0,0,0,0);
font-family: -apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif;
border: 1px solid #ccc;
box-sizing: border-box;
}
.primary-menus .left-cont button {
height: 50px;
box-sizing: border-box;
min-width: 100px;
/* margin-left: 0px; */
cursor: pointer;
color: #fff;
font-size: 15px;
line-height: 40px;
position: absolute;
right: 5px;
top: 5px;
border-radius: 1px 30px 30px 1px;
padding: 0 15px;
transform: translateY(0px);
}
.button, button {
background: #fc3c2d;
border: 1px solid #fc3c2d;
border-radius: 0px;
}
.home-banner-search .tag {
position: absolute;
right: 100px;
top: 0;
padding: 15px 10px;
display: none;
}
.home-banner-search .tag a {
display: inline;
padding: 0px 8px;
border-radius: 10px;
background: #EFEFEF;
float: left;
margin: 5px;
height: 20px;
line-height: 20px;
color: #A0A0A0;
font-size: 12px;
}
.home-banner-search .tag a:hover {
background: #fc3c2d;
color: #fff;
}

@media (max-width:776px) {#page-wrapper {display: none;}
#home-row-qukuai {display: none;}
}

@media (min-width: 1440px){
.home-banner-search .tag{display:block}
}
</style>
<?php
}
}

[/acc]
此搜索框只能在pc端查看
只能用视频文件替代背景
视频背景高度在代码11行修改
视频链接地址在代码13行修改
其他的自己研究研究吧,教程结束。

]]>
0 https://blog.qsuu.cn/archives/31.html#comments https://blog.qsuu.cn/feed/category/meihua/archives/31.html
Zibll给网站换个好看的字体 https://blog.qsuu.cn/archives/30.html https://blog.qsuu.cn/archives/30.html Thu, 16 Mar 2023 15:51:00 +0800 北海的鱼 字体下载与转换

先去网站下载一些你喜欢的字体。
这里给大家列举一些个人觉得比较好的下载站。
100字体下载站
猫啃网
下载后,会得到一个.ttf的文件(压缩包的解压)。
但是经过测试,.ttf的字体在部分浏览器不能生效(如Safari)
所以,需要转换成eot,woff,woff2,svg其中一个就好。推荐.woff
字体转换 (转换教程不多讲)

添加CSS

把文件上传至网站根目录(可以是其他地方,不推荐)只需要记住地址就行。
例子:https://www.wabm.cn/font.tff
font.tff是字体文件名,实际使用时需更改(包括网站链接)
以下代码添加到zibll主题>自定义代码>自定义CSS里。

@font-face{
font-family: 'moe';
src:  url('https://blog.gtwxxh.cc/font.ttf');
src:  url('https://blog.gtwxxh.cc/font.woff');
}
body{
font-family:'moe';
}
.enlighter-default .enlighter{max-height:400px;overflow-y:auto !important;}.lazyloading:not(.swiper-lazy-loaded){opacity: 0;}@media (max-width:640px) {
    .meta-right .meta-view{
      display: unset !important;
    }
  }

font-family 是自定义字体名称(自己修改),url 这是字体文件的地址(自己修改)
如果要添加多个字体文件,你有可能需要注意代码规范。

]]>
0 https://blog.qsuu.cn/archives/30.html#comments https://blog.qsuu.cn/feed/category/meihua/archives/30.html
Cuteen主题默认图片名称test修改 https://blog.qsuu.cn/archives/26.html https://blog.qsuu.cn/archives/26.html Wed, 15 Mar 2023 10:19:00 +0800 北海的鱼 默认的图片名称我就不说了吧,就是发完文章,如果你不自定义名称那他就显示test。

教程

打开网站根目录 usr/plugins/Cuteen/js/editor.bundle.js文件,找到24544行代码
北海的鱼
把后面的Test修改成你想要的名称,然后保存即可。

]]>
0 https://blog.qsuu.cn/archives/26.html#comments https://blog.qsuu.cn/feed/category/meihua/archives/26.html
给Cuteen主题安排上侧栏标签云 https://blog.qsuu.cn/archives/25.html https://blog.qsuu.cn/archives/25.html Wed, 15 Mar 2023 09:49:13 +0800 北海的鱼 借鉴了小何博客的代码,自己试了下发现不对称就改了一个数值。每次刷新颜色都会改变,目前有8组颜色,具体效果看我的侧边栏。

引入自定义CSS

/*侧栏标签云*/
.flink-item{width:63px;height: 25px; margin:3px; background-color:#57b027; border-radius:2px; text-align: center;}
.flink-title a{ font-size:10px; color:#ffffff; margin:3px; }
.flink-title a:hover{ color:#cccccc; }
.bg-1{background-color:#b57dff!important}
.bg-2{background-color:#465efb!important}
.bg-3{background-color:#f9bb3c!important}
.bg-4{background-color:#f55555!important}
.bg-5{background-color:#f6969a!important}
.bg-6{background-color:#e92b6f!important}
.bg-7{background-color:#8c76f!important}
.bg-8{background-color:#3fa5ff!important}

通过函数调用标签

路径 /Cuteen/include/sidebar.php 合适位置加入下方代码
北海的鱼

<!-- 标签云 -->
<section class="sidebar-comment-box card mt-4">
<div class="px-3 py-2 my-2 d-flex align-items-center border-bottom">
<svg t="1678186881052" class="icon icon-20 me-1" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="13180" width="20" height="20"><path d="M511.744 514.7136m-450.816 0a450.816 450.816 0 1 0 901.632 0 450.816 450.816 0 1 0-901.632 0Z" fill="#1296db" p-id="13181" data-spm-anchor-id="a313x.7781069.0.i20" class="selected"></path><path d="M405.0432 356.4544l154.9824-143.4624c24.9344-23.0912 65.3312-23.296 90.5728-0.4608l100.5056 91.0336c14.9504 13.5168 15.6672 35.584 1.6384 49.9712l-347.6992 2.9184zM293.376 356.1472l94.976-142.0288c16.7936-26.7264 52.3776-37.8368 83.2512-26.0096 23.2448 8.9088 45.0048 17.3056 44.3392 17.3056-1.4336 0-163.6352 150.016-163.6352 150.016l-58.9312 0.7168zM749.6192 402.176H280.1664c-44.9536 0-81.4592 36.4544-81.4592 81.4592v213.0944c0 44.9536 36.4544 81.4592 81.4592 81.4592h469.4528c44.9536 0 81.4592-36.4544 81.4592-81.4592V483.584c-0.0512-44.9536-36.5056-81.408-81.4592-81.408z m-430.7968 237.7216c-27.4944 0-49.7664-22.272-49.7664-49.7664s22.272-49.7664 49.7664-49.7664c27.4944 0 49.7664 22.272 49.7664 49.7664s-22.272 49.7664-49.7664 49.7664z" fill="#FFFFFF" p-id="13182"></path></svg>
  <span>标签云</span> <span class="ios"></span> </div>
<div class="px-2 pb-3">

<ul class="flinks"><li></li><li></li><li></li><li></li></ul>
<?php $this->widget('Widget_Metas_Tag_Cloud', 'ignoreZeroCount=1&limit=28')->to($tags); ?>
<?php while($tags->next()): ?>
<script>document.querySelectorAll('ul.flinks').forEach(function(e){let a=e;if(a){let ns=a.querySelectorAll("li");let str='<div style="display:inline-block;; float:left">';let bgid=0;const bgs=["bg-1","bg-2","bg-3","bg-4","bg-5","bg-6","bg-7","bg-8"];for(let i=0;i<ns.length;i+=4){str+=(`<div class="flink-item ${bgs[Math.floor(Math.random() * 8)]}"><div class="flink-title"><a href="<?php $tags->permalink(); ?>"><?php $tags->name(); ?></a></div></div>`)}str+=`</div>`;let n1=document.createElement("div");n1.innerHTML=str;a.parentNode.insertBefore(n1,a);a.style="display: none;"}else{console.log('No such id "flinks"')}});</script>
<?php endwhile; ?>

</div></section>
<!-- 标签云 -->

另外我改的数值是以下地方
北海的鱼
原本是3 我改成了2 如果你们不对称,也可以修改试试。

]]>
0 https://blog.qsuu.cn/archives/25.html#comments https://blog.qsuu.cn/feed/category/meihua/archives/25.html
Cuteen网站底部增加本站运行时间 https://blog.qsuu.cn/archives/19.html https://blog.qsuu.cn/archives/19.html Mon, 06 Mar 2023 10:59:00 +0800 北海的鱼 也挺简单,我也是小白,把下面代码复制一下

<!-- 开站时间开始 --><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> <!-- 开站时间结束 -->

然后去宝塔-网站根目录
Test
打开footer.php-拉到下面,我是把版权删了换成了这个,你们可以保留作者版权。
粘贴上之后改一下时间即可。
Test
是不是很简单...

]]>
0 https://blog.qsuu.cn/archives/19.html#comments https://blog.qsuu.cn/feed/category/meihua/archives/19.html
本站同款每天60s新闻 https://blog.qsuu.cn/archives/17.html https://blog.qsuu.cn/archives/17.html Fri, 03 Mar 2023 16:43:00 +0800 北海的鱼 之前弄过wp的每天自动发表一篇新闻,下面就给大家详细讲一下,怎么通过调用API给网站添加一个每天60秒读懂世界的新闻早报页面。
Test

两种方法

第一种是首先去注册一个api免费的,我是用的Alapi,注册好之后去个人中心获取token,然后复制下来。
Test
去后台-新建页面-把下面的代码复制进去,把“这里填你的token换成你个人中心的token”

<img src="https://v2.alapi.cn/api/zaobao?token=这里填你的token&format=image" alt="每日早报" width="100%">

Test
然后发表就可以啦
第二种是在后台新建页面,然后在内容那里添加图片链接,然后发表就行了。
Test
其实两种差不多,都挺简单👏
如果你想单独做一个html页面也是这个方法,直接新建html文件然后输入下面代码:

<!DOCTYPE html><html lang="en"><head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>每日早报</title></head><body>
    <div style="text-align: center;">
        <img src="https://v2.alapi.cn/api/zaobao?token=用户中心获取token&format=image" alt="每日早报" width="100%">
    </div></body></html>

填上你的token就行了。✌

]]>
0 https://blog.qsuu.cn/archives/17.html#comments https://blog.qsuu.cn/feed/category/meihua/archives/17.html
Cuteen主题美化汇总 https://blog.qsuu.cn/archives/10.html https://blog.qsuu.cn/archives/10.html Thu, 02 Mar 2023 08:58:00 +0800 北海的鱼 目前有27条美化,持续更新中...

[acc status="close" title="改变鼠标样式"]下方代码放后台-自定义CSS


/*鼠标样式*/
body {
    cursor:url('https://xxi.icu/usr/themes/Cuteen/static/img/lin/shubiao (5).cur'), auto;
}
select, input, textarea, a, button {
    cursor:url('https://xxi.icu/usr/themes/Cuteen/static/img/lin/shubiao (6).cur'), auto;
}

[/acc]
[acc status="close" title="LOGO扫光"]下方代码放后台-自定义CSS

/* logo扫光 */
.navbar-brand{position:relative;overflow:hidden;margin: 0px 0 0 0px;}.navbar-brand:before{content:""; position: absolute; left: -665px; top: -460px; width: 200px; height: 15px; background-color: rgba(255,255,255,.5); -webkit-transform: rotate(-45deg); -moz-transform: rotate(-45deg); -ms-transform: rotate(-45deg); -o-transform: rotate(-45deg); transform: rotate(-45deg); -webkit-animation: searchLights 6s ease-in 0s infinite; -o-animation: searchLights 6s ease-in 0s infinite; animation: searchLights 5s ease-in 0s infinite;}@-moz-keyframes searchLights{50%{left: -100px; top: 0;} 65%{left: 120px; top: 100px;}}@keyframes searchLights{40%{left: -100px; top: 0;} 60%{left: 120px; top: 100px;} 80%{left: -100px; top: 0px;}}

[/acc]

[acc status="close" title="网站实现网格背景"]下方代码放后台-自定义CSS

/*网格背景css*/
body {
z-index:1;
    background-position: center top;
    background-size: 28px 28px;
    background-color: #f9f9f9;
    background-image: linear-gradient(to right,rgba(37,82,110, 0.1) 1px,transparent 1px),linear-gradient(to bottom,rgba(37,82,110, 0.1) 1px,transparent 1px);
}

[/acc]

[acc status="close" title="网站背景图设置"]下方代码放后台-自定义CSS

/* 背景图片 */
    body::before {
        content: '';
position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
      background: url(图片地址);
        background-position: center 0;
        background-size: cover;
        z-index: -1;
        opacity: 0.75;
    }

[/acc]

[acc status="close" title="PC端侧栏仿ios小点点"]cuteen主题在sidebar.php里面
这个位置加入下方代码就行,例如:

<span>最新回复</span>下面
<span class="ios"></span>

下方代码放后台-自定义CSS

/*PC端侧栏仿ios小点点*/
.ios {
    content: " ";
    position: absolute;
    -webkit-border-radius: 50%;
    border-radius: 50%;
    background: #fc625d !important;
    width: 10px;
    height: 10px;
z-index:999;
    -webkit-box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b;
    box-shadow: 19px 0 #fdbc40, 40px 0 #35cd4b;
    float: right;
    right: 58px;
    top: 22px;
z-index:100;

}

[/acc]

[acc status="close" title="评论框图片"]下方代码放后台-自定义CSS

/*评论框图片*/
textarea.form-control {
 resize: vertical;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: right;
  margin-bottom: 2px;
  background-image: url(https://xxi.icu/usr/themes/Cuteen/static/img/lin/pinglunbg.webp);
  transition: all 0.25s ease-in-out 0s;
}

[/acc]

[acc status="close" title="增加网页右侧联系站长功能"]HTML放/body前

<!--右侧联系站长--><a href="链接你的QQ" target="_blank"><div id="qidiana" class="leke"> 
<svg t="1599210542874" class="upload-icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="16321" width="30" height="30"><path d="M224.99 512a287.01 287.01 0 1 0 574.02 0 287.01 287.01 0 1 0-574.02 0z" fill="#FFDA33" p-id="16322"></path><path d="M659.18375 635.7275c5.61375-6.55875 3.74625-16.86375-2.82375-22.5-6.5475-5.61375-16.86375-3.735-22.48875 2.82375-33.75 37.485-70.30125 55.305-121.86 55.305-51.55875 0-84.375-14.0625-121.87125-55.305-5.625-6.57-15.94125-8.4375-22.5-2.82375-6.57 5.63625-8.4375 15.94125-2.8125 22.5 44.055 49.69125 85.30875 68.43375 147.18375 68.43375 61.86375 0 107.7975-22.48875 147.1725-68.43375zM390.15125 469.8125v-56.25c0-14.99625-12.18375-28.125-28.125-28.125-14.99625 0-28.11375 12.18375-28.11375 28.125v56.25c0 14.99625 12.1725 28.125 28.11375 28.125 14.99625 0 28.125-12.18375 28.125-28.125z m494.94375-59.0625c-42.1875-170.6175-193.10625-297.1575-373.08375-297.1575-179.98875 0-330.9075 126.54-373.10625 297.1575-45 16.875-76.87125 66.555-76.87125 124.68375 0 66.56625 42.1875 121.86 97.4925 130.30875 0 0 0 0.93375 0.945 0.93375h62.80875a339.87375 339.87375 0 0 1-39.375-159.3675c0-186.5475 147.18375-337.4775 328.10625-337.4775s328.08375 150.93 328.08375 337.4775c0 125.60625-66.54375 234.36-165.915 292.48875A54.9 54.9 0 0 0 661.0625 797.91875c-30.9375 0-56.25 25.30125-56.25 56.2275 0 30.94875 25.3125 56.26125 56.25 56.26125 30.92625 0 56.23875-25.3125 56.23875-56.26125 0-4.68-0.93375-9.36-1.87875-13.10625 64.6875-42.1875 117.18-103.12875 148.12875-175.2975 55.29375-9.39375 98.415-63.7425 98.415-130.30875 0-58.12875-32.81625-107.80875-76.87125-124.68375z m-194.985 59.0625v-56.25c0-14.99625-12.18375-28.125-28.11375-28.125-15.0075 0-28.125 12.18375-28.125 28.125v56.25c0 14.99625 12.18375 28.125 28.125 28.125 14.99625 0 28.11375-12.18375 28.11375-28.125z" fill="#515151" p-id="16323" data-spm-anchor-id="a313x.7781069.0.i0" class=""></path></svg> <span>联</span><span>系</span><span>站</span><span>长</span> </div></a>

下方代码放后台-自定义CSS

/*右边联系站长 css 开始*/
@keyframes shangxa { 0%, 100%, 20%, 50%, 80% { transition-timing-function: cubic-bezier(0.215,.61,.355,1); transform: translate3d(0,0,0); } 40%, 43% { transition-timing-function: cubic-bezier(0.755,0.50,0.855,0.060); transform: translate3d(0,-10px,0); } 70% { transition-timing-function: cubic-bezier(0.755,0.050,0.855,0.060); transform: translate3d(0,-6px,0); } 90% { transform: translate3d(0,-3px,0); } } .leke { display: flex; position: fixed; right: 0; top: calc(50% - 103px); flex-direction: column; -webkit-box-align: center; align-items: center; color: rgb(255, 255, 255); font-size: 16px; font-weight: 500; line-height: 20px; box-shadow: rgba(0, 0, 0, 0.08) 0px 5px 6px -4px, rgba(13, 206, 158, .37) 0px 6px 10px; z-index: 10; overflow: hidden; background: #0dce9e; padding: 12px 6px 12px 7px; border-radius: 7px 1px 1px 7px; transition: height 0.2s ease 0s, top 0.2s ease 0s; } .leke:hover { opacity: .8; } .leke .upload-icon { flex-shrink: 0; width: 28px; height: auto; display: block; margin-bottom: 2px; -webkit-animation: shangxa 2s infinite; animation: shangxa 2s infinite; } @media screen
AND (max-width: 768px) { .leke { display: none; } } #qidiana { cursor: pointer; } .class_qidian_wpa { border-radius: 6px !important; box-shadow: 0 0 10px 0 rgba(0, 0, 0, .1); -webkit-box-shadow: 0 0 10px 0 rgba(0, 0, 0, .1); -moz-box-shadow: 0 0 10px 0 rgba(0, 0, 0, .1); } 
/*右边联系站长 css 开始*/

[/acc]

[acc status="close" title="解决导航栏无法使用emoji表情"]由于数据库不支持emoji表情
我们可以在根目录直接加,无视数据库
根目录找到navbar.php,路径/Cuteen/include/navbar.php
合适的位置把原有的注释/删除

<ul class="navbar-nav justify-content-start flex-grow-1 pe-3">
                    <?php if ($this->options->CustomMenu) {
                        $source = array();
                        $source = '[' . $this->options->CustomMenu . ']';
                        $source = json_decode($source, true);
                        foreach ($source as $key) {
                            if (empty($key['children'])) {
                                echo Context::MenuTag($key['url'], $key['name']);
                            } else {
                                echo Context::CustomerDropdownMenuTag($this, $key);
                            }
                        }
                    } else {
                        if ($this->options->LabelOrder == 'P-C') {
                            Context::PageEcho($this, $pages, false);
                            Context::CategoryEcho($this, $category, false);
                        } else {
                            Context::CategoryEcho($this, $category, false);
                            Context::PageEcho($this, $pages, false);
                        }
                    }
                    ?>
                </ul>

在复制这串代码设置好链接即可

 <ul class="navbar-nav justify-content-start flex-grow-1 pe-3">
<li class="nav-item dropdown"><a class="nav-link dropdown-toggle" role="button" data-bs-toggle="dropdown" aria-expanded="false">⚙️文章分类</a>
<ul class="dropdown-menu"> 
<li><a class="dropdown-item" href="路径">⚙️资源分享</a></li> <li><a class="dropdown-item" href="路径">⚙️编程相关</a></li> <li><a class="dropdown-item" href="路径">⚙️折腾日记</a></li> <li><a class="dropdown-item" href="路径">⚙️杂七杂八</a></li> <li><a class="dropdown-item" href="路径">⚙️每日新闻</a></li></ul></li>
<li class="nav-item"><a class="nav-link text-nowrap" href="路径">⚙️归档处</a></li>
<li class="nav-item"><a class="nav-link text-nowrap" href="路径">⚙️时光机</a></li>
<li class="nav-item"><a class="nav-link text-nowrap" href="路径">⚙️朋友圈</a></li>
<li class="nav-item"><a class="nav-link text-nowrap" href="路径">✍️留言板</a></li>

<li class="nav-item dropdown"><a class="nav-link dropdown-toggle" role="button" data-bs-toggle="dropdown" aria-expanded="false">⚙️更多</a>
<ul class="dropdown-menu"> 
<li><a class="dropdown-item" href="路径">⚙️影视解析</a></li>
<li><a class="dropdown-item" href="路径">⚙️在线音乐</a></li> 
<li><a class="dropdown-item" href="路径">⚙️颜色代码</a></li>
 <li><a class="dropdown-item" href="路径">⚙️实用标签</a></li>
 <li><a class="dropdown-item" href="路径">⚙️情侣小站</a></li>
 <li><a class="dropdown-item" href="路径">⚙️免责声明</a></li>
</ul></li>
</ul>

记得把⚙️图标换成你需要的
[/acc]

[acc status="close" title="防止网站被别人恶意镜像"]在/body前加入下方代码就可以了
别人访问被镜像的网站会自动跳转到官方网站

<script>var xxhzmurl = window.location.href;
            if (xxhzmurl.indexOf("xxi.icu") > 0) {//此处采用搜索,防止误判定
            } else {
               alert('警告!检测到该网站为恶意镜像站点,将立即为您跳转到官方站点!');
                window.location.href = 'https://xxi.icu/';//这里填入要跳转的地址
            }
</script>

[/acc]

[acc status="close" title="为网站添加一个运行时间"]放在你需要展示的地方

<!-- 开站时间开始 --><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> <!-- 开站时间结束 -->

[/acc]

[acc status="close" title="顶部阅读进度条"]放/body前即可

<!-- 顶部阅读进度条 --><progress id="content_progress" value="0"></progress>
<script>
document.addEventListener('DOMContentLoaded', function () {
      var winHeight = window.innerHeight,
            docHeight = document.documentElement.scrollHeight,
            progressBar = document.querySelector('#content_progress');
      progressBar.max = docHeight - winHeight;
      progressBar.value = window.scrollY;

      document.addEventListener('scroll', function () {
            progressBar.max = document.documentElement.scrollHeight - window.innerHeight;
            progressBar.value = window.scrollY;
      });
});
</script><!-- 顶部阅读进度条 -->

下面代码放后台自定义CSS

/* 阅读进度条 */
#content_progress {
      /* Positioning */
      position: fixed;
      left: 0px;
      top: 50px;
      z-index: 188;
      width: 100%;
      height: 2px;
      -webkit-appearance: none;
      -moz-appearance: none;
      appearance: none;
      border: none;
      background-color: transparent;
      color: #BABABA;
}

#content_progress::-webkit-progress-bar {
      background-color: transparent;
}

#content_progress::-webkit-progress-value {
      background-color: #B8B8B8;/* 修改颜色 */
}

#content_progress::-moz-progress-bar {
      background-color: #BF3EFF;
}
/* 阅读进度条 */

[/acc]

[acc status="close" title="前台增加编辑页面/文章功能"]编辑页面,下方代码放你需要拥有该功能的根目录即可
路径每个单页根目录

下方

<!-- 前台编辑页面 --> <?php if($this->user->hasLogin()):?><span style="position: absolute;right: 11px; transform:translateY(-14px); font-size: 14px;" class="item">
<a href="<?php $this->options->adminUrl(); ?>write-page.php?cid=<?php echo $this->cid;?>" class="item" target="_blank">编辑页面</a></span><?php endif;?><!-- 前台编辑页面 --> 

编辑文章,下方代码放post.php里面即可
路径正文下方

<!-- 前台编辑文章 --><?php if($this->user->hasLogin()):?><span style="position: absolute;right: 25px;" class="item"><font size=2>
<a href="<?php $this->options->adminUrl(); ?>write-post.php?cid=<?php echo $this->cid;?>" target="_blank" class="item">编辑文章</a>
</font></span><?php endif;?><!-- 前台编辑文章 --> 

[/acc]

[acc status="close" title="认证评论等级"]我也不知道放哪里

<?php
$me = md5(strtolower('你的邮箱@qq.com')); //这里填入自己的邮箱
$boy = md5(strtolower('你的邮箱@qq.com')); //这里填入好友的邮箱
$rz = md5(strtolower($comments->mail)); //用于判断邮箱
//博主样式
$str = '<span class="commentapprove" style="color: #FFF;padding: .035rem .25rem;font-size:
.65rem;border-radius: .15rem;background-color:#7e7e7e;" >博主';
//好友样式
$str2 = '<span class="commentapprove" style="color: #FFF;padding: .035rem .25rem;font-size:
.65rem;border-radius: .15rem;background-color:#7e7e7e;" >基友';
//开始判断
if($me==$rz){
echo $str; //如果条件成立则输出'博主'样式
}if($boy==$rz){
echo $str2; //如果条件成立则输出'好友'样式
}
?>

[/acc]

[acc status="close" title="网站下樱花雨特效"]将下方代码粘贴到/body前
1、手机电脑都显示(电脑端会稍微稀疏一点)

<!-- 全站下樱花 -->
<script src="https://www.xxi.icu/usr/themes/Brave/base/js/yinghua.js" type="text/javascript"></script>

2、那么在加一句就好了

<!-- 增强PC端下樱花 --><script>if (screen && screen.width >768 ) {
document.write('<script src="https://www.xxi.icu/usr/themes/Brave/base/js/yinghua1.js" type="text/javascript"><\/script>');
}</script>

Ps:保险起见,建议将JS保存到本地
[/acc]

[acc status="close" title="底部鱼群跳跃动画"]将下方代码复制到网站顶部/head前
如果不想手机端显示就复制下面那一句

<!-- 底部小鱼跳跃 --><script src="https://www.xxi.icu/usr/themes/Brave/base/js/xiaoyu.js" type="text/javascript"></script>

下方代码复制到/body前

<!--底部小鱼跳跃--><div id="xiaoyu" style="position: relative;height: 160px; bottom: 0px;"></div>

[/acc]

[acc status="close" title="PC端红色大灯笼"]下方代码复制到/body前即可

<!-- PC端大红灯笼 --><script>if (screen && screen.width >768 ) {
document.write('<script src="https://www.xxi.icu/usr/themes/Brave/base/js/dadenglong.js" type="text/javascript"><\/script>');
}</script>

[/acc]

[acc status="close" title="浏览器标签栏动态文字"]下方代码复制到/body前即可

<!--变换标题-->
<script type="text/javascript">
var tx=new Array("欢迎光临","祝你生活愉快","本站随机更新","敬请期待..","闪!!");
var txcount=7;
var i=1;
var wo=0;
var ud=1;
function animatetitle()
{
window.document.title=tx[wo].substr(0,i)+"";
if(ud==0)i--;
if(ud==1)i++;
if(i==-1){ud=1;i=0;wo++;wo=wo%txcount;}
if(i==tx[wo].length+10){ud=0;i=tx[wo].length;}
parent.window.document.title=tx[wo].substr(0,i)+"";
setTimeout("animatetitle()",100);
}
animatetitle();
</script>
<!--变换标题-->

[/acc]

[acc status="close" title="QQ微信防红跳转"]自动识别QQ/微信访问将遮罩并引导至浏览器访问下方代码复制到网页顶部

<!-- QQ微信引导至浏览器访问 -->
<?php
$conf['qqjump']=1;if(strpos($_SERVER['HTTP_USER_AGENT'], 'QQ/')||strpos($_SERVER['HTTP_USER_AGENT'], 'MicroMessenger')!==false && $conf['qqjump']==1){$siteurl='http://'.$_SERVER['SERVER_NAME'].':'.$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];echo '<html>
<head>
<meta charset="UTF-8">
<title>请使用浏览器访问</title>
<style>
        body,html{width:100%;height:100%}
        *{margin:0;padding:0}
        body{background-color:#fff}
        #browser img{
            width:50px;
        }
        #browser{
            margin: 0px 10px;
            text-align:center;
        }

        .top-bar-guidance{font-size:15px;color:#fff;height:70%;line-height:1.8;padding-left:20px;padding-top:20px;background:url(https://xxi.icu/usr/themes/Cuteen/static/img/lin/fanghong-youshangjiao.webp) center top/contain no-repeat}
        .top-bar-guidance .icon-safari{width:40px;height:40px;vertical-align:middle;margin:0 .2em}
</style>
</head>
<body>
<div class="top-bar-guidance">
<font size=6><p>点击右上角<img src="https://xxi.icu/usr/themes/Cuteen/static/img/lin/fanghong-liulanqi.webp" class="icon-safari"> <span id="openm">,在浏览器打开</span></p>
<p>可以正常访问本站~</p></font>
</div>
</html>';exit; } ?>
<!-- QQ微信引导至浏览器访问 -->

[/acc]

[acc status="close" title="指定日期自动黑白网页"]应引用至需要黑白的页面即可,附带弹窗(已注释)

<!-- 主页自动黑白哀悼 -->
<?php 
/** 
 * PHP判断一个日期
 */
// 拟设一个日期 
$aday = '2023-02-18 00:00:00'; 
// 截取日期部分,摒弃时分秒,注意类似1月1日应为01-01
$bday = substr($aday,0,10);
// 获取今天的日期,格式为 YYYY-MM-DD 
$cday = date('Y-m-d');
//使用IF当作字符串判断是否相等
if($bday==$cday){
echo <<<EOF
<!--灰白特效-->
<style type="text/css">
html {
-webkit-filter: grayscale(100%);
-moz-filter: grayscale(100%);
-ms-filter: grayscale(100%);
-o-filter: grayscale(100%);
filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);
_filter:none;
}
</style>
<!--灰白特效-->
    <!--弹窗代码开始 -->
    <div class="web_notice" style="position: fixed;top: 0;left: 0;width: 100%;height: 100%;background: rgba(0,0,0,0.3);z-index: 99999999;">
    <div style="position: fixed;top: 50%;left: 50%;width: 20%;background: #FFF;transform: translate(-50%, -50%);border-radius: 8px;padding: 30px 24px 28px 24px;">
    <h3 style="font-weight: bold;text-align: center;font-size: 26px;">本 站 公 告</h3><hr>
    <div style="font-size: 18px;margin-top: 24px;line-height: 30px;color: #707070;">清明时节雨纷纷,路上行人欲断魂!<br>
<font size=2 style="position: absolute;right: 30px;">——自动黑白哀悼</font>
</div>
    <a style="display: block;background: #98a3ff;color: #FFF;text-align: center;font-weight: bold;font-size: 18px;line-height: 45px;margin: 0 auto;margin-top: 60px;border-radius: 80px;width: 29%;" onclick="javascript:document.querySelector('.web_notice').remove()">我知道了</a></div></div>
    <!-- 弹窗代码结束 -->
EOF;
}else{

}
?>
<!-- 主页自动黑白哀悼 -->

[/acc]

[acc status="close" title="图片呼吸灯效果"]下方代码放后台-自定义CSS

img{-webkit-animation:ani 2s linear infinite;}@keyframes ani{0%{box-shadow:0 0 0px #00BCD4;}25%{box-shadow:0 0 10px #00BCD4;}50%{box-shadow:0 0 20px #00BCD4;}75%{box-shadow:0 0 10px #00BCD4;}100%{box-shadow:0 0 0px #00BCD4;}}

[/acc]

[acc status="close" title="禁止图片拖动"]下方代码放后台-自定义CSS

body img { -webkit-user-drag: none; }

[/acc]

[acc status="close" title="网站全站变灰代码"]放网页顶部

<style type="text/css">
html {
filter: progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);
-webkit-filter: grayscale(100%);}
</style>

[/acc]

[acc status="close" title="导航栏增加后台管理按钮"]在这之前,因为进后台比较繁琐,故自研得 该方法

PC端
路径/Cuteen/include/navbar.php,此处(昼夜切换按钮下方)加入下方代码即可

 <li class="navbar-icon d-none d-md-inline-flex" data-bs-toggle="tooltip"
                data-bs-placement="bottom"
                title="后台管理"><a target="_blank" class="d-md-inline-flex nav-link" href="/admin">
<svg t="1673414371247"  class="icon icon-20 darkMode" aria-hidden="true" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2207" width="16" height="16"><path d="M614.015 562.226H409.928c-191.021 0-346.487 153.046-346.487 341.29v20.07C63.441 1024 216.36 1024 409.928 1024h204.087c185.927 0 346.46 0 346.5-100.413v-20.121c0-188.156-155.48-341.291-346.5-341.291zM501.77 0C350.075 0 226.7 121.566 226.7 271.02s123.323 271.047 275.07 271.047S776.84 420.475 776.84 271.02 653.454 0 501.771 0z" p-id="2208"></path></svg>
            </a></li>

手机端
1、先在后台引入下方css,放于头部自定义内容里面
切勿直接放自定义css里边。

<style>
/**自适应显示**/
.sjxs{display: none;}
@media (max-width: 768px){.sjxs{display: block !important;}
.pcxs{display: block;}
@media (max-width: 768px){.pcxs{display: none;}
/**自适应显示**/
</style>

2、路径/Cuteen/include/navbar.php,/ul上方加入下方代码即可

<br><li class="nav-item sjxs"><a class="nav-link text-nowrap" target="_blank" href="/admin">⚙️后台管理→</a></li>

[/acc]

[acc status="close" title="网站底部备案栏美化"]PC端
路径/Cuteen/include/footer.php中找到图片位置
Test
footer标签里面的原有内容删了或者注释掉,再直接加入下方代码即可

<!-- PC --><span class="pcxs">
<p class="small" style="font-size:15px; font-family="Verdana,Geneva,DejaVu Sans,sans-serif">
&copy; 2022 - <?php echo date('Y'); ?> <a target="_blank" class="d-md-inline-flex nav-link" href="/index.php/Copyright.html" title="本站申明">?</a> Lucky - Bear</p>

<span style="position: relative;bottom: 3px;">
<span style="font-size: 15px" id="timeDate">载入天数...</span><span style="font-size: 15px" id="times">载入时分秒...</span>
</span>
<script language="javascript"> 
    var now = new Date();
    function createtime(){
        var grt= new Date("9/01/2018 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 +"&nbsp天&nbsp";
        document.getElementById("times").innerHTML = hnum + "&nbsp小时&nbsp" + mnum + "&nbsp分&nbsp" + snum + "&nbsp秒?";
    }
    setInterval("createtime()",250); 
</script> 
<br>
<a target="_blank" class="d-md-inline-flex nav-link" href="https://typecho.org" title="博客驱动为 Typecho"><img src="https://img.shields.io/badge/Powered-Typecho-d42328?style=flat&logo=Analogue"></a>
&nbsp<a target="_blank" class="d-md-inline-flex nav-link" href="https://blog.zwying.com" title="主题采用 Cuteen"><img src="https://img.shields.io/badge/Theme-Cuteen-9561cd?style=flat&logo=Pinterest"></a>
&nbsp<a target="_blank" class="d-md-inline-flex nav-link" href="https://beian.miit.gov.cn/#/Integrated/index" title="湘ICP备-2022002433号-2"><img src="https://img.shields.io/badge/湘ICP备-2022002433号-4bc51d?style=flat&logo=Octane Render"></a>
&nbsp<a target="_blank" class="d-md-inline-flex nav-link" href="https://www.rainyun.com/?ref=MjQyNTc=" title="由 雨云 提供云计算服务"><img src="https://img.shields.io/badge/Hosted-Rain云-f42187?style=flat&logo=Git Extensions"></a>
&nbsp<a target="_blank" class="d-md-inline-flex nav-link" href="https://cloud.tencent.com/" title="由 腾讯云 提供CDN加速服务"><img src="https://img.shields.io/badge/CDN-TxCloud-148EFF?style=flat&logo=ONLYOFFICE"></a>
</span>
<!-- PC -->

手机端
1、先在后台引入下方css,放于头部自定义内容里面
切勿直接放自定义css里边。(若以引用,请忽视)

<style>
/**自适应显示**/
.sjxs{display: none;}
@media (max-width: 768px){.sjxs{display: block !important;}
.pcxs{display: block;}
@media (max-width: 768px){.pcxs{display: none;}
/**自适应显示**/
</style>

2、footer标签里面继续加入下方代码即可

<!-- WAP -->
<span class="sjxs">
<p class="small" style="position: relative;bottom: 1.5px; font-size:15px; font-family="Verdana,Geneva,DejaVu Sans,sans-serif">
&copy; 2022 - <?php echo date('Y'); ?> ? Luckys - Bear</p>

<span style="font-size: 15px">
<a href="https://beian.miit.gov.cn/#/Integrated/index" target="_blank">?<?php $this->options->ICP() ?></a>
 - <a href="/index.php/Copyright.html" target="_blank">本站申明?</a>
</span>
</span>
<!-- WAP -->

[/acc]

[acc status="close" title="表格文字居中"]下方代码放后台-自定义CSS

.typography table thead>tr>th{text-align: center !important;}

[/acc]

[acc status="close" title="把侧栏“随便看看”改成多条"]网站根目录下 usr/themes/Cuteen/include/sidebar.php 找到以下代码,然后把 pageSize=3 原来的数字3改成你想要的数字,保存即可。

$this->widget('Widget_Post_rand@rand', 'pageSize=3')->to($rand); ?>

北海的鱼
[/acc]

[acc status="close" title="图片默认提示为 Test 的修改"]打开网站根目录 usr\plugins\Cuteen\js\editor.bundle.js 文件,拖动到 24544 行,找到以下代码,把Test改成你想要的,保存即可。

const title = $(".cm-modal input[name='title']").val() || 'Test';

北海的鱼
[/acc]

[card title="本教程不定时更新,欢迎阅读" color="info"]本文转自小熊博客[/card]

]]> 0 https://blog.qsuu.cn/archives/10.html#comments https://blog.qsuu.cn/feed/category/meihua/archives/10.html