mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-16 20:30:53 +08:00
fix: 修復上個版本導致的代碼塊部分css沒有生成的bugs
fix: 修復valine背景圖片再次出現時,由左到右移動的bugs improvement: 調大sidebar的寬度 improvement: html結構調整,mobile-sidebar改為sidebar/search調整 remove: 刪除多餘的css和pug
This commit is contained in:
@@ -24,8 +24,8 @@ $(function () {
|
||||
// sidebar menus
|
||||
const sidebarFn = () => {
|
||||
const $toggleMenu = $('#toggle-menu')
|
||||
const $mobileSidebarMenus = $('#mobile-sidebar-menus')
|
||||
const $menuMask = $('#menu_mask')
|
||||
const $mobileSidebarMenus = $('#sidebar-menus')
|
||||
const $menuMask = $('#menu-mask')
|
||||
const $body = $('body')
|
||||
|
||||
function openMobileSidebar () {
|
||||
@@ -489,7 +489,7 @@ $(function () {
|
||||
* 解決menus在觸摸屏下,滑動屏幕menus_item_child不消失的問題(手機hover的bug)
|
||||
*/
|
||||
const clickFnOfSubMenu = function () {
|
||||
$('#mobile-sidebar-menus .expand').on('click', function () {
|
||||
$('#sidebar-menus .expand').on('click', function () {
|
||||
$(this).parents('.menus_item').find('> .menus_item_child').slideToggle()
|
||||
$(this).toggleClass('hide')
|
||||
})
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
$(function () {
|
||||
const openSearch = () => {
|
||||
$('body').css({ width: '100%', overflow: 'hidden' })
|
||||
$('#algolia-search').css('display', 'block')
|
||||
$('#algolia-search .search-dialog').css('display', 'block')
|
||||
$('.ais-search-box--input').focus()
|
||||
$('#search-mask').fadeIn()
|
||||
// shortcut: ESC
|
||||
@@ -15,12 +15,12 @@ $(function () {
|
||||
|
||||
const closeSearch = () => {
|
||||
$('body').css({ width: '', overflow: '' })
|
||||
$('#algolia-search').css({
|
||||
$('#algolia-search .search-dialog').css({
|
||||
animation: 'search_close .5s'
|
||||
})
|
||||
|
||||
setTimeout(function () {
|
||||
$('#algolia-search').css({
|
||||
$('#algolia-search .search-dialog').css({
|
||||
animation: '',
|
||||
display: 'none'
|
||||
})
|
||||
|
||||
@@ -5,7 +5,7 @@ $(function () {
|
||||
width: '100%',
|
||||
overflow: 'hidden'
|
||||
})
|
||||
$('#local-search').css('display', 'block')
|
||||
$('#local-search .search-dialog').css('display', 'block')
|
||||
$('#local-search-input input').focus()
|
||||
$('#search-mask').fadeIn()
|
||||
if (!loadFlag) {
|
||||
@@ -27,12 +27,12 @@ $(function () {
|
||||
width: '',
|
||||
overflow: ''
|
||||
})
|
||||
$('#local-search').css({
|
||||
$('#local-search .search-dialog').css({
|
||||
animation: 'search_close .5s'
|
||||
})
|
||||
|
||||
setTimeout(function () {
|
||||
$('#local-search').css({
|
||||
$('#local-search .search-dialog').css({
|
||||
animation: '',
|
||||
display: 'none'
|
||||
})
|
||||
@@ -49,7 +49,7 @@ $(function () {
|
||||
searchClickFn()
|
||||
|
||||
window.addEventListener('pjax:complete', function () {
|
||||
$('#local-search').is(':visible') && closeSearch()
|
||||
$('#local-search .search-dialog').is(':visible') && closeSearch()
|
||||
searchClickFn()
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user