From 4b492e1d796900250601396fa6822d3ca4ae88ca Mon Sep 17 00:00:00 2001 From: Jigyasu Arya Date: Tue, 9 May 2023 20:15:36 +0530 Subject: [PATCH] docs: add new product launch webinar banner for mysql, oracle & mariadb section PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9091 GitOrigin-RevId: 215ba8051eb957f751258a22562eef3980de8c85 --- docs/src/components/HasuraConBanner/index.tsx | 107 +++++++++++++----- .../HasuraConBanner/styles.module.scss | 6 + 2 files changed, 87 insertions(+), 26 deletions(-) diff --git a/docs/src/components/HasuraConBanner/index.tsx b/docs/src/components/HasuraConBanner/index.tsx index a8ec06c15df..c97ba2f103f 100644 --- a/docs/src/components/HasuraConBanner/index.tsx +++ b/docs/src/components/HasuraConBanner/index.tsx @@ -1,19 +1,49 @@ import React from 'react'; -import hasuraConDark from '@site/static/img/hasura-con-dark.png'; -import hasuraConLight from '@site/static/img/hasura-con-light.png'; +// import hasuraConDark from '@site/static/img/hasura-con-dark.png'; +// import hasuraConLight from '@site/static/img/hasura-con-light.png'; import ArrowRight from '@site/static/icons/arrow_right.svg'; import styles from './styles.module.scss'; const HasuraConBanner = props => { - const isSnowFlakeSectionPage = props.location.pathname.startsWith(`/docs/latest/databases/snowflake`); + const isSnowFlakeSection = props.location.pathname.startsWith(`/docs/latest/databases/snowflake`); - const isObservabilitySectionPage = props.location.pathname.startsWith(`/docs/latest/observability`); + const isObservabilitySection = props.location.pathname.startsWith(`/docs/latest/observability`); - const isSecuritySectionPage = props.location.pathname.startsWith(`/docs/latest/security`); + const isSecuritySection = props.location.pathname.startsWith(`/docs/latest/security`); - if (isSnowFlakeSectionPage) { + const isMySQLSection = props.location.pathname.startsWith(`/docs/latest/databases/mysql`); + + const isOracleSection = props.location.pathname.startsWith(`/docs/latest/databases/oracle`); + + const isMariaDBSection = props.location.pathname.startsWith(`/docs/latest/databases/mariadb`); + + // Banner for - New product launch webinar */ + if (isMySQLSection || isOracleSection || isMariaDBSection) { + return ( +
+ +
+ hasura-webinar +
+
+

Ship faster with low-code APIs on MySQL, MariaDB, and Oracle

+
+ Register + +
+
+
+
+ ); + } + + if (isSnowFlakeSection) { return (
@@ -36,7 +66,30 @@ const HasuraConBanner = props => { ); } - if (isObservabilitySectionPage) { + if (isSnowFlakeSection) { + return ( +
+ +
+ Hasura Con +
+
+

Combining Snowflake and PostgreSQL to build low-latency apps on historical data insights

+
+ View Recording + +
+
+
+
+ ); + } + + if (isObservabilitySection) { return (
{ ); } - if (isSecuritySectionPage) { + if (isSecuritySection) { return (
@@ -85,24 +138,26 @@ const HasuraConBanner = props => { ); } - return ( - -
- Hasura Con - Hasura Con -
-
-
-
The Hasura User Conference
-
New Product Announcements
-
-
- View Recordings - -
-
-
- ); + return null; + + // return ( + // + //
+ // Hasura Con + // Hasura Con + //
+ //
+ //
+ //
The Hasura User Conference
+ //
New Product Announcements
+ //
+ //
+ // View Recordings + // + //
+ //
+ //
+ // ); }; export default HasuraConBanner; diff --git a/docs/src/components/HasuraConBanner/styles.module.scss b/docs/src/components/HasuraConBanner/styles.module.scss index 9a3f9e4b5b8..df669ba0d1f 100644 --- a/docs/src/components/HasuraConBanner/styles.module.scss +++ b/docs/src/components/HasuraConBanner/styles.module.scss @@ -179,6 +179,12 @@ html[data-theme='dark'] { } } +.product-launch-webinar-bg { + background: #000615; + margin: 40px 0; + border-radius: 12px; +} + .snowflake-bg { background: linear-gradient(117.44deg, #2c64f4 35.75%, #a36ff8 95.65%, #16a9c9 136.27%); margin: 40px 0;