From 52e6c86c1117705246bcbbce0ba416b468da76db Mon Sep 17 00:00:00 2001 From: TuvalSimha Date: Tue, 23 May 2023 21:31:40 +0300 Subject: [PATCH 1/6] Attend page: Expired Pricing --- src/assets/css/_css/attend.less | 7 ++++++ src/assets/css/style.less | 2 ++ src/components/Conf/Pricing/index.tsx | 34 ++++++++++++++++++++++++--- src/pages/conf/faq.tsx | 10 ++++++++ 4 files changed, 50 insertions(+), 3 deletions(-) create mode 100644 src/assets/css/_css/attend.less diff --git a/src/assets/css/_css/attend.less b/src/assets/css/_css/attend.less new file mode 100644 index 0000000000..aa4cc79bf0 --- /dev/null +++ b/src/assets/css/_css/attend.less @@ -0,0 +1,7 @@ +.badge-rotate { + -webkit-transform: rotate(-45deg); + -moz-transform: rotate(-45deg); + -ms-transform: rotate(-45deg); + -o-transform: rotate(-45deg); + transform: rotate(-45deg); +} \ No newline at end of file diff --git a/src/assets/css/style.less b/src/assets/css/style.less index 9077762b6b..8629363497 100644 --- a/src/assets/css/style.less +++ b/src/assets/css/style.less @@ -9,3 +9,5 @@ @import "_css/faq.less"; @import "_css/foundation.less"; @import "_css/brand.less"; +@import "_css/attend.less"; + diff --git a/src/components/Conf/Pricing/index.tsx b/src/components/Conf/Pricing/index.tsx index 413d4a75e3..aa9534671c 100644 --- a/src/components/Conf/Pricing/index.tsx +++ b/src/components/Conf/Pricing/index.tsx @@ -6,6 +6,7 @@ interface Pricing { title: string date: string price: string + expierdDate: Date } const pricing: Pricing[] = [ @@ -13,16 +14,19 @@ const pricing: Pricing[] = [ title: "Early Bird", date: "Through May 31, 2023", price: "$599", + expierdDate: new Date("2022-05-31"), }, { title: "Standard", date: "Jun 1 - Sep 4, 2023", price: "$799", + expierdDate: new Date("2023-09-04"), }, { title: "Late/Onsite", date: "Sep 5 Through Event", price: "$899", + expierdDate: new Date("2023-09-05"), }, ] @@ -48,6 +52,7 @@ const includes = [ ] const PricingConf = () => { + const today = new Date() return ( // Invisible padding so anchor links align to the header menu
@@ -62,18 +67,41 @@ const PricingConf = () => { key={i} href="https://cvent.me/4zbxz9" target="_blank" - className="block mx-auto w-64 p-6 overflow-hidden bg-[#2E343C] shadow-xl rounded-2xl focus:outline-none hover:drop-shadow-lg hover:scale-[102%] hover:no-underline focus:no-underline transition ease-in-out" + className={`${ + pricing.expierdDate < today + ? "block mx-auto w-64 p-6 overflow-hidden bg-[#474c52] shadow-xl rounded-2xl focus:outline-none hover:drop-shadow-lg hover:scale-[102%] hover:no-underline focus:no-underline transition ease-in-out cursor-not-allowed" + : "block mx-auto w-64 p-6 overflow-hidden bg-[#2E343C] shadow-xl rounded-2xl focus:outline-none hover:drop-shadow-lg hover:scale-[102%] hover:no-underline focus:no-underline transition ease-in-out" + }`} >
-
+
{pricing.title}
{pricing.date}
-
+
{pricing.price}
+ {pricing.expierdDate < today && ( +
+
+ Expired +
+
+ )}
))} diff --git a/src/pages/conf/faq.tsx b/src/pages/conf/faq.tsx index be2c06f572..12c187bb48 100644 --- a/src/pages/conf/faq.tsx +++ b/src/pages/conf/faq.tsx @@ -657,6 +657,16 @@ const faq: Array<{ id: string; title: string; contents: ReactNode }> = [ {" "} and a member of our PR team will be in touch.

+ +

Group Discounts

+

+ If you have a group of 5 or more people, you can receive a 10% + discount on all passes. All pass types must be the same, and all + registrations must be processed under one group registration and must + be paid with the same credit card. To create a group, select “Add + Another Person” to your registration. When 5 or more people are added + the 10% discount will be automatically applied. +

), }, From dcdaf897c31244d7cf14964629696e6522fb6fed Mon Sep 17 00:00:00 2001 From: TuvalSimha Date: Tue, 23 May 2023 21:38:17 +0300 Subject: [PATCH 2/6] some Signed-off-by: TuvalSimha From fff9e9933ad8da51fe9730c010006c7130a324e2 Mon Sep 17 00:00:00 2001 From: TuvalSimha Date: Tue, 23 May 2023 22:55:00 +0300 Subject: [PATCH 3/6] fix some --- src/assets/css/_css/attend.less | 7 -- src/assets/css/style.less | 1 - src/components/Conf/Pricing/index.tsx | 131 ++++++++++++++------------ 3 files changed, 69 insertions(+), 70 deletions(-) delete mode 100644 src/assets/css/_css/attend.less diff --git a/src/assets/css/_css/attend.less b/src/assets/css/_css/attend.less deleted file mode 100644 index aa4cc79bf0..0000000000 --- a/src/assets/css/_css/attend.less +++ /dev/null @@ -1,7 +0,0 @@ -.badge-rotate { - -webkit-transform: rotate(-45deg); - -moz-transform: rotate(-45deg); - -ms-transform: rotate(-45deg); - -o-transform: rotate(-45deg); - transform: rotate(-45deg); -} \ No newline at end of file diff --git a/src/assets/css/style.less b/src/assets/css/style.less index 8629363497..be1162c85a 100644 --- a/src/assets/css/style.less +++ b/src/assets/css/style.less @@ -9,5 +9,4 @@ @import "_css/faq.less"; @import "_css/foundation.less"; @import "_css/brand.less"; -@import "_css/attend.less"; diff --git a/src/components/Conf/Pricing/index.tsx b/src/components/Conf/Pricing/index.tsx index aa9534671c..d548dff766 100644 --- a/src/components/Conf/Pricing/index.tsx +++ b/src/components/Conf/Pricing/index.tsx @@ -1,12 +1,16 @@ -import React from "react" -import { CheckCircledIcon } from "@radix-ui/react-icons" -import ButtonConf from "../Button" +import React from "react"; +import { CheckCircledIcon } from "@radix-ui/react-icons"; +import ButtonConf from "../Button"; interface Pricing { - title: string - date: string - price: string - expierdDate: Date + title: string; + date: string; + price: string; + dateIsExpired: Date; +} + +interface Title { + title: string; } const pricing: Pricing[] = [ @@ -14,23 +18,23 @@ const pricing: Pricing[] = [ title: "Early Bird", date: "Through May 31, 2023", price: "$599", - expierdDate: new Date("2022-05-31"), + dateIsExpired: new Date("2022-06-01"), }, { title: "Standard", date: "Jun 1 - Sep 4, 2023", price: "$799", - expierdDate: new Date("2023-09-04"), + dateIsExpired: new Date("2022-09-05"), }, { title: "Late/Onsite", date: "Sep 5 Through Event", price: "$899", - expierdDate: new Date("2023-09-05"), + dateIsExpired: new Date("2023-10-01"), }, -] +]; -const includes = [ +const includes: Title[] = [ { title: "All conference content", }, @@ -49,12 +53,57 @@ const includes = [ { title: "Access to watch all sessions", }, -] +]; + +const PricingConf: React.FC = () => { + const today = new Date(); + + const isExpired = (expiredDate: Date): boolean => expiredDate < today; + + const renderPriceCard = (pricing: Pricing, index: number) => { + const expired = isExpired(pricing.dateIsExpired); + + const cardStyles = `block mx-auto w-64 p-6 overflow-hidden bg-[#2E343C] shadow-xl rounded-2xl focus:outline-none hover:drop-shadow-lg hover:scale-[102%] hover:no-underline focus:no-underline transition ease-in-out`; + const expiredCardStyles = `block mx-auto w-64 p-6 overflow-hidden bg-[#474c52] shadow-xl rounded-2xl focus:outline-none hover:drop-shadow-lg hover:scale-[102%] hover:no-underline focus:no-underline transition ease-in-out cursor-not-allowed`; + + return ( + + {expired && ( +
+
+ Expired +
+
+ )} +
+ {pricing.title} +
+
{pricing.date}
+
+ {pricing.price} +
+
+ ); + }; -const PricingConf = () => { - const today = new Date() return ( - // Invisible padding so anchor links align to the header menu
@@ -62,49 +111,7 @@ const PricingConf = () => {
@@ -147,7 +154,7 @@ const PricingConf = () => {
- ) -} + ); +}; -export default PricingConf +export default PricingConf; From 1c31c87e009b1a121c9fa96f1663998a3f6bfde7 Mon Sep 17 00:00:00 2001 From: TuvalSimha Date: Tue, 23 May 2023 22:58:50 +0300 Subject: [PATCH 4/6] prettier --- src/components/Conf/Pricing/index.tsx | 40 +++++++++++++-------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/components/Conf/Pricing/index.tsx b/src/components/Conf/Pricing/index.tsx index d548dff766..5c02eb0b50 100644 --- a/src/components/Conf/Pricing/index.tsx +++ b/src/components/Conf/Pricing/index.tsx @@ -1,16 +1,16 @@ -import React from "react"; -import { CheckCircledIcon } from "@radix-ui/react-icons"; -import ButtonConf from "../Button"; +import React from "react" +import { CheckCircledIcon } from "@radix-ui/react-icons" +import ButtonConf from "../Button" interface Pricing { - title: string; - date: string; - price: string; - dateIsExpired: Date; + title: string + date: string + price: string + dateIsExpired: Date } interface Title { - title: string; + title: string } const pricing: Pricing[] = [ @@ -32,7 +32,7 @@ const pricing: Pricing[] = [ price: "$899", dateIsExpired: new Date("2023-10-01"), }, -]; +] const includes: Title[] = [ { @@ -53,18 +53,18 @@ const includes: Title[] = [ { title: "Access to watch all sessions", }, -]; +] const PricingConf: React.FC = () => { - const today = new Date(); + const today = new Date() - const isExpired = (expiredDate: Date): boolean => expiredDate < today; + const isExpired = (expiredDate: Date): boolean => expiredDate < today const renderPriceCard = (pricing: Pricing, index: number) => { - const expired = isExpired(pricing.dateIsExpired); + const expired = isExpired(pricing.dateIsExpired) - const cardStyles = `block mx-auto w-64 p-6 overflow-hidden bg-[#2E343C] shadow-xl rounded-2xl focus:outline-none hover:drop-shadow-lg hover:scale-[102%] hover:no-underline focus:no-underline transition ease-in-out`; - const expiredCardStyles = `block mx-auto w-64 p-6 overflow-hidden bg-[#474c52] shadow-xl rounded-2xl focus:outline-none hover:drop-shadow-lg hover:scale-[102%] hover:no-underline focus:no-underline transition ease-in-out cursor-not-allowed`; + const cardStyles = `block mx-auto w-64 p-6 overflow-hidden bg-[#2E343C] shadow-xl rounded-2xl focus:outline-none hover:drop-shadow-lg hover:scale-[102%] hover:no-underline focus:no-underline transition ease-in-out` + const expiredCardStyles = `block mx-auto w-64 p-6 overflow-hidden bg-[#474c52] shadow-xl rounded-2xl focus:outline-none hover:drop-shadow-lg hover:scale-[102%] hover:no-underline focus:no-underline transition ease-in-out cursor-not-allowed` return ( { {pricing.price}
- ); - }; + ) + } return (
@@ -154,7 +154,7 @@ const PricingConf: React.FC = () => {
- ); -}; + ) +} -export default PricingConf; +export default PricingConf From 30ae38c89604d2d56185c7a68fbc5205137823fe Mon Sep 17 00:00:00 2001 From: TuvalSimha Date: Tue, 23 May 2023 23:04:42 +0300 Subject: [PATCH 5/6] some --- src/components/Conf/Pricing/index.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/components/Conf/Pricing/index.tsx b/src/components/Conf/Pricing/index.tsx index 5c02eb0b50..7851069a7f 100644 --- a/src/components/Conf/Pricing/index.tsx +++ b/src/components/Conf/Pricing/index.tsx @@ -9,10 +9,6 @@ interface Pricing { dateIsExpired: Date } -interface Title { - title: string -} - const pricing: Pricing[] = [ { title: "Early Bird", @@ -34,7 +30,7 @@ const pricing: Pricing[] = [ }, ] -const includes: Title[] = [ +const includes: { title: string }[] = [ { title: "All conference content", }, From f389a9a93ea8ca65fde37094b877ca1531d5e9f5 Mon Sep 17 00:00:00 2001 From: TuvalSimha Date: Tue, 23 May 2023 23:08:51 +0300 Subject: [PATCH 6/6] real date --- src/components/Conf/Pricing/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Conf/Pricing/index.tsx b/src/components/Conf/Pricing/index.tsx index 7851069a7f..130da086ef 100644 --- a/src/components/Conf/Pricing/index.tsx +++ b/src/components/Conf/Pricing/index.tsx @@ -14,13 +14,13 @@ const pricing: Pricing[] = [ title: "Early Bird", date: "Through May 31, 2023", price: "$599", - dateIsExpired: new Date("2022-06-01"), + dateIsExpired: new Date("2023-06-01"), }, { title: "Standard", date: "Jun 1 - Sep 4, 2023", price: "$799", - dateIsExpired: new Date("2022-09-05"), + dateIsExpired: new Date("2023-09-05"), }, { title: "Late/Onsite",