mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-10 21:17:07 +08:00
feat: 不再支持 butterfly.yml 寫法
improvement: 文章頁標題改為h1(seo) improvement: 改用hexo 內置的 injector 插入 inject 的代碼 improvement: canonical 改為hexo提供的函數生成 improvement: 優化手機toc 的特效和按鈕出現的時機 remove: 刪除搜索不必要的配置 remove: 移除豆瓣配置,如需配置,請使用 hexo-butterfly-douban fix: 修復上一個版本導致的搜索按鈕在pjax下無法點擊的bugs close #387 fix: 修復上一個版本更新的toc z-index 過低的bugs
This commit is contained in:
21
_config.yml
21
_config.yml
@@ -53,17 +53,9 @@ algolia_search:
|
|||||||
hits:
|
hits:
|
||||||
per_page: 6
|
per_page: 6
|
||||||
|
|
||||||
labels:
|
|
||||||
input_placeholder: Search for Posts
|
|
||||||
hits_empty: "We didn't find any results for the search: ${query}" # if there are no result
|
|
||||||
hits_stats: '${hits} results found in ${time} ms'
|
|
||||||
|
|
||||||
# Local search
|
# Local search
|
||||||
local_search:
|
local_search:
|
||||||
enable: false
|
enable: false
|
||||||
labels:
|
|
||||||
input_placeholder: Search for Posts
|
|
||||||
hits_empty: "We didn't find any results for the search: ${query}" # if there are no result
|
|
||||||
|
|
||||||
# Math (數學)
|
# Math (數學)
|
||||||
# --------------------------------------
|
# --------------------------------------
|
||||||
@@ -121,13 +113,6 @@ category_img:
|
|||||||
# - category name: xxxxx
|
# - category name: xxxxx
|
||||||
category_per_img:
|
category_per_img:
|
||||||
|
|
||||||
# If you are using hexo-douban, you can configure it (如果你有使用 hexo-douban,可配置這個)
|
|
||||||
# douban:
|
|
||||||
# meta: false
|
|
||||||
# movies_img:
|
|
||||||
# books_img:
|
|
||||||
# games_img:
|
|
||||||
|
|
||||||
cover:
|
cover:
|
||||||
# display the cover or not (是否顯示文章封面)
|
# display the cover or not (是否顯示文章封面)
|
||||||
index_enable: true
|
index_enable: true
|
||||||
@@ -576,9 +561,9 @@ font:
|
|||||||
|
|
||||||
# Font settings for the site title and site subtitle
|
# Font settings for the site title and site subtitle
|
||||||
# 左上角網站名字 主頁居中網站名字
|
# 左上角網站名字 主頁居中網站名字
|
||||||
# blog_title_font:
|
blog_title_font:
|
||||||
# font_link: https://fonts.googleapis.com/css?family=Titillium+Web&display=swap
|
font_link:
|
||||||
# font-family: Titillium Web, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif
|
font-family:
|
||||||
|
|
||||||
# The setting of divider icon (水平分隔線圖標設置)
|
# The setting of divider icon (水平分隔線圖標設置)
|
||||||
hr_icon:
|
hr_icon:
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ aside:
|
|||||||
site_pv_name: PV
|
site_pv_name: PV
|
||||||
more_button: More
|
more_button: More
|
||||||
card_newest_comments:
|
card_newest_comments:
|
||||||
heading: Newest Comments
|
headline: Newest Comments
|
||||||
loading_text: loading...
|
loading_text: loading...
|
||||||
error: Unable to get the data, please make sure the settings are correct.
|
error: Unable to get the data, please make sure the settings are correct.
|
||||||
card_toc: Catalog
|
card_toc: Catalog
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ aside:
|
|||||||
site_pv_name: PV
|
site_pv_name: PV
|
||||||
more_button: More
|
more_button: More
|
||||||
card_newest_comments:
|
card_newest_comments:
|
||||||
heading: Newest Comments
|
headline: Newest Comments
|
||||||
loading_text: loading...
|
loading_text: loading...
|
||||||
error: Unable to get the data, please make sure the settings are correct.
|
error: Unable to get the data, please make sure the settings are correct.
|
||||||
card_toc: Catalog
|
card_toc: Catalog
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ aside:
|
|||||||
site_pv_name: 本站总访问量
|
site_pv_name: 本站总访问量
|
||||||
more_button: 查看更多
|
more_button: 查看更多
|
||||||
card_newest_comments:
|
card_newest_comments:
|
||||||
heading: 最新评论
|
headline: 最新评论
|
||||||
loading_text: 正在加载中...
|
loading_text: 正在加载中...
|
||||||
error: 无法获取资料,请确认相关配置是否正确
|
error: 无法获取资料,请确认相关配置是否正确
|
||||||
card_toc: 目录
|
card_toc: 目录
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ aside:
|
|||||||
site_pv_name: 本站總訪問量
|
site_pv_name: 本站總訪問量
|
||||||
more_button: 檢視更多
|
more_button: 檢視更多
|
||||||
card_newest_comments:
|
card_newest_comments:
|
||||||
heading: 最新評論
|
headline: 最新評論
|
||||||
loading_text: 正在加載中...
|
loading_text: 正在加載中...
|
||||||
error: 無法獲取資料,請確認相關配置是否正確
|
error: 無法獲取資料,請確認相關配置是否正確
|
||||||
card_toc: 目錄
|
card_toc: 目錄
|
||||||
|
|||||||
@@ -55,8 +55,6 @@ div
|
|||||||
else if (!is_post() && page.aside !== false)
|
else if (!is_post() && page.aside !== false)
|
||||||
!=partial('includes/third-party/newest-comments/index', {}, {cache:theme.fragment_cache})
|
!=partial('includes/third-party/newest-comments/index', {}, {cache:theme.fragment_cache})
|
||||||
|
|
||||||
!=fragment_cache('injectBottom', function(){return injectHtml(theme.inject.bottom)})
|
|
||||||
|
|
||||||
!=partial('includes/third-party/effect', {}, {cache:theme.fragment_cache})
|
!=partial('includes/third-party/effect', {}, {cache:theme.fragment_cache})
|
||||||
|
|
||||||
!=partial('includes/third-party/chat/index', {}, {cache:theme.fragment_cache})
|
!=partial('includes/third-party/chat/index', {}, {cache:theme.fragment_cache})
|
||||||
|
|||||||
@@ -81,5 +81,3 @@ include ./head/noscript.pug
|
|||||||
|
|
||||||
!=partial('includes/head/darkmode', {}, {cache:theme.fragment_cache})
|
!=partial('includes/head/darkmode', {}, {cache:theme.fragment_cache})
|
||||||
|
|
||||||
!=fragment_cache('injectHead', function(){return injectHtml(theme.inject.head)})
|
|
||||||
|
|
||||||
|
|||||||
@@ -16,18 +16,6 @@ if page.top_img !== false
|
|||||||
else
|
else
|
||||||
- var top_img = page.top_img || theme.default_top_img
|
- var top_img = page.top_img || theme.default_top_img
|
||||||
|
|
||||||
if theme.douban
|
|
||||||
- var doubanExist = false
|
|
||||||
if is_current('/movies/', [strict])
|
|
||||||
- var top_img = theme.douban.movies_img !== false ? theme.douban.movies_img || theme.default_top_img : false
|
|
||||||
- doubanExist = true
|
|
||||||
else if is_current('/books/', [strict])
|
|
||||||
- var top_img = theme.douban.books_img !== false ? theme.douban.books_img || theme.default_top_img : false
|
|
||||||
- doubanExist = true
|
|
||||||
else if is_current('/games/', [strict])
|
|
||||||
- var top_img = theme.douban.games_img !== false ? theme.douban.games_img || theme.default_top_img : false
|
|
||||||
- doubanExist = true
|
|
||||||
|
|
||||||
if top_img !== false
|
if top_img !== false
|
||||||
- var imgSource = top_img && top_img.indexOf('/') !== -1 ? `background-image: url(${url_for(top_img)})` : `background: ${top_img}`
|
- var imgSource = top_img && top_img.indexOf('/') !== -1 ? `background-image: url(${url_for(top_img)})` : `background: ${top_img}`
|
||||||
- var bg_img = top_img ? imgSource : ''
|
- var bg_img = top_img ? imgSource : ''
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
#post-info
|
#post-info
|
||||||
#post-title
|
h1.post-title= page.title || _p('no_title')
|
||||||
.posttitle= page.title || _p('no_title')
|
|
||||||
|
|
||||||
#post-meta
|
#post-meta
|
||||||
.meta-firstline
|
.meta-firstline
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
if theme.douban && theme.douban.meta && doubanExist
|
|
||||||
meta(name="referrer" content="no-referrer")
|
|
||||||
#article-container
|
#article-container
|
||||||
if top_img === false
|
if top_img === false
|
||||||
h1.page-title= page.title
|
h1.page-title= page.title
|
||||||
|
|||||||
@@ -2,6 +2,6 @@
|
|||||||
.card-content
|
.card-content
|
||||||
.item-headline
|
.item-headline
|
||||||
i.fas.fa-bolt
|
i.fas.fa-bolt
|
||||||
span= _p('aside.card_newest_comments.heading')
|
span= _p('aside.card_newest_comments.headline')
|
||||||
.aside-list
|
.aside-list
|
||||||
span= _p('aside.card_newest_comments.loading_text')
|
span= _p('aside.card_newest_comments.loading_text')
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hexo-theme-butterfly",
|
"name": "hexo-theme-butterfly",
|
||||||
"version": "3.3.0-b2",
|
"version": "3.3.0-b3",
|
||||||
"description": "A Simple and Card UI Design theme for Hexo",
|
"description": "A Simple and Card UI Design theme for Hexo",
|
||||||
"main": "package.json",
|
"main": "package.json",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -9,4 +9,13 @@ hexo.extend.filter.register('before_generate', () => {
|
|||||||
logger.error('請把 Hexo 升級到 V5.0.0 或更高的版本!')
|
logger.error('請把 Hexo 升級到 V5.0.0 或更高的版本!')
|
||||||
process.exit(-1)
|
process.exit(-1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (hexo.locals.get) {
|
||||||
|
const data = hexo.locals.get('data')
|
||||||
|
if (data && data.butterfly) {
|
||||||
|
logger.error(" 'butterfly.yml' is deprecated. Please use '_config.butterfly.yml' ")
|
||||||
|
logger.error(" 'butterfly.yml' 已經棄用,請使用 '_config.butterfly.yml' ")
|
||||||
|
process.exit(-1)
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
/**
|
|
||||||
* Note: configs in _data/butterfly.yml will merge configs with hexo.theme.config.
|
|
||||||
*/
|
|
||||||
|
|
||||||
'use strict'
|
|
||||||
|
|
||||||
const { deepMerge } = require('hexo-util')
|
|
||||||
|
|
||||||
hexo.on('generateBefore', function () {
|
|
||||||
const rootConfig = hexo.config
|
|
||||||
if (hexo.locals.get) {
|
|
||||||
const data = hexo.locals.get('data')
|
|
||||||
if (data && data.butterfly) {
|
|
||||||
hexo.theme.config = deepMerge(hexo.theme.config, data.butterfly)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
hexo.theme.config.rootConfig = rootConfig
|
|
||||||
})
|
|
||||||
@@ -6,7 +6,8 @@
|
|||||||
'use strict'
|
'use strict'
|
||||||
|
|
||||||
hexo.extend.filter.register('before_post_render', function (data) {
|
hexo.extend.filter.register('before_post_render', function (data) {
|
||||||
if (hexo.theme.config.rootConfig.post_asset_folder) {
|
const { config } = this
|
||||||
|
if (config.post_asset_folder) {
|
||||||
const imgTestReg = /\.(png|jpe?g|gif|svg|webp)(\?.*)?$/
|
const imgTestReg = /\.(png|jpe?g|gif|svg|webp)(\?.*)?$/
|
||||||
const topImg = data.top_img
|
const topImg = data.top_img
|
||||||
const cover = data.cover
|
const cover = data.cover
|
||||||
|
|||||||
@@ -2,13 +2,12 @@
|
|||||||
* Butterfly
|
* Butterfly
|
||||||
* @example
|
* @example
|
||||||
* page_description()
|
* page_description()
|
||||||
* injectHtml(data)
|
|
||||||
* cloudTags(source, minfontsize, maxfontsize, limit)
|
* cloudTags(source, minfontsize, maxfontsize, limit)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'use strict'
|
'use strict'
|
||||||
|
|
||||||
const { stripHTML, escapeHTML } = require('hexo-util')
|
const { stripHTML, escapeHTML, prettyUrls } = require('hexo-util')
|
||||||
const crypto = require('crypto')
|
const crypto = require('crypto')
|
||||||
|
|
||||||
hexo.extend.helper.register('page_description', function () {
|
hexo.extend.helper.register('page_description', function () {
|
||||||
@@ -23,15 +22,6 @@ hexo.extend.helper.register('page_description', function () {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
hexo.extend.helper.register('injectHtml', function (data) {
|
|
||||||
let result = ''
|
|
||||||
if (!data) return ''
|
|
||||||
for (let i = 0; i < data.length; i++) {
|
|
||||||
result += data[i]
|
|
||||||
}
|
|
||||||
return result
|
|
||||||
})
|
|
||||||
|
|
||||||
hexo.extend.helper.register('cloudTags', function (options = {}) {
|
hexo.extend.helper.register('cloudTags', function (options = {}) {
|
||||||
const env = this
|
const env = this
|
||||||
let source = options.source
|
let source = options.source
|
||||||
@@ -65,12 +55,7 @@ hexo.extend.helper.register('cloudTags', function (options = {}) {
|
|||||||
})
|
})
|
||||||
|
|
||||||
hexo.extend.helper.register('urlNoIndex', function () {
|
hexo.extend.helper.register('urlNoIndex', function () {
|
||||||
const { permalink } = hexo.config
|
return prettyUrls(this.url, { trailing_index: false, trailing_html: false })
|
||||||
let url = this.url.replace(/index\.html$/, '')
|
|
||||||
if (!permalink.endsWith('.html')) {
|
|
||||||
url = url.replace(/\.html$/, '')
|
|
||||||
}
|
|
||||||
return url
|
|
||||||
})
|
})
|
||||||
|
|
||||||
hexo.extend.helper.register('md5', function (path) {
|
hexo.extend.helper.register('md5', function (path) {
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ hexo.extend.helper.register('related_posts', function (currentPost, allPosts) {
|
|||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
let result = ''
|
let result = ''
|
||||||
const hexoConfig = hexo.theme.config.rootConfig
|
const hexoConfig = hexo.config
|
||||||
const config = hexo.theme.config
|
const config = hexo.theme.config
|
||||||
|
|
||||||
const limitNum = config.related_post.limit || 6
|
const limitNum = config.related_post.limit || 6
|
||||||
|
|||||||
22
scripts/injector/inject.js
Normal file
22
scripts/injector/inject.js
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
// Injector
|
||||||
|
|
||||||
|
'use strict'
|
||||||
|
|
||||||
|
hexo.extend.injector.register('head_end', function () {
|
||||||
|
const data = hexo.config.theme_config && hexo.config.theme_config.inject.head
|
||||||
|
return genResult(data)
|
||||||
|
})
|
||||||
|
|
||||||
|
hexo.extend.injector.register('body_end', () => {
|
||||||
|
const data = hexo.config.theme_config && hexo.config.theme_config.inject.bottom
|
||||||
|
return genResult(data)
|
||||||
|
})
|
||||||
|
|
||||||
|
function genResult (data) {
|
||||||
|
let result = ''
|
||||||
|
if (!data) return ''
|
||||||
|
for (let i = 0; i < data.length; i++) {
|
||||||
|
result += data[i]
|
||||||
|
}
|
||||||
|
return result
|
||||||
|
}
|
||||||
@@ -152,11 +152,12 @@ a
|
|||||||
color: $light-blue
|
color: $light-blue
|
||||||
|
|
||||||
// font
|
// font
|
||||||
#site-title,
|
if $site-name-font
|
||||||
#site-subtitle,
|
#site-title,
|
||||||
#site-name,
|
#site-subtitle,
|
||||||
#aside_content .author-info__name,
|
#site-name,
|
||||||
#aside_content .author-info__description
|
#aside_content .author-info__name,
|
||||||
|
#aside_content .author-info__description
|
||||||
font-family: $site-name-font
|
font-family: $site-name-font
|
||||||
|
|
||||||
.is-center
|
.is-center
|
||||||
|
|||||||
@@ -126,6 +126,7 @@ blockquote
|
|||||||
text-transform: uppercase
|
text-transform: uppercase
|
||||||
font-weight: bold
|
font-weight: bold
|
||||||
font-size: 1.15em
|
font-size: 1.15em
|
||||||
|
user-select: none
|
||||||
|
|
||||||
.copy-notice
|
.copy-notice
|
||||||
position: absolute
|
position: absolute
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ if hexo-config('error_404.enable')
|
|||||||
padding: .5rem
|
padding: .5rem
|
||||||
text-align: center
|
text-align: center
|
||||||
font-size: 14px
|
font-size: 14px
|
||||||
|
if $site-name-font
|
||||||
font-family: $site-name-font
|
font-family: $site-name-font
|
||||||
|
|
||||||
+maxWidth768()
|
+maxWidth768()
|
||||||
|
|||||||
@@ -269,14 +269,10 @@
|
|||||||
position: fixed
|
position: fixed
|
||||||
right: 45px
|
right: 45px
|
||||||
bottom: 30px
|
bottom: 30px
|
||||||
z-index: 9999
|
z-index: 100
|
||||||
display: none
|
display: none
|
||||||
width: 300px
|
width: 300px
|
||||||
transform-origin: right bottom
|
transform-origin: right bottom
|
||||||
animation: toc-close .3s
|
|
||||||
|
|
||||||
&.open
|
|
||||||
display: block
|
|
||||||
animation: toc-open .3s
|
animation: toc-open .3s
|
||||||
|
|
||||||
.toc-child
|
.toc-child
|
||||||
@@ -327,7 +323,7 @@
|
|||||||
|
|
||||||
@keyframes toc-close
|
@keyframes toc-close
|
||||||
0%
|
0%
|
||||||
transform: scale(.7)
|
transform: scale(1)
|
||||||
|
|
||||||
100%
|
100%
|
||||||
transform: scale(1)
|
transform: scale(.7)
|
||||||
|
|||||||
@@ -130,19 +130,18 @@
|
|||||||
padding: 0 1.1rem
|
padding: 0 1.1rem
|
||||||
|
|
||||||
#post-info
|
#post-info
|
||||||
#post-title
|
.post-title
|
||||||
|
@extend .limit-more-line
|
||||||
margin-bottom: .4rem
|
margin-bottom: .4rem
|
||||||
font-size: 2.5em
|
font-size: 2.5em
|
||||||
|
font-weight: normal
|
||||||
+maxWidth768()
|
|
||||||
font-size: 1.72em
|
|
||||||
|
|
||||||
.posttitle
|
|
||||||
@extend .limit-more-line
|
|
||||||
color: var(--white)
|
color: var(--white)
|
||||||
line-height: 1.5
|
line-height: 1.5
|
||||||
-webkit-line-clamp: 3
|
-webkit-line-clamp: 3
|
||||||
|
|
||||||
|
+maxWidth768()
|
||||||
|
font-size: 1.72em
|
||||||
|
|
||||||
#post-meta
|
#post-meta
|
||||||
color: var(--light-grey)
|
color: var(--light-grey)
|
||||||
font-size: 95%
|
font-size: 95%
|
||||||
@@ -189,7 +188,7 @@
|
|||||||
& > #post-info
|
& > #post-info
|
||||||
margin-bottom: 1.5rem
|
margin-bottom: 1.5rem
|
||||||
|
|
||||||
.posttitle
|
.post-title
|
||||||
padding-bottom: .2rem
|
padding-bottom: .2rem
|
||||||
border-bottom: 1px solid var(--light-grey)
|
border-bottom: 1px solid var(--light-grey)
|
||||||
color: var(--text-highlight-color)
|
color: var(--text-highlight-color)
|
||||||
|
|||||||
@@ -36,5 +36,5 @@
|
|||||||
#mobile-toc-button
|
#mobile-toc-button
|
||||||
display: none
|
display: none
|
||||||
|
|
||||||
+maxWidth1024()
|
+maxWidth900()
|
||||||
display: block
|
display: block
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ $dafault-font-family = -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica
|
|||||||
$dafault-code-font = consolas, Menlo, 'PingFang SC', 'Microsoft YaHei', sans-serif
|
$dafault-code-font = consolas, Menlo, 'PingFang SC', 'Microsoft YaHei', sans-serif
|
||||||
$font-family = hexo-config('font.font-family') ? unquote(hexo-config('font.font-family')) : $dafault-font-family
|
$font-family = hexo-config('font.font-family') ? unquote(hexo-config('font.font-family')) : $dafault-font-family
|
||||||
$code-font-family = hexo-config('font.code-font-family') ? unquote(hexo-config('font.code-font-family')) : $dafault-code-font
|
$code-font-family = hexo-config('font.code-font-family') ? unquote(hexo-config('font.code-font-family')) : $dafault-code-font
|
||||||
$site-name-font = hexo-config('blog_title_font.font-family') ? unquote(hexo-config('blog_title_font.font-family')) : $font-family
|
$site-name-font = hexo-config('blog_title_font.font-family') && unquote(hexo-config('blog_title_font.font-family'))
|
||||||
// hr
|
// hr
|
||||||
$hrEnable = hexo-config('hr_icon') && hexo-config('hr_icon.enable')
|
$hrEnable = hexo-config('hr_icon') && hexo-config('hr_icon.enable')
|
||||||
$hr-icon = $hrEnable && hexo-config('hr_icon.icon') ? hexo-config('hr_icon.icon') : '\f0c4'
|
$hr-icon = $hrEnable && hexo-config('hr_icon.icon') ? hexo-config('hr_icon.icon') : '\f0c4'
|
||||||
|
|||||||
@@ -351,11 +351,14 @@ $(function () {
|
|||||||
|
|
||||||
const mobileToc = {
|
const mobileToc = {
|
||||||
open: () => {
|
open: () => {
|
||||||
$cardTocLayout.addClass('open')
|
$cardTocLayout.css('display', 'block')
|
||||||
},
|
},
|
||||||
|
|
||||||
close: () => {
|
close: () => {
|
||||||
$cardTocLayout.removeClass('open')
|
$cardTocLayout.css('animation', 'toc-close .2s')
|
||||||
|
setTimeout(() => {
|
||||||
|
$cardTocLayout.css({ display: '', animation: '' })
|
||||||
|
}, 100)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ $(function () {
|
|||||||
|
|
||||||
searchClickFn()
|
searchClickFn()
|
||||||
|
|
||||||
window.addEventListener('pjax:send', function () {
|
window.addEventListener('pjax:complete', function () {
|
||||||
closeSearch()
|
closeSearch()
|
||||||
searchClickFn()
|
searchClickFn()
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -47,7 +47,8 @@ $(function () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
searchClickFn()
|
searchClickFn()
|
||||||
window.addEventListener('pjax:send', function () {
|
|
||||||
|
window.addEventListener('pjax:complete', function () {
|
||||||
$('#local-search').is(':visible') && closeSearch()
|
$('#local-search').is(':visible') && closeSearch()
|
||||||
searchClickFn()
|
searchClickFn()
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user