|
| 1 | +import React from 'react'; |
| 2 | +import useBaseUrl from '@docusaurus/useBaseUrl'; |
| 3 | +import { SdkLogosAsBlocks } from './SdkLogosAsBlocks'; |
| 4 | +import '../../css/homepage-hero.css'; |
| 5 | + |
| 6 | +const Icon = ({ src, alt, className, width, height }) => { |
| 7 | + const darkSrc = src; |
| 8 | + const lightSrc = src.replace('.svg', '-dark.svg'); |
| 9 | + |
| 10 | + return ( |
| 11 | + <> |
| 12 | + <img |
| 13 | + src={useBaseUrl(darkSrc)} |
| 14 | + alt={alt} |
| 15 | + className={`icon-dark-mode ${className || ''}`} |
| 16 | + width={width} |
| 17 | + height={height} |
| 18 | + /> |
| 19 | + <img |
| 20 | + src={useBaseUrl(lightSrc)} |
| 21 | + alt={alt} |
| 22 | + className={`icon-light-mode ${className || ''}`} |
| 23 | + width={width} |
| 24 | + height={height} |
| 25 | + /> |
| 26 | + </> |
| 27 | + ); |
| 28 | +}; |
| 29 | + |
| 30 | +const HomePageHero = () => { |
| 31 | + const quickstartLinks = [ |
| 32 | + { |
| 33 | + path: '/develop/go/set-up-your-local-go', |
| 34 | + name: 'Go Quickstart', |
| 35 | + }, |
| 36 | + { |
| 37 | + path: '/develop/java/set-up-your-local-java', |
| 38 | + name: 'Java Quickstart', |
| 39 | + }, |
| 40 | + { |
| 41 | + path: '/develop/python/set-up-your-local-python', |
| 42 | + name: 'Python Quickstart', |
| 43 | + }, |
| 44 | + { |
| 45 | + path: '/develop/typescript/set-up-your-local-typescript', |
| 46 | + name: 'TypeScript Quickstart', |
| 47 | + }, |
| 48 | + { |
| 49 | + path: '/develop/dotnet/set-up-your-local-dotnet', |
| 50 | + name: '.NET Quickstart', |
| 51 | + }, |
| 52 | + { |
| 53 | + path: '/develop/ruby/set-up-local-ruby', |
| 54 | + name: 'Ruby Quickstart', |
| 55 | + }, |
| 56 | + ]; |
| 57 | + |
| 58 | + const actionCards = [ |
| 59 | + { |
| 60 | + href: '/quickstarts', |
| 61 | + icon: <Icon src="/img/icons/Lightning.svg" alt="Lightning icon" />, |
| 62 | + title: 'Quickstart', |
| 63 | + description: 'Setup your local and run a Hello World workflow.', |
| 64 | + }, |
| 65 | + { |
| 66 | + href: '/develop', |
| 67 | + icon: <Icon src="/img/icons/Code.svg" alt="Code icon" />, |
| 68 | + title: 'Developer Guide', |
| 69 | + description: 'Dive into everything you need to know about building Temporal workflows.', |
| 70 | + }, |
| 71 | + { |
| 72 | + href: '/production-deployment', |
| 73 | + icon: <Icon src="/img/icons/Rocket.svg" alt="Rocket icon" />, |
| 74 | + title: 'Deploy your Workflows', |
| 75 | + description: |
| 76 | + 'Deploy your Temporal Application to your environment. Self-Host the Temporal Service or use Temporal Cloud.', |
| 77 | + }, |
| 78 | + { |
| 79 | + href: 'https://temporal.io/cloud', |
| 80 | + icon: <Icon src="/img/icons/Cloud.svg" alt="Cloud icon" />, |
| 81 | + title: 'Get started for free with $1000 in credits', |
| 82 | + description: |
| 83 | + '<span class="linkify">Sign up for Temporal Cloud</span> and let us host the Temporal Service for you.', |
| 84 | + }, |
| 85 | + ]; |
| 86 | + |
| 87 | + const communityCards = [ |
| 88 | + { |
| 89 | + href: 'https://temporal.io/slack', |
| 90 | + icon: <Icon src="/img/icons/Slack.svg" alt="Slack" />, |
| 91 | + title: 'Slack Community', |
| 92 | + description: |
| 93 | + 'Join us on <a href="https://temporal.io/slack">temporal.io/slack</a> and say hi or ask us a question.', |
| 94 | + }, |
| 95 | + { |
| 96 | + href: 'https://community.temporal.io', |
| 97 | + icon: <Icon src="/img/icons/Message.svg" alt="Message" />, |
| 98 | + title: 'Developer Forum', |
| 99 | + description: '<a href="https://community.temporal.io">Find out</a> if your question has already been asked.', |
| 100 | + }, |
| 101 | + { |
| 102 | + href: 'https://learn.temporal.io/courses/', |
| 103 | + icon: <Icon src="/img/icons/Education.svg" alt="Education" />, |
| 104 | + title: 'Learn it all', |
| 105 | + description: '<a href="https://learn.temporal.io/courses/">Master Temporal</a> with our courses and tutorials.', |
| 106 | + }, |
| 107 | + ]; |
| 108 | + |
| 109 | + return ( |
| 110 | + <div className="homepage-hero-wrapper"> |
| 111 | + <div className="hero-main-title-container"> |
| 112 | + <header className="hero-main-title">Temporal Docs</header> |
| 113 | + |
| 114 | + <div className="quickstart-links">{SdkLogosAsBlocks()}</div> |
| 115 | + </div> |
| 116 | + |
| 117 | + <div className="hero-section"> |
| 118 | + <div className="hero-content"> |
| 119 | + <h1>Build applications that never fail</h1> |
| 120 | + <p> |
| 121 | + Temporal is an open-source platform for building reliable applications. Temporal delivers crash-proof |
| 122 | + execution by guaranteeing that applications resume exactly where they left off after crashes, network |
| 123 | + failures, or infrastructure outages, whether that happens seconds, days, or even years later. |
| 124 | + </p> |
| 125 | + <p> |
| 126 | + Temporal enables developers to focus on building features that drive the business while ensuring that |
| 127 | + mission-critical processes such as order fulfillment, customer onboarding, and payment processing never fail |
| 128 | + or disappear, regardless of what goes wrong. |
| 129 | + </p> |
| 130 | + <a href="/quickstarts" className="hero-cta"> |
| 131 | + Quickstart |
| 132 | + <svg fill="none" height="18" viewBox="0 0 21 18" width="21" xmlns="http://www.w3.org/2000/svg"> |
| 133 | + <path d="m20.1094 9.5625-7.1719 7.2187-.7969.7969-1.5937-1.5937.7969-.7969 5.25-5.29688h-15.4688-1.125v-2.25h1.125 15.4688l-5.25-5.25-.7969-.79687 1.5937-1.59375.7969.796875 7.1719 7.171875.7968.79687z" /> |
| 134 | + </svg> |
| 135 | + </a> |
| 136 | + </div> |
| 137 | + |
| 138 | + <div className="hero-actions"> |
| 139 | + {actionCards.map((card, index) => ( |
| 140 | + <div key={index} className="border-container"> |
| 141 | + <a href={card.href} className="action-card"> |
| 142 | + <div className="action-icon">{card.icon}</div> |
| 143 | + <div className="action-content"> |
| 144 | + <h3>{card.title}</h3> |
| 145 | + <p dangerouslySetInnerHTML={{ __html: card.description }}></p> |
| 146 | + </div> |
| 147 | + </a> |
| 148 | + </div> |
| 149 | + ))} |
| 150 | + </div> |
| 151 | + </div> |
| 152 | + |
| 153 | + <div className="community-cards"> |
| 154 | + {communityCards.map((card, index) => ( |
| 155 | + <div key={index} className="community-card"> |
| 156 | + <div className="community-icon">{card.icon}</div> |
| 157 | + <h3>{card.title}</h3> |
| 158 | + <p dangerouslySetInnerHTML={{ __html: card.description }}></p> |
| 159 | + </div> |
| 160 | + ))} |
| 161 | + </div> |
| 162 | + </div> |
| 163 | + ); |
| 164 | +}; |
| 165 | + |
| 166 | +export default HomePageHero; |
0 commit comments