Skip to content

Commit

Permalink
0.59
Browse files Browse the repository at this point in the history
  • Loading branch information
solstice23 committed Nov 10, 2019
1 parent f5c5041 commit 3189c82
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 3 deletions.
3 changes: 3 additions & 0 deletions README.md
Expand Up @@ -51,6 +51,9 @@ Argon - 一个轻盈、简洁、美观的 WordPress 主题

# 更新日志

## 20191111 v0.59
+ 增加博客公告功能

## 20191107 v0.582
+ 修复未开启 Mathjax 选项时 Pjax 错误的问题

Expand Down
11 changes: 11 additions & 0 deletions functions.php
Expand Up @@ -1062,6 +1062,14 @@ function themeoptions_page(){
<p class="description">需带上 http(s) 开头</p>
</td>
</tr>
<tr><th class="subtitle"><h2>博客公告</h2></th></tr>
<tr>
<th><label>公告内容</label></th>
<td>
<textarea type="text" rows="5" cols="50" name="argon_sidebar_announcement"><?php echo htmlspecialchars(get_option('argon_sidebar_announcement')); ?></textarea>
<p class="description">显示在左侧栏顶部,留空则不显示,支持 HTML 标签</p>
</td>
</tr>
<tr><th class="subtitle"><h2>文章 Meta 信息</h2></th></tr>
<tr>
<th><label>显示字数和预计阅读时间</label></th>
Expand Down Expand Up @@ -1379,6 +1387,9 @@ function themeoptions_page(){
//页头页尾脚本
update_option('argon_custom_html_head', stripslashes($_POST['argon_custom_html_head']));
update_option('argon_custom_html_foot', stripslashes($_POST['argon_custom_html_foot']));

//公告
update_option('argon_sidebar_announcement', stripslashes($_POST['argon_sidebar_announcement']));
}
/*主题菜单*/
register_nav_menus( array(
Expand Down
4 changes: 2 additions & 2 deletions info.json
@@ -1,5 +1,5 @@
{
"version" : "0.582",
"version" : "0.59",
"details_url" : "https://github.com/abc2237512422/argon-theme/releases",
"download_url" : "https://github.com/abc2237512422/argon-theme/releases/download/v0.582/argon.zip"
"download_url" : "https://github.com/abc2237512422/argon-theme/releases/download/v0.59/argon.zip"
}
8 changes: 8 additions & 0 deletions sidebar.php
@@ -1,5 +1,13 @@
<div id="sidebar_mask"></div>
<aside id="leftbar" class="leftbar widget-area" role="complementary">
<?php if (get_option('argon_sidebar_announcement') != '') { ?>
<div id="leftbar_announcement" class="card bg-white shadow-sm border-0">
<div class="leftbar-announcement-body">
<div class="leftbar-announcement-title text-white">公告</div>
<div class="leftbar-announcement-content text-white"><?php echo get_option('argon_sidebar_announcement'); ?></div>
</div>
</div>
<?php } ?>
<div id="leftbar_part1" class="widget widget_search card bg-white shadow-sm border-0">
<div class="leftbar-banner card-body">
<span class="leftbar-banner-title text-white"><?php echo get_option('argon_sidebar_banner_title') == '' ? bloginfo('name') : get_option('argon_sidebar_banner_title'); ?></span>
Expand Down
23 changes: 22 additions & 1 deletion style.css
Expand Up @@ -3,7 +3,7 @@ Theme Name: argon
Author: abc2237512422
Author URI: https://abc233.site/
Description: 轻盈、简洁、美观的 Wordpress 主题
Version: 0.582
Version: 0.59
License: MIT License
License URI: https://opensource.org/licenses/MIT
Tags: 简约, 两栏, 侧栏在左边, 浮动侧栏, 文章目录, 自适应, 夜间模式, 可自定义
Expand Down Expand Up @@ -457,6 +457,23 @@ article table > thead > tr > th{
color: #32325d;
border-bottom: 1px solid #999;
}
#leftbar_announcement {
margin-bottom: 10px;
background: linear-gradient(150deg,#7795f8 15%,#6772e5 70%,#555abf 94%);
}
.leftbar-announcement-body {
padding: 15px 1.2em;
padding-bottom: 22px;
}
.leftbar-announcement-title {
font-size: 18px;
}
.leftbar-announcement-content {
font-size: 15px;
line-height: 1.8;
padding-top: 8px;
opacity: .9;
}
/*底栏*/
#footer{
background: linear-gradient(150deg,#7795f8 15%,#6772e5 70%,#555abf 94%);
Expand Down Expand Up @@ -2015,6 +2032,10 @@ html.darkmode .CtxtMenu_Menu {
.leftbar-banner-subtitle{
margin-top: 10px;
}
#leftbar_announcement{
border-radius: 0;
margin-bottom: 0;
}
#primary{
width: 100%;
}
Expand Down

0 comments on commit 3189c82

Please sign in to comment.