Skip to content

Commit

Permalink
1.2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
solstice23 committed Sep 4, 2021
1 parent 083067c commit 4a778bc
Show file tree
Hide file tree
Showing 7 changed files with 68 additions and 6 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ Argon 使用 [GPL V3.0](https://github.com/solstice23/argon-theme/blob/master/LI

# 更新日志

## 20210905 v1.2.5
+ 滚动条沉浸
+ Banner 显示状态新增全屏选项(Banner 可全屏作为封面)
+ 更正翻译

## 20210815 v1.2.4
+ 新增 Banner 显示状态选项(新增隐藏 Banner、迷你 Banner)
+ 新增顶栏显示状态选项 (新增顶栏不随页面滚动)
Expand Down
27 changes: 27 additions & 0 deletions argontheme.js
Original file line number Diff line number Diff line change
Expand Up @@ -1659,6 +1659,33 @@ function tippyInit(){
}
tippyInit();

/*Banner 全屏封面相关*/
if ($("html").hasClass("banner-as-cover")){
function classInit(){
if ($("#main").hasClass("article-list-home")){
if (!$("html").hasClass("is-home")){
$("html").addClass("is-home");
$("html").trigger("resize");
}
}else{
if ($("html").hasClass("is-home")){
$("html").removeClass("is-home");
$("html").trigger("resize");
}
}
}
classInit();
new MutationObserver(function(mutations, observer){
classInit();
}).observe(document.querySelector("#primary"), {
'childList': true
});
$(".cover-scroll-down").on("click" , function(){
gotoHash("#content", 500);
$("#content").focus();
});
}

/*Pjax*/
$.pjax.defaults.timeout = 10000;
$.pjax.defaults.container = ['#primary', '#leftbar_part1_menu', '#leftbar_part2_inner', '.page-information-card-container', '#wpadminbar'];
Expand Down
3 changes: 2 additions & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -2990,9 +2990,10 @@ function themeoptions_page(){
<?php $argon_banner_size = get_option('argon_banner_size', 'full'); ?>
<option value="full" <?php if ($argon_banner_size=='full'){echo 'selected';} ?>><?php _e('完整', 'argon');?></option>
<option value="mini" <?php if ($argon_banner_size=='mini'){echo 'selected';} ?>><?php _e('迷你', 'argon');?></option>
<option value="fullscreen" <?php if ($argon_banner_size=='fullscreen'){echo 'selected';} ?>><?php _e('全屏', 'argon');?></option>
<option value="hide" <?php if ($argon_banner_size=='hide'){echo 'selected';} ?>><?php _e('隐藏', 'argon');?></option>
</select>
<p class="description"><?php _e('完整: Banner 高度占用半屏', 'argon');?></br><?php _e('迷你: 减小 Banner 的内边距', 'argon');?></br><?php _e('隐藏: 完全隐藏 Banner', 'argon');?></br></p>
<p class="description"><?php _e('完整: Banner 高度占用半屏', 'argon');?></br><?php _e('迷你: 减小 Banner 的内边距', 'argon');?></br><?php _e('全屏: Banner 占用全屏作为封面(仅在首页生效)', 'argon');?></br><?php _e('隐藏: 完全隐藏 Banner', 'argon');?></br></p>
</td>
</tr>
<tr>
Expand Down
7 changes: 7 additions & 0 deletions header.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
$htmlclasses .= 'banner-mini ';
}else if ($banner_size == 'hide'){
$htmlclasses .= 'no-banner ';
}else if ($banner_size == 'fullscreen'){
$htmlclasses .= 'banner-as-cover ';
}
}
if (get_option('argon_toolbar_blur', 'false') == 'true'){
Expand Down Expand Up @@ -447,6 +449,11 @@ public function end_el( &$output, $object, $depth = 0, $args = array(), $current
}
</style>
<?php } ?>
<?php if ($banner_size == 'fullscreen') { ?>
<div class="cover-scroll-down">
<i class="fa fa-angle-down" aria-hidden="true"></i>
</div>
<?php } ?>
</section>

<?php if (apply_filters('argon_page_background_url', get_option('argon_page_background_url')) != '') { ?>
Expand Down
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<?php get_sidebar(); ?>

<div id="primary" class="content-area">
<main id="main" class="site-main article-list" role="main">
<main id="main" class="site-main article-list article-list-home" role="main">
<?php if ( have_posts() ) : ?>
<?php
while ( have_posts() ) :
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": "1.2.4",
"version": "1.2.5",
"details_url": "https://github.com/solstice23/argon-theme/releases",
"download_url": "https://github.com/solstice23/argon-theme/releases/download/v1.2.4/argon.zip"
"download_url": "https://github.com/solstice23/argon-theme/releases/download/v1.2.5/argon.zip"
}
26 changes: 24 additions & 2 deletions 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: 1.2.4
Version: 1.2.5
License: GNU General Public License v3.0
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Tags: 简约, 两栏, 侧栏在左边, 浮动侧栏, 文章目录, 自适应, 夜间模式, 可自定义
Expand Down Expand Up @@ -436,7 +436,7 @@ a.text-primary:hover {
html.no-banner #content{
margin-top: 85px;
}
html.banner-mini #content{
html.banner-mini #content, html.is-home.banner-as-cover #content{
margin-top: unset;
}
@media screen and (min-width: 1700px) {
Expand Down Expand Up @@ -757,6 +757,28 @@ html.banner-mini .banner > .banner-container > .banner-title {
top: unset;
transform: unset;
}
html.is-home.banner-as-cover.banner-as-cover .banner {
height: 100vh;
}
html.is-home.banner-as-cover.banner-as-cover .banner-container {
height: 100% !important;
}
.cover-scroll-down {
display: block;
width: max-content;
color: #fff;
position: absolute;
left: 50%;
bottom: 10px;
transform: translateX(-50%);
cursor: pointer;
font-size: 36px;
transition: opacity .3s ease;
}
html:not(.is-home) .cover-scroll-down{
opacity: 0;
pointer-events: none;
}

/*左侧栏*/
.leftbar-banner {
Expand Down

0 comments on commit 4a778bc

Please sign in to comment.