Skip to content

Commit

Permalink
0.820
Browse files Browse the repository at this point in the history
  • Loading branch information
solstice23 committed Feb 5, 2020
1 parent b763ede commit 2b4e35b
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 3 deletions.
25 changes: 25 additions & 0 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -1229,6 +1229,28 @@ function themeoptions_page(){
</p>
</td>
</tr>
<tr><th class="subtitle"><h2>页面背景</h2></th></tr>
<tr>
<th><label>页面背景</label></th>
<td>
<input type="text" class="regular-text" name="argon_page_background_url" value="<?php echo get_option('argon_page_background_url'); ?>"/>
<p class="description">页面背景的地址,需带上 http(s)。留空则不设置页面背景。如果设置了背景,推荐修改以下选项来增强页面整体观感。</p>
</td>
</tr>
<tr>
<th><label>背景不透明度</label></th>
<td>
<input type="number" name="argon_page_background_opacity" min="0" max="1" step="0.01" value="<?php echo (get_option('argon_page_background_opacity') == '' ? '1' : get_option('argon_page_background_opacity')); ?>"/>
<p class="description">0 ~ 1 的小数,越小透明度越高,默认为 1 不透明</p>
</td>
</tr>
<tr>
<th><label>Banner 样式</label></th>
<td>
<input type="text" style="width:150px" class="regular-text" name="argon_page_background_banner_style" value="<?php echo get_option('argon_page_background_banner_style'); ?>"/>
<p class="description">留空则不修改 Banner 样式。填 0 可以将 Banner 设为透明。填入正整数可以将 Banner 设为毛玻璃(高斯模糊)特效,模糊半径为填入的数。推荐填入 0。该选项仅在设置页面背景后才会生效。</p>
</td>
</tr>
<tr><th class="subtitle"><h2>左侧栏</h2></th></tr>
<tr>
<th><label>左侧栏标题</label></th>
Expand Down Expand Up @@ -1724,6 +1746,9 @@ function themeoptions_page(){
update_option('argon_seo_description', stripslashes($_POST['argon_seo_description']));
update_option('argon_seo_keywords', $_POST['argon_seo_keywords']);
update_option('argon_enable_mobile_scale', $_POST['argon_enable_mobile_scale']);
update_option('argon_page_background_url', $_POST['argon_page_background_url']);
update_option('argon_page_background_opacity', $_POST['argon_page_background_opacity']);
update_option('argon_page_background_banner_style', $_POST['argon_page_background_banner_style']);

//LazyLoad 相关
update_option('argon_enable_lazyload', $_POST['argon_enable_lazyload']);
Expand Down
33 changes: 33 additions & 0 deletions header.php
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,39 @@ public function end_el( &$output, $object, $depth = 0, $args = array(), $current
<?php } ?>
</section>

<?php if (get_option('argon_page_background_url') != '') { ?>
<style>
body:after {
content: '';
display: block;
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
z-index: -2;
background: url(<?php echo get_option('argon_page_background_url');?>);
background-position: center;
background-size: cover;
background-repeat: no-repeat;
opacity: <?php echo (get_option('argon_page_background_opacity') == '' ? '1' : get_option('argon_page_background_opacity')); ?>;
}
html.darkmode body:after{
filter: brightness(0.65);
}
<?php if (get_option('argon_page_background_banner_style') != '') { ?>
#banner, #banner .shape {
background: transparent !important;
}
<?php if (get_option('argon_page_background_banner_style') != '0') { ?>
#banner {
backdrop-filter: blur(<?php echo get_option('argon_page_background_banner_style');?>px);
}
<?php } ?>
<?php } ?>
</style>
<?php } ?>

<div id="float_action_buttons" class="float-action-buttons fabs-unloaded">
<button id="fab_toggle_sides" class="btn btn-icon btn-neutral fab shadow-sm" type="button" aria-hidden="true">
<span class="btn-inner--icon fab-show-on-right"><i class="fa fa-caret-left"></i></span>
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.810",
"version" : "0.820",
"details_url" : "https://github.com/solstice23/argon-theme/releases",
"download_url" : "https://github.com/solstice23/argon-theme/releases/download/v0.810/argon.zip"
"download_url" : "https://github.com/solstice23/argon-theme/releases/download/v0.820/argon.zip"
}
2 changes: 1 addition & 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://abc233.site/
Description: 轻盈、简洁、美观的 Wordpress 主题
Version: 0.810
Version: 0.820
License: MIT License
License URI: https://opensource.org/licenses/MIT
Tags: 简约, 两栏, 侧栏在左边, 浮动侧栏, 文章目录, 自适应, 夜间模式, 可自定义
Expand Down

0 comments on commit 2b4e35b

Please sign in to comment.