|
| 1 | +import React, { useEffect } from 'react'; |
| 2 | +import AnimationCarousel from './animations/AnimationCarousel'; |
| 3 | + |
| 4 | +import { Activity, GitCompareArrows, Server, ArrowRight } from 'lucide-react'; |
| 5 | + |
| 6 | +import { Lottie } from './LightFeatureCard'; |
| 7 | +// @ts-ignore |
| 8 | +import deployAtScale from '/illustrations/deploy_at_scale.json'; |
| 9 | +import { ArrowLongDownIcon } from '@heroicons/react/20/solid'; |
| 10 | +import Window from './animations/Window'; |
| 11 | +import { twMerge } from 'tailwind-merge'; |
| 12 | + |
| 13 | +export default function TutorialSection() { |
| 14 | + const containerRef = React.useRef<HTMLDivElement>(null); |
| 15 | + |
| 16 | + const [currentIndex, setCurrentIndex] = React.useState(0); |
| 17 | + |
| 18 | + return ( |
| 19 | + <> |
| 20 | + <div |
| 21 | + className="flex flex-col relative max-w-7xl px-4 lg:px-8 mx-auto w-full" |
| 22 | + ref={containerRef} |
| 23 | + > |
| 24 | + <div className="dark:bg-gray-900 bg-gray-50 w-full p-4 rounded-xl"> |
| 25 | + <div className="flex flex-col justify-between items-center"> |
| 26 | + <div className="font-light text-2xl mb-4 max-w-2xl"> |
| 27 | + {'Develop and iterate with instant feedback'} |
| 28 | + </div> |
| 29 | + <div className="flex flex-row items-start my-2 gap-2 w-full"> |
| 30 | + <div |
| 31 | + onClick={() => setCurrentIndex(0)} |
| 32 | + className={twMerge( |
| 33 | + 'cursor-pointer px-2 py-1 border-b-2 hover:bg-opacity-50 ', |
| 34 | + currentIndex === 0 ? ' border-blue-600' : 'border-blue-800' |
| 35 | + )} |
| 36 | + > |
| 37 | + Scripts |
| 38 | + </div> |
| 39 | + <div |
| 40 | + onClick={() => setCurrentIndex(1)} |
| 41 | + className={twMerge( |
| 42 | + 'cursor-pointer px-2 py-1 border-b-2 hover:bg-opacity-50 ', |
| 43 | + currentIndex === 1 ? ' border-emerald-600' : 'border-emerald-800' |
| 44 | + )} |
| 45 | + > |
| 46 | + Flows |
| 47 | + </div> |
| 48 | + <div |
| 49 | + onClick={() => setCurrentIndex(2)} |
| 50 | + className={twMerge( |
| 51 | + 'cursor-pointer px-2 py-1 border-b-2 hover:bg-opacity-50 ', |
| 52 | + currentIndex === 2 ? ' border-orange-600' : 'border-orange-800' |
| 53 | + )} |
| 54 | + > |
| 55 | + Apps |
| 56 | + </div> |
| 57 | + </div> |
| 58 | + |
| 59 | + {currentIndex === 0 && ( |
| 60 | + <div className="flex flex-row items-start "> |
| 61 | + <div className="bg-gradient-to-br from-blue-200 to-sky-400 dark:from-blue-700 dark:to-sky-600 w-full rounded-lg p-2 shadow-inner overflow-hidden h-full"> |
| 62 | + <Window |
| 63 | + shouldRender={true} |
| 64 | + name="Scripts | Windmill" |
| 65 | + icon="/third_party_logos/firefox.svg" |
| 66 | + className="h-min" |
| 67 | + > |
| 68 | + <img src="/images/script_example.png" alt="Scripts" /> |
| 69 | + </Window> |
| 70 | + </div> |
| 71 | + </div> |
| 72 | + )} |
| 73 | + {currentIndex === 1 && ( |
| 74 | + <div className="flex flex-row items-start "> |
| 75 | + <div className="bg-gradient-to-br from-emerald-200 to-emerald-400 dark:from-emerald-500 dark:to-emerald-600 w-full rounded-lg p-2 shadow-inner overflow-hidden "> |
| 76 | + <Window |
| 77 | + shouldRender={true} |
| 78 | + name="Flows | Windmill" |
| 79 | + icon="/third_party_logos/firefox.svg" |
| 80 | + className="h-min" |
| 81 | + > |
| 82 | + <img src="/images/flow_example.png" alt="Flows" /> |
| 83 | + </Window> |
| 84 | + </div> |
| 85 | + </div> |
| 86 | + )} |
| 87 | + {currentIndex === 2 && ( |
| 88 | + <div className="flex flex-row items-start "> |
| 89 | + <div className="bg-gradient-to-br from-orange-200 to-orange-400 dark:from-orange-700 dark:to-orange-600 w-full rounded-lg p-2 shadow-inner overflow-hidden "> |
| 90 | + <Window |
| 91 | + shouldRender={true} |
| 92 | + name="Apps | Windmill" |
| 93 | + icon="/third_party_logos/firefox.svg" |
| 94 | + className="h-min" |
| 95 | + > |
| 96 | + <img src="/images/app_example.png" alt="Apps" /> |
| 97 | + </Window> |
| 98 | + </div> |
| 99 | + </div> |
| 100 | + )} |
| 101 | + |
| 102 | + <div className="text-opacity-50 text-sm">Animation available on desktop</div> |
| 103 | + </div> |
| 104 | + </div> |
| 105 | + <div className="h-20 w-full flex justify-center my-2 py-2"> |
| 106 | + <ArrowLongDownIcon className="text-gray-200 dark:text-gray-700" /> |
| 107 | + </div> |
| 108 | + </div> |
| 109 | + <div className="max-w-7xl px-4 lg:px-8 mx-auto flex justify-center items-center h-full flex-col"> |
| 110 | + <div className="dark:bg-gray-900 bg-gray-50 w-full p-4 rounded-xl grid grid-cols-1 md:grid-cols-5 gap-8"> |
| 111 | + <a |
| 112 | + href="/docs/core_concepts/draft_and_deploy#diff-viewer" |
| 113 | + target="_blank" |
| 114 | + className="col-span-2 group text-black dark:text-white !no-underline hover:text-black hover:dark:text-white cursor-pointer " |
| 115 | + > |
| 116 | + <div className="font-medium text-xl mb-6 group-hover:ml-2 transition-all flex flex-row items-center gap-2 "> |
| 117 | + <GitCompareArrows size={20} /> |
| 118 | + Review |
| 119 | + </div> |
| 120 | + <div className="text-md mb-4 group-hover:ml-2 transition-all max-w-sm"> |
| 121 | + {'Use the built-in diff viewer, GitHub PRs or GitLab MRs to review changes.'} |
| 122 | + </div> |
| 123 | + <div |
| 124 | + className={`text-sm text-blue-500 dark:text-blue-300 flex flex-row items-center gap-2 group-hover:ml-2 transition-all`} |
| 125 | + > |
| 126 | + Learn more |
| 127 | + <ArrowRight size={24} /> |
| 128 | + </div> |
| 129 | + </a> |
| 130 | + <div className="col-span-3"> |
| 131 | + <div className="rounded-lg overflow-hidden h-full w-full flex flex-col justify-end"> |
| 132 | + <img src={'/illustrations/diff.png'} alt={'Review'} /> |
| 133 | + </div> |
| 134 | + </div> |
| 135 | + </div> |
| 136 | + <div className="h-20 w-full flex justify-center my-2 py-2"> |
| 137 | + <ArrowLongDownIcon className="text-gray-200 dark:text-gray-700" /> |
| 138 | + </div> |
| 139 | + |
| 140 | + <div className="dark:bg-gray-900 bg-gray-50 w-full p-4 rounded-xl grid grid-cols-1 md:grid-cols-5 gap-8"> |
| 141 | + <a |
| 142 | + href="/docs/advanced/deploy_to_prod" |
| 143 | + target="_blank" |
| 144 | + className="col-span-2 group text-black dark:text-white !no-underline hover:text-black hover:dark:text-white cursor-pointer" |
| 145 | + > |
| 146 | + <div className="font-medium text-xl mb-6 group-hover:ml-2 transition-all flex flex-row items-center gap-2"> |
| 147 | + <Server size={20} /> |
| 148 | + Deploy at scale |
| 149 | + </div> |
| 150 | + <div className="text-md mb-4 group-hover:ml-2 transition-all max-w-sm"> |
| 151 | + { |
| 152 | + 'Deploy with ease on our infrastructure or your own infrastructure, on bare VMs with docker-compose, ecs, or large Kubernetes clusters with up to 1000 workers and even remote agents.' |
| 153 | + } |
| 154 | + </div> |
| 155 | + <div |
| 156 | + className={`text-sm text-blue-500 dark:text-blue-300 flex flex-row items-center gap-2 group-hover:ml-2 transition-all`} |
| 157 | + > |
| 158 | + Learn more |
| 159 | + <ArrowRight size={24} /> |
| 160 | + </div> |
| 161 | + </a> |
| 162 | + <div className="col-span-3"> |
| 163 | + <Lottie lottieData={deployAtScale} autoplay loop /> |
| 164 | + </div> |
| 165 | + </div> |
| 166 | + <div className="h-20 w-full flex justify-center my-2 py-2"> |
| 167 | + <ArrowLongDownIcon className="text-gray-200 dark:text-gray-700" /> |
| 168 | + </div> |
| 169 | + <div className="dark:bg-gray-900 bg-gray-50 w-full p-4 rounded-xl grid grid-cols-1 md:grid-cols-5 gap-8"> |
| 170 | + <a className="col-span-2 group text-black dark:text-white !no-underline hover:text-black hover:dark:text-white cursor-pointer"> |
| 171 | + <div className="font-medium text-xl mb-6 group-hover:ml-2 transition-all flex flex-row items-center gap-2"> |
| 172 | + <Activity size={20} /> |
| 173 | + Monitor |
| 174 | + </div> |
| 175 | + <div className="text-md mb-4 group-hover:ml-2 transition-all max-w-sm"> |
| 176 | + {'Keep track of your scripts, flows, and apps with detailed logs and metrics.'} |
| 177 | + </div> |
| 178 | + <div |
| 179 | + className={`text-sm text-blue-500 dark:text-blue-300 flex flex-row items-center gap-2 group-hover:ml-2 transition-all`} |
| 180 | + > |
| 181 | + Learn more |
| 182 | + <ArrowRight size={24} /> |
| 183 | + </div> |
| 184 | + </a> |
| 185 | + <div className="col-span-3"> |
| 186 | + <div className="rounded-lg overflow-hidden h-full w-full flex flex-col justify-end"> |
| 187 | + <img src={'/illustrations/11.png'} alt={'Review'} /> |
| 188 | + </div> |
| 189 | + </div> |
| 190 | + </div> |
| 191 | + </div> |
| 192 | + </> |
| 193 | + ); |
| 194 | +} |
0 commit comments