Skip to content

Commit

Permalink
0.930
Browse files Browse the repository at this point in the history
  • Loading branch information
solstice23 committed Apr 4, 2020
1 parent fef378b commit 8297eeb
Show file tree
Hide file tree
Showing 6 changed files with 109 additions and 13 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ Argon 使用 [GPL V3.0](https://github.com/solstice23/argon-theme/blob/master/LI

# 更新日志

## 20200403 v0.925
## 20200405 v0.930
+ 左侧栏顶部菜单支持无限层级嵌套子菜单

## 20200404 v0.925
+ Github 短代码增加可选的后端获取模式
+ 修复 "暗化" 滤镜不生效的问题

Expand Down
2 changes: 1 addition & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function theme_slug_setup() {
);
}else{
$argonThemeUpdateChecker = Puc_v4_Factory::buildUpdateChecker(
'https://api.solstice23.top/argon/info.json?source=github',
'https://raw.githubusercontent.com/solstice23/argon-theme/master/info.json',
get_template_directory() . '/functions.php',
'argon'
);
Expand Down
1 change: 0 additions & 1 deletion header.php
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,6 @@ public function end_el( &$output, $object, $depth = 0, $args = array(), $current
</nav>
</header>
</div>
<!--搜索弹出框-->
<div class="modal fade" id="argon_search_modal" tabindex="-1" role="dialog" aria-labelledby="" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal-sm" role="document">
<div class="modal-content">
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.925",
"version" : "0.930",
"details_url" : "https://github.com/solstice23/argon-theme/releases",
"download_url" : "https://github.com/solstice23/argon-theme/releases/download/v0.925/argon.zip"
"download_url" : "https://github.com/solstice23/argon-theme/releases/download/v0.930/argon.zip"
}
16 changes: 11 additions & 5 deletions sidebar.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,18 @@
<?php
/*侧栏上部菜单*/
class leftbarMenuWalker extends Walker_Nav_Menu{
public function start_lvl( &$output, $depth = 0, $args = array() ) {
$indent = str_repeat("\t", $depth);
$output .= "\n$indent<ul class=\"leftbar-menu-item leftbar-menu-subitem shadow-sm\">\n";
}
public function end_lvl( &$output, $depth = 0, $args = array() ) {
$indent = str_repeat("\t", $depth);
$output .= "\n$indent</ul>\n";
}
public function start_el( &$output, $object, $depth = 0, $args = array(), $current_object_id = 0 ) {
if ($depth == 0){
$output .= "\n
<li class='leftbar-menu-item" . ( $object -> current == 1 ? " current" : "" ) . "'>
<a href='" . $object -> url . "'>". $object -> title . "</a>";
}
$output .= "\n
<li class='leftbar-menu-item" . ( $args -> walker -> has_children == 1 ? " leftbar-menu-item-haschildren" : "" ) . ( $object -> current == 1 ? " current" : "" ) . "'>
<a href='" . $object -> url . "'" . ( $args -> walker -> has_children == 1 ? " no-pjax onclick='return false;'" : "" ) . ">". $object -> title . "</a>";
}
public function end_el( &$output, $object, $depth = 0, $args = array(), $current_object_id = 0 ) {
if ($depth == 0){
Expand Down
94 changes: 91 additions & 3 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: 0.925
Version: 0.930
License: GNU General Public License v3.0
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Tags: 简约, 两栏, 侧栏在左边, 浮动侧栏, 文章目录, 自适应, 夜间模式, 可自定义
Expand Down Expand Up @@ -340,7 +340,7 @@ html.darkmode.amoled-dark #navbar-main{
color: #fff !important;
}
.navbar-brand.navbar-icon-mobile {
display: none;
display: none;
}
#navbar-main{
transition: background 0s, padding .15s ease;
Expand Down Expand Up @@ -471,6 +471,50 @@ html.darkmode.amoled-dark #navbar-main{
line-height: 36px;
list-style: none;
padding: 0;
position: relative;
}
.leftbar-menu-item:hover > .leftbar-menu-subitem {
opacity: 1;
transform: none;
pointer-events: unset;
}
.leftbar-menu-subitem {
position: absolute;
left: calc(100% + 8px);
top: 0;
background: #fff;
width: max-content;
min-width: 150px;
z-index: 1;
height: unset;
border-radius: 3px;
padding: 6px 0;
opacity: 0;
transform: translateX(-8px);
pointer-events: none;
transition: all .3s ease;
}
.leftbar-menu-subitem:before {
content: '';
width: 8px;
height: calc(100% + 12px);
display: block;
position: absolute;
top: 0;
left: -8px;
}
#leftbar_part1_menu > .leftbar-menu-item > .leftbar-menu-subitem {
left: calc(100% + 12px);
}
#leftbar_part1_menu > .leftbar-menu-item > .leftbar-menu-subitem:before {
width: 12px;
left: -12px;
}
.leftbar-menu-subitem > .leftbar-menu-item:first-child a{
border-radius: 3px 3px 0 0;
}
.leftbar-menu-subitem > .leftbar-menu-item:last-child a{
border-radius: 0 0 3px 3px;
}
.leftbar-menu-item > a{
display: block;
Expand All @@ -495,6 +539,23 @@ html.darkmode.amoled-dark #navbar-main{
margin-right: 8px;
width: 15px;
}
.leftbar-menu-item.leftbar-menu-item-haschildren:after {
content: "\f0da";
font: normal normal normal 14px/1 FontAwesome;
font-size: 14px;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
position: absolute;
right: 16px;
top: 0;
line-height: 36px;
opacity: .6;
transform: translateY(1px);
transition: all .3s ease;
pointer-events: none;
}


.leftbar-search-button{
padding-top: 0;
Expand Down Expand Up @@ -2850,10 +2911,13 @@ html.darkmode ::-webkit-scrollbar-thumb{
background: #424242;
}
}

html.darkmode .leftbar-menu-subitem {
background: #424242;
}
html.darkmode .leftbar-menu-item > a{
color: #eee !important;
}

html.darkmode .leftbar-menu-item > a:hover ,
html.darkmode .leftbar-menu-item.current > a {
background-color: #606060;
Expand Down Expand Up @@ -3044,6 +3108,10 @@ html.darkmode.amoled-dark body{
background: #000;
}
}

html.darkmode.amoled-dark .leftbar-menu-subitem {
background: #000;
}
html.darkmode.amoled-dark .leftbar-menu-item > a:hover ,
html.darkmode.amoled-dark .leftbar-menu-item.current > a {
background-color: #222;
Expand Down Expand Up @@ -3205,6 +3273,26 @@ html.darkmode.amoled-dark #content:before , html.darkmode.amoled-dark #content:a
height: 100vh;
z-index: 1001;
}
.leftbar-menu-item{
overflow: hidden;
}
.leftbar-menu-item:hover{
height: max-content;
}
.leftbar-menu-item:hover:after{
transform: rotateZ(90deg) translateY(1px);
}
.leftbar-menu-subitem {
position: static;
width: calc(100% - 10px) !important;
margin-left: 10px;
box-shadow: none !important;
}
.leftbar-menu-item:hover .leftbar-menu-subitem {
position: static;
width: 100%;
box-shadow: none;
}
.leftbar-banner{
padding-top: 40px;
padding-bottom: 40px;
Expand Down

0 comments on commit 8297eeb

Please sign in to comment.