Skip to content

Commit

Permalink
docs: add contaction in VChart
Browse files Browse the repository at this point in the history
  • Loading branch information
YyumeiZhang committed Dec 11, 2023
1 parent 5248737 commit c7982af
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 0 deletions.
4 changes: 4 additions & 0 deletions content/other/chart/index-en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 4 additions & 0 deletions content/other/chart/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 6 additions & 0 deletions src/styles/doc.scss
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ a {
}
}

.pre-chartcontact {
border: none;
background-color: transparent;
}


.changelog {
strong {
background-color: var(--semi-color-danger-light-hover);
Expand Down
11 changes: 11 additions & 0 deletions src/templates/postTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -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} />;
};

Expand All @@ -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,
Expand Down

0 comments on commit c7982af

Please sign in to comment.