Skip to content

Commit

Permalink
0.960
Browse files Browse the repository at this point in the history
  • Loading branch information
solstice23 committed May 18, 2020
1 parent 2278d42 commit 070f98f
Show file tree
Hide file tree
Showing 6 changed files with 89 additions and 5 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ Argon 使用 [GPL V3.0](https://github.com/solstice23/argon-theme/blob/master/LI

# 更新日志

## 20200518 v0.960
+ 新增三栏布局模式

## 20200517 v0.958
+ 评论区时间显示实时更新
+ 优化评论区时间格式
Expand Down
19 changes: 18 additions & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,17 @@ function argon_widgets_init() {
'after_title' => '</h6>',
)
);
register_sidebar(
array(
'name' => '右侧栏小工具',
'id' => 'rightbar-tools',
'description' => __( '右侧栏小工具 (在 "Argon 主题选项" 中选择 "三栏布局" 才会显示)' ),
'before_widget' => '<div id="%1$s" class="widget %2$s card shadow-sm bg-white border-0">',
'after_widget' => '</div>',
'before_title' => '<h6 class="font-weight-bold text-black">',
'after_title' => '</h6>',
)
);
}
add_action('widgets_init','argon_widgets_init');
//注册新后台主题配色方案
Expand Down Expand Up @@ -2233,7 +2244,13 @@ function themeoptions_page(){
</div>
<label><input name="argon_page_layout" type="radio" value="single" <?php if ($argon_page_layout=='single'){echo 'checked';} ?>> 单栏</label>
</div>
<p class="description" style="margin-top: 15px;">使用单栏时,关于侧栏的设置将失效。</p>
<div class="radio-with-img">
<div class="radio-img">
<svg width="250" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1920 1080"><title>setting_three_columns_preview</title><rect width="1920" height="1080" style="fill:#e6e6e6"/><g style="opacity:0.5"><rect width="1920" height="381" style="fill:#5e72e4"/></g><rect x="237.5" y="256" width="258" height="179" style="fill:#5e72e4"/><rect x="237.5" y="470" width="258" height="485" style="fill:#fff"/><rect x="538.5" y="256.5" width="842" height="250" style="fill:#fff"/><rect x="538.5" y="536.5" width="842" height="250" style="fill:#fff"/><rect x="538.5" y="817" width="842" height="250" style="fill:#fff"/><rect x="1424" y="256" width="258" height="811" style="fill:#fff"/></svg>
</div>
<label><input name="argon_page_layout" type="radio" value="triple" <?php if ($argon_page_layout=='triple'){echo 'checked';} ?>> 三栏</label>
</div>
<p class="description" style="margin-top: 15px;">使用单栏时,关于左侧栏的设置将失效。</br>使用三栏时,请前往 "外观-小工具" 设置页面配置右侧栏内容。</p>
</td>
</tr>
<tr><th class="subtitle"><h3>字体</h3></th></tr>
Expand Down
3 changes: 3 additions & 0 deletions header.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
if (get_option('argon_page_layout') == "single"){
$htmlclasses .= "single-column ";
}
if (get_option('argon_page_layout') == "triple"){
$htmlclasses .= "triple-column ";
}
if (get_option('argon_enable_amoled_dark') == "true"){
$htmlclasses .= "amoled-dark ";
}
Expand Down
4 changes: 2 additions & 2 deletions info.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version" : "0.958",
"version" : "0.960",
"details_url" : "https://github.com/solstice23/argon-theme/releases",
"download_url" : "https://github.com/solstice23/argon-theme/releases/download/v0.958/argon.zip"
"download_url" : "https://github.com/solstice23/argon-theme/releases/download/v0.960/argon.zip"
}
9 changes: 8 additions & 1 deletion sidebar.php
Original file line number Diff line number Diff line change
Expand Up @@ -272,4 +272,11 @@ public function end_el( &$output, $object, $depth = 0, $args = array(), $current
</div>
</div>
</div>
</div>
</div>
<?php
if (get_option('argon_page_layout') == 'triple'){
echo '<aside id="rightbar" class="rightbar widget-area" role="complementary">';
dynamic_sidebar( 'rightbar-tools' );
echo '</aside>';
}
?>
56 changes: 55 additions & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Theme Name: argon
Author: solstice23
Author URI: https://solstice23.top/
Description: 轻盈、简洁、美观的 Wordpress 主题
Version: 0.958
Version: 0.960
License: GNU General Public License v3.0
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Tags: 简约, 两栏, 侧栏在左边, 浮动侧栏, 文章目录, 自适应, 夜间模式, 可自定义
Expand Down Expand Up @@ -291,6 +291,56 @@ html.page-infomation-card{
margin-left: auto;
margin-right: auto;
}
/*三栏布局*/
#rightbar {
padding-left: 0;
padding-right: 0;
width: 280px;
float: right;
margin-bottom: 25px;
}
#rightbar > .card {
margin-left: 10px;
margin-right: 20px;
margin-bottom: 15px;
padding: 20px 25px;
}
#rightbar > .card ul {
list-style: none;
padding-inline-start: 0;
}
#rightbar > .card ul li {
margin-bottom: 5px;
}
#rightbar > .card > h6 {
margin-bottom: 15px;
}
@media screen and (min-width:1100px){
html.triple-column #leftbar {
padding-right: 10px;
}
html.triple-column #leftbar_part2.sticky{
width: 250px;
}
html.triple-column #primary {
width: calc(100% - 560px);
float: left;
}
}
html.triple-column #content {
max-width: 1500px;
}
@media screen and (min-width:1700px){
html.triple-column #content{
max-width: 1600px;
}
}
@media screen and (max-width:1100px){
#rightbar{
display: none;
}
}

/*Pjax加载动画 & 卡片动画*/
@keyframes card-show{
0%{
Expand Down Expand Up @@ -3827,6 +3877,10 @@ html.using-safari #share .icon-wechat .wechat-qrcode{
transform: translate3d(-50%,-50% , 0) !important;
}
}
html.using-safari .post-donate .donate-btn:hover ~ .donate-qrcode {
transform: translateX(-50%);
opacity: 1;
}
html.using-safari #fabtn_blog_settings_popup{
-webkit-transform: translate3d(0,0,0) !important;
}
Expand Down

0 comments on commit 070f98f

Please sign in to comment.