mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-10 21:17:07 +08:00
feat: 適配 Alogia Search 5.0
feat: 搜索分頁圓角 feat: 説説頁面 tag 可以爲空
This commit is contained in:
@@ -40,10 +40,13 @@
|
|||||||
<div class="shuoshuo-content">
|
<div class="shuoshuo-content">
|
||||||
${item.content}
|
${item.content}
|
||||||
</div>
|
</div>
|
||||||
|
<div class="shuoshuo-footer">
|
||||||
|
${item.tags && item.tags.length ? `
|
||||||
<div class="shuoshuo-footer">
|
<div class="shuoshuo-footer">
|
||||||
<div class="shuoshuo-tags">
|
<div class="shuoshuo-tags">
|
||||||
${item.tags.map(tag => `<span class="shuoshuo-tag">${tag}</span>`).join('')}
|
${item.tags.map(tag => `<span class="shuoshuo-tag">${tag}</span>`).join('')}
|
||||||
</div>
|
</div>
|
||||||
|
</div>` : ''}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`
|
`
|
||||||
@@ -98,6 +101,7 @@
|
|||||||
.shuoshuo-content
|
.shuoshuo-content
|
||||||
!=markdown(i.content)
|
!=markdown(i.content)
|
||||||
.shuoshuo-footer
|
.shuoshuo-footer
|
||||||
|
if i.tags
|
||||||
.shuoshuo-tags
|
.shuoshuo-tags
|
||||||
each tag in i.tags
|
each tag in i.tags
|
||||||
span.shuoshuo-tag=tag
|
span.shuoshuo-tag=tag
|
||||||
@@ -8,8 +8,8 @@ activate_power_mode:
|
|||||||
version: 1.1.4
|
version: 1.1.4
|
||||||
algolia_search:
|
algolia_search:
|
||||||
name: algoliasearch
|
name: algoliasearch
|
||||||
file: dist/algoliasearch-lite.umd.js
|
file: dist/lite/builds/browser.umd.js
|
||||||
version: 5.7.0
|
version: 5.8.1
|
||||||
aplayer_css:
|
aplayer_css:
|
||||||
name: aplayer
|
name: aplayer
|
||||||
file: dist/APlayer.min.css
|
file: dist/APlayer.min.css
|
||||||
@@ -111,7 +111,7 @@ instantpage:
|
|||||||
instantsearch:
|
instantsearch:
|
||||||
name: instantsearch.js
|
name: instantsearch.js
|
||||||
file: dist/instantsearch.production.min.js
|
file: dist/instantsearch.production.min.js
|
||||||
version: 4.74.2
|
version: 4.75.0
|
||||||
katex:
|
katex:
|
||||||
name: katex
|
name: katex
|
||||||
file: dist/katex.min.css
|
file: dist/katex.min.css
|
||||||
@@ -137,7 +137,7 @@ medium_zoom:
|
|||||||
mermaid:
|
mermaid:
|
||||||
name: mermaid
|
name: mermaid
|
||||||
file: dist/mermaid.min.js
|
file: dist/mermaid.min.js
|
||||||
version: 11.2.1
|
version: 11.3.0
|
||||||
meting_js:
|
meting_js:
|
||||||
name: butterfly-extsrc
|
name: butterfly-extsrc
|
||||||
file: metingjs/dist/Meting.min.js
|
file: metingjs/dist/Meting.min.js
|
||||||
|
|||||||
@@ -59,6 +59,7 @@
|
|||||||
height: 24px
|
height: 24px
|
||||||
text-align: center
|
text-align: center
|
||||||
line-height: 24px
|
line-height: 24px
|
||||||
|
addBorderRadius()
|
||||||
|
|
||||||
.ais-Pagination-item--selected
|
.ais-Pagination-item--selected
|
||||||
a
|
a
|
||||||
|
|||||||
@@ -85,9 +85,10 @@ window.addEventListener('load', () => {
|
|||||||
document.querySelector('#algolia-info .algolia-stats')
|
document.querySelector('#algolia-info .algolia-stats')
|
||||||
]
|
]
|
||||||
|
|
||||||
|
const searchClient = typeof algoliasearch === 'function' ? algoliasearch : window['algoliasearch/lite'].liteClient
|
||||||
const search = instantsearch({
|
const search = instantsearch({
|
||||||
indexName,
|
indexName,
|
||||||
searchClient: algoliasearch(appId, apiKey),
|
searchClient: searchClient(appId, apiKey),
|
||||||
searchFunction (helper) {
|
searchFunction (helper) {
|
||||||
disableDiv.forEach(item => {
|
disableDiv.forEach(item => {
|
||||||
item.style.display = helper.state.query ? '' : 'none'
|
item.style.display = helper.state.query ? '' : 'none'
|
||||||
|
|||||||
Reference in New Issue
Block a user