diff --git a/docs/docusaurus.config.ts b/docs/docusaurus.config.ts index 8aed606..ff4ff85 100644 --- a/docs/docusaurus.config.ts +++ b/docs/docusaurus.config.ts @@ -67,6 +67,10 @@ const config: Config = { '@docusaurus/plugin-client-redirects', { redirects: [ + // { + // from: '/', + // to: '/docs/home', + // }, { from: '/ansible/ansible/', to: '/ansible/', @@ -211,7 +215,7 @@ const config: Config = { sidebarId: "infrahubctlSidebar", label: "Infrahubctl", docsPluginId: "infrahubctl", - }, + }, { type: "docSidebar", sidebarId: "emmaSidebar", @@ -296,7 +300,7 @@ const config: Config = { preprocessor: ({ filePath, fileContent }) => { console.log(`Processing ${filePath}`); const transformedContent = fileContent.replace(/\$\(\s*(\w+)\s*\)/g, (match, variableName) => { - //console.log(`Found variable: ${variableName}`); + //console.log(`Found variable: ${variableName}`); if (variableName === 'base_url' && globalVars.base_url === 'RELATIVE') { return getDocsRelative(filePath); } diff --git a/docs/package-lock.json b/docs/package-lock.json index ab3be17..f14c8a1 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -6676,9 +6676,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001690", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001690.tgz", - "integrity": "sha512-5ExiE3qQN6oF8Clf8ifIDcMRCRE/dMGcETG/XGMD8/XiXm6HXQgQTh1yZYLXXpSOsEUlJm1Xr7kGULZTuGtP/w==", + "version": "1.0.30001721", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001721.tgz", + "integrity": "sha512-cOuvmUVtKrtEaoKiO0rSc29jcjwMwX5tOHDy4MgVFEWiUXj4uBMJkwI8MDySkgXidpMiHUcviogAvFi4pA2hDQ==", "funding": [ { "type": "opencollective", diff --git a/docs/src/components/HomePage/card.tsx b/docs/src/components/HomePage/card.tsx new file mode 100644 index 0000000..d188048 --- /dev/null +++ b/docs/src/components/HomePage/card.tsx @@ -0,0 +1,27 @@ +import React from 'react'; +import clsx from 'clsx'; +import Heading from '@theme/Heading' +import Link from '@docusaurus/Link'; +import styles from './styles.module.css'; + +type SectionItem = { + title: string; + svgPath: string; + description: React.ReactNode; + link: string; +}; + +export default function HomePageCard({ title, svgPath, description, link }: SectionItem) { + return ( +
+ +
+ python logo + {title} +
+ +
{description}
+ +
+ ) +} \ No newline at end of file diff --git a/docs/src/components/HomePage/header.tsx b/docs/src/components/HomePage/header.tsx new file mode 100644 index 0000000..347a9d7 --- /dev/null +++ b/docs/src/components/HomePage/header.tsx @@ -0,0 +1,72 @@ +import React from 'react'; +import clsx from 'clsx'; +import Heading from '@theme/Heading' +import Link from '@docusaurus/Link'; +import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; +import styles from './styles.module.css'; +import { translate } from '@docusaurus/Translate'; +import ArrowRightIcon from "/img/arrow-right.svg"; +import EducationIcon from "/img/education.svg"; + +export default function HomepageHeader() { + const { siteConfig } = useDocusaurusContext(); + + return ( +
+
+ {siteConfig.title} +

+ {translate({ + id: 'home.header.subtitle', + message: "Infrastructure Data Management Platform", + })} +

+ +
+ + {translate({ + id: 'home.header.docs', + message: 'Learn about Infrahub', + })} + + + + + {translate({ + id: 'home.header.sandbox', + message: 'Infrahub Sandbox', + })} + + + + {translate({ + id: 'home.header.tutorials', + message: 'Infrahub Labs', + })} + + +
+
+ +
+ +
+
+ ); +} diff --git a/docs/src/components/HomePage/styles.module.css b/docs/src/components/HomePage/styles.module.css new file mode 100644 index 0000000..9d0c917 --- /dev/null +++ b/docs/src/components/HomePage/styles.module.css @@ -0,0 +1,75 @@ +/** + * CSS files with the .module.css suffix will be treated as CSS modules + * and scoped locally. + */ + +.heroBanner { + display: flex; + align-items: center; + overflow: hidden; + padding: 0; + flex-grow: 1; + max-height: 540px; +} + +.infrahubVideo { + align-self: start; +} + +@media screen and (max-width: 996px) { + .heroBanner { + padding: 4rem 2rem; + flex-grow: 0; + } + + .infrahubVideo { + display: none; + } +} + +.cardTitle { + display: inline-flex; + gap: 0.5rem; + align-items: center; +} + +.heroCard { + transition: box-shadow 0.2s ease-in-out; + border: 1px solid var(--border-color); + box-shadow: none; + flex-grow: 1; +} + +html[data-theme='dark'] .heroCard { + color: #f5f4f4; +} + +html[data-theme='dark'] .heroCard img { + background: #f5f4f4; + border-radius: 100%; + padding: 1px; + margin: 2px; + background-size: contain; +} + +.heroCard:hover { + box-shadow: 1px 0px 16px 0px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); +} + +.heroButton { + border-radius: 9999px; + display: inline-flex; + gap: 0.5rem; + align-items: center; +} + +.containerFlexWrap { + display: flex; + flex-wrap: wrap; + align-items: start; + gap: 1rem; +} + +.flex { + display: flex; +} \ No newline at end of file diff --git a/docs/src/pages/index.tsx b/docs/src/pages/index.tsx.old similarity index 100% rename from docs/src/pages/index.tsx rename to docs/src/pages/index.tsx.old diff --git a/docs/static/img/discord.png b/docs/static/img/discord.png new file mode 100644 index 0000000..88b4a24 Binary files /dev/null and b/docs/static/img/discord.png differ diff --git a/docs/static/img/github.png b/docs/static/img/github.png new file mode 100644 index 0000000..6cb3b70 Binary files /dev/null and b/docs/static/img/github.png differ diff --git a/infrahub b/infrahub index 739edc8..f5b3bee 160000 --- a/infrahub +++ b/infrahub @@ -1 +1 @@ -Subproject commit 739edc811537dc0645d00109759d2a9e52f7f024 +Subproject commit f5b3bee715bc9c606a5d60c591c60df2b4a37291