Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
Signed-off-by: B-Step62 <[email protected]>
  • Loading branch information
B-Step62 committed Dec 12, 2024
1 parent 5d261f9 commit 27d816b
Show file tree
Hide file tree
Showing 4 changed files with 148 additions and 36 deletions.
4 changes: 3 additions & 1 deletion website/src/components/ExpandableGrid/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ const ExpandableGrid = ({ items, defaultVisibleCount, renderItem }) => {

return (
<div>
<div className={`${styles.grid} ${!isExpanded ? styles.fadeOverlay : ""}`}>
<div
className={`${styles.grid} ${!isExpanded ? styles.fadeOverlay : ""}`}
>
{visibleItems.map((item, index) => (
<div key={index} className={styles.gridItem}>
{renderItem(item, index)}
Expand Down
10 changes: 4 additions & 6 deletions website/src/components/ExpandableGrid/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,7 @@
left: 0;
width: 100%;
height: 4rem;
background: linear-gradient(
to bottom,
rgba(0, 0, 0, 0),
#0c1519
);
background: linear-gradient(to bottom, rgba(0, 0, 0, 0), #0c1519);
pointer-events: none; /* Allow click-through */
z-index: 1;
}
Expand All @@ -42,7 +38,9 @@
border: none;
background-color: transparent;
color: inherit;
transition: color 0.3s, transform 0.3s;
transition:
color 0.3s,
transform 0.3s;
display: inline-flex;
align-items: center;
justify-content: center;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import ArrowText from "../ArrowText";
import styles from "./styles.module.css";
import { MOBILE_LAYOUT_BREAKPOINT } from "../../constants";


const MLflowLogo = ({ displaySideDots }: { displaySideDots: boolean }) => {
return (
<svg
Expand Down
169 changes: 141 additions & 28 deletions website/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,15 @@ export default function Home(): JSX.Element {
return () => observer.disconnect();
}, []);

const [windowWidth, setWindowWidth] = useState(window.innerWidth);

useEffect(() => {
const handleResize = () => setWindowWidth(window.innerWidth);

window.addEventListener("resize", handleResize);
return () => window.removeEventListener("resize", handleResize);
}, []);

return (
<Layout
title={siteConfig.title}
Expand Down Expand Up @@ -528,35 +537,139 @@ export default function Home(): JSX.Element {
</div>

<ExpandableGrid
items={[
{ title: "PyTorch", src: "img/pytorch.svg", href: "docs/latest/deep-learning/pytorch/index.html" },
{ title: "HuggingFace", src: "img/huggingface.svg", href: "docs/latest/llms/transformers/index.html" },
{ title: "OpenAI", src: "img/openai.svg", href: "docs/latest/llms/openai/index.html" },
{ title: "LangChain", src: "img/langchain.svg", href: "docs/latest/llms/langchain/index.html" },
{ title: "LlamaIndex", src: "img/llamaindex.svg", href: "docs/latest/llms/llama-index/index.html" },
{ title: "Spark", src: "img/spark.svg", href: "docs/latest/python_api/mlflow.spark.html" },
{ title: "Keras", src: "img/keras.svg", href: "docs/latest/deep-learning/keras/index.html" },
{ title: "TensorFlow", src: "img/tensorflow.svg", href: "docs/latest/deep-learning/tensorflow/index.html" },
{ title: "scikit-learn", src: "img/scikit-learn.svg", href: "docs/latest/models.html#scikit-learn-sklearn" },
{ title: "XGBoost", src: "img/xgboost.svg", href: "docs/latest/models.html#xgboost-xgboost" },
{ title: "LightGBM", src: "img/lightgbm.svg", href: "docs/latest/models.html#lightgbm-lightgbm" },
{ title: "CatBoost", src: "img/catboost.svg", href: "docs/latest/models.html#catboost-catboost" },
{ title: "Anthropic", src: "img/anthropic.svg", href: "docs/latest/llms/tracing/index.html#automatic-tracing" },
{ title: "CrewAI", src: "img/crewai.svg", href: "docs/latest/llms/tracing/index.html#automatic-tracing" },
{ title: "Gemini", src: "img/google-gemini.svg", href: "docs/latest/llms/tracing/index.html#automatic-tracing" },
{ title: "AutoGen", src: "img/autogen.jpeg", href: "docs/latest/llms/tracing/index.html#automatic-tracing" },
{ title: "LiteLLM", src: "img/litellm.png", href: "docs/latest/llms/tracing/index.html#automatic-tracing" },
{ title: "Sentence Transformers", src: "img/sentence-transformers.svg", href: "docs/latest/llms/sentence-transformers/index.html" },
{ title: "ONNX", src: "img/onnx.svg", href: "docs/latest/models.html#onnx-onnx" },
{ title: "Spacy", src: "img/spacy.svg", href: "docs/latest/models.html#spacy-spacy" },
{ title: "FastAI", src: "img/fastai.png", href: "docs/latest/models.html#fastai-fastai" },
{ title: "StatsModels", src: "img/statsmodels.svg", href: "docs/latest/models.html#statsmodels-statsmodels" },
{ title: "Prompt flow", src: "img/promptflow.svg", href: "docs/latest/models.html#promptflow-promptflow-experimental" },
{ title: "JohnSnowLabs", src: "img/johnsnowlab.svg", href: "docs/latest/models.html#john-snow-labs-johnsnowlabs-experimental" },
{ title: "H2O", src: "img/h2o.svg", href: "docs/latest/models.html#h2o-h2o" },
{ title: "Prophet", src: "img/prophet.svg", href: "docs/latest/python_api/mlflow.prophet.html" },
items={[
{
title: "PyTorch",
src: "img/pytorch.svg",
href: "docs/latest/deep-learning/pytorch/index.html",
},
{
title: "HuggingFace",
src: "img/huggingface.svg",
href: "docs/latest/llms/transformers/index.html",
},
{
title: "OpenAI",
src: "img/openai.svg",
href: "docs/latest/llms/openai/index.html",
},
{
title: "LangChain",
src: "img/langchain.svg",
href: "docs/latest/llms/langchain/index.html",
},
{
title: "LlamaIndex",
src: "img/llamaindex.svg",
href: "docs/latest/llms/llama-index/index.html",
},
{
title: "Spark",
src: "img/spark.svg",
href: "docs/latest/python_api/mlflow.spark.html",
},
{
title: "Keras",
src: "img/keras.svg",
href: "docs/latest/deep-learning/keras/index.html",
},
{
title: "TensorFlow",
src: "img/tensorflow.svg",
href: "docs/latest/deep-learning/tensorflow/index.html",
},
{
title: "scikit-learn",
src: "img/scikit-learn.svg",
href: "docs/latest/models.html#scikit-learn-sklearn",
},
{
title: "XGBoost",
src: "img/xgboost.svg",
href: "docs/latest/models.html#xgboost-xgboost",
},
{
title: "LightGBM",
src: "img/lightgbm.svg",
href: "docs/latest/models.html#lightgbm-lightgbm",
},
{
title: "CatBoost",
src: "img/catboost.svg",
href: "docs/latest/models.html#catboost-catboost",
},
{
title: "Anthropic",
src: "img/anthropic.svg",
href: "docs/latest/llms/tracing/index.html#automatic-tracing",
},
{
title: "CrewAI",
src: "img/crewai.svg",
href: "docs/latest/llms/tracing/index.html#automatic-tracing",
},
{
title: "Gemini",
src: "img/google-gemini.svg",
href: "docs/latest/llms/tracing/index.html#automatic-tracing",
},
{
title: "AutoGen",
src: "img/autogen.jpeg",
href: "docs/latest/llms/tracing/index.html#automatic-tracing",
},
{
title: "LiteLLM",
src: "img/litellm.png",
href: "docs/latest/llms/tracing/index.html#automatic-tracing",
},
{
title: "Sentence Transformers",
src: "img/sentence-transformers.svg",
href: "docs/latest/llms/sentence-transformers/index.html",
},
{
title: "ONNX",
src: "img/onnx.svg",
href: "docs/latest/models.html#onnx-onnx",
},
{
title: "Spacy",
src: "img/spacy.svg",
href: "docs/latest/models.html#spacy-spacy",
},
{
title: "FastAI",
src: "img/fastai.png",
href: "docs/latest/models.html#fastai-fastai",
},
{
title: "StatsModels",
src: "img/statsmodels.svg",
href: "docs/latest/models.html#statsmodels-statsmodels",
},
{
title: "Prompt flow",
src: "img/promptflow.svg",
href: "docs/latest/models.html#promptflow-promptflow-experimental",
},
{
title: "JohnSnowLabs",
src: "img/johnsnowlab.svg",
href: "docs/latest/models.html#john-snow-labs-johnsnowlabs-experimental",
},
{
title: "H2O",
src: "img/h2o.svg",
href: "docs/latest/models.html#h2o-h2o",
},
{
title: "Prophet",
src: "img/prophet.svg",
href: "docs/latest/python_api/mlflow.prophet.html",
},
]}
defaultVisibleCount={window.innerWidth > MOBILE_LAYOUT_BREAKPOINT ? 16 : 8}
defaultVisibleCount={windowWidth > MOBILE_LAYOUT_BREAKPOINT ? 16 : 8}
renderItem={({ title, src, href }) => (
<MiniLogoCard title={title} src={src} href={href} />
)}
Expand Down

0 comments on commit 27d816b

Please sign in to comment.