1
1
import DatabricksLogo from "@site/static/img/databricks-logo.svg" ;
2
2
import Checkmark from "@site/static/img/checkmark.svg" ;
3
+ import { useLocation } from "@docusaurus/router" ;
4
+ import useBaseUrl from "@docusaurus/useBaseUrl" ;
5
+ import useBrokenLinks from "@docusaurus/useBrokenLinks" ;
3
6
4
7
import { GetStartedButton } from "../GetStartedButton/GetStartedButton" ;
5
- import { cn } from "../../utils" ;
8
+ import { cn , isClassicalMLPage } from "../../utils" ;
6
9
import { Heading } from "../Typography/Heading" ;
7
10
import { Body } from "../Typography/Body" ;
8
11
import { useLayoutVariant } from "../Layout/Layout" ;
9
- import { MLFLOW_DOCS_URL , MLFLOW_DBX_TRIAL_URL } from "@site/src/constants" ;
12
+ import {
13
+ MLFLOW_DOCS_URL ,
14
+ MLFLOW_DBX_TRIAL_URL ,
15
+ MLFLOW_DBX_INSTALL_URL ,
16
+ } from "@site/src/constants" ;
10
17
11
18
export const GetStartedWithMLflow = ( ) => {
12
19
const variant = useLayoutVariant ( ) ;
20
+ const location = useLocation ( ) ;
21
+ const classicalMLPath = useBaseUrl ( "/classical-ml" ) ;
22
+ const isClassicalML = isClassicalMLPage ( location . pathname , classicalMLPath ) ;
23
+ const databricksUrl = isClassicalML
24
+ ? MLFLOW_DBX_INSTALL_URL
25
+ : MLFLOW_DBX_TRIAL_URL ;
26
+ const databricksButtonText = isClassicalML
27
+ ? "Get started"
28
+ : "Get started for free" ;
29
+
30
+ useBrokenLinks ( ) . collectAnchor ( "get-started" ) ;
13
31
14
32
return (
15
- < div className = { cn ( "grid grid-cols-1 lg:grid-cols-2 gap-8" ) } >
16
- < div
17
- className = { cn (
18
- "flex flex-col gap-6 items-start" ,
19
- variant !== "blue" ? "lg:col-span-2" : "" ,
20
- ) }
21
- >
33
+ < div
34
+ id = "get-started"
35
+ className = { cn ( "grid grid-cols-1 lg:grid-cols-2 gap-8" ) }
36
+ >
37
+ < div className = "flex flex-col gap-6 items-start lg:col-span-2" >
22
38
< Heading level = { 2 } > Get started with MLflow</ Heading >
23
- { variant !== "blue" ? (
24
- < Body size = "l" > Choose from two options depending on your needs</ Body >
25
- ) : null }
39
+ < Body size = "l" > Choose from two options depending on your needs</ Body >
26
40
</ div >
27
41
< div className = "flex flex-col gap-8 p-8 bg-[#fff]/4 rounded-2xl justify-between" >
28
42
< div className = "flex flex-col gap-8" >
@@ -49,40 +63,38 @@ export const GetStartedWithMLflow = () => {
49
63
link = { MLFLOW_DOCS_URL }
50
64
/>
51
65
</ div >
52
- { variant !== "blue" ? (
53
- < div className = "flex flex-col gap-8 p-8 bg-[#fff]/4 rounded-2xl @container justify-between" >
54
- < div className = "flex flex-col gap-8" >
55
- < div className = "flex flex-row justify-between items-center gap-4" >
56
- < div className = "flex flex-row justify-center items-end gap-3 flex-wrap" >
57
- < h3 className = "m-0 text-white" > Managed hosting </ h3 >
58
- < span className = "text-gray-500 text-sm" > ON</ span >
59
- < DatabricksLogo />
60
- </ div >
61
- </ div >
62
- < div className = "flex flex-col gap-4" >
63
- { [
64
- "Free and fully managed — experience MLflow without the setup hassle" ,
65
- "Built and maintained by the original creators of MLflow" ,
66
- "Full OSS compatibility" ,
67
- ] . map ( ( bulletPoint , index ) => (
68
- < div key = { index } className = "flex flex-row items-center gap-4" >
69
- < Checkmark className = "shrink-0" />
70
- < span className = "text-md font-light text-gray-600" >
71
- { bulletPoint }
72
- </ span >
73
- </ div >
74
- ) ) }
66
+ < div className = "flex flex-col gap-8 p-8 bg-[#fff]/4 rounded-2xl @container justify-between" >
67
+ < div className = "flex flex-col gap-8" >
68
+ < div className = "flex flex-row justify-between items-center gap-4" >
69
+ < div className = "flex flex-row justify-center items-end gap-3 flex-wrap" >
70
+ < h3 className = "m-0 text-white" > Managed hosting </ h3 >
71
+ < span className = "text-gray-500 text-sm" > ON</ span >
72
+ < DatabricksLogo />
75
73
</ div >
76
74
</ div >
77
- < GetStartedButton
78
- body = "Get started for free"
79
- size = "large"
80
- width = "full"
81
- variant = "dark"
82
- link = { MLFLOW_DBX_TRIAL_URL }
83
- />
75
+ < div className = "flex flex-col gap-4" >
76
+ { [
77
+ "Free and fully managed — experience MLflow without the setup hassle" ,
78
+ "Built and maintained by the original creators of MLflow" ,
79
+ "Full OSS compatibility" ,
80
+ ] . map ( ( bulletPoint , index ) => (
81
+ < div key = { index } className = "flex flex-row items-center gap-4" >
82
+ < Checkmark className = "shrink-0" />
83
+ < span className = "text-md font-light text-gray-600" >
84
+ { bulletPoint }
85
+ </ span >
86
+ </ div >
87
+ ) ) }
88
+ </ div >
84
89
</ div >
85
- ) : null }
90
+ < GetStartedButton
91
+ body = { databricksButtonText }
92
+ size = "large"
93
+ width = "full"
94
+ variant = "dark"
95
+ link = { databricksUrl }
96
+ />
97
+ </ div >
86
98
</ div >
87
99
) ;
88
100
} ;
0 commit comments