🎨 🐛 Fixed the friends link code block & others imports.
This commit is contained in:
parent
f215616230
commit
6d65d92943
@ -6,7 +6,6 @@
|
|||||||
@import 'gitter';
|
@import 'gitter';
|
||||||
@import 'livere';
|
@import 'livere';
|
||||||
@import 'waline';
|
@import 'waline';
|
||||||
@import 'mermaid';
|
|
||||||
|
|
||||||
.use-motion .animated {
|
.use-motion .animated {
|
||||||
// Fix issue #48 #55
|
// 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 'group-pictures';
|
||||||
@import 'label';
|
@import 'label';
|
||||||
@import 'link-grid';
|
@import 'link-grid';
|
||||||
@import 'mermaid';
|
|
||||||
@import 'note';
|
@import 'note';
|
||||||
@import 'pdf';
|
@import 'pdf';
|
||||||
@import 'tabs';
|
@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_overlay : {{ $P.bodyScrollbar.overlay }};
|
||||||
$body_scrollbar_stable : {{ $P.bodyScrollbar.stable }};
|
$body_scrollbar_stable : {{ $P.bodyScrollbar.stable }};
|
||||||
$mermaid_enable : {{ $P.mermaid.enable }};
|
|
||||||
$mobile_layout_economy : {{ $P.mobileLayoutEconomy }};
|
$mobile_layout_economy : {{ $P.mobileLayoutEconomy }};
|
||||||
$theme_color_dark : {{ $P.themeColor.dark }};
|
$theme_color_dark : {{ $P.themeColor.dark }};
|
||||||
$theme_color_light : {{ $P.themeColor.light }};
|
$theme_color_light : {{ $P.themeColor.light }};
|
||||||
|
@ -1,41 +1,41 @@
|
|||||||
/* clipboard plugin */
|
/* clipboard plugin */
|
||||||
NexT.plugins.others.clipboard = function () {
|
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);
|
const clipboard_js = NexT.utils.getCDNResource(NexT.CONFIG.page.clipboard.js);
|
||||||
NexT.utils.getScript(clipboard_js, function () {
|
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);
|
|
||||||
});
|
|
||||||
|
|
||||||
// Register the clipboard event.
|
// Register the clipboard event.
|
||||||
var clipboard = new ClipboardJS('.copy-btn', {
|
var clipboard = new ClipboardJS('.copy-btn', {
|
||||||
text: function (trigger) {
|
text: function (trigger) {
|
||||||
|
@ -40,7 +40,7 @@ languageCode: zh-CN
|
|||||||
# languageCode: fr-FR
|
# languageCode: fr-FR
|
||||||
# languageDirection: ltr
|
# languageDirection: ltr
|
||||||
# languageName: French
|
# languageName: French
|
||||||
# weight: 2
|
# weight: 3
|
||||||
# 是否包含中文,日语,韩文
|
# 是否包含中文,日语,韩文
|
||||||
# Whether contains Chinese, Japanese and Korean
|
# Whether contains Chinese, Japanese and Korean
|
||||||
hasCJKLanguage: true
|
hasCJKLanguage: true
|
||||||
@ -1111,15 +1111,6 @@ params:
|
|||||||
# Default height
|
# Default height
|
||||||
height: 500px
|
height: 500px
|
||||||
|
|
||||||
# Mermaid tag
|
|
||||||
mermaid:
|
|
||||||
enable: false
|
|
||||||
# Available themes: default | dark | forest | neutral
|
|
||||||
theme:
|
|
||||||
light: default
|
|
||||||
dark: dark
|
|
||||||
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------
|
# ---------------------------------------------------------------
|
||||||
# 动画效果设置
|
# 动画效果设置
|
||||||
# Animation Settings
|
# Animation Settings
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
{{ partialCached "footer.html" . }}
|
{{ partialCached "footer.html" . }}
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
{{ partial "head/config.html" . }}
|
||||||
{{ partial "scripts.html" . }}
|
{{ partial "scripts.html" . }}
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
@ -60,6 +60,5 @@
|
|||||||
theme.active();
|
theme.active();
|
||||||
})(window);
|
})(window);
|
||||||
</script>
|
</script>
|
||||||
{{ partial "head/config.html" . }}
|
|
||||||
{{ partialCached "head/script/analytics.html" . }}
|
{{ partialCached "head/script/analytics.html" . }}
|
||||||
|
|
||||||
|
@ -84,14 +84,3 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<script class="next-config" data-name="page" type="application/json">{{ $pageCfg }}</script>
|
<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 }}
|
|
@ -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 -->
|
<!-- Extend Style -->
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
{{ partialCached "head/style/global.html" . }}
|
.post-footer hr:after {
|
||||||
{{ partial "head/style/plugins.html" . }}
|
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>
|
</style>
|
||||||
|
|
||||||
<!-- Custom Style file -->
|
<!-- 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