Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
liihuu authored Jun 4, 2024
2 parents 3279db0 + 9efcd01 commit 773da8f
Show file tree
Hide file tree
Showing 214 changed files with 4,586 additions and 2,472 deletions.
11 changes: 1 addition & 10 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,7 @@ module.exports = {
browser: true,
es2021: true
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: 'tsconfig.json'
},
extends: 'standard-with-typescript',
plugins: ['@typescript-eslint'],
overrides: [
],
extends: 'love',
rules: {
"@typescript-eslint/no-non-null-assertion": "off"
}
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
/dist
/types
/docs/.vitepress/cache
/docs/data/sample/*/index.json

/package-lock.json
/pnpm-lock.yaml
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ English | <a href="https://github.com/liihuu/KLineChart/blob/main/README.zh-CN.m
[![npms.io (maintenance)](https://img.shields.io/npms-io/quality-score/klinecharts)](https://www.npmjs.com/package/klinecharts)
[![Typescript](https://badgen.net/npm/types/klinecharts)](types/index.d.ts)
[![LICENSE](https://badgen.net/github/license/liihuu/KLineChart)](LICENSE)
[![Docs](https://badgen.net/badge/docs%20by/vitepress/10B981)](https://vitepress.dev/)
[![Docs](https://badgen.net/badge/docs%20by/vitepress/bd34fe)](https://vitepress.dev/)

</div>

<div align="center">

[![Github Issues](https://img.shields.io/static/v1?color=1f2328&logo=github&logoColor=fff&label&message=Github%20Issues)](https://github.com/liihuu/KLineChart/issues)
[![Github Discussions](https://img.shields.io/static/v1?color=1f2328&logo=github&logoColor=fff&label&message=Github%20Discussions)](https://github.com/liihuu/KLineChart/discussions)
[![Telegram](https://img.shields.io/static/v1?color=1296DB&logo=telegram&logoColor=fff&label&message=Telegram)](https://t.me/+098syuQtzI0yNzll)
[![Discord](https://img.shields.io/static/v1?color=738BD8&logo=discord&logoColor=fff&label&message=Discord)](https://discord.gg/7YjHYgvvvZ)
[![Issues](https://img.shields.io/static/v1?color=1f2328&logo=github&logoColor=fff&label&message=Github%20Issues)](https://github.com/liihuu/KLineChart/issues)
[![Discussions](https://img.shields.io/static/v1?color=1f2328&logo=github&logoColor=fff&label&message=Github%20Discussions)](https://github.com/liihuu/KLineChart/discussions)
[![Telegram](https://img.shields.io/static/v1?color=1296DB&logo=telegram&logoColor=fff&label&message=Telegram)](https://t.me/klinecharts)
[![Wechat](https://img.shields.io/static/v1?color=1EBE1F&logo=wechat&logoColor=fff&label&message=Wechat)](https://klinecharts.com/en-US/guide/feedback.html)
<!-- [![Discord](https://img.shields.io/static/v1?color=738BD8&logo=discord&logoColor=fff&label&message=Discord)](https://discord.gg/7YjHYgvvvZ) -->
<!-- [![Twitter](https://img.shields.io/static/v1?color=1D9BF0&logo=twitter&logoColor=fff&label&message=Twitter)](https://twitter.com/klinecharts) -->


Expand Down
12 changes: 5 additions & 7 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,23 @@
[![npms.io (maintenance)](https://img.shields.io/npms-io/quality-score/klinecharts)](https://www.npmjs.com/package/klinecharts)
[![Typescript](https://badgen.net/npm/types/klinecharts)](types/index.d.ts)
[![LICENSE](https://badgen.net/github/license/liihuu/KLineChart)](LICENSE)
[![Docs](https://badgen.net/badge/docs%20by/vitepress/10B981)](https://vitepress.dev/)
[![Docs](https://badgen.net/badge/docs%20by/vitepress/bd34fe)](https://vitepress.dev/)

</div>

<div align="center">

[![Github Issues](https://img.shields.io/static/v1?color=1f2328&logo=github&logoColor=fff&label&message=Github%20Issues)](https://github.com/liihuu/KLineChart/issues)
[![Github Discussions](https://img.shields.io/static/v1?color=1f2328&logo=github&logoColor=fff&label&message=Github%20Discussions)](https://github.com/liihuu/KLineChart/discussions)
[![Telegram](https://img.shields.io/static/v1?color=1296DB&logo=telegram&logoColor=fff&label&message=Telegram)](https://t.me/+098syuQtzI0yNzll)
[![Discord](https://img.shields.io/static/v1?color=738BD8&logo=discord&logoColor=fff&label&message=Discord)](https://discord.gg/7YjHYgvvvZ)
[![Issues](https://img.shields.io/static/v1?color=1f2328&logo=github&logoColor=fff&label&message=Github%20Issues)](https://github.com/liihuu/KLineChart/issues)
[![Discussions](https://img.shields.io/static/v1?color=1f2328&logo=github&logoColor=fff&label&message=Github%20Discussions)](https://github.com/liihuu/KLineChart/discussions)
[![Telegram](https://img.shields.io/static/v1?color=1296DB&logo=telegram&logoColor=fff&label&message=Telegram)](https://t.me/klinecharts)
[![Wechat](https://img.shields.io/static/v1?color=1EBE1F&logo=wechat&logoColor=fff&label&message=微信)](https://klinecharts.com/guide/feedback.html)
<!-- [![Discord](https://img.shields.io/static/v1?color=738BD8&logo=discord&logoColor=fff&label&message=Discord)](https://discord.gg/7YjHYgvvvZ) -->
<!-- [![Twitter](https://img.shields.io/static/v1?color=1D9BF0&logo=twitter&logoColor=fff&label&message=Twitter)](https://twitter.com/klinecharts) -->

</div>

<img src="https://cdn.nlark.com/yuque/0/2023/png/8403091/1684399506365-assets/web-upload/044fe897-168c-4fbb-a485-87a8ef61c04a.png" />

简体中文 | [English](./README.md)

## ✨ 特性
+ 📦 **开箱即用:** 简单快速集成,基本零成本上手。
+ 🚀 **轻量流畅:** 零依赖,Gzip压缩下仅40k。
Expand Down
15 changes: 15 additions & 0 deletions docs/.vitepress/components/Badge.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<template>
<span class="Badge"><slot></slot></span>
</template>

<style scoped>
.Badge {
vertical-align: middle;
padding: 3px 6px;
font-size: 12px;
border-radius: 3px;
background-color: var(--vp-c-indigo-1);
margin: auto;
color: #fff;
}
</style>
94 changes: 94 additions & 0 deletions docs/.vitepress/components/Banner.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
<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>邮箱([email protected])</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([email protected])</strong> .</span>
<button class="banner-close" @click.prevent="closeBanner">
<span class="close">&times;</span>
</button>
</div>
</template>

<script setup>
import { ref, onMounted } from 'vue'
import { useData } from 'vitepress'
const isVisible = ref(true)
const { lang } = useData()
const closeBanner = () => {
isVisible.value = false
document.documentElement.classList.remove('banner-fixed')
}
onMounted(() => {
if (isVisible.value) {
document.documentElement.classList.add('banner-fixed')
}
})
</script>
<style scoped>
.banner {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
position: fixed;
padding: 0 12px;
top: 0;
bottom: 0;
left: 0;
right: 0;
z-index: 61;
width: 100%;
height: 100%;
height: 50px;
background: var(--vp-c-bg);
overflow: hidden;
margin: 0;
color: #F92855;
font-size: 14px;
border-bottom: solid 1px var(--vp-c-gutter);
}
.banner-close {
position: absolute;
right: 16px;
color: var(--vp-c-text-1);
font-size: 20px;
font-weight: bold;
display: flex;
align-items: center;
justify-content: center;
}
.banner-close > .close {
font-size: 20px;
font-weight: 500;
}
@media (max-width: 767px) {
.banner {
font-size: 12px;
}
}
</style>

<style>
html.banner-fixed {
--vp-layout-top-height: 50px;
}
html.banner-fixed .VPNav,
html.banner-fixed .VPSidebar {
top: 50px;
}
html.banner-fixed {
margin-top: 52px;
}
@media (max-width: 960px) {
html.banner-fixed .VPNav,
html.banner-fixed .VPSidebar {
top: 0;
}
}
</style>
32 changes: 30 additions & 2 deletions docs/.vitepress/components/HomeSponsor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,23 @@
{{ lang === 'zh-CN' ? '成为赞助商' : 'Become a sponsor' }}
</a> -->
</div>
<h4 v-if="platinum.length > 0">{{ lang === 'zh-CN' ? '铂金赞助商' : 'Platinum Sponsors' }}</h4>
<!-- <h4 v-if="platinum.length > 0">{{ lang === 'zh-CN' ? '铂金赞助商' : 'Platinum Sponsors' }}</h4> -->
<div v-if="platinum.length > 0" class="sponsor-grid sponsor-platinum-grid">
<a v-for="item in platinum" class="sponsor-grid-item item" target="_blank" rel="noreferrer" :href="item.website">
<img class="image" :src="item.logo"/>
</a>
</div>
<h4 v-if="gold.length > 0">{{ lang === 'zh-CN' ? '黄金赞助商' : 'Gold Sponsors' }}</h4>
<!-- <h4 v-if="gold.length > 0">{{ lang === 'zh-CN' ? '黄金赞助商' : 'Gold Sponsors' }}</h4> -->
<div v-if="gold.length > 0" class="sponsor-grid sponsor-gold-grid">
<a v-for="item in gold" class="sponsor-grid-item item" target="_blank" rel="noreferrer" :href="item.website">
<img class="image" :src="item.logo"/>
</a>
</div>
<div class="sponsor-become">
<a target="_blank" rel="noreferrer" href="./sponsor.html">
{{ lang === 'zh-CN' ? '成为赞助商' : 'Become a sponsor' }}
</a>
</div>
</div>
</section>
</template>
Expand Down Expand Up @@ -158,6 +163,29 @@
height: 16px;
}
.sponsor-become {
display: flex;
flex-direction: row;
justify-content: center;
padding-top: 26px;
font-size: 14px;
color: var(--vp-c-indigo-1);
font-weight: bold;
}
.sponsor-become a {
padding: 8px 22px;
border-radius: 99px;
transition: all .25s ease-in;
text-decoration: underline;
}
.sponsor-become a:hover {
background-color: var(--vp-c-indigo-1);
color: white;
text-decoration: none;
}
@media (min-width: 640px) {
.sponsor-platinum-grid .item {
width: calc((100% - 12px) / 3);
Expand Down
Loading

0 comments on commit 773da8f

Please sign in to comment.