mirror of
https://github.com/Colin-XKL/Colinx-Blog.git
synced 2026-01-12 18:51:28 +08:00
feat: add pangu spacing; refactor
This commit is contained in:
@@ -17,6 +17,21 @@
|
|||||||
}
|
}
|
||||||
</style> -->
|
</style> -->
|
||||||
|
|
||||||
|
<!-- toc -->
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/tocbot/4.11.1/tocbot.min.js"></script>
|
||||||
|
<script>
|
||||||
|
tocbot.init({
|
||||||
|
// Where to render the table of contents.
|
||||||
|
tocSelector: '.js-toc',
|
||||||
|
// Where to grab the headings to build the table of contents.
|
||||||
|
contentSelector: '.post-content',
|
||||||
|
// Which headings to grab inside of the contentSelector element.
|
||||||
|
headingSelector: 'h1, h2, h3',
|
||||||
|
// For headings inside relative or absolute positioned containers within content.
|
||||||
|
hasInnerContainers: true,
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tocbot/4.11.1/tocbot.css">
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
::selection {
|
::selection {
|
||||||
@@ -34,3 +49,18 @@
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<!-- Sentry -->
|
||||||
|
<script src="https://browser.sentry-cdn.com/6.15.0/bundle.tracing.min.js"
|
||||||
|
integrity="sha384-1k7XKRQgqjUbNyG2sI+qsY8HTHMOeLdycMx6hoGuNSANZ3WrMa3LXkr+M4t+SIpF"
|
||||||
|
crossorigin="anonymous"></script>
|
||||||
|
<script>
|
||||||
|
Sentry.init({
|
||||||
|
dsn: "https://446fb53b106744b1b70e1074e68a5e71@o850059.ingest.sentry.io/6077493",
|
||||||
|
integrations: [new Sentry.Integrations.BrowserTracing()],
|
||||||
|
// Set tracesSampleRate to 1.0 to capture 100%
|
||||||
|
// of transactions for performance monitoring.
|
||||||
|
// We recommend adjusting this value in production
|
||||||
|
tracesSampleRate: 1.0,
|
||||||
|
});
|
||||||
|
</script>
|
||||||
@@ -7,20 +7,6 @@
|
|||||||
"></div>
|
"></div>
|
||||||
<div class='js-toc'></div>
|
<div class='js-toc'></div>
|
||||||
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/tocbot/4.11.1/tocbot.min.js"></script>
|
|
||||||
<script>
|
|
||||||
tocbot.init({
|
|
||||||
// Where to render the table of contents.
|
|
||||||
tocSelector: '.js-toc',
|
|
||||||
// Where to grab the headings to build the table of contents.
|
|
||||||
contentSelector: '.post-content',
|
|
||||||
// Which headings to grab inside of the contentSelector element.
|
|
||||||
headingSelector: 'h1, h2, h3',
|
|
||||||
// For headings inside relative or absolute positioned containers within content.
|
|
||||||
hasInnerContainers: true,
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tocbot/4.11.1/tocbot.css">
|
|
||||||
<style>
|
<style>
|
||||||
@media (min-width: 1560px) {
|
@media (min-width: 1560px) {
|
||||||
.js-toc {
|
.js-toc {
|
||||||
@@ -119,28 +105,22 @@
|
|||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
<script src="{{ "assets/main.js" | absURL }}"></script>
|
|
||||||
<script async src="{{ "assets/prism.js" | absURL }}"></script>
|
<script async src="{{ "assets/prism.js" | absURL }}"></script>
|
||||||
|
<script src="{{ "assets/main.js" | absURL }}"></script>
|
||||||
<script>
|
<script>
|
||||||
meta = document.querySelectorAll('.post:not(.on-list) .post-meta')[0];
|
let meta = document.querySelectorAll('.post:not(.on-list) .post-meta')[0];
|
||||||
var visitors = `<span id="busuanzi_container_page_pv" style='display:none'> 浏览:<span id="busuanzi_value_page_pv"></span>次</span>`
|
const visitors = `<span id="busuanzi_container_page_pv" style='display:none'> 浏览:<span id="busuanzi_value_page_pv"></span>次</span>`
|
||||||
if (meta) meta.innerHTML = meta.innerHTML + visitors
|
if (meta) meta.innerHTML = meta.innerHTML + visitors
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/pangu@4/dist/browser/pangu.min.js"></script>
|
||||||
<!-- Sentry -->
|
|
||||||
<script src="https://browser.sentry-cdn.com/6.15.0/bundle.tracing.min.js"
|
|
||||||
integrity="sha384-1k7XKRQgqjUbNyG2sI+qsY8HTHMOeLdycMx6hoGuNSANZ3WrMa3LXkr+M4t+SIpF"
|
|
||||||
crossorigin="anonymous"></script>
|
|
||||||
<script>
|
<script>
|
||||||
Sentry.init({
|
pangu.spacingElementByClassName('post');
|
||||||
dsn: "https://446fb53b106744b1b70e1074e68a5e71@o850059.ingest.sentry.io/6077493",
|
pangu.spacingElementByTagName('p');
|
||||||
integrations: [new Sentry.Integrations.BrowserTracing()],
|
|
||||||
// Set tracesSampleRate to 1.0 to capture 100%
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
// of transactions for performance monitoring.
|
// listen to any DOM change and automatically perform spacing via MutationObserver()
|
||||||
// We recommend adjusting this value in production
|
pangu.autoSpacingPage();
|
||||||
tracesSampleRate: 1.0,
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user