layout
This commit is contained in:
@@ -1,19 +1,50 @@
|
||||
//- Mathjax 3
|
||||
//- Mathjax 4/5
|
||||
- const { tags, enableMenu } = theme.math.mathjax
|
||||
script.
|
||||
(() => {
|
||||
const loadMathjax = () => {
|
||||
if (!window.MathJax) {
|
||||
window.MathJax = {
|
||||
loader: {
|
||||
load: [
|
||||
// Four font extension packages (optional)
|
||||
//- '[tex]/bbm',
|
||||
//- '[tex]/bboldx',
|
||||
//- '[tex]/dsfont',
|
||||
'[tex]/mhchem'
|
||||
],
|
||||
paths: {
|
||||
'mathjax-newcm': '[mathjax]/../@mathjax/mathjax-newcm-font',
|
||||
|
||||
//- // Four font extension packages (optional)
|
||||
//- 'mathjax-bbm-extension': '[mathjax]/../@mathjax/mathjax-bbm-font-extension',
|
||||
//- 'mathjax-bboldx-extension': '[mathjax]/../@mathjax/mathjax-bboldx-font-extension',
|
||||
//- 'mathjax-dsfont-extension': '[mathjax]/../@mathjax/mathjax-dsfont-font-extension',
|
||||
'mathjax-mhchem-extension': '[mathjax]/../@mathjax/mathjax-mhchem-font-extension'
|
||||
}
|
||||
},
|
||||
output: {
|
||||
font: 'mathjax-newcm',
|
||||
},
|
||||
tex: {
|
||||
inlineMath: [['$', '$'], ['\\(', '\\)']],
|
||||
tags: '!{tags}',
|
||||
packages: {
|
||||
'[+]': [
|
||||
'mhchem'
|
||||
]
|
||||
}
|
||||
},
|
||||
chtml: {
|
||||
scale: 1.1
|
||||
},
|
||||
options: {
|
||||
enableMenu: !{enableMenu},
|
||||
menuOptions: {
|
||||
settings: {
|
||||
enrich: false // Turn off Braille and voice narration text automatic generation
|
||||
}
|
||||
},
|
||||
renderActions: {
|
||||
findScript: [10, doc => {
|
||||
for (const node of document.querySelectorAll('script[type^="math/tex"]')) {
|
||||
|
||||
@@ -29,7 +29,13 @@ script.
|
||||
|
||||
const triggerPjaxFn = (val) => {
|
||||
if (!val) return
|
||||
Object.values(val).forEach(fn => fn())
|
||||
Object.values(val).forEach(fn => {
|
||||
try {
|
||||
fn()
|
||||
} catch (err) {
|
||||
console.debug('Pjax callback failed:', err)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
document.addEventListener('pjax:send', () => {
|
||||
|
||||
@@ -2,21 +2,33 @@
|
||||
.search-dialog
|
||||
nav.search-nav
|
||||
span.search-dialog-title= _p('search.title')
|
||||
i.fas.fa-spinner.fa-pulse#loading-status(hidden)
|
||||
button.search-close-button
|
||||
i.fas.fa-times
|
||||
|
||||
.search-wrap
|
||||
#algolia-search-input
|
||||
#algolia-search-input
|
||||
.ais-SearchBox
|
||||
form.ais-SearchBox-form(action="" role="search" novalidate="")
|
||||
input.ais-SearchBox-input(type="search" placeholder=theme.search.placeholder || _p("search.input_placeholder") autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" maxlength="512" aria-label="Search")
|
||||
button.ais-SearchBox-submit(type="submit" title="Submit the search query" style="display:none;")
|
||||
svg.ais-SearchBox-submitIcon(width="10" height="10" viewBox="0 0 40 40" aria-hidden="true")
|
||||
path(d="M26.804 29.01c-2.832 2.34-6.465 3.746-10.426 3.746C7.333 32.756 0 25.424 0 16.378 0 7.333 7.333 0 16.378 0c9.046 0 16.378 7.333 16.378 16.378 0 3.96-1.406 7.594-3.746 10.426l10.534 10.534c.607.607.61 1.59-.004 2.202-.61.61-1.597.61-2.202.004L26.804 29.01zm-10.426.627c7.323 0 13.26-5.936 13.26-13.26 0-7.32-5.937-13.257-13.26-13.257C9.056 3.12 3.12 9.056 3.12 16.378c0 7.323 5.936 13.26 13.258 13.26z")
|
||||
hr
|
||||
#algolia-search-results
|
||||
#algolia-hits
|
||||
#algolia-pagination
|
||||
#algolia-hits-empty(style="display:none;")
|
||||
.ais-Hits(style="display:none;")
|
||||
ol.ais-Hits-list
|
||||
#algolia-pagination.ais-Pagination(style="display:none;")
|
||||
ul.ais-Pagination-list
|
||||
#algolia-info
|
||||
.algolia-stats
|
||||
.algolia-poweredBy
|
||||
span.ais-Stats-text
|
||||
a.algolia-poweredBy(href="https://www.algolia.com/?utm_source=algoliasearch.js&utm_medium=website&utm_content=localhost&utm_campaign=poweredby" target="_blank" aria-label="Search by Algolia" rel="noopener noreferrer")
|
||||
svg.ais-PoweredBy-logo(height="1.2em" viewBox="0 0 572 64" style="width: auto;")
|
||||
path(fill="#36395A" d="M16 48.3c-3.4 0-6.3-.6-8.7-1.7A12.4 12.4 0 0 1 1.9 42C.6 40 0 38 0 35.4h6.5a6.7 6.7 0 0 0 3.9 6c1.4.7 3.3 1.1 5.6 1.1 2.2 0 4-.3 5.4-1a7 7 0 0 0 3-2.4 6 6 0 0 0 1-3.4c0-1.5-.6-2.8-1.9-3.7-1.3-1-3.3-1.6-5.9-1.8l-4-.4c-3.7-.3-6.6-1.4-8.8-3.4a10 10 0 0 1-3.3-7.9c0-2.4.6-4.6 1.8-6.4a12 12 0 0 1 5-4.3c2.2-1 4.7-1.6 7.5-1.6s5.5.5 7.6 1.6a12 12 0 0 1 5 4.4c1.2 1.8 1.8 4 1.8 6.7h-6.5a6.4 6.4 0 0 0-3.5-5.9c-1-.6-2.6-1-4.4-1s-3.2.3-4.4 1c-1.1.6-2 1.4-2.6 2.4-.5 1-.8 2-.8 3.1a5 5 0 0 0 1.5 3.6c1 1 2.6 1.7 4.7 1.9l4 .3c2.8.2 5.2.8 7.2 1.8 2.1 1 3.7 2.2 4.9 3.8a9.7 9.7 0 0 1 1.7 5.8c0 2.5-.7 4.7-2 6.6a13 13 0 0 1-5.6 4.4c-2.4 1-5.2 1.6-8.4 1.6Zm35.6 0c-2.6 0-4.8-.4-6.7-1.3a13 13 0 0 1-4.7-3.5 17.1 17.1 0 0 1-3.6-10.4v-1c0-2 .3-3.8 1-5.6a13 13 0 0 1 7.3-8.3 15 15 0 0 1 6.3-1.4A13.2 13.2 0 0 1 64 24.3c1 2.2 1.6 4.6 1.6 7.2V34H39.4v-4.3h21.8l-1.8 2.2c0-2-.3-3.7-.9-5.1a7.3 7.3 0 0 0-2.7-3.4c-1.2-.7-2.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a32 32 0 0 1-47.2-28.6z")
|
||||
|
||||
#search-mask
|
||||
|
||||
script(src=url_for(theme.asset.algolia_search))
|
||||
script(src=url_for(theme.asset.instantsearch))
|
||||
script(src=url_for(theme.asset.algolia_js))
|
||||
@@ -2,7 +2,7 @@
|
||||
.search-dialog
|
||||
nav.search-nav
|
||||
span.search-dialog-title= _p('search.title')
|
||||
span#loading-status
|
||||
i.fas.fa-spinner.fa-pulse#loading-status(hidden)
|
||||
button.search-close-button
|
||||
i.fas.fa-times
|
||||
|
||||
@@ -10,13 +10,15 @@
|
||||
i.fas.fa-spinner.fa-pulse
|
||||
span= ' ' + _p("search.load_data")
|
||||
|
||||
.search-wrap
|
||||
#local-search-input
|
||||
.local-search-box
|
||||
input(placeholder=theme.search.placeholder || _p("search.input_placeholder") type="text").local-search-box--input
|
||||
hr
|
||||
#local-search-results
|
||||
#local-search-stats-wrap
|
||||
#search-mask
|
||||
.local-search-input
|
||||
input(placeholder=theme.search.placeholder || _p("search.input_placeholder") type="text")
|
||||
|
||||
hr
|
||||
|
||||
#local-search-results
|
||||
#local-search-pagination.ais-Pagination(style="display:none;")
|
||||
ul.ais-Pagination-list
|
||||
#local-search-stats
|
||||
|
||||
#search-mask
|
||||
script(src=url_for(theme.asset.local_search))
|
||||
@@ -1,4 +1,4 @@
|
||||
- let { serverURL, website_id, option, UV_PV } = theme.umami_analytics
|
||||
- let { serverURL, script_name, website_id, option, UV_PV } = theme.umami_analytics
|
||||
- const isServerURL = !!serverURL
|
||||
- const baseURL = serverURL ? serverURL.replace(/\/$/, '') : 'https://cloud.umami.is'
|
||||
- const apiUrl = serverURL ? serverURL.replace(/\/$/, '') + '/api' : 'https://api.umami.is/v1'
|
||||
@@ -9,28 +9,51 @@ script.
|
||||
const config = !{JSON.stringify(UV_PV)}
|
||||
|
||||
const runTrack = () => {
|
||||
umami.track(props => ({ ...props, url: window.location.pathname, title: GLOBAL_CONFIG_SITE.title }))
|
||||
if (typeof umami !== 'undefined' && typeof umami.track === 'function') {
|
||||
umami.track(props => ({ ...props, url: window.location.pathname, title: GLOBAL_CONFIG_SITE.title }))
|
||||
} else {
|
||||
console.warn('Umami Analytics: umami.track is not available')
|
||||
}
|
||||
}
|
||||
|
||||
const loadUmamiJS = () => {
|
||||
btf.getScript('!{baseURL}/script.js', {
|
||||
btf.getScript('!{baseURL}/!{script_name}', {
|
||||
'data-website-id': '!{website_id}',
|
||||
'data-auto-track': 'false',
|
||||
...option
|
||||
}).then(runTrack)
|
||||
}).then(() => {
|
||||
runTrack()
|
||||
}).catch(error => {
|
||||
console.error('Umami Analytics: Error loading script', error)
|
||||
})
|
||||
}
|
||||
|
||||
const getData = async (isPost) => {
|
||||
const now = Date.now()
|
||||
const keyUrl = isPost ? `&url=${window.location.pathname}` : ''
|
||||
const headerList = { 'Accept': 'application/json' }
|
||||
if (!{isServerURL}) headerList['Authorization'] = `Bearer ${config.token}`
|
||||
else headerList['x-umami-api-key'] = config.token
|
||||
const res = await fetch(`!{apiUrl}/websites/!{website_id}/stats?startAt=0000000000&endAt=${now}${keyUrl}`, {
|
||||
method: "GET",
|
||||
headers: headerList
|
||||
})
|
||||
return await res.json()
|
||||
try {
|
||||
const now = Date.now()
|
||||
const keyUrl = isPost ? `&url=${window.location.pathname}` : ''
|
||||
const headerList = { 'Accept': 'application/json' }
|
||||
|
||||
if (!{isServerURL}) {
|
||||
headerList['Authorization'] = `Bearer ${config.token}`
|
||||
} else {
|
||||
headerList['x-umami-api-key'] = config.token
|
||||
}
|
||||
|
||||
const res = await fetch(`!{apiUrl}/websites/!{website_id}/stats?startAt=0000000000&endAt=${now}${keyUrl}`, {
|
||||
method: "GET",
|
||||
headers: headerList
|
||||
})
|
||||
|
||||
if (!res.ok) {
|
||||
throw new Error(`HTTP error! status: ${res.status}`)
|
||||
}
|
||||
|
||||
return await res.json()
|
||||
} catch (error) {
|
||||
console.error('Umami Analytics: Failed to fetch data', error)
|
||||
throw error
|
||||
}
|
||||
}
|
||||
|
||||
const insertData = async () => {
|
||||
@@ -39,27 +62,49 @@ script.
|
||||
const pagePV = document.getElementById('umamiPV')
|
||||
if (pagePV) {
|
||||
const data = await getData(true)
|
||||
pagePV.textContent = data.pageviews.value
|
||||
}
|
||||
} else {
|
||||
const data = (config.site_uv || config.site_pv) && await getData()
|
||||
if (config.site_uv) {
|
||||
const siteUV = document.getElementById('umami-site-uv')
|
||||
if (siteUV) siteUV.textContent = data.visitors.value
|
||||
}
|
||||
if (config.site_pv) {
|
||||
const sitePV = document.getElementById('umami-site-pv')
|
||||
if (sitePV) sitePV.textContent = data.pageviews.value
|
||||
if (data && data.pageviews && typeof data.pageviews.value !== 'undefined') {
|
||||
pagePV.textContent = data.pageviews.value
|
||||
} else {
|
||||
console.warn('Umami Analytics: Invalid page view data received')
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('Failed to load Umami Analytics:', e)
|
||||
|
||||
if (config.site_uv || config.site_pv) {
|
||||
const data = await getData(false)
|
||||
|
||||
if (config.site_uv) {
|
||||
const siteUV = document.getElementById('umami-site-uv')
|
||||
if (siteUV && data && data.visitors && typeof data.visitors.value !== 'undefined') {
|
||||
siteUV.textContent = data.visitors.value
|
||||
} else if (siteUV) {
|
||||
console.warn('Umami Analytics: Invalid site UV data received')
|
||||
}
|
||||
}
|
||||
|
||||
if (config.site_pv) {
|
||||
const sitePV = document.getElementById('umami-site-pv')
|
||||
if (sitePV && data && data.pageviews && typeof data.pageviews.value !== 'undefined') {
|
||||
sitePV.textContent = data.pageviews.value
|
||||
} else if (sitePV) {
|
||||
console.warn('Umami Analytics: Invalid site PV data received')
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Umami Analytics: Failed to insert data', error)
|
||||
}
|
||||
}
|
||||
|
||||
btf.addGlobalFn('pjaxComplete', runTrack, 'umami_analytics_run_track')
|
||||
btf.addGlobalFn('pjaxComplete', insertData, 'umami_analytics_insert')
|
||||
|
||||
|
||||
loadUmamiJS()
|
||||
insertData()
|
||||
|
||||
if (document.readyState === 'loading') {
|
||||
document.addEventListener('DOMContentLoaded', insertData)
|
||||
} else {
|
||||
setTimeout(insertData, 100)
|
||||
}
|
||||
})()
|
||||
Reference in New Issue
Block a user