代码拉取完成,页面将自动刷新
<?php
/**获取客户端IP */
function getIp()
{
if ($_SERVER["HTTP_CLIENT_IP"] && strcasecmp($_SERVER["HTTP_CLIENT_IP"], "unknown")) {
$ip = $_SERVER["HTTP_CLIENT_IP"];
} else {
if ($_SERVER["HTTP_X_FORWARDED_FOR"] && strcasecmp($_SERVER["HTTP_X_FORWARDED_FOR"], "unknown")) {
$ip = $_SERVER["HTTP_X_FORWARDED_FOR"];
} else {
if ($_SERVER["REMOTE_ADDR"] && strcasecmp($_SERVER["REMOTE_ADDR"], "unknown")) {
$ip = $_SERVER["REMOTE_ADDR"];
} else {
if (
isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'] && strcasecmp(
$_SERVER['REMOTE_ADDR'],
"unknown"
)
) {
$ip = $_SERVER['REMOTE_ADDR'];
} else {
$ip = "unknown";
}
}
}
}
return ($ip);
}
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo('charset'); ?>" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title><?php is_front_page() ? bloginfo('description') : wp_title(''); ?> - <?php bloginfo('name'); ?></title>
<?php wp_head(); ?>
<!-- highlight风格 -->
<link rel="stylesheet" href="//static.class4ever.com/highlight.js/v9.18.1/style/ricky.css">
<link rel="stylesheet" href="//static.class4ever.com/layui/v2.5.5/css/layui.css">
<script src="//static.class4ever.com/layui/v2.5.5/layui.all.js"></script>
<!--/highlight风格 -->
<style>
html,
body {
font-family: Helvetica, Arial, Sans-Serif;
font-size: 18px;
color: #fff;
background: #000;
margin: 0px;
padding: 0px;
}
a {
color: #eee;
}
#wrapper {
width: 1015px;
margin: 10px auto;
box-shadow: 0px 0px 10px #666;
overflow: hidden;
}
#head {
height: 40px;
background: #262626;
}
.side-bar {
width: 444px;
}
/**诗句样式 */
.wp-block-verse {
font-size: 21px;
line-height: 40px;
border: 0;
}
.side-bar ul {
line-height: 26px;
}
/* 日历样式 */
#wp-calendar {
background: #000;
color: #ddd;
display: none;
}
#wp-calendar td {
font-size: 19px;
}
.wrap img {
border-radius: 5px;
}
#wp-calendar a {
color: yellow;
}
#wp-calendar a:hover {
color: #fff;
}
#wp-calendar tr:hover {
background: #000;
}
#wp-calendar th {
background: #000;
}
#wp-calendar caption {
background: #333;
padding: 6px;
border: 1px solid #fff;
border-bottom: 0;
}
/* 日历样式 */
.side-bar a {
text-decoration: underline;
white-space: nowrap;
}
#head a {
color: #FFF;
}
#head ul {
padding-left: 20px;
list-style: none;
}
#head ul li {
display: inline;
margin-right: 10px;
}
#head .side {
font-size: 14px;
color: #FFF;
padding-right: 10px;
}
#head .side .custom-logo {
float: left;
margin: 2px 7px 0 0;
border: 0px;
width: 48px;
height: 48px;
}
#head .side .contact-menu,
#head .side .contact-menu li {
display: inline;
margin: 0;
padding: 0;
position: static;
}
textarea {
width: 95%;
}
#head .side .text {
margin-top: 2px;
}
#head .side .text .name {
font-size: 24px;
margin-bottom: 5px;
}
#wrap {
position: relative;
/*background: #6889AE;*/
background: #000;
}
.main {
font-size: 18px;
}
#body {
width: 720px;
min-height: 800px;
background: #000;
color: rgb(220, 220, 220);
padding: 10px 0;
line-height: 1.3em;
}
#body .wrap {
/* margin: 0 20px 20px 20px; */
/* padding: 8px 0 10px 0; */
position: relative;
padding-left: 10px;
}
#body h2 {
margin: 0;
padding: 0;
line-height: 35px;
font-size: 30px;
font-weight: normal;
}
#body h2 span {
font-weight: bold;
}
#body .date {
margin: 10px 0 0 10px;
padding: 0;
color: #6A6A6A;
font-weight: normal;
font-size: 24px;
}
#body div.projects {
float: left;
width: 360px;
margin-right: 15px;
}
#body .rest {
padding: 0 5px 0 5px;
overflow: hidden;
}
#body .rest .bsap {
margin-bottom: 15px;
}
pre {
overflow: auto;
background-color: #000;
margin: 0 15px;
padding: 15px;
font-size: 13px;
line-height: 1.1em;
font-family: Consolas, monospace;
border: 1px solid #DDD;
}
ol.projects,
ol.posts {
list-style: none;
margin: 0;
padding: 0;
}
ol.projects li {
width: 45%;
}
ol.projects p {
margin-top: 5px;
font-size: 0.8em;
color: #444;
}
ol.posts li {
margin: 10px 0;
font-size: 0.8em;
color: #444;
}
ol.posts strong {
font-size: 1.2em;
}
h3 {
margin: 0;
padding: 0;
font-weight: normal;
}
.item {
position: relative;
font-size: 18px;
}
.item img {
position: absolute;
top: 0px;
left: 10px;
display: none;
}
.item .box {
margin: 20px 0 20px 10px;
height: 213px;
width: 560px;
overflow: hidden;
position: relative;
}
.item .box h2 {
margin: 4px 0 5px 10px;
padding: 0;
font-size: 30px;
font-weight: normal;
}
h2 a {
color: #000;
}
.item .box .more {
position: absolute;
top: 4px;
right: 10px;
font-size: 14px;
}
.item .box ol {
list-style: none;
margin: 0 10px 0 10px;
padding: 0px;
height: 150px;
overflow: hidden;
}
.item .box li {
margin: 0 2px 0 0;
padding: 0;
}
.item .box li.blog {
margin-bottom: 8px;
line-height: 18px;
}
.item .box li.blog a {
font-weight: bold;
}
.item .box li.blog .desc {
display: inline;
font-size: 16px;
}
.item .box li.link .desc {
display: none;
}
#side {
position: absolute;
top: 0px;
left: 726px;
color: #FFF;
}
#side h3 {
font-size: 20px;
font-weight: normal;
margin: 20px 0 0 0;
padding: 0;
}
#side h3 span {
font-weight: bold;
}
#side a {
color: #FFF;
}
#body h2 a {
color: rgb(220, 220, 220);
}
#side .box {
width: 268px;
background: #446E95;
position: relative;
padding: 8px;
margin: 15px 0;
overflow: auto;
font-size: 12px;
}
#side .box label {
font-size: 18px;
}
#side .box img {
float: left;
border: 0;
}
#side .box .desc {
margin: 0 0 0 82px;
}
#side .box .padding {
margin: 0 8px;
}
#side .box h3 {
font-size: 18px;
font-weight: normal;
margin: 0 0 5px 0;
padding: 0;
}
#side .box .desc p {
line-height: 18px;
font-size: 14px;
margin: 0;
padding: 0;
}
.more {
text-align: right;
font-size: 18px;
}
.header-img {
width: 960px;
margin-left: -140px;
}
.header-caption {
width: 960px;
margin-left: -140px;
text-align: right;
font-size: 0.6em;
color: #666;
margin-top: -18px;
}
.header-caption a {
margin-right: 20px;
}
@media screen and (max-width: 960px) {
.header-img,
.header-caption {
width: 100%;
margin-left: 0;
}
}
/*@media screen and (max-width: 1015px) {*/
#wrapper {
width: 100%;
margin: 0px;
min-width: 600px;
}
#head.other .side {
right: -95px;
}
#side {
position: static;
width: 100%;
max-width: 720px;
left: 0px;
overflow: hidden;
/* margin: 0 auto; */
background: #6889AE;
}
#side #projects {
width: 608px;
margin: 0 auto;
}
#side .box {
float: left;
margin: 10px;
}
#side br {
clear: both;
}
#head .wrap,
#body {
width: 720px;
/* margin: 0 auto; */
position: relative;
height: 100%;
}
#side .bsap {
float: left;
margin: 10px;
}
/**标签云 */
.widget_tag_cloud a {
font-weight: 700;
margin-right: 0.5rem;
white-space: nowrap;
}
/**归档 */
.widget_archive a {
font-weight: 700;
text-decoration: none !important;
}
/*}*/
@media screen and (max-width: 719px) {
#wrapper {
min-width: 0;
}
#head .wrap {
width: 100%;
}
#head.other .side {
right: 0;
width: 68px;
}
#head .side .text {
display: none;
}
#body {
width: 100%;
}
#body div.projects {
width: 100%;
margin-bottom: 20px;
}
#body .box.large {
width: 100%;
}
#body .rest {
width: 100%;
}
#body img {
max-width: 100%;
}
#side .box {
float: none;
margin: 10px auto;
}
#side #projects {
width: 100%;
margin: 0;
}
}
@media screen and (max-width: 399px) {
#head ul {
position: static;
padding: 8px 0 0 0;
margin: 0 68px 0 10px;
}
#head ul li {
margin-right: 0;
}
#head.other .side {
width: 58px;
}
}
.incanvas a {
text-decoration: underline;
}
.syntax_hilite {
font-family: Courier New;
padding: 8px;
margin: 8px;
background: #F5F5F5;
border-top: 1px solid #BBB;
border-bottom: 1px solid #BBB;
font-size: 14px;
}
.postentry h3 {
font-weight: bold;
}
.postentry blockquote {
padding-left: 5px;
border-left: 3px solid #BBB;
}
.syntax_hilite ol {
list-style: none;
margin: 0px;
padding: 0px;
}
#commentlist {
list-style: none;
margin: 0;
padding: 0;
}
#commentlist li {
font-size: 13px;
margin: 0 0 10px 0;
}
#commentlist li.author {
background: #FFECC7;
}
#commentlist li h3 {
background: #F5F5F5;
border-bottom: 1px solid #BBB;
padding: 4px;
}
#commentlist li div.comment-text {
padding: 10px;
overflow: auto;
}
#commentlist li div.comment-text p {
margin: 0;
padding: 4px 0;
}
#commentform {
border: 1px solid #BBB;
margin-left: 20px;
margin-right: 20px;
background: #000;
padding: 5px;
margin-top: 50px;
}
#commentform h4 {
margin: 0;
}
code {
white-space: pre;
}
code br {
display: none;
}
#carbonads {
margin-top: -12px;
}
.carbon-img img {
margin-right: 8px;
}
.carbon-poweredby {
display: block;
margin-top: 1em;
}
/* 以上是原john的css */
.card {
color: #fff;
border: 1px solid #444;
border-radius: 4px;
margin: 10px;
height: auto;
}
.card>div:not(:last-child) {
border-bottom: 1px solid #444;
}
.card-header {
padding: 10px 10px 5px 10px;
}
.card-body {
padding: .4em 1em .7em;
}
.card-footer {
padding: 5px;
}
.post-title {
font-size: 1.5em;
margin-bottom: 5px;
line-height: 1.5em;
}
.post-title>a {
text-decoration: none;
}
.post-title>a:hover {
text-decoration: underline;
}
.wrap,
#body,
#wrap {
width: 100%;
}
.post-list {
display: flex;
flex-flow: row wrap;
}
.a-post {
width: 422px;
}
.nav-bar {
position: fixed;
top: 0;
left: 0;
z-index: 999;
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
.body {
margin-top: 40px;
}
.nav {
display: inline-block;
}
.layui-btn-sm {
font-size: 14px;
}
.card img {
max-width: 100%;
}
</style>
<script src="//static.class4ever.com/jquery/jquery-3.4.1.min.js"></script>
<?php
//判断wordpress是否已登录
$hasLogin = current_user_can('level_0') ? 1 : 0;
?>
<script>
//已登录时调整nav高度
$(document).ready(function() {
const hasLogin = <?= $hasLogin ?>;
const addNum = 30
if (hasLogin) {
//微调nav高度
let topNav = parseInt($('.nav-bar').css('margin-top')) + 30
$('.nav-bar').css('margin-top', topNav + 'px')
}
})
</script>
</head>
<body <?php body_class(); ?>>
<div id="wrapper">
<!-- 导航 -->
<div id="head" class="nav-bar">
<!-- 全站菜单 -->
<div style="white-space:nowrap;">
<?php wp_nav_menu(array(
'theme_location' => 'header-menu',
'container_class' => 'nav',
'depth' => 1
)); ?>
<div style="display:inline-block;">
<form method="get" action="https://blog.class4ever.com/">
<input type="text" name="s" class="layui-input" style="width:150px;display:inline-block;height:30px;">
<button class="layui-btn layui-btn-normal layui-btn-sm">搜博客</button>
</form>
</div>
<div style="display:inline-block;font-size:14px;color:#ddd;margin-left:20px;">
您的ip: <?= getIp() ?>
</div>
</div>
<!-- /全站菜单 -->
<!-- 右侧 -->
<div class="side">
<?php
if (function_exists('the_custom_logo')) {
echo '<a href="/about/" class="logo">';
the_custom_logo();
echo '</a>';
}
?>
<div class="text">
<div class="name" style="display:inline-block;margin-right:5px;"><?php bloginfo('name'); ?></div>
<a href="https://gitee.com/ricky1986/" target="_blank">
<img src="//www.class4ever.com/_static/images/gitee.png" style="width:30px;margin-bottom:13px;" title="码云">
</a>
<a href="https://github.com/ricky1986/" target="_blank">
<img src="//www.class4ever.com/_static/images/github.png" style="width:30px;margin-bottom:13px;" title="GitHub">
</a>
<!-- 公众号 -->
<i class="layui-icon wechat menu-icon" style="font-size:26px;" title="微信公众号"></i>
<!-- /公众号 -->
<div>
<style>
.menu-icon:hover {
cursor: pointer;
}
</style>
</div>
</div>
</div>
<!-- /右侧 -->
</div>
<script>
/**功能: 微信弹出 开始 */
$('.wechat').click(function() {
let html = ''
html += '<div style="text-align:center;margin-top:20px;margin-bottom:40px;color:#000;">基督徒公众号</div>'
html += '<div style="text-align:center;">'
html += '<img src="//www.class4ever.com/_static/images/wechat_mp.jpg" style="width:200px;" alt="基督徒">'
html += "</div>"
layer.open({
type: 1,
shadeClose: true,
maxmin: false,
title: false,
skin: 'layui-layer-rim', //加上边框
area: ['560px', '355px'], //宽高
content: html,
});
})
/***功能: 微信弹出 结束 */
</script>
<!-- /导航 -->
<div id="wrap" class="body">
<div id="body">
<div class="wrap">
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。