Skip to content

Commit

Permalink
🍭修改一些错误配置
Browse files Browse the repository at this point in the history
  • Loading branch information
yqchilde committed Feb 27, 2020
1 parent 6f440bd commit 2c140c9
Show file tree
Hide file tree
Showing 5 changed files with 115 additions and 39 deletions.
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# WordPress Theme - Rebirth

### 声明

Rebirth主题的WordPress版本是完全移植过来的,原主题为`JaxsonWang(淮城一只猫)制作`,且是ghost博客主题,详情请看 [点击查看](https://github.com/JaxsonWang/Rebirth)

### PJAX版本

暂时没有

### 特色

- 大气、简约、优雅以及强大的响应式布局
- 原生黑暗模式,支持 macOS 和 window10 黑暗模式
- 俩种风格文章模板,全宽和含有文章目录的模板
- 友情链接和关于独立页独特模板,更好展示自己站点
- 恰到好处的个人社交信息
- 适合于中文字体阅读个人文章页面,优化到每一个元素
- Valine 评论系统的支持
- 强大的社交分享文章功能
- 增强模板 SEO 优化
- ...更多功能等你来体验

## 使用指南

- 建议使用 `git clone` 下载

- 如果直接下载压缩包记载将文件夹名字改回rebirth,即保证主题目录为 `wp-content/themes/rebirth`

- 请把主题文件包解压去掉master改为rebirth

- 关于设置主题方面,在wordpress后台里`外观->Rebirth主题设置`里面操作(都有功能描述)

- 此外如果发现bug,请及时给我一个issue

![](https://pic.yqqy.top/blog/20200227161811.png?imageslim)



### License

WordPress Theme Rebirth is open source and released under the MIT License.
24 changes: 20 additions & 4 deletions options.php
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,22 @@ function optionsframework_options() {
'type' => 'text'
);

// 支付宝捐赠二维码
$options[] = array(
'name' => '支付宝捐赠二维码',
'desc' => '写下一段简洁的文字,展示在你的作者页',
'id' => 'donate_alipay',
'type' => 'upload'
);

// 微信捐赠二维码
$options[] = array(
'name' => '微信捐赠二维码',
'desc' => '写下一段简洁的文字,展示在你的作者页',
'id' => 'donate_wxpay',
'type' => 'upload'
);

// 社交网络(不写则不显示)
$options[] = array(
'name' => '社交网络',
Expand Down Expand Up @@ -296,7 +312,7 @@ function optionsframework_options() {
// 关于
$options[] = array(
'name' => '关于',
'desc' => sprintf( 'Theme Rebirth v %s | <a href="#"> 主题说明 </a>', Rebirth_Version ),
'desc' => sprintf( 'Theme Rebirth v %s | <a href="https://github.com/yqchilde/rebirth"> 主题说明 </a>', Rebirth_Version ),
'id' => 'theme_intro',
'std' => '',
'type' => 'typography '
Expand All @@ -305,13 +321,13 @@ function optionsframework_options() {
// 检查更新
$options[] = array(
'name' => '检查更新',
'desc' => '<a href="https://github.com/mashirozx/Sakura/releases/latest">Download the latest version</a>',
'desc' => '<a href="https://github.com/yqchilde/rebirth/releases/latest">Download the latest version</a>',
'id' => "theme_version",
'std' => "tag",
'type' => "images",
'options' => array(
'tag' => 'https://img.shields.io/github/release/mashirozx/Sakura.svg?style=flat-square',
'tag2' => 'https://img.shields.io/github/commits-since/mashirozx/Sakura/v' . Rebirth_Version . '/dev.svg?style=flat-square',
'tag' => 'https://img.shields.io/github/v/release/yqchilde/rebirth.svg?style=flat-square',
'tag2' => 'https://img.shields.io/github/commits-since/yqchilde/rebirth/' . Rebirth_Version . '?logo=dev&style=flat-square',
),
);

Expand Down
Binary file modified screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions tpl/home/home-pagination.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

global $paged, $wp_query;
$range = 2;
$max_page = 0;
if (!$max_page) {
$max_page = $wp_query->max_num_pages;
}
Expand Down
87 changes: 52 additions & 35 deletions tpl/single/single-content.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,20 @@
$blog_author_others = esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) );
// 查看更多文章链接
$the_more_article_link = esc_url( get_category_link( get_the_category()[0]->term_id ) );
// 上一篇文章分类
$prev_blog_cat = get_category( get_the_category( get_previous_post()->ID )[0]->term_id )->cat_name;
// 上一篇文章链接
$prev_blog_link = get_permalink( get_previous_post()->ID );
// 下一篇文章分类
$next_blog_cat = get_category( get_the_category( get_next_post()->ID )[0]->term_id )->cat_name;
// 下一篇文章链接
$next_blog_link = get_permalink( get_next_post()->ID );
// 判断上一篇文章有没有
if (get_previous_post() != null) {
// 上一篇文章分类
$prev_blog_cat = get_category( get_the_category( get_previous_post()->ID )[0]->term_id )->cat_name;
// 上一篇文章链接
$prev_blog_link = get_permalink( get_previous_post()->ID );
}
// 判断下一篇文章有没有
if (get_next_post() != null) {
// 下一篇文章分类
$next_blog_cat = get_category( get_the_category( get_next_post()->ID )[0]->term_id )->cat_name;
// 下一篇文章链接
$next_blog_link = get_permalink( get_next_post()->ID );
}

?>
<main class="main-content">
Expand Down Expand Up @@ -73,14 +79,14 @@ class="btn btn-tools-item btn-donation"
<div class="row">
<div class="col-sm">
<figure class="figure">
<img src="https://img.alicdn.com/imgextra/i4/2038135983/O1CN011u4G8M87EOv3N6Q_!!2038135983.jpg"
<img src="<?php echo rebirth_option('donate_alipay') ?>"
alt="支付宝捐赠" title="请使用支付宝扫一扫进行捐赠">
<figcaption class="figure-caption">请使用支付宝扫一扫进行捐赠</figcaption>
</figure>
</div>
<div class="col-sm">
<figure class="figure">
<img src="https://img.alicdn.com/imgextra/i1/2038135983/O1CN012t8d2E1u4G8KbRFYp_!!2038135983.png"
<img src="<?php echo rebirth_option('donate_wxpay') ?>"
alt="微信捐赠" title="请使用微信扫一扫进行赞赏">
<figcaption class="figure-caption">请使用微信扫一扫进行赞赏</figcaption>
</figure>
Expand Down Expand Up @@ -116,31 +122,42 @@ class="btn btn-tools-item btn-donation"
</div>
<div class="col-12 col-sm-12 col-md-auto col-lg-auto col-xl-auto">
<div class="author-card-social">
<a class="site-tooltip author-card-social-links" target="_blank"
rel="noreferrer noopener nofollow" href="#" data-toggle="tooltip"
data-placement="top" title="QQ">
<i class="fab fa-qq"></i>
</a>
<a class="site-popover author-card-social-links"
href="#"
data-container=".site-wrapper"
data-toggle="popover"
data-placement="top"
data-trigger="hover"
data-content="<div class='hero-social-wechat'><img src='https://img.alicdn.com/imgextra/i4/2038135983/O1CN011u4G8M87EOv3N6Q_!!2038135983.jpg' alt='微信二维码'/></div>"
>
<i class="fab fa-weixin"></i>
</a>
<a class="site-tooltip author-card-social-links" target="_blank"
rel="noreferrer noopener nofollow" href="#" data-toggle="tooltip"
data-placement="top" title="WeiBo">
<i class="fab fa-weibo"></i>
</a>
<a class="site-tooltip author-card-social-links" target="_blank"
rel="noreferrer noopener nofollow" href="#" data-toggle="tooltip"
data-placement="top" title="Github">
<i class="fab fa-github"></i>
</a>
<?php if ( rebirth_option( 'author_qq' ) ) : ?>
<a class="site-tooltip author-card-social-links" target="_blank"
rel="noreferrer noopener nofollow" href="<?php echo rebirth_option( 'author_qq' ) ?>" data-toggle="tooltip"
data-placement="top" title="QQ">
<i class="fab fa-qq"></i>
</a>
<?php endif; ?>

<?php if ( rebirth_option( 'author_wechat' ) ) : ?>
<a class="site-popover author-card-social-links"
href="#"
data-container=".site-wrapper"
data-toggle="popover"
data-placement="top"
data-trigger="hover"
data-content="<div class='hero-social-wechat'><img src='<?php echo rebirth_option( 'author_wechat' ) ?>' alt='微信二维码'/></div>"
>
<i class="fab fa-weixin"></i>
</a>
<?php endif; ?>

<?php if ( rebirth_option( 'author_sina' ) ) : ?>
<a class="site-tooltip author-card-social-links" target="_blank"
rel="noreferrer noopener nofollow" href="<?php echo rebirth_option( 'author_sina' ) ?>" data-toggle="tooltip"
data-placement="top" title="WeiBo">
<i class="fab fa-weibo"></i>
</a>
<?php endif; ?>

<?php if ( rebirth_option( 'author_github' ) ) : ?>
<a class="site-tooltip author-card-social-links" target="_blank"
rel="noreferrer noopener nofollow" href="<?php echo rebirth_option( 'author_github' ) ?>" data-toggle="tooltip"
data-placement="top" title="Github">
<i class="fab fa-github"></i>
</a>
<?php endif; ?>
</div>
</div>
</div>
Expand Down

0 comments on commit 2c140c9

Please sign in to comment.