feat(docs): Add guide index page

This commit is contained in:
Braks
2022-04-04 21:42:48 +02:00
parent ae18d231b0
commit 3bc0e878a2
5 changed files with 78 additions and 9 deletions
+18 -1
View File
@@ -143,7 +143,7 @@ onPaneReady(({ fitView }) => {
</VueFlow> </VueFlow>
</div> </div>
</template> </template>
<style scoped> <style>
.intro { .intro {
@apply cursor-pointer @apply cursor-pointer
bg-green-500 bg-green-500
@@ -175,4 +175,21 @@ onPaneReady(({ fitView }) => {
button:focus { button:focus {
outline: none; outline: none;
} }
h1 {
@apply text-xl lg:text-4xl mb-4 font-bold;
}
h2 {
@apply text-lg lg:text-2xl mb-4 font-semibold;
}
p {
@apply text-md lg:text-lg;
}
p ~ h1,
p ~ h2 {
@apply mt-6;
}
</style> </style>
+19 -5
View File
@@ -1,12 +1,14 @@
:root { :root {
--primary: #BB86FC; --primary: #BB86FC;
--secondary: #03dac5; --secondary: #03dac5;
--content-width: 100%;
} }
.dark { .dark {
--c-text-lighter: white !important; --c-text-lighter: white !important;
--c-text: white !important; --c-text: white !important;
--c-bg: black !important;
--c-bg-light: rgba(17, 24, 39, var(--tw-bg-opacity)) !important;
--c-bg-lighter: rgba(17, 24, 39, var(--tw-bg-opacity)) !important;
} }
html, body { html, body {
@@ -14,14 +16,24 @@ html, body {
} }
.home { .home {
--content-width: 100%;
max-width: 100% !important; max-width: 100% !important;
@apply !px-0; @apply !px-0;
} }
.page, .page-meta, .footer, .sidebar { .page a {
@apply text-green-500 font-semibold;
}
.examples .page, .examples .page-meta, .footer, .sidebar {
@apply dark:(!bg-black text-white); @apply dark:(!bg-black text-white);
} }
.examples .page {
--content-width: 100%;
@apply max-w-3/4;
}
.theme-default-content { .theme-default-content {
@apply overflow-scroll md:overflow-hidden; @apply overflow-scroll md:overflow-hidden;
} }
@@ -39,11 +51,13 @@ h2 {
} }
p { p {
@apply text-md lg:text-lg font-qtype; @apply text-md lg:text-lg;
line-height: inherit;
margin: inherit;
} }
p ~ h1, p ~ h2 { ul li {
@apply mt-6; @apply mt-2;
} }
.vue-flow__node.dark { .vue-flow__node.dark {
+1 -2
View File
@@ -16,9 +16,8 @@ import ParentLayout from '@vuepress/theme-default/lib/client/layouts/Layout.vue'
</template> </template>
<style> <style>
.page-footer { .page-footer {
@apply dark:(text-white bg-black) pt-[2rem]; @apply dark:(text-white bg-black) pt-[2rem] text-center;
border-top: 1px solid var(--c-border); border-top: 1px solid var(--c-border);
text-align: center;
transition: border-color var(--t-color); transition: border-color var(--t-color);
} }
</style> </style>
+1 -1
View File
@@ -1,6 +1,6 @@
--- ---
title: Basic Example title: Basic Example
tags: ['examples', 'basic', 'get-started', 'quickstart'] pageClass: examples
--- ---
# Basic Example # Basic Example
+39
View File
@@ -0,0 +1,39 @@
---
title: Introduction
---
# Introduction
Vue Flow is a library for building node-based applications. These can be simple static diagrams or complex node-based
editors. You can implement custom nodes and edges. It also comes with components like a mini-map, zoom pane controls and
a background.
Check out the [examples](/examples/) if you want to dive directly into the code.
# Features
- 👶 __Easy to use__: Seamless zooming & panning behaviour and single and multi-selections of
elements
- 🎨 __Customizable__: Different and edge types and support for custom nodes with multiple handles and custom edges
- 🚀 __Fast rendering__: Only nodes that have changed are re-rendered and only those that are in the viewport are displayed (optionally)
- 🧲 __Handy utilities__: Comes with graph helper and state composable functions for advanced uses
- 📦 __Additional Components__:
- 🖼 Background: With two built-in patterns and some configuration options like height, width or color.
- 🧭 Minimap: Shows current nodes in a small map shape in the bottom right corner
- 🕹 Controls: Control zoom behavior from a panel on the bottom left
- 🦾 __Reliable__: Fully written in TypeScript
::: warning
Vue Flow is still version 0.x.x.
Expect breaking changes between versions!
:::