docs: update docs

This commit is contained in:
liihuu 2024-10-27 01:09:39 +08:00
parent dbf0545bd8
commit 9a4bba1176
8 changed files with 30 additions and 30 deletions

View File

@ -87,7 +87,7 @@ onUnmounted(() => {
</script>
<template>
<div id="container" style="position: relative;width: 100%;">
<div id="container" style="position: relative;width: 100%;" :style="{ 'height': props.height }">
<Loading v-if="loading"/>
</div>
</template>

View File

@ -1,7 +1,7 @@
<template>
<div class="banner" role="banner" v-if="isVisible">
<span v-if="lang === 'zh-CN'">💼&nbsp;&nbsp;作者正在寻找一份web前端开发的工作如果觉得合适可以联系作者&nbsp;<strong>微信(274082897)</strong>&nbsp;或者&nbsp;<strong>邮箱(hu_li888@foxmail.com)</strong>&nbsp;</span>
<span v-else>💼 The author is looking for a job in web front-end development and if you think the author is suitable, you can contact the author <strong>WeChat(274082897)</strong> or <strong>Email(hu_li888@foxmail.com)</strong> .</span>
<span v-if="lang === 'zh-CN'">🎉&nbsp;🎉&nbsp;🎉&nbsp;&nbsp;新版本即将发布,旧版文档请访问 <strong><a target="_blank" href="https://v9.klinecharts.com">这里</a></strong></span>
<span v-else>🎉&nbsp;🎉&nbsp;🎉&nbsp;&nbsp;The new version is about to be released, please visit <strong><a target="_blank" href="https://v9.klinecharts.com">here</a></strong> for the old version document.</span>
<button class="banner-close" @click.prevent="closeBanner">
<span class="close">&times;</span>
</button>
@ -46,14 +46,14 @@ onMounted(() => {
background: var(--vp-c-bg);
overflow: hidden;
margin: 0;
color: #F92855;
color: var(--vp-c-indigo-1);
font-size: 14px;
border-bottom: solid 1px var(--vp-c-gutter);
}
.banner-close {
position: absolute;
right: 16px;
right: 32px;
color: var(--vp-c-text-1);
font-size: 20px;
font-weight: bold;

View File

@ -29,7 +29,7 @@ const zhItems = [
},
{
q: "想创建一个内置技术指标之外的指标,怎么办?",
a: `图表支持自定义技术指标,详情参阅<a href="/guide/indicator" style="cursor:pointer;color:var(--vp-c-indigo-1)">技术指标</a>。`,
a: `图表支持自定义技术指标,详情参阅<a rel="noreferrer" href="/guide/indicator" style="cursor:pointer;color:var(--vp-c-indigo-1)">技术指标</a>。`,
collapsed: true
},
{
@ -62,7 +62,7 @@ const enItems = [
},
{
q: "What if I want to create an indicator other than the built-in technical indicator?",
a: `Chart support custom technical indicators, see <a href="/en-US/guide/indicator" style="cursor:pointer;color:var(--vp-c-indigo-1)">indicators</a> for details.`,
a: `Chart support custom technical indicators, see <a rel="noreferrer" href="/en-US/guide/indicator" style="cursor:pointer;color:var(--vp-c-indigo-1)">indicators</a> for details.`,
collapsed: true
},
{

View File

@ -17,10 +17,10 @@ const { lang } = useData()
{{ lang === 'zh-CN' ? '简单易用,轻量流畅,适用场景丰富的 Web 前端金融图表。' : 'Easy to use, lightweight and smooth, suitable for web front-end financial chart with rich scenarios.' }}
</p>
<div class="actions">
<a class="action brand" :href="lang === 'zh-CN' ? '/guide/quick-start' : '/en-US/guide/quick-start'">{{ lang === 'zh-CN' ? '快速开始' : 'Getting Started' }}</a>
<a class="action alt" href="https://github.com/klinecharts/KLineChart">
<svg width="14px" height="14px" viewBox="0 0 64 64"><path fill="currentColor" d="M32 0C14 0 0 14 0 32c0 21 19 30 22 30c2 0 2-1 2-2v-5c-7 2-10-2-11-5c0 0 0-1-2-3c-1-1-5-3-1-3c3 0 5 4 5 4c3 4 7 3 9 2c0-2 2-4 2-4c-8-1-14-4-14-15q0-6 3-9s-2-4 0-9c0 0 5 0 9 4c3-2 13-2 16 0c4-4 9-4 9-4c2 7 0 9 0 9q3 3 3 9c0 11-7 14-14 15c1 1 2 3 2 6v8c0 1 0 2 2 2c3 0 22-9 22-30C64 14 50 0 32 0"/></svg>
&nbsp;Github
<a class="action brand" rel="noreferrer" :href="lang === 'zh-CN' ? '/guide/quick-start' : '/en-US/guide/quick-start'">{{ lang === 'zh-CN' ? '快速开始' : 'Getting Started' }}</a>
<a class="action alt" rel="noreferrer" href="https://github.com/klinecharts/KLineChart">
<svg viewBox="0 0 64 64"><path fill="currentColor" d="M32 0C14 0 0 14 0 32c0 21 19 30 22 30c2 0 2-1 2-2v-5c-7 2-10-2-11-5c0 0 0-1-2-3c-1-1-5-3-1-3c3 0 5 4 5 4c3 4 7 3 9 2c0-2 2-4 2-4c-8-1-14-4-14-15q0-6 3-9s-2-4 0-9c0 0 5 0 9 4c3-2 13-2 16 0c4-4 9-4 9-4c2 7 0 9 0 9q3 3 3 9c0 11-7 14-14 15c1 1 2 3 2 6v8c0 1 0 2 2 2c3 0 22-9 22-30C64 14 50 0 32 0"/></svg>
&nbsp;&nbsp;Github
</a>
</div>
</div>
@ -129,6 +129,11 @@ const { lang } = useData()
color: var(--vp-c-indigo-2);
}
.action.alt svg {
width: 14px;
height: 14px;
}
@media (min-width: 640px) {
.hero {
padding: calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 80px) 48px 64px;
@ -163,6 +168,11 @@ const { lang } = useData()
.action {
padding: 6px 20px;
}
.action.alt svg {
width: 16px;
height: 16px;
}
}
@media (min-width: 960px) {

View File

@ -80,6 +80,10 @@
</div>
<div class="sponsor-become">
<a target="_blank" rel="noreferrer" href="./sponsor.html">
<svg width="18" height="18" viewBox="0 0 24 24">
<path fill="currentColor" d="m12 21l-1.45-1.3q-2.525-2.275-4.175-3.925T3.75 12.812T2.388 10.4T2 8.15Q2 5.8 3.575 4.225T7.5 2.65q1.3 0 2.475.55T12 4.75q.85-1 2.025-1.55t2.475-.55q2.35 0 3.925 1.575T22 8.15q0 1.15-.387 2.25t-1.363 2.412t-2.625 2.963T13.45 19.7z"/>
</svg>
&nbsp;
{{ lang === 'zh-CN' ? '成为赞助商' : 'Become a sponsor' }}
</a>
</div>
@ -170,6 +174,9 @@
}
.sponsor-become a {
display: flex;
flex-direction: row;
align-items: center;
padding: 8px 22px;
border-radius: 99px;
transition: all .25s ease-in;

View File

@ -3,21 +3,6 @@ title: Highly customizable professional lightweight financial chart
# https://vitepress.dev/reference/default-theme-home-page
layout: home
# hero:
# name: KLineChart
# text: Highly customizable professional lightweight financial chart
# tagline: Easy to use, lightweight and smooth, suitable for web front-end financial chart with rich scenarios.
# image:
# src: /images/logo_hero.svg
# alt: KLineChart
# actions:
# - theme: brand
# text: Getting Started
# link: /en-US/guide/quick-start
# - theme: alt
# text: View on Github
# link: https://github.com/klinecharts/KLineChart
features:
- icon:
light: /images/box_light.png

View File

@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="160.00003051757812" height="160" viewBox="0 0 160.00003051757812 160"><defs><linearGradient x1="0" y1="0.5" x2="1" y2="0.5" id="master_svg0_768_1759"><stop offset="0%" stop-color="#F92855" stop-opacity="1"/><stop offset="100%" stop-color="#2DC08E" stop-opacity="1"/></linearGradient></defs><g><g><path d="M95.1576,6.27848L153.722,64.8424Q156.803,67.9238,158.43,71.9362Q160,75.8078,160,80Q160,84.1922,158.43,88.0638Q156.803,92.0762,153.722,95.1576L95.1576,153.722Q92.0762,156.803,88.0638,158.43Q84.1922,160,80,160Q75.8078,160,71.9362,158.43Q67.9238,156.803,64.8424,153.722L6.27848,95.1576Q3.19708,92.0762,1.56999,88.0638Q0,84.1922,0,80Q0,75.8078,1.56999,71.9362Q3.19707,67.9238,6.27848,64.8424L64.8424,6.27848Q67.9238,3.19707,71.9362,1.56999Q75.8078,0,80,0Q84.1922,0,88.0638,1.56999Q92.0762,3.19707,95.1576,6.27848ZM87.9397,13.4964Q86.322,11.8787,84.2279,11.0295Q82.2013,10.2077,80,10.2077Q77.7987,10.2077,75.7721,11.0295Q73.678,11.8787,72.0603,13.4964L54.5534,31.0033L105.447,31.0033L87.9397,13.4964ZM107.561,118.789Q109.848,118.789,111.93,117.909Q113.944,117.057,115.5,115.5Q117.057,113.944,117.909,111.93Q118.789,109.848,118.789,107.561L118.789,52.4393Q118.789,50.1516,117.909,48.0703Q117.057,46.0562,115.5,44.4996Q113.944,42.9431,111.93,42.0912Q109.848,41.2109,107.561,41.2109L52.4393,41.2109Q50.1515,41.2109,48.0703,42.0912Q46.0562,42.9431,44.4996,44.4996Q42.9431,46.0562,42.0912,48.0703Q41.2109,50.1515,41.2109,52.4393L41.2109,107.561Q41.2109,109.848,42.0912,111.93Q42.9431,113.944,44.4996,115.5Q46.0562,117.057,48.0703,117.909Q50.1516,118.789,52.4393,118.789L107.561,118.789ZM13.4964,72.0603L31.0033,54.5534L31.0033,105.447L13.4964,87.9397Q11.8787,86.322,11.0295,84.2278Q10.2077,82.2013,10.2077,80Q10.2077,77.7987,11.0295,75.7721Q11.8787,73.678,13.4964,72.0603ZM146.504,87.9397L128.997,105.447L128.997,54.5534L146.504,72.0603Q148.121,73.678,148.971,75.7721Q149.792,77.7987,149.792,80Q149.792,82.2013,148.971,84.2279Q148.121,86.322,146.504,87.9397ZM72.0603,146.504L54.5534,128.997L105.447,128.997L87.9397,146.504Q86.322,148.121,84.2278,148.971Q82.2012,149.792,80,149.792Q77.7987,149.792,75.7721,148.971Q73.678,148.121,72.0603,146.504Z" fill-rule="evenodd" fill="url(#master_svg0_768_1759)" fill-opacity="1"/></g><g><g><path d="M64.16208911132813,62.68834972381592C63.348189111328125,62.68834972381592,62.68838911132812,63.27273572381592,62.68838911132812,63.993609723815915L62.68838911132812,71.82518972381592L55.319959111328124,71.82518972381592C53.69216911132813,71.82518972381592,52.372589111328125,72.99394972381592,52.372589111328125,74.43574972381592L52.372589111328125,96.62514972381592C52.372589111328125,98.06694972381592,53.69216911132813,99.23574972381593,55.319959111328124,99.23574972381593L62.68838911132812,99.23574972381593L62.68838911132812,107.06724972381592C62.68838911132812,107.78814972381592,63.348189111328125,108.37254972381592,64.16208911132813,108.37254972381592C64.97598911132812,108.37254972381592,65.63578911132812,107.78814972381592,65.63578911132812,107.06724972381592L65.63578911132812,99.23574972381593L73.00418911132812,99.23574972381593C74.63198911132812,99.23574972381593,75.95148911132813,98.06694972381592,75.95148911132813,96.62514972381592L75.95148911132813,74.43574972381592C75.95148911132813,72.99394972381592,74.63198911132812,71.82518972381592,73.00418911132812,71.82518972381592L65.63578911132812,71.82518972381592L65.63578911132812,63.993609723815915C65.63578911132812,63.27273572381592,64.97598911132812,62.68834972381592,64.16208911132813,62.68834972381592Z" fill-rule="evenodd" fill="#F92855" fill-opacity="1"/></g><g><path d="M96.58314395141602,52.37255859375C95.76924395141602,52.37255859375,95.10944395141601,52.95694459375,95.10944395141601,53.67781859375L95.10944395141601,61.50939859375L87.74101395141602,61.50939859375C86.11322395141602,61.50939859375,84.79364395141602,62.67815859375,84.79364395141602,64.11995859375L84.79364395141602,86.30935859375C84.79364395141602,87.75115859375,86.11322395141602,88.91995859375001,87.74101395141602,88.91995859375001L95.10944395141601,88.91995859375001L95.10944395141601,96.75145859375C95.10944395141601,97.47235859375,95.76924395141602,98.05675859375,96.58314395141602,98.05675859375C97.39704395141601,98.05675859375,98.05684395141601,97.47235859375,98.05684395141601,96.75145859375L98.05684395141601,88.91995859375001L105.42524395141601,88.91995859375001C107.05304395141602,88.91995859375001,108.37254395141602,87.75115859375,108.37254395141602,86.30935859375L108.37254395141602,64.11995859375C108.37254395141602,62.67815859375,107.05304395141602,61.50939859375,105.42524395141601,61.50939859375L98.05684395141601,61.50939859375L98.05684395141601,53.67781859375C98.05684395141601,52.95694459375,97.39704395141601,52.37255859375,96.58314395141602,52.37255859375Z" fill-rule="evenodd" fill="#2DC08E" fill-opacity="1"/></g></g></g></svg>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="60" height="60" viewBox="0 0 60 60"><g><g><rect x="27.70969009399414" y="17.502239227294922" width="4.999998569488525" height="24.995521545410156" rx="0" fill="#E6AC00" fill-opacity="1" style="mix-blend-mode:passthrough"/></g><g><path d="M43.5914,4.34332L43.5914,3.25748C39.5054,1.18259,34.8925,0,30,0C13.4301,0,0,13.4277,0,29.9946C0,39.724,4.6344,48.3569,11.8064,53.8398L11.8064,47.1313C7.59139,42.659,4.99999,36.6279,4.99999,29.9946C4.99999,16.1906,16.1935,4.9991,30,4.9991C33.0215,4.9991,35.914,5.53664,38.5914,6.52572L38.5914,26.8447L43.5914,26.8447L43.5914,4.34332Z" fill="#E6AC00" fill-opacity="1" style="mix-blend-mode:passthrough"/></g><g><path d="M48.59135179748535,6.46121883392334L48.59135179748535,13.28795883392334C52.58065179748535,17.71721883392334,54.99995179748535,23.57641883392334,54.99995179748535,29.99461883392334C54.99995179748535,43.79861883392334,43.80645179748535,54.99021883392334,29.999951797485352,54.99021883392334C27.129051797485353,54.99021883392334,24.376321797485353,54.50641883392334,21.806441797485352,53.61411883392334L21.806441797485352,33.080118833923336L16.80645179748535,33.080118833923336L16.80645179748535,55.58141883392334L16.80645179748535,56.94681883392334C20.784941797485352,58.90341883392334,25.268811797485352,60.00001883392334,29.999951797485352,60.00001883392334C46.569851797485356,60.00001883392334,59.99995179748535,46.57231883392334,59.99995179748535,30.00541883392334C60.010751797485355,20.44791883392334,55.54835179748535,11.95483883392334,48.59135179748535,6.46121883392334Z" fill="#E6AC00" fill-opacity="1" style="mix-blend-mode:passthrough"/></g></g></svg>

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -67,6 +67,7 @@
"@rollup/pluginutils": "^5.1.0",
"@stackblitz/sdk": "^1.9.0",
"@types/node": "^20.12.7",
"shiki": "^1.22.1",
"chalk": "^5.3.0",
"codesandbox": "^2.2.3",
"cross-env": "^7.0.3",
@ -83,8 +84,5 @@
"tslib": "^2.6.2",
"typescript": "^5.5.4",
"vitepress": "^1.3.4"
},
"dependencies": {
"shiki": "^1.22.1"
}
}