🎨 🐛 Fixed the friends link code block & others imports.

This commit is contained in:
elkan1788 2025-01-25 17:43:52 +08:00
parent f215616230
commit 6d65d92943
14 changed files with 53 additions and 88 deletions

View File

@ -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

View File

@ -1,3 +0,0 @@
.post-block .post-body .mermaid {
background: var(--highlight-foreground);
}

View File

@ -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';

View File

@ -1,6 +0,0 @@
@if $mermaid_enable {
.mermaid {
margin-bottom: 20px;
text-align: center;
}
}

View File

@ -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 }};

View File

@ -1,9 +1,5 @@
/* clipboard plugin */ /* clipboard plugin */
NexT.plugins.others.clipboard = function () { NexT.plugins.others.clipboard = function () {
if (!NexT.CONFIG.copybtn) 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'); let chromaDiv = document.querySelectorAll('div.highlight div.chroma');
if (chromaDiv.length === 0) return; if (chromaDiv.length === 0) return;
@ -36,6 +32,10 @@ NexT.plugins.others.clipboard = function () {
element.parentNode.insertBefore(ch, element); 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 () {
// 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) {

View File

@ -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

View File

@ -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>

View File

@ -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" . }}

View File

@ -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 }}

View File

@ -1,3 +0,0 @@
.post-footer, .flinks-list-footer hr:after {
content: "{{ .Site.Params.postFooter.endLineTip }}";
}

View File

@ -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 }}

View File

@ -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