Browse Source

docs: add contaction in VChart

zhangyumei.0319 1 year ago
parent
commit
c7982af07a

+ 4 - 0
content/other/chart/index-en-US.md

@@ -161,3 +161,7 @@ For more information, please refer to the following two documents:
 
 - [VChart Theme Concept and Design Rules](https://visactor.io/vchart/guide/tutorial_docs/Theme/Theme_Concept_and_Design_Rules)
 - [VChart Theme Extension Package](https://visactor.io/vchart/guide/tutorial_docs/Theme/Theme_Extension)
+
+Contact VChart:
+```chartcontact 
+```

+ 4 - 0
content/other/chart/index.md

@@ -166,3 +166,7 @@ Semi Design 为 VChart 声明了数据色板对应的 20 个 token, 详见下
 
 - [VChart 主题概念和设计规范](https://visactor.io/vchart/guide/tutorial_docs/Theme/Theme_Concept_and_Design_Rules)
 - [VChart 扩展主题包](https://visactor.io/vchart/guide/tutorial_docs/Theme/Theme_Extension)
+
+联系 VChart:
+```chartcontact 
+```

+ 6 - 0
src/styles/doc.scss

@@ -116,6 +116,12 @@ a {
     }
 }
 
+.pre-chartcontact {
+    border: none;
+    background-color: transparent;
+} 
+
+
 .changelog {
     strong {
         background-color: var(--semi-color-danger-light-hover);

+ 11 - 0
src/templates/postTemplate.js

@@ -135,6 +135,10 @@ const pre = ({ ...props }) => {
         return <Blocks.pre className={'pre-chart gatsby-overview'} {...props} />;
     }
 
+    if (props.children.props.className === 'language-chartcontact') {
+        return <Blocks.pre className={'pre-chartcontact gatsby-overview'} {...props} />;
+    }
+
     return <Blocks.pre {...props} />;
 };
 
@@ -151,6 +155,13 @@ const code = ({ ...props }) => {
         return <Charts code={props.children} zh={props.zh} />;
     }
 
+    if (props.className === 'language-chartcontact') {
+        return <>
+        <img src={'https://lf3-static.bytednsdoc.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/vchart/contact_wechat.jpeg'} style={{width:250, height:250}}/>
+        <img src={'https://lf3-static.bytednsdoc.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/vchart/contact_lark.jpeg'} style={{width:250, height:250}}/>
+     </>;
+    }
+
     const scope = {
         useEffect,
         useMemo,