Skip to content

Commit

Permalink
feat: update ui
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamadch91 committed Dec 22, 2024
1 parent d116ea1 commit e7b8fb3
Show file tree
Hide file tree
Showing 6 changed files with 303 additions and 59 deletions.
26 changes: 16 additions & 10 deletions ui/src/components/UseCaseCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ interface CardProps {
logo1: string;
tag?: string;
onClick?: () => void;
option?: string
description?: string
}

const UseCaseCard: FunctionComponent<CardProps> = ({
Expand All @@ -23,7 +23,7 @@ const UseCaseCard: FunctionComponent<CardProps> = ({
logo1,
tag,
onClick,
option
description,
}) => {
const truncate = (text: string | undefined, number: number) => {
if (text) {
Expand All @@ -33,26 +33,32 @@ const UseCaseCard: FunctionComponent<CardProps> = ({

return (
<>
<div onClick={()=>{
onClick?.()
}} className="card cursor-pointer rounded-lg border shadow-2xl dark:border-none dark:bg-white h-full flex flex-col justify-between w-full gap-4 ">
<div className="flex flex-row justify-between rounded-xl items-center px-4 py-2">
<div
onClick={() => {
onClick?.();
}}
className="card cursor-pointer rounded-lg border shadow-2xl dark:border-none dark:bg-white h-full flex flex-col justify-between w-full gap-4 "
>
<div className="flex flex-row justify-between rounded-xl items-center px-4 pt-6 pb-0">
<div className="flex flex-row gap-2">
<div className=" bg-gray-300 dark:bg-slate-400 rounded p-2">
{/* <div className=" bg-gray-300 dark:bg-slate-400 rounded p-2">
<img src={logo} className=" h-5 w-5" />
</div>
<div className="bg-gray-300 dark:bg-slate-400 rounded p-2">
<img src={logo1} className=" h-5 w-5" />
</div>
</div> */}
<h3 className=" font-semibold text-black dark:text-black">
{title}
</h3>
</div>
<div>
{/* <span className="rounded-3xl text-black dark:text-white bg-gray-300 dark:bg-slate-400 px-3 py-1 text-center">
{tag}
</span> */}
</div>
</div>
<div className=" text-start text-black text-wrap px-4 py-2 ">
{title}
<div className=" text-start text-black text-wrap px-4 pt-1 pb-2 ">
{description}
</div>

<div className="flex flex-row justify-center bg-gray-600 dark:bg-blue-900 rounded-b-lg px-4 py-2 items-center">
Expand Down
30 changes: 20 additions & 10 deletions ui/src/components/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -107,40 +107,50 @@ box-shadow: -3px 4px 4px 0px rgba(255, 255, 255, 0.39) !important;
}



.custom-container {
background-color: #2F2F2F!important;
border: 1px solid #dcdcdc!important;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1)!important;

}
.custom-container:is(.dark *) {
background-color: #3f4344!important;

}

.custom-container-card {
/* border: 1px solid #dcdcdc!important; */
background-color: #5c5c5cd5!important;
border: none;

/* box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1)!important; */
border-radius: 8px!important;
/* padding: 20px!important; */
/* margin: 15px 0!important; */
}
.custom-container h2 {
.custom-container-card h2 {
/* font-size: 1.5rem!important; */
font-weight: bold!important;
color: #ffff!important;
}
.custom-container p {
.custom-container-card p {
/* font-size: 1rem!important; */
color: #fff!important;
/* line-height: 1.6!important; */
}

.custom-container:is(.dark *) {
.custom-container-card:is(.dark *) {
background-color: #e4e3e3!important;
border: 1px solid #000!important;
box-shadow: -5px 5px 11px 10px rgb(255 255 255 / 20%) !important;
/* border: 1px solid #000!important; */
/* box-shadow: -5px 5px 11px 10px rgb(255 255 255 / 20%) !important; */
border-radius: 8px!important;
/* padding: 20px!important; */
/* margin: 15px 0!important; */
}
.custom-container h2:is(.dark *) {
.custom-container-card h2:is(.dark *) {
/* font-size: 1.5rem!important; */
font-weight: bold!important;
color: #000!important;
}
.custom-container p:is(.dark *) {
.custom-container-card p:is(.dark *) {
/* font-size: 1rem!important; */
color: #000!important;
line-height: 1.6!important;
Expand Down
54 changes: 28 additions & 26 deletions ui/src/components/ui/Features.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,35 +21,37 @@ export default function Features() {
return (
<section
aria-labelledby="features-title"
className="custom-container mt-24 w-full max-w-6xl px-3 sm:px-60 py-12 mx-auto border dark:border-white ring-1 bg-white ring-tremor-background-emphasis rounded-xl flex flex-col justify-start items-start"
className=" custom-container my-12"
>
{/* <Badge>Security at Scale</Badge> */}
<h2
id="features-title"
className=" inline-block text-black text-start w-full bg-gradient-to-br from-gray-900 to-gray-800 bg-clip-text py-2 text-4xl font-bold tracking-tighter sm:text-4xl md:text-4xl "
>
Compliance is painful
</h2>
<p className="mt-6 text-lg max-w-3xl text-left leading-7 text-black dark:text-black">
{/* <b>Compliance is painful.</b> <br />
<div className="custom-container-card mt-24 mb-24 max-w-4xl px-3 sm:px-36 py-12 mx-auto border rounded-xl flex flex-col justify-start items-start">
<h2
id="features-title"
className=" inline-block text-black text-start w-full bg-gradient-to-br from-gray-900 to-gray-800 bg-clip-text py-2 text-4xl font-bold tracking-tighter sm:text-4xl md:text-4xl "
>
Compliance is painful
</h2>
<p className="mt-6 text-lg max-w-3xl text-left leading-7 text-black dark:text-black">
{/* <b>Compliance is painful.</b> <br />
<br /> */}
Generic controls. Outdated processes. Confusing standards. Overpriced
tools that can’t handle modern stacks or real-world workflows.
<br />
<br />
<b>We want to change that.</b>
<br />
<br />
We believe compliance should be simple, transparent, and adaptable, so
it fits naturally into how you work.
<br />
<br />
That’s why we built a platform that evolves with your stack, letting you
focus on what really matters—building incredible products.
<br />
<br />
<b> Welcome to opencomply.</b>
</p>
Generic controls. Outdated processes. Confusing standards. Overpriced
tools that can’t handle modern stacks or real-world workflows.
<br />
<br />
<b>We want to change that.</b>
<br />
<br />
We believe compliance should be simple, transparent, and adaptable, so
it fits naturally into how you work.
<br />
<br />
That’s why we built a platform that evolves with your stack, letting
you focus on what really matters—building incredible products.
<br />
<br />
<b> Welcome to opencomply.</b>
</p>
</div>
{/* <div className="mt-4 w-full text-center">
<Button className="mt-4 ">
<a href="https://opencomply.io/oss" target="__blank">
Expand Down
186 changes: 186 additions & 0 deletions ui/src/components/ui/UseCase.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
import {
Button,
Container,
FormField,
Header,
Input,
KeyValuePairs,
Link,
Modal,
SpaceBetween,
Wizard,
} from "@cloudscape-design/components";
import Advantage from "../../components/ui/Advantage";
import Benefits from "../../components/ui/Benefits";
import CodeExample from "../../components/ui/CodeExample";
import Cta from "../../components/ui/Cta";
import { Faqs } from "../../components/ui/Faqs";
import Features from "../../components/ui/Features";
import { GlobalDatabase } from "../../components/ui/GlobalDatabase";
import Hero from "../../components/ui/Hero";
import HeroUseCase from "../../components/ui/HeroUseCase";
import LogoCloud from "../../components/ui/LogoCloud";
import Steps from "../../components/ui/Steps";
import UseCaseCard from "../../components/UseCaseCard";
import { useState } from "react";
// @ts-ignore
import video from "../../videos/2024-10-08-How_to_Customize_Controls.mp4";
import CopyToClipboard from "../../components/CopyToClipboard";


const CARDS = {
DevOps: [
{
title: "Centralize Visibility",
description:
"Aggregate assets/configs in one spot. Query with SQL for rapid oversight.",
},
{
title: "Identify Risky Configurations",
description: "Spot insecure setups that could expose sensitive data.",
},
{
title: "Identify Vulnerable Deployments ",
description:
"Spot vulnerabilities in builds and deployments early for secure releases.",
},
{
title: "Maintain Policy as Code ",
description:
"Store compliance rules in Git for easy audits and repeatable enforcement.",
},
{
title: "Eliminate Unused Resources",
description:
"Remove idle services to cut costs and reduce hidden security threats.",
},
{
title: "Detect non-compliance in Builds",
description:
"Spot vulnerabilities and non-compliance in builds and deployments early for secure releases.",
},
],
Security: [
{
title: "Centralize Visibility",
description:
"Aggregate assets/configs in one spot. Query with SQL for rapid oversight.",
},
{
title: "Streamline Incident Response ",
description:
"Automate detection/resolution to quickly fix misconfigs and limit damage.",
},
{
title: "Govern Identities",
description:
"Track roles/permissions, remove overlaps, and reduce overprivilege.",
},
{
title: "Identify Vulnerable Deployments ",
description:
"Spot vulnerabilities in builds and deployments early for secure releases.",
},
{
title: "Maintain Policy as Code ",
description:
"Store compliance rules in Git for easy audits and repeatable enforcement.",
},
{
title: "Centralize Compliance",
description:
"Centralize compliance across your stack for easy oversight and enforcement.",
},
],
MLOps: [],
};
const STEPS = {
0: "DevOps",
1: "Security",
2: "MLOps",
}



export default function UseCase() {
const [activeStepIndex, setActiveStepIndex] = useState(0);
const [open, setOpen] = useState(false);
return (
<section
aria-labelledby="code-example-title"
className="mx-auto mt-28 w-full max-w-6xl flex flex-col justify-center items-center"
>
{/* <Badge>Developer-first</Badge> */}
<h2
id="code-example-title"
className="mt-2 inline-block bg-gradient-to-br from-gray-900 to-gray-800 bg-clip-text py-2 text-4xl font-bold tracking-tighter text-transparent sm:text-6xl md:text-6xl dark:from-gray-50 dark:to-gray-300"
>
UseCases
</h2>
<p className="mt-6 mb-4 max-w-2xl text-lg text-center text-gray-600 dark:text-gray-400">
Unicorn Platform is a powerful website builder for startups,
solo-entrepreneurs and hackers. Try it for free.
</p>
<div className="p-1 mb-6 mt-4 dark:bg-white bg-[#5c5c5cd5] w-1/2 rounded-full flex flex-row gap-3">
<div
onClick={() => {
setActiveStepIndex(0);
}}
className={`text-white dark:text-black rounded-full w-full text-center hover:bg-indigo-200 p-3 cursor-pointer ${activeStepIndex == 0 && "bg-indigo-500 text-white dark:text-white"}`}
>
DevOps
</div>
<div
onClick={() => {
setActiveStepIndex(1);
}}
className={`text-white dark:text-black rounded-full w-full text-center hover:bg-indigo-200 p-3 cursor-pointer ${activeStepIndex == 1 && "bg-indigo-500 text-white dark:text-white"}`}
>
Security
</div>
<div
onClick={() => {
setActiveStepIndex(2);
}}
className={`text-white dark:text-black rounded-full w-full text-center hover:bg-indigo-200 p-3 cursor-pointer ${activeStepIndex == 2 && "bg-indigo-500 text-white dark:text-white"}`}
>
MLOps
</div>
</div>
<div
className="mt-4 flex flex-row flex-wrap gap-10 flex-grow flex-shrink flex-1 justify-start"
style={{ flex: "1 1 0" }}
>
{
// @ts-ignore
CARDS[STEPS[activeStepIndex]].map((card, index) => (
<>
{/* <div className="bg-[#5c5c5cd5] w-[calc(33%-calc(2rem/3))] dark:bg-[#3f4344] rounded-xl flex flex-col gap-4 p-4">
<div className="">
<h3 className="text-xl font-bold text-white dark:text-white">
{card.title}
</h3>
</div>
<div>
<p className="text-white dark:text-gray-200">
{card.description}
</p>
</div>
</div> */}
<div className="w-[calc(33%-calc(2rem))]">
<UseCaseCard
title={card.title}
description={card.description}
logo=""
logo1=""
onClick={() => {}}
// description={card.description}
/>
</div>
</>
))
}
</div>
</section>
);
}
3 changes: 2 additions & 1 deletion ui/src/pages/landing/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { GlobalDatabase } from "../../components/ui/GlobalDatabase"
import Hero from "../../components/ui/Hero"
import LogoCloud from "../../components/ui/LogoCloud"
import Steps from "../../components/ui/Steps"
import UseCase from "../../components/ui/UseCase"

export default function Home() {
return (
Expand All @@ -16,7 +17,7 @@ export default function Home() {
<LogoCloud />
{/* <GlobalDatabase /> */}
<Features />

<UseCase />
<Steps />

<CodeExample />
Expand Down
Loading

0 comments on commit e7b8fb3

Please sign in to comment.