Skip to content

Commit 9c64e7c

Browse files
authored
chore: css style and content fixes (#31)
Signed-off-by: Aditya Prasad Mohanty <[email protected]>
1 parent 0f90f85 commit 9c64e7c

File tree

8 files changed

+112
-31
lines changed

8 files changed

+112
-31
lines changed

src/components/HomepageBlogs/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export default function HomepageBlogs() {
6666
</div>
6767
<div className={styles.containerData}>
6868
<p className={styles.containerAuthor}>
69-
by <span className={styles.author}>Shubham Tatvamasi</span>
69+
by <span className={styles.author}>Prashant Mishra</span>
7070
</p>
7171
<p className={styles.containerDate}>Aug 17, 2023</p>
7272
</div>

src/components/HomepageFeatures/index.js

+65-8
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,111 @@
1-
import React, { useState, useEffect, useRef, useMemo } from "react";
1+
import React, { useState, useLayoutEffect, useRef, useMemo } from "react";
22
import styles from "./styles.module.css";
33
import featuresImage from "../../../static/img/features/features-illustration.webp";
44
import CreatorLogo from "../../../static/img/accuknox/accuknox-light-bg.svg";
55
import { gsap } from "gsap";
66
import { ScrollTrigger } from "gsap/ScrollTrigger";
77
import featuresContent from "./content.json";
88
import { icons } from "./icons";
9+
import Link from "@docusaurus/Link";
10+
11+
gsap.registerPlugin(ScrollTrigger);
912

1013
function Item(props) {
1114
const Icon = props.icon;
1215

1316
return (
1417
<div className={styles.content}>
15-
<div className={styles.iconContainer}>
16-
{Icon && <Icon className={styles.icon} />}
18+
<div className={styles.contentTop}>
19+
<div className={styles.iconContainer}>
20+
{Icon && <Icon className={styles.icon} />}
21+
</div>
22+
<h3 className={styles.contentHeader}>{props.feature}</h3>
1723
</div>
1824
<div className={styles.contentWrapper}>
19-
<h3 className={styles.contentHeader}>{props.feature}</h3>
25+
{/* <h3 className={styles.contentHeader}>{props.feature}</h3> */}
2026
<p className={styles.contentDescription}>{props.description}</p>
2127
</div>
2228
</div>
2329
);
2430
}
2531

2632
export default function HomepageFeatures() {
33+
const featuresRef = useRef(null);
34+
35+
useLayoutEffect(() => {
36+
const featuresEl = featuresRef.current;
37+
const featuresImage = featuresEl.querySelector("features-image");
38+
const featuresContentEl = featuresEl.querySelector("features-content");
39+
// Pin the featuresImage element
40+
gsap.to(featuresImage, {
41+
position: "fixed",
42+
top: "50%",
43+
right: 0,
44+
});
45+
46+
gsap.to(featuresContentEl, {
47+
position: "absolute",
48+
top: 0,
49+
left: 0,
50+
opacity: 1,
51+
scrollTrigger: {
52+
trigger: featuresEl,
53+
start: "top",
54+
end: "+100vh",
55+
},
56+
});
57+
58+
// Animate the opacity of content elements on scroll
59+
featuresContent.forEach((item, index) => {
60+
const contentEl = featuresEl.querySelector(`#content-${item.id}`);
61+
gsap.to(contentEl, {
62+
opacity: 0,
63+
transform: "translate3d(100%, 0, 0)",
64+
scrollTrigger: {
65+
trigger: featuresEl,
66+
start: `top ${index * window.innerHeight}px`,
67+
end: `top ${(index + 1) * window.innerHeight}px`,
68+
// opacity: 1,
69+
transform: "translate3d(0, 0, 0)",
70+
ease: "power1inOut",
71+
},
72+
});
73+
});
74+
}, []);
75+
2776
return (
2877
<section className={`features ${styles.features}`}>
2978
<h2 className={styles.featuresTitle}>FEATURES</h2>
3079
<h1 className={styles.featuresHeader}>What Makes KubeArmor Unique?</h1>
3180
<div className={`features-container ${styles.container} `}>
3281
{/* <div className={`features-progress-bar ${styles.progressBar}`}>0%</div> */}
33-
<div className={`features-content ${styles.containerContent}`}>
82+
<div
83+
className={`features-content ${styles.containerContent}`}
84+
ref={featuresRef}
85+
id="features-content"
86+
>
3487
{featuresContent.map((item) => (
3588
<Item
3689
key={item.id}
90+
id={`content-${item.id}`}
3791
feature={item.feature}
3892
description={item.description}
3993
icon={icons[item.icon]}
4094
/>
4195
))}
4296
</div>
43-
{/* <img
97+
<img
4498
src={featuresImage}
4599
className={styles.featuresImage}
46100
alt="feature image"
47-
/> */}
101+
id="features-image"
102+
/>
48103
</div>
49104
<div className={styles.creator}>
50105
Created By
51-
<CreatorLogo className={styles.creatorLogo} />
106+
<Link to="https://www.accuknox.com/" className={styles.creatorContainer}>
107+
<CreatorLogo className={styles.creatorLogo} />
108+
</Link>
52109
</div>
53110
</section>
54111
);

src/components/HomepageFeatures/styles.module.css

+36-4
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,29 @@
1919
}
2020

2121
.featuresImage {
22-
width: 100%;
22+
display: none;
23+
width: 50%;
2324
overflow: visible;
2425
}
2526

27+
.container {
28+
display: flex;
29+
flex-direction: row;
30+
align-items: center;
31+
}
2632
.containerContent {
2733
/* width: 40%; */
2834
display: grid;
2935
grid-template-columns: repeat(2, 1fr);
3036
grid-template-rows: repeat(3, 1fr);
3137
gap: 1.5rem;
38+
/* display: flex;
39+
flex-direction: column; */
3240
margin-top: 3rem;
3341
}
3442
.content {
35-
height: 18rem;
43+
/* height: 18rem; */
44+
height: 15rem;
3645
padding: 1.5rem;
3746
color: var(--color-white);
3847
box-shadow: 1px 1px 4px 0px rgba(0, 0, 0, 0.1),
@@ -62,12 +71,19 @@
6271
display: inline-block;
6372
align-items: center;
6473
}
74+
.contentTop {
75+
display: flex;
76+
flex-direction: row;
77+
gap: 1rem;
78+
align-items: center;
79+
}
6580
.contentHeader {
6681
font-family: var(--font-main-semibold);
6782
font-weight: 600;
6883
color: var(--color-font-header);
6984
font-size: 1.5rem;
70-
margin-top: 1rem;
85+
/* margin-top: 1rem; */
86+
margin: 0;
7187
}
7288
.contentDescription {
7389
font-family: var(--font-main-regular);
@@ -86,7 +102,7 @@
86102
margin-top: 2rem;
87103
}
88104
.creatorLogo {
89-
width: 20%;
105+
width: 16rem;
90106
height: auto;
91107
}
92108
.containerDesktop {
@@ -103,3 +119,19 @@
103119
padding: 16rem 2rem 0;
104120
}
105121
}
122+
@media screen and (max-width: 550px) {
123+
.icon {
124+
height: 1rem;
125+
width: 1rem;
126+
}
127+
.iconContainer {
128+
padding: 0.25rem 0.5rem;
129+
}
130+
.contentHeader {
131+
font-size: 1rem;
132+
}
133+
.contentTop {
134+
margin-bottom: 0.5rem;
135+
}
136+
137+
}

src/components/HomepageHeader/styles.module.css

+4-4
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@
2727
justify-content: space-between;
2828
margin-bottom: 0.5rem;
2929
}
30-
.heroAnnouncement:hover {
31-
text-decoration: none;
32-
}
3330
.heroTitle {
3431
font-family: var(--font-main-bold);
3532
font-size: 4rem;
@@ -72,10 +69,13 @@
7269
width: 24%;
7370
}
7471
}
75-
@media screen and (max-width: 996px) {
72+
@media screen and (max-width: 880px) {
7673
.heroAnnouncement {
7774
width: 36%;
7875
}
76+
.heroImage {
77+
width: 80vw;
78+
}
7979
}
8080
@media screen and (max-width: 550px) {
8181
.heroTitle {

src/components/HomepageInstallation/index.js

+4-12
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,13 @@ import Link from "@docusaurus/Link";
88
export default function HomepageInstallation() {
99
const videoId = "CH0qtp5DAhs";
1010
const code = `
11-
export HELM_EXPERIMENTAL_OCI=1
11+
helm repo add kubearmor https://kubearmor.github.io/charts
1212
13-
aws ecr get-login-password \\
14-
--region us-east-1 | helm registry login \\
15-
--username AWS \\
16-
--password-stdin 709825985650.dkr.ecr.us-east-1.amazonaws.com
13+
helm repo update kubearmor
1714
18-
mkdir awsmp-chart && cd awsmp-chart
15+
helm upgrade --install kubearmor-operator kubearmor/kubearmor-operator -n kubearmor --create-namespace
1916
20-
helm pull oci://709825985650.dkr.ecr.us-east-1.amazonaws.com/accuknox/kubearmor --version 0.10.3
21-
22-
tar xf $(pwd)/* && find $(pwd) -maxdepth 1 -type f -delete
23-
24-
helm install kubearmor \\
25-
--namespace <ENTER_NAMESPACE_HERE> ./*
17+
kubectl apply -f https://raw.githubusercontent.com/kubearmor/KubeArmor/main/pkg/KubeArmorOperator/config/samples/sample-config.yml
2618
`;
2719

2820
function copyToClipboard() {

src/components/HomepageMarketplaces/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ export default function HomepageMarketplaceImages() {
77
return (
88
<section className={`marketplaceImages ${styles.market}`}>
99
<p className={styles.marketText}>KubeArmor is Now Available on</p>
10-
<MarketplaceImage className={styles.marketImage}/>
10+
<MarketplaceImage className={styles.marketImage} />
1111
<RedirectButton
1212
redirectColor="var(--color-primary)"
1313
redirectText="Install Now"
14-
redirectLink="https://aws.amazon.com/marketplaceImage/pp/prodview-5npox4ixz64qk"
14+
redirectLink="https://aws.amazon.com/marketplace/pp/prodview-5npox4ixz64qk"
1515
/>
1616
</section>
1717
);

static/img/hero/hero-mascot.png

187 KB
Loading

static/img/hero/hero-mascot.webp

49.1 KB
Binary file not shown.

0 commit comments

Comments
 (0)