feat: aside 可配置隐藏/增加按钮可展开或收缩aside

This commit is contained in:
Jerry
2020-10-21 21:54:14 +08:00
Unverified
parent c54f23bc14
commit 6b35388f33
8 changed files with 30 additions and 3 deletions
+11
View File
@@ -327,3 +327,14 @@
100%
transform: scale(.7)
+minWidth900()
html.hide-aside
.layout
justify-content: center
> div:last-child
display: none
> div:first-child
width: 80%
+4
View File
@@ -38,3 +38,7 @@
+maxWidth900()
display: block
+maxWidth900()
#hide-aside-btn
display: none
+1 -1
View File
@@ -19,7 +19,6 @@
border-radius: 8px
background: var(--card-bg)
box-shadow: 0 4px 8px 6px rgba(7, 17, 27, .06)
transition: all .3s
&:hover
box-shadow: 0 4px 12px 12px rgba(7, 17, 27, .15)
@@ -29,6 +28,7 @@
& > div:first-child
width: 75%
transition: all .3s
+maxWidth900()
width: 100% !important
+5
View File
@@ -483,6 +483,11 @@ $(function () {
// Back to top
$rightsideEle.on('click', '#go-up', () => btf.scrollToDest('body'))
$rightsideEle.on('click', '#hide-aside-btn', () => {
const $htmlDom = $(document.documentElement)
$htmlDom.hasClass('hide-aside') ? $htmlDom.removeClass('hide-aside') : $htmlDom.addClass('hide-aside')
})
/**
* menu
* 側邊欄sub-menu 展開/收縮