Some minor fixes

This commit is contained in:
Mimi 2020-08-22 23:39:49 +08:00
parent c809e2d3ab
commit ae9e1407ea
4 changed files with 7 additions and 10 deletions

View File

@ -9,8 +9,7 @@
gtag('config', '{{ theme.google_analytics.tracking_id }}'); gtag('config', '{{ theme.google_analytics.tracking_id }}');
} }
</script> </script>
{%- endif %} {%- else %}
{%- if theme.google_analytics.only_pageview %}
<script> <script>
function sendPageView() { function sendPageView() {
if (CONFIG.hostname !== location.hostname) return; if (CONFIG.hostname !== location.hostname) return;

View File

@ -43,6 +43,7 @@
})(); })();
} else { } else {
MathJax.startup.document.state(0); MathJax.startup.document.state(0);
MathJax.typesetClear();
MathJax.texReset(); MathJax.texReset();
MathJax.typeset(); MathJax.typeset();
} }

View File

@ -11,7 +11,6 @@ module.exports = ctx => function(args, content) {
const tabName = args[0]; const tabName = args[0];
const tabActive = Number(args[1]) || 0; const tabActive = Number(args[1]) || 0;
const matches = [];
let match; let match;
let tabId = 0; let tabId = 0;
let tabNav = ''; let tabNav = '';
@ -20,13 +19,8 @@ module.exports = ctx => function(args, content) {
if (!tabName) ctx.log.warn('Tabs block must have unique name!'); if (!tabName) ctx.log.warn('Tabs block must have unique name!');
while ((match = tabBlock.exec(content)) !== null) { while ((match = tabBlock.exec(content)) !== null) {
matches.push(match[1]); let [caption = '', icon = ''] = match[1].split('@');
matches.push(match[2]); let postContent = match[2];
}
for (let i = 0; i < matches.length; i += 2) {
let [caption = '', icon = ''] = matches[i].split('@');
let postContent = matches[i + 1];
postContent = ctx.render.renderSync({ text: postContent, engine: 'markdown' }).trim(); postContent = ctx.render.renderSync({ text: postContent, engine: 'markdown' }).trim();

View File

@ -13,9 +13,12 @@
} }
} }
// Flexbox layout makes it possible to reorder the child
// elements of .footer-inner through the `order` CSS property
.footer-inner { .footer-inner {
box-sizing: border-box; box-sizing: border-box;
text-align: center; text-align: center;
flex-column();
main-container(); main-container();
} }