🎨 🐛 Fixed the friends link code block & others imports.
This commit is contained in:
parent
f215616230
commit
6d65d92943
@ -6,7 +6,6 @@
|
||||
@import 'gitter';
|
||||
@import 'livere';
|
||||
@import 'waline';
|
||||
@import 'mermaid';
|
||||
|
||||
.use-motion .animated {
|
||||
// Fix issue #48 #55
|
||||
|
@ -1,3 +0,0 @@
|
||||
.post-block .post-body .mermaid {
|
||||
background: var(--highlight-foreground);
|
||||
}
|
@ -2,7 +2,6 @@
|
||||
@import 'group-pictures';
|
||||
@import 'label';
|
||||
@import 'link-grid';
|
||||
@import 'mermaid';
|
||||
@import 'note';
|
||||
@import 'pdf';
|
||||
@import 'tabs';
|
||||
|
@ -1,6 +0,0 @@
|
||||
@if $mermaid_enable {
|
||||
.mermaid {
|
||||
margin-bottom: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
@ -7,7 +7,6 @@ $darkmode : {{ $P.darkmode }};
|
||||
|
||||
$body_scrollbar_overlay : {{ $P.bodyScrollbar.overlay }};
|
||||
$body_scrollbar_stable : {{ $P.bodyScrollbar.stable }};
|
||||
$mermaid_enable : {{ $P.mermaid.enable }};
|
||||
$mobile_layout_economy : {{ $P.mobileLayoutEconomy }};
|
||||
$theme_color_dark : {{ $P.themeColor.dark }};
|
||||
$theme_color_light : {{ $P.themeColor.light }};
|
||||
|
@ -1,41 +1,41 @@
|
||||
/* clipboard plugin */
|
||||
NexT.plugins.others.clipboard = function () {
|
||||
if (!NexT.CONFIG.copybtn) return;
|
||||
|
||||
let chromaDiv = document.querySelectorAll('div.highlight div.chroma');
|
||||
if (chromaDiv.length === 0) return;
|
||||
|
||||
chromaDiv.forEach(element => {
|
||||
// Add copy button DOM.
|
||||
let codeblock = element.querySelector('code[class]:not([class=""]');
|
||||
let lang = codeblock.className;
|
||||
let copyBtn = document.createElement('div');
|
||||
copyBtn.classList.add('copy-btn');
|
||||
codeblock.parentNode.appendChild(copyBtn);
|
||||
|
||||
element.addEventListener('mouseleave', () => {
|
||||
setTimeout(() => {
|
||||
copyBtn.classList.remove('copied','uncopied');
|
||||
}, 300);
|
||||
});
|
||||
|
||||
// Add code header show
|
||||
var ch = document.createElement('div');
|
||||
ch.classList.add('code-header');
|
||||
ch.classList.add(lang);
|
||||
ch.insertAdjacentHTML('afterbegin',
|
||||
'<span class="code-lang"></span><span class="collapse-btn"></span>');
|
||||
ch.addEventListener('click', function () {
|
||||
element.classList.toggle('hidden-code');
|
||||
ch.querySelector('.collapse-btn').classList.toggle('collapse');
|
||||
}, false);
|
||||
|
||||
element.parentNode.insertBefore(ch, element);
|
||||
});
|
||||
|
||||
if (!NexT.CONFIG.copybtn || !NexT.CONFIG.page.clipboard) return;
|
||||
|
||||
const clipboard_js = NexT.utils.getCDNResource(NexT.CONFIG.page.clipboard.js);
|
||||
NexT.utils.getScript(clipboard_js, function () {
|
||||
|
||||
let chromaDiv = document.querySelectorAll('div.highlight div.chroma');
|
||||
if (chromaDiv.length === 0) return;
|
||||
|
||||
chromaDiv.forEach(element => {
|
||||
// Add copy button DOM.
|
||||
let codeblock = element.querySelector('code[class]:not([class=""]');
|
||||
let lang = codeblock.className;
|
||||
let copyBtn = document.createElement('div');
|
||||
copyBtn.classList.add('copy-btn');
|
||||
codeblock.parentNode.appendChild(copyBtn);
|
||||
|
||||
element.addEventListener('mouseleave', () => {
|
||||
setTimeout(() => {
|
||||
copyBtn.classList.remove('copied','uncopied');
|
||||
}, 300);
|
||||
});
|
||||
|
||||
// Add code header show
|
||||
var ch = document.createElement('div');
|
||||
ch.classList.add('code-header');
|
||||
ch.classList.add(lang);
|
||||
ch.insertAdjacentHTML('afterbegin',
|
||||
'<span class="code-lang"></span><span class="collapse-btn"></span>');
|
||||
ch.addEventListener('click', function () {
|
||||
element.classList.toggle('hidden-code');
|
||||
ch.querySelector('.collapse-btn').classList.toggle('collapse');
|
||||
}, false);
|
||||
|
||||
element.parentNode.insertBefore(ch, element);
|
||||
});
|
||||
|
||||
NexT.utils.getScript(clipboard_js, function () {
|
||||
// Register the clipboard event.
|
||||
var clipboard = new ClipboardJS('.copy-btn', {
|
||||
text: function (trigger) {
|
||||
|
@ -40,7 +40,7 @@ languageCode: zh-CN
|
||||
# languageCode: fr-FR
|
||||
# languageDirection: ltr
|
||||
# languageName: French
|
||||
# weight: 2
|
||||
# weight: 3
|
||||
# 是否包含中文,日语,韩文
|
||||
# Whether contains Chinese, Japanese and Korean
|
||||
hasCJKLanguage: true
|
||||
@ -1111,15 +1111,6 @@ params:
|
||||
# Default height
|
||||
height: 500px
|
||||
|
||||
# Mermaid tag
|
||||
mermaid:
|
||||
enable: false
|
||||
# Available themes: default | dark | forest | neutral
|
||||
theme:
|
||||
light: default
|
||||
dark: dark
|
||||
|
||||
|
||||
# ---------------------------------------------------------------
|
||||
# 动画效果设置
|
||||
# Animation Settings
|
||||
|
@ -42,7 +42,7 @@
|
||||
{{ partialCached "footer.html" . }}
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
{{ partial "head/config.html" . }}
|
||||
{{ partial "scripts.html" . }}
|
||||
</body>
|
||||
|
||||
|
@ -60,6 +60,5 @@
|
||||
theme.active();
|
||||
})(window);
|
||||
</script>
|
||||
{{ partial "head/config.html" . }}
|
||||
{{ partialCached "head/script/analytics.html" . }}
|
||||
|
||||
|
@ -83,15 +83,4 @@
|
||||
{{ $pageCfg = merge $pageCfg (dict "math" $math) }}
|
||||
{{ end }}
|
||||
|
||||
<script class="next-config" data-name="page" type="application/json">{{ $pageCfg }}</script>
|
||||
|
||||
{{/** Special CSS Style for page **/}}
|
||||
{{ if .IsPage }}
|
||||
<style type="text/css">
|
||||
.post-footer, .flinks-list-footer hr:after {
|
||||
content: "{{ .Site.Params.postFooter.endLineTip }}";
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
{{ end }}
|
||||
<script class="next-config" data-name="page" type="application/json">{{ $pageCfg }}</script>
|
@ -1,3 +0,0 @@
|
||||
.post-footer, .flinks-list-footer hr:after {
|
||||
content: "{{ .Site.Params.postFooter.endLineTip }}";
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
{{/* Defind loading plugin entend style which only need in pages */}}
|
||||
{{ if .IsPage }}
|
||||
|
||||
{{/** Short code params **/}}
|
||||
{{ $scParam := .Store.Get "scParams" }}
|
||||
|
||||
{{ if $scParam.mermaid }}
|
||||
.post-block .post-body .mermaid {
|
||||
background: var(--highlight-foreground);
|
||||
}
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
@ -20,8 +20,22 @@
|
||||
|
||||
<!-- Extend Style -->
|
||||
<style type="text/css">
|
||||
{{ partialCached "head/style/global.html" . }}
|
||||
{{ partial "head/style/plugins.html" . }}
|
||||
.post-footer hr:after {
|
||||
content: "{{ .Site.Params.postFooter.endLineTip }}";
|
||||
}
|
||||
|
||||
.flinks-list-footer hr:after {
|
||||
content: "{{ .Site.Params.postFooter.endLineTip }}";
|
||||
}
|
||||
|
||||
{{ $scParam := .Store.Get "scParams" }}
|
||||
{{ if $scParam.mermaid }}
|
||||
.post-block .post-body .mermaid {
|
||||
background: var(--highlight-foreground);
|
||||
margin-bottom: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
{{ end }}
|
||||
</style>
|
||||
|
||||
<!-- Custom Style file -->
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 973 KiB After Width: | Height: | Size: 443 KiB |
Loading…
Reference in New Issue
Block a user