Skip to content

Commit 28fd495

Browse files
committed
docs: update theme
1 parent be70047 commit 28fd495

File tree

11 files changed

+260
-134
lines changed

11 files changed

+260
-134
lines changed

docs/components/home/Features.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ onBeforeUnmount(stop)
2727
<template>
2828
<div ref="el" class="w-full">
2929
<div
30-
class="flex flex-col divide-y divide-gray-500 md:divide-y-0 gap-12 md:gap-24 lg:gap-36 max-w-9/12 md:max-w-11/12 lg:max-w-9/12 m-auto py-12 md:py-24 text-center md:text-left"
30+
class="flex flex-col divide-y divide-gray-500 md:divide-y-0 gap-12 md:gap-24 lg:gap-36 max-w-5/6 xl:max-w-7xl m-auto py-12 md:py-24 text-center md:text-left"
3131
>
3232
<div class="flex flex-col md:flex-row gap-12 md:gap-24">
3333
<Basic @pane="onLoad" />

docs/components/home/Showcase.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
<template>
44
<div class="w-full">
5-
<div class="max-w-3/4 md:max-w-5xl mx-auto py-4 md:py-12 lg:py-12 text-center">
5+
<div class="max-w-5/6 lg:max-w-7xl mx-auto py-4 md:py-12 lg:py-12 text-center">
66
<div class="flex flex-col items-center justify-center gap-2">
77
<h1>Showcase</h1>
88

99
<p class="text-lg">Vue Flow is used in a variety of projects and applications. Here are some of them:</p>
1010

11-
<div class="flex flex-col md:flex-row justify-between gap-12 mt-8">
11+
<div class="flex flex-col md:flex-row justify-between items-center gap-12 mt-8">
1212
<div class="flex-1 flex flex-col justify-center">
1313
<div
1414
class="h-[200px] md:min-h-[300px] w-full shadow-xl rounded-xl font-mono uppercase border-1 border-gray overflow-hidden"
@@ -20,7 +20,7 @@
2020
<h2 class="text-3xl mt-6 font-semibold text-[#2196f3]">Octai</h2>
2121
</a>
2222

23-
<h3 class="text-lg">Machine Learning NoCode Platform for Data Scientists and Developers.</h3>
23+
<h3 class="text-lg">A Machine-Learning NoCode platform using a node-based UI for Data Scientists and Developers.</h3>
2424
</div>
2525

2626
<div class="flex-1 flex flex-col justify-center">

docs/components/home/Team.vue

Lines changed: 0 additions & 19 deletions
This file was deleted.

docs/components/home/flows/Additional.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,16 +101,19 @@ onPaneReady((i) => emit('pane', i))
101101
<Background variant="lines" pattern-color="#aaa" :gap="46" />
102102
</VueFlow>
103103
</div>
104+
104105
<div class="md:max-w-1/3 flex flex-col gap-12 justify-center <md:pt-12">
105106
<div class="flex flex-col gap-2 items-center md:items-start">
106107
<h1>Additional Features</h1>
108+
107109
<p>
108110
On top of all the features Vue Flow comes with several components like a Background, Minimap or Controls.
109111

110112
<br />
111113
Plus it's built for composition, making the access of the internal state easy as can be!
112114
</p>
113-
<a class="docs-button max-w-max" href="/guide/"> Documentation </a>
115+
116+
<a class="docs-button" href="/guide/"> Documentation </a>
114117
</div>
115118
</div>
116119
</template>

docs/components/home/flows/Basic.vue

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ const emit = defineEmits(['pane'])
1111
const getNodeClass: ClassFunc<GraphNode> = (el) => {
1212
const classes = ['font-semibold', '!border-2', 'transition-colors', 'duration-300', 'ease-in-out']
1313
if (el.selected) {
14-
classes.push(
15-
...['!border-green-500/80', '!shadow-md', '!shadow-green-500/50', '!bg-green-100/80 dark:(!bg-white)', '!text-gray-700'],
16-
)
14+
classes.push(...['!border-primary/80', '!shadow-md', '!shadow-primary/50', '!bg-primary-100/50', '!text-gray-700'])
1715
}
1816
1917
return classes.join(' ')
@@ -111,13 +109,16 @@ onConnect((param) => {
111109
<div class="md:max-w-1/3 flex flex-col justify-center">
112110
<div class="flex flex-col items-center md:items-start">
113111
<h1>Interactive Graphs</h1>
112+
114113
<p>
115114
Vue Flow comes with built-in features like zoom & pan and dedicated controls, single & multi-selections, draggable
116115
elements, customizable nodes and edges and a bunch of event handlers.
117116
</p>
118-
<a class="docs-button max-w-max" href="/guide/"> Documentation </a>
117+
118+
<a class="docs-button" href="/guide/"> Documentation </a>
119119
</div>
120120
</div>
121+
121122
<div
122123
class="w-full h-[300px] md:min-h-[400px] shadow-xl rounded-xl font-mono uppercase border-1 border-secondary overflow-hidden"
123124
>
@@ -134,14 +135,14 @@ onConnect((param) => {
134135

135136
<style>
136137
.basic .vue-flow__node-input.selected .vue-flow__handle {
137-
@apply bg-green-500;
138+
@apply bg-primary;
138139
}
139140
140141
.basic .vue-flow__node-default.selected .vue-flow__handle {
141-
@apply bg-green-500;
142+
@apply bg-primary;
142143
}
143144
144145
.basic .vue-flow__node-output.selected .vue-flow__handle {
145-
@apply bg-green-500;
146+
@apply bg-primary;
146147
}
147148
</style>

docs/components/home/flows/Intro.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ function scrollTo() {
243243

244244
<template v-else-if="props.id === 'examples'">
245245
<div class="flex">
246-
<a class="intro-link group bg-[#ef467e]" href="/examples/"> Check The Examples </a>
246+
<a class="intro-link group bg-pink-500" href="/examples/"> Check The Examples </a>
247247
</div>
248248

249249
<Handle
@@ -278,7 +278,7 @@ function scrollTo() {
278278
<style>
279279
.intro {
280280
@apply cursor-pointer
281-
bg-green-500
281+
bg-primary
282282
text-white
283283
transform
284284
transition-transform

docs/components/home/flows/Nested.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const emit = defineEmits(['pane'])
99
const breakpoints = useBreakpoints(breakpointsTailwind)
1010
1111
const nodeClasses = ['!normal-case font-semibold !text-white', '!border-1', 'shadow-md'].join(' ')
12-
const childClasses = `${nodeClasses} !bg-green-500/70 !border-white`
12+
const childClasses = `${nodeClasses} !bg-primary-500/70 !border-white`
1313
1414
const { onPaneReady, panOnDrag } = useVueFlow({
1515
fitViewOnInit: true,
@@ -27,7 +27,7 @@ const { onPaneReady, panOnDrag } = useVueFlow({
2727
id: '2',
2828
label: 'Parent Node',
2929
position: { x: -125, y: 100 },
30-
class: `${nodeClasses} !bg-green-500/30 !border-green-500`,
30+
class: `${nodeClasses} !bg-primary-500/30 !border-primary-500`,
3131
style: { width: '400px', height: '160px' },
3232
},
3333
{
@@ -72,7 +72,7 @@ onPaneReady((i) => emit('pane', i))
7272
</div>
7373
</div>
7474
<div
75-
class="w-full h-[300px] md:min-h-[400px] shadow-xl rounded-xl font-mono uppercase border-1 border-green-500 overflow-hidden"
75+
class="w-full h-[300px] md:min-h-[400px] shadow-xl rounded-xl font-mono uppercase border-1 border-primary-500 overflow-hidden"
7676
>
7777
<VueFlow class="nested">
7878
<Controls class="md:(!left-auto !right-[10px])" />

docs/src/.vitepress/theme/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ import '@vue-flow/core/dist/style.css'
66
import '@vue-flow/core/dist/theme-default.css'
77
import '@vue-flow/controls/dist/style.css'
88
import '@vue-flow/minimap/dist/style.css'
9-
import './../../assets/index.css'
109

1110
import Theme from 'vitepress/theme'
1211
import Layout from './layouts/default.vue'
12+
import './style.css'
1313

1414
export default {
1515
extends: Theme,

docs/src/.vitepress/theme/style.css

Lines changed: 202 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,202 @@
1+
/**
2+
* Customize default theme styling by overriding CSS variables:
3+
* https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/vars.css
4+
*/
5+
6+
/**
7+
* Colors
8+
*
9+
* Each colors have exact same color scale system with 3 levels of solid
10+
* colors with different brightness, and 1 soft color.
11+
*
12+
* - `XXX-1`: The most solid color used mainly for colored text. It must
13+
* satisfy the contrast ratio against when used on top of `XXX-soft`.
14+
*
15+
* - `XXX-2`: The color used mainly for hover state of the button.
16+
*
17+
* - `XXX-3`: The color for solid background, such as bg color of the button.
18+
* It must satisfy the contrast ratio with pure white (#ffffff) text on
19+
* top of it.
20+
*
21+
* - `XXX-soft`: The color used for subtle background such as custom container
22+
* or badges. It must satisfy the contrast ratio when putting `XXX-1` colors
23+
* on top of it.
24+
*
25+
* The soft color must be semi transparent alpha channel. This is crucial
26+
* because it allows adding multiple "soft" colors on top of each other
27+
* to create a accent, such as when having inline code block inside
28+
* custom containers.
29+
*
30+
* - `default`: The color used purely for subtle indication without any
31+
* special meanings attched to it such as bg color for menu hover state.
32+
*
33+
* - `brand`: Used for primary brand colors, such as link text, button with
34+
* brand theme, etc.
35+
*
36+
* - `tip`: Used to indicate useful information. The default theme uses the
37+
* brand color for this by default.
38+
*
39+
* - `warning`: Used to indicate warning to the users. Used in custom
40+
* container, badges, etc.
41+
*
42+
* - `danger`: Used to show error, or dangerous message to the users. Used
43+
* in custom container, badges, etc.
44+
* -------------------------------------------------------------------------- */
45+
46+
:root {
47+
--vp-c-default-1: var(--vp-c-gray-1);
48+
--vp-c-default-2: var(--vp-c-gray-2);
49+
--vp-c-default-3: var(--vp-c-gray-3);
50+
--vp-c-default-soft: var(--vp-c-gray-soft);
51+
52+
--vp-c-brand-1: #42B983;
53+
--vp-c-brand-2: #339066;
54+
--vp-c-brand-3: #246648;
55+
--vp-c-brand-soft: #35495E;
56+
57+
--vp-c-tip-1: var(--vp-c-brand-1);
58+
--vp-c-tip-2: var(--vp-c-brand-2);
59+
--vp-c-tip-3: var(--vp-c-brand-3);
60+
--vp-c-tip-soft: var(--vp-c-brand-soft);
61+
62+
--vp-c-warning-1: var(--vp-c-yellow-1);
63+
--vp-c-warning-2: var(--vp-c-yellow-2);
64+
--vp-c-warning-3: var(--vp-c-yellow-3);
65+
--vp-c-warning-soft: var(--vp-c-yellow-soft);
66+
67+
--vp-c-danger-1: var(--vp-c-red-1);
68+
--vp-c-danger-2: var(--vp-c-red-2);
69+
--vp-c-danger-3: var(--vp-c-red-3);
70+
--vp-c-danger-soft: var(--vp-c-red-soft);
71+
}
72+
73+
/**
74+
* Component: Button
75+
* -------------------------------------------------------------------------- */
76+
77+
:root {
78+
--vp-button-brand-border: transparent;
79+
--vp-button-brand-text: var(--vp-c-white);
80+
--vp-button-brand-bg: var(--vp-c-brand-3);
81+
--vp-button-brand-hover-border: transparent;
82+
--vp-button-brand-hover-text: var(--vp-c-white);
83+
--vp-button-brand-hover-bg: var(--vp-c-brand-2);
84+
--vp-button-brand-active-border: transparent;
85+
--vp-button-brand-active-text: var(--vp-c-white);
86+
--vp-button-brand-active-bg: var(--vp-c-brand-1);
87+
}
88+
89+
/**
90+
* Component: Home
91+
* -------------------------------------------------------------------------- */
92+
93+
:root {
94+
--vp-home-hero-name-color: transparent;
95+
--vp-home-hero-name-background: -webkit-linear-gradient(
96+
120deg,
97+
#bd34fe 30%,
98+
#41d1ff
99+
);
100+
101+
--vp-home-hero-image-background-image: linear-gradient(
102+
-45deg,
103+
#bd34fe 50%,
104+
#47caff 50%
105+
);
106+
--vp-home-hero-image-filter: blur(40px);
107+
}
108+
109+
@media (min-width: 640px) {
110+
:root {
111+
--vp-home-hero-image-filter: blur(56px);
112+
}
113+
}
114+
115+
@media (min-width: 960px) {
116+
:root {
117+
--vp-home-hero-image-filter: blur(72px);
118+
}
119+
}
120+
121+
/**
122+
* Component: Custom Block
123+
* -------------------------------------------------------------------------- */
124+
125+
:root {
126+
--primary: #42B983;
127+
--secondary: #35495E;
128+
--vp-custom-block-tip-border: transparent;
129+
--vp-custom-block-tip-text: white;
130+
--vp-custom-block-tip-bg: var(--vp-c-brand-soft);
131+
--vp-custom-block-tip-code-bg: var(--vp-c-brand-soft);
132+
}
133+
134+
/**
135+
* Component: Algolia
136+
* -------------------------------------------------------------------------- */
137+
138+
.DocSearch {
139+
--docsearch-primary-color: var(--vp-c-brand-1) !important;
140+
}
141+
142+
.VPHome {
143+
padding-bottom: 0 !important;
144+
}
145+
146+
.VPNavBar.has-sidebar .content, .VPNav {
147+
background-color: rgba(var(--vp-c-bg), 0.75);
148+
backdrop-filter: blur(1px);
149+
}
150+
151+
.examples .VPDoc {
152+
@apply !px-8 !py-6;
153+
}
154+
155+
.examples .content-container {
156+
@apply !w-full !max-w-7xl;
157+
}
158+
159+
.examples .aside {
160+
@apply !hidden;
161+
}
162+
163+
html, body {
164+
@apply scrollbar scrollbar-thin scrollbar-thumb-rounded scrollbar-thumb-green-500 scrollbar-track-black;
165+
}
166+
167+
ul li {
168+
@apply mt-2;
169+
}
170+
171+
.docs-button {
172+
@apply mt-4 z-1 shadow-lg transition-colors duration-200 text-white font-semibold text-lg px-4 py-3 rounded-lg bg-accent dark:shadow-white/10;
173+
}
174+
175+
.examples-button {
176+
@apply z-1 shadow-lg transition-colors duration-200 font-semibold text-lg text-white px-4 py-3 rounded-lg bg-primary dark:shadow-white/10;
177+
}
178+
179+
.slider {
180+
--color: red;
181+
@apply bg-gray-200 w-full h-[10px] outline-none rounded-full;
182+
-webkit-appearance: none;
183+
appearance: none;
184+
185+
&::-moz-range-thumb {
186+
@apply w-[15px] h-[15px] cursor-pointer border-1 border-solid border-white rounded-full;
187+
-webkit-appearance: none;
188+
background: var(--color);
189+
}
190+
&::-webkit-slider-thumb {
191+
@apply w-[15px] h-[15px] cursor-pointer border-1 border-solid border-white rounded-full;
192+
-webkit-appearance: none;
193+
background: var(--color);
194+
}
195+
}
196+
197+
.vue-repl pre, .vue-repl pre[class*=language-] {
198+
padding: unset;
199+
margin: unset;
200+
border-radius: unset;
201+
line-height: unset;
202+
}

0 commit comments

Comments
 (0)