diff --git a/README.md b/README.md index 65cb5e0b..37c385ad 100644 --- a/README.md +++ b/README.md @@ -114,7 +114,7 @@ Check out [CONTRIBUTING.md](CONTRIBUTING.md) for more details. ## Compare to others -| Features | GPUI Component | [Iced] | [egui] | [QT 6] | +| Features | GPUI Component | [Iced] | [egui] | [Qt 6] | | --------------------- | ------------------------------ | ------------------ | --------------------- | ------------------------------------------------- | | Language | Rust | Rust | Rust | C++/QML | | Core Render | GPUI | wgpu | wgpu | QT | @@ -135,7 +135,7 @@ Check out [CONTRIBUTING.md](CONTRIBUTING.md) for more details. | Markdown Rendering | Yes | Yes | Basic | No | | Markdown mix HTML | Yes | No | No | No | | HTML Rendering | Basic | No | No | Basic | -| Text Selection | TextView | No | Any Label | No | +| Text Selection | TextView | No | Any Label | Yes | | Custom Theme | Yes | Yes | Yes | Yes | | Built Themes | Yes | No | No | No | | I18n | Yes | Yes | Yes | Yes | diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index 4654247e..ce117cc6 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -93,13 +93,14 @@ const config: UserConfig = { }, ], }, + { + component: "GitHubStar", + }, ], sidebar: sidebar as any, - socialLinks: [ - { icon: "github", link: "https://github.com/longbridge/gpui-component" }, - ], + socialLinks: null, editLink: { pattern: "https://github.com/longbridge/gpui-component/edit/main/docs/:path", diff --git a/docs/.vitepress/theme/components/GitHubStar.vue b/docs/.vitepress/theme/components/GitHubStar.vue new file mode 100644 index 00000000..a750fe04 --- /dev/null +++ b/docs/.vitepress/theme/components/GitHubStar.vue @@ -0,0 +1,40 @@ + + + + + diff --git a/docs/.vitepress/theme/index.ts b/docs/.vitepress/theme/index.ts index f90bd40b..347202bb 100644 --- a/docs/.vitepress/theme/index.ts +++ b/docs/.vitepress/theme/index.ts @@ -3,7 +3,9 @@ import { h } from "vue"; import type { Theme } from "vitepress"; import DefaultTheme from "vitepress/theme"; import "./style.css"; +import GitHubStar from "./components/GitHubStar.vue"; +/** @type {import('vitepress').Theme} */ export default { extends: DefaultTheme, Layout: () => { @@ -13,5 +15,6 @@ export default { }, enhanceApp({ app, router, siteData }) { // ... + app.component("GitHubStar", GitHubStar); }, } satisfies Theme; diff --git a/docs/.vitepress/theme/style.css b/docs/.vitepress/theme/style.css index a61bd0a7..003280fd 100644 --- a/docs/.vitepress/theme/style.css +++ b/docs/.vitepress/theme/style.css @@ -54,6 +54,8 @@ --vp-custom-block-tip-text: var(--vp-c-text-1); --vp-custom-block-tip-bg: transparent; --vp-custom-block-tip-code-bg: var(--vp-c-default-soft); + --vp-input-switch-bg-color: var(--secondary); + --vp-input-border-color: var(--input); } .dark { @@ -94,6 +96,20 @@ border-right: 1px solid var(--border); } +#app { + .VPMenu { + @apply p-1 rounded-md bg-[var(--popover)]; + + .link { + @apply text-sm py-1; + } + } + + .DocSearch-Button { + @apply rounded-md py-0 px-2 h-8 lg:w-56 xl:w-64; + } +} + .vp-doc { [class*="language-"] pre { @apply rounded-md py-5 text-base font-mono; diff --git a/docs/contributors.vue b/docs/contributors.vue index b8c5e560..d366b91b 100644 --- a/docs/contributors.vue +++ b/docs/contributors.vue @@ -22,18 +22,8 @@