Skip to content

Commit 4a778bc

Browse files
committed
1.2.5
1 parent 083067c commit 4a778bc

File tree

7 files changed

+68
-6
lines changed

7 files changed

+68
-6
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ Argon 使用 [GPL V3.0](https://github.com/solstice23/argon-theme/blob/master/LI
7070

7171
# 更新日志
7272

73+
## 20210905 v1.2.5
74+
+ 滚动条沉浸
75+
+ Banner 显示状态新增全屏选项(Banner 可全屏作为封面)
76+
+ 更正翻译
77+
7378
## 20210815 v1.2.4
7479
+ 新增 Banner 显示状态选项(新增隐藏 Banner、迷你 Banner)
7580
+ 新增顶栏显示状态选项 (新增顶栏不随页面滚动)

argontheme.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1659,6 +1659,33 @@ function tippyInit(){
16591659
}
16601660
tippyInit();
16611661

1662+
/*Banner 全屏封面相关*/
1663+
if ($("html").hasClass("banner-as-cover")){
1664+
function classInit(){
1665+
if ($("#main").hasClass("article-list-home")){
1666+
if (!$("html").hasClass("is-home")){
1667+
$("html").addClass("is-home");
1668+
$("html").trigger("resize");
1669+
}
1670+
}else{
1671+
if ($("html").hasClass("is-home")){
1672+
$("html").removeClass("is-home");
1673+
$("html").trigger("resize");
1674+
}
1675+
}
1676+
}
1677+
classInit();
1678+
new MutationObserver(function(mutations, observer){
1679+
classInit();
1680+
}).observe(document.querySelector("#primary"), {
1681+
'childList': true
1682+
});
1683+
$(".cover-scroll-down").on("click" , function(){
1684+
gotoHash("#content", 500);
1685+
$("#content").focus();
1686+
});
1687+
}
1688+
16621689
/*Pjax*/
16631690
$.pjax.defaults.timeout = 10000;
16641691
$.pjax.defaults.container = ['#primary', '#leftbar_part1_menu', '#leftbar_part2_inner', '.page-information-card-container', '#wpadminbar'];

functions.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2990,9 +2990,10 @@ function themeoptions_page(){
29902990
<?php $argon_banner_size = get_option('argon_banner_size', 'full'); ?>
29912991
<option value="full" <?php if ($argon_banner_size=='full'){echo 'selected';} ?>><?php _e('完整', 'argon');?></option>
29922992
<option value="mini" <?php if ($argon_banner_size=='mini'){echo 'selected';} ?>><?php _e('迷你', 'argon');?></option>
2993+
<option value="fullscreen" <?php if ($argon_banner_size=='fullscreen'){echo 'selected';} ?>><?php _e('全屏', 'argon');?></option>
29932994
<option value="hide" <?php if ($argon_banner_size=='hide'){echo 'selected';} ?>><?php _e('隐藏', 'argon');?></option>
29942995
</select>
2995-
<p class="description"><?php _e('完整: Banner 高度占用半屏', 'argon');?></br><?php _e('迷你: 减小 Banner 的内边距', 'argon');?></br><?php _e('隐藏: 完全隐藏 Banner', 'argon');?></br></p>
2996+
<p class="description"><?php _e('完整: Banner 高度占用半屏', 'argon');?></br><?php _e('迷你: 减小 Banner 的内边距', 'argon');?></br><?php _e('全屏: Banner 占用全屏作为封面(仅在首页生效)', 'argon');?></br><?php _e('隐藏: 完全隐藏 Banner', 'argon');?></br></p>
29962997
</td>
29972998
</tr>
29982999
<tr>

header.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
$htmlclasses .= 'banner-mini ';
3232
}else if ($banner_size == 'hide'){
3333
$htmlclasses .= 'no-banner ';
34+
}else if ($banner_size == 'fullscreen'){
35+
$htmlclasses .= 'banner-as-cover ';
3436
}
3537
}
3638
if (get_option('argon_toolbar_blur', 'false') == 'true'){
@@ -447,6 +449,11 @@ public function end_el( &$output, $object, $depth = 0, $args = array(), $current
447449
}
448450
</style>
449451
<?php } ?>
452+
<?php if ($banner_size == 'fullscreen') { ?>
453+
<div class="cover-scroll-down">
454+
<i class="fa fa-angle-down" aria-hidden="true"></i>
455+
</div>
456+
<?php } ?>
450457
</section>
451458

452459
<?php if (apply_filters('argon_page_background_url', get_option('argon_page_background_url')) != '') { ?>

index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<?php get_sidebar(); ?>
66

77
<div id="primary" class="content-area">
8-
<main id="main" class="site-main article-list" role="main">
8+
<main id="main" class="site-main article-list article-list-home" role="main">
99
<?php if ( have_posts() ) : ?>
1010
<?php
1111
while ( have_posts() ) :

info.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "1.2.4",
2+
"version": "1.2.5",
33
"details_url": "https://github.com/solstice23/argon-theme/releases",
4-
"download_url": "https://github.com/solstice23/argon-theme/releases/download/v1.2.4/argon.zip"
4+
"download_url": "https://github.com/solstice23/argon-theme/releases/download/v1.2.5/argon.zip"
55
}

style.css

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Theme Name: argon
33
Author: solstice23
44
Author URI: https://solstice23.top/
55
Description: 轻盈、简洁、美观的 Wordpress 主题
6-
Version: 1.2.4
6+
Version: 1.2.5
77
License: GNU General Public License v3.0
88
License URI: https://www.gnu.org/licenses/gpl-3.0.html
99
Tags: 简约, 两栏, 侧栏在左边, 浮动侧栏, 文章目录, 自适应, 夜间模式, 可自定义
@@ -436,7 +436,7 @@ a.text-primary:hover {
436436
html.no-banner #content{
437437
margin-top: 85px;
438438
}
439-
html.banner-mini #content{
439+
html.banner-mini #content, html.is-home.banner-as-cover #content{
440440
margin-top: unset;
441441
}
442442
@media screen and (min-width: 1700px) {
@@ -757,6 +757,28 @@ html.banner-mini .banner > .banner-container > .banner-title {
757757
top: unset;
758758
transform: unset;
759759
}
760+
html.is-home.banner-as-cover.banner-as-cover .banner {
761+
height: 100vh;
762+
}
763+
html.is-home.banner-as-cover.banner-as-cover .banner-container {
764+
height: 100% !important;
765+
}
766+
.cover-scroll-down {
767+
display: block;
768+
width: max-content;
769+
color: #fff;
770+
position: absolute;
771+
left: 50%;
772+
bottom: 10px;
773+
transform: translateX(-50%);
774+
cursor: pointer;
775+
font-size: 36px;
776+
transition: opacity .3s ease;
777+
}
778+
html:not(.is-home) .cover-scroll-down{
779+
opacity: 0;
780+
pointer-events: none;
781+
}
760782

761783
/*左侧栏*/
762784
.leftbar-banner {

0 commit comments

Comments
 (0)