本站页脚全功能开源,因已经发现有人使用本站CDN导致我CDN开销巨大,故删减了部分本站资源。

页脚截图

页脚本站句子api的css,请自行添加到主题的style.css或main.css中。

#hitokoto{
    border-left: 5px solid #00b5f2;
    border-right: 5px solid #00b5f2;
    background-color: #ffffff;
    padding: 10px;text-align: center;
    color: #00b5f2;
    margin: 5px 0 5px 0;
border-radius: 10px;
     border-top-left-radius: 10px; 
     border-top-right-radius: 10px; 
     border-bottom-left-radius: 10px;
     border-bottom-right-radius: 10px; 

下面为文本版本,可以点击右上角一键复制或点击上横框放大至全屏。

<?php
/**
 * The template for displaying the footer.
 *
 * Contains the closing of the #content div and all content after.
 *
 * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
 *
 * @package Sakura
 */

?>
	</div><!-- #content -->
	<?php
		if(akina_option('general_disqus_plugin_support')){
			get_template_part('layouts/duoshuo');
		}else{
			comments_template('', true);
		}
	?>
	</div><!-- #page Pjax container-->
	<footer id="colophon" class="site-footer" role="contentinfo">
		<div class="site-info">
			<div class="footertext">
				<div class="img-preload">
					<img src="https://cdn.jsdelivr.net/gh/moezx/cdn@3.1.9/img/Sakura/images/wordpress-rotating-ball-o.svg">
					<img src="https://cdn.jsdelivr.net/gh/moezx/cdn@3.1.9/img/Sakura/images/disqus-preloader.svg">
				</div>
				<p style="color: #666666;"><?php echo akina_option('footer_info', ''); ?></p>
			</div>
			<div class="footer-device">
			<p style="font-family: 'Ubuntu', sans-serif;">
					              <span style="color: #b9b9b9;">
						<?php /* 能保留下面两个链接吗?算是我一个小小的心愿吧~ */ /*行叭,满足你,白猫大佬~*/?>
						Theme <a href="https://2heng.xin/theme-sakura/" target="_blank" style="color: #b9b9b9;;text-decoration: underline dotted rgba(0, 0, 0, .1);">Sakura</a> <i class="iconfont icon-sakura rotating" style="color: #ffc0cb;display:inline-block"></i> by <a href="https://2heng.xin/" target="_blank" style="color: #b9b9b9;;text-decoration: underline dotted rgba(0, 0, 0, .1);">Mashiro</a>
					</span>
				</p>
<center><div><link
      href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css"
      rel="stylesheet"
    />
    <script src="https://cdn.jsdelivr.net/npm/jquery@1.12.4/dist/jquery.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script>

  </head>

  <script type="text/javascript">
    $(function() {


      $.ajax({
        url: "https://v1.hitokoto.cn/",
        data:'', // 请求的参数
        type: "GET", //提交方式
        dataType: "json",
        success: function(data) {
            // 请求后处理
            // 调用文字处理方法
            chakhsu(document.getElementById("chakhsu"),data.hitokoto);
          console.log(data.hitokoto);
        }
      });



      // 文字循环处理 两个参数,第一个是需要显示在哪个标签内append 以id为选择器,第二个参数是 要处理的文字
      function chakhsu(r,text) {
        function t() {
          return b[Math.floor(Math.random() * b.length)];
        }
        function e() {
          return String.fromCharCode(94 * Math.random() + 33);
        }
        function n(r) {
          for (var n = document.createDocumentFragment(), i = 0; r > i; i++) {
            var l = document.createElement("span");
            (l.textContent = e()), (l.style.color = t()), n.appendChild(l);
          }
          return n;
        }
        function i() {
          var t = o[c.skillI];
          c.step
            ? c.step--
            : ((c.step = g),
              c.prefixP < l.length
                ? (c.prefixP >= 0 && (c.text += l[c.prefixP]), c.prefixP++)
                : "forward" === c.direction
                ? c.skillP < t.length
                  ? ((c.text += t[c.skillP]), c.skillP++)
                  : c.delay
                  ? c.delay--
                  : ((c.direction = "backward"), (c.delay = a))
                : c.skillP > 0
                ? ((c.text = c.text.slice(0, -1)), c.skillP--)
                : ((c.skillI = (c.skillI + 1) % o.length),
                  (c.direction = "forward"))),
            (r.textContent = c.text),
            r.appendChild(
              n(
                c.prefixP < l.length
                  ? Math.min(s, s + c.prefixP)
                  : Math.min(s, t.length - c.skillP)
              )
            ),
            setTimeout(i, d);
        }
        /*以下内容自定义修改*/
        var l = "每日一言:",
          o = [text].map(function(r) {
            return r + "";
          }),
          a = 3,
          g = 1,
          s = 5,
          d = 75,
          b = [
            "rgb(110,64,170)",
            "rgb(150,61,179)",
            "rgb(191,60,175)",
            "rgb(228,65,157)",
            "rgb(254,75,131)",
            "rgb(255,94,99)",
            "rgb(255,120,71)",
            "rgb(251,150,51)",
            "rgb(226,183,47)",
            "rgb(198,214,60)",
            "rgb(175,240,91)",
            "rgb(127,246,88)",
            "rgb(82,246,103)",
            "rgb(48,239,130)",
            "rgb(29,223,163)",
            "rgb(26,199,194)",
            "rgb(35,171,216)",
            "rgb(54,140,225)",
            "rgb(76,110,219)",
            "rgb(96,84,200)"
          ],
          c = {
            text: "",
            prefixP: -s,
            skillI: 0,
            skillP: 0,
            direction: "forward",
            delay: a,
            step: g
          };
        i();
      }


    });
  </script>
  <style></style>

  <body>
    <div class="container">
     <div id="chakhsu">

     </div>
    </div>
  </body>
  </div></center>
              <font color="#00b5f2"><span id="runtime_span"></span><script type="text/javascript">function show_runtime(){window.setTimeout("show_runtime()",1000);X=new Date("7/26/2018 21:39:00");Y=new Date();T=(Y.getTime()-X.getTime());M=24*60*60*1000;a=T/M;A=Math.floor(a);b=(a-A)*24;B=Math.floor(b);c=(b-B)*60;C=Math.floor((b-B)*60);D=Math.floor((c-C)*60);runtime_span.innerHTML="本站已安全运行"+A+"天"+B+"小时"+C+"分"+D+"秒"}show_runtime() ;</script></font>
		 <script count= "75" src="https://cdn.bootcss.com/canvas-nest.js/2.0.4/canvas-nest.js"></script>
          <?php get_template_part( 'template/footer-widget' ); ?>
    <p style="text-align:center;color:"#00b5f2">成功查询 <?php echo get_num_queries();?> 次!总用时 <?php timer_stop(1); ?> 秒!</p>
     <?php
    if(!file_exists("count.txt")){
        $one_file=fopen("count.txt","w+"); //建立一个统计文本,如果不存在就创建
       echo"您是本月第<font color='red'><b>1</b></font>位访客"; //首次直接输出第一次
        fwrite("count.txt","1");  //把数字1写入文本
        fclose("$one_file");
     }else{ //如果不是第一次访问直接读取内容,并+1,写入更新后再显示新的访客数
        $num=file_get_contents("count.txt");
        $num++;
        file_put_contents("count.txt","$num");
        $newnum=file_get_contents("count.txt");
        echo"您是本月第<font color='red'><b>".$newnum."</b></font>位访客";
    }
?>
<?php
/*header('Content-type: text/html; charset=utf-8');*/
$online_log = "count.dat"; //保存人数的文件,
$timeout = 30;//30秒内没动作者,认为掉线
$entries = file($online_log);

$temp = array();

for ($i=0;$i<count($entries);$i++) {
$entry = explode(",",trim($entries[$i]));
if (($entry[0] != $_SERVER["REMOTE_ADDR"]) && ($entry[1] > time())) {
array_push($temp,$entry[0].",".$entry[1]."\n"); //取出其他浏览者的信息,并去掉超时者,保存进$temp
}
}

array_push($temp,$_SERVER["REMOTE_ADDR"].",".(time() + ($timeout))."\n"); //更新浏览者的时间
$users_online = count($temp); //计算在线人数

$entries = implode("",$temp);
//写入文件
$fp = fopen($online_log,"w");
flock($fp,LOCK_EX); //flock() 不能在NFS以及其他的一些网络文件系统中正常工作
fputs($fp,$entries);
flock($fp,LOCK_UN);
fclose($fp);

echo "当前在线".$users_online."人";?>
   <script type="text/javascript" src="https://api.gymxbl.com/?format=js&charset=utf-8"></script>
 </p>孤影墨香 强力驱动</p>
<div id="hitokoto"><script>hitokoto()</script></div>
          </div>
		</div><!-- .site-info -->
	</footer><!-- #colophon -->
	<div class="openNav no-select">
		<div class="iconflat no-select">
			<div class="icon"></div>
		</div>
		<div class="site-branding">
			<?php if (akina_option('akina_logo')){ ?>
			<div class="site-title"><a href="<?php bloginfo('url');?>" ><img src="<?php echo akina_option('akina_logo'); ?>"></a></div>
			<?php }else{ ?>
			<h1 class="site-title"><a href="<?php bloginfo('url');?>" ><?php bloginfo('name');?></a></h1>
			<?php } ?>
		</div>
	</div><!-- m-nav-bar -->
	</section><!-- #section -->
	<!-- m-nav-center -->
	<div id="mo-nav">
		<div class="m-avatar">
			<?php $ava = akina_option('focus_logo') ? akina_option('focus_logo') : get_template_directory_uri().'/images/avatar.jpg'; ?>
			<img src="<?php echo $ava ?>">
		</div>
		<div class="m-search">
			<form class="m-search-form" method="get" action="<?php echo home_url(); ?>" role="search">
				<input class="m-search-input" type="search" name="s" placeholder="<?php _e('搜索...', 'akina') ?>" required>
			</form>
		</div>
		<?php wp_nav_menu( array( 'depth' => 2, 'theme_location' => 'primary', 'container' => false ) ); ?>
	</div><!-- m-nav-center end -->
	<a href="#" class="cd-top faa-float animated "></a>
	<button onclick="topFunction()" id="moblieGoTop" title="Go to top"><i class="fa fa-chevron-up" aria-hidden="true"></i></button>
	<!-- search start -->
	<form class="js-search search-form search-form--modal" method="get" action="<?php echo home_url(); ?>" role="search">
		<div class="search-form__inner">
			<div>
				<p class="micro mb-"><?php _e('想要找点什么呢?', 'akina') ?></p>
				<i class="iconfont icon-search"></i>
				<input class="text-input" type="search" name="s" placeholder="<?php _e('Search', 'akina') ?>" required>
			</div>
		</div>
		<div class="search_close"></div>
	</form>
	<!-- search end -->
<?php wp_footer(); ?>
<?php if(akina_option('site_statistics')){ ?>
<div class="site-statistics">
<script type="text/javascript"><?php echo akina_option('site_statistics'); ?></script>
</div>
<?php } ?>
<div class="changeSkin-gear no-select">
    <div class="keys">
        <span id="open-skinMenu">
		<i class="iconfont icon-gear inline-block rotating"></i>  切换主题 | SCHEME TOOL
        </span>
    </div>
</div>
<div class="skin-menu no-select">
    <div class="theme-controls row-container">
        <ul class="menu-list">
            <li id="white-bg">
                <i class="fa fa-television" aria-hidden="true"></i>
            </li><!--Default-->
            <li id="sakura-bg">
                <i class="iconfont icon-sakura"></i>
            </li><!--Sakura-->
            <li id="gribs-bg">
                <i class="fa fa-slack" aria-hidden="true"></i>
            </li><!--Grids-->
            <li id="KAdots-bg">
                <i class="iconfont icon-dots"></i>
            </li><!--Dots-->
            <li id="totem-bg">
                <i class="fa fa-superpowers" aria-hidden="true"></i>
            </li><!--Orange-->
            <li id="pixiv-bg">
                <i class="iconfont icon-pixiv"></i>
            </li><!--Start-->
            <li id="bing-bg">
                <i class="iconfont icon-bing"></i>
            </li><!--Bing-->
            <li id="dark-bg">
                <i class="fa fa-moon-o" aria-hidden="true"></i>
            </li><!--Night-->
        </ul>
    </div>
    <div class="font-family-controls row-container">
        <button type="button" class="control-btn-serif selected" data-mode="serif"
                onclick="mashiro_global.font_control.change_font()">Serif</button>
        <button type="button" class="control-btn-sans-serif" data-mode="sans-serif"
                onclick="mashiro_global.font_control.change_font()">Sans Serif</button>
    </div>
</div>
<canvas id="night-mode-cover"></canvas>
<?php if (akina_option('playlist_id', '')): ?>
<div id="aplayer-float" style="z-index: 100;"
	class="aplayer"
    data-id="<?php echo akina_option('playlist_id', ''); ?>"
    data-server="netease"
    data-type="playlist"
    data-fixed="true"
    data-theme="orange">
</div>
<style>.skin-menu{left:auto;right:10px;}.changeSkin-gear{left:auto;right:5px;}</style>
<?php endif; ?>
<script type="text/javascript">
/* 鼠标特效 */
var a_idx = 0;
jQuery(document).ready(function($) {
   $("body").click(function(e) {
       var a = new Array("富强", "民主", "文明", "和谐", "自由", "平等", "公正" ,"法治", "爱国", "敬业", "诚信", "友善");
       var $i = $("<span/>").text(a[a_idx]);
       a_idx = (a_idx + 1) % a.length;
       var x = e.pageX,
       y = e.pageY;
       $i.css({
           "z-index": 999999999999999999999999999999999999999999999999999999999999999999999,
           "top": y - 20,
           "left": x,
           "position": "absolute",
           "font-weight": "bold",
           "color": "#00b5f2"
       });
       $("body").append($i);
       $i.animate({
           "top": y - 180,
           "opacity": 0
       },
       1500,
       function() {
           $i.remove();
       });
   });
});
</script>
 </body>
</html>

努力学习ing