Skip to content

Commit 1d67516

Browse files
revert the deleted bookcomponent
Signed-off-by: Rajesh-Nagarajan-11 <rajeshnagarajan36@gmail.com>
1 parent ad61c31 commit 1d67516

3 files changed

Lines changed: 130 additions & 9 deletions

File tree

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import React, { useEffect } from "react";
2+
import BookComponentWrapper from "./BookComponent.style";
3+
import handbookdark from "../images/handbook-dark.webp";
4+
import { Link } from "gatsby";
5+
6+
const BookComponent = () => {
7+
useEffect(() => {
8+
const bookElement = document.querySelector(".book");
9+
bookElement.classList.add("rot-on-rel");
10+
}, []);
11+
return (
12+
<BookComponentWrapper>
13+
<Link
14+
className="book-container"
15+
to="/community/handbook"
16+
target="_blank"
17+
rel="noreferrer noopener"
18+
>
19+
<div className="book">
20+
<img
21+
alt="Community HandBook"
22+
src={handbookdark}
23+
/>
24+
</div>
25+
</Link>
26+
</BookComponentWrapper>
27+
);
28+
};
29+
30+
export default BookComponent;
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
import styled from "styled-components";
2+
3+
const BookComponentWrapper = styled.div`
4+
.book-container {
5+
display: flex;
6+
align-items: center;
7+
justify-content: center;
8+
perspective: 600px;
9+
}
10+
11+
@keyframes initAnimation {
12+
0% {
13+
transform: rotateY(0deg);
14+
}
15+
100% {
16+
transform: rotateY(-30deg);
17+
}
18+
}
19+
20+
.rot-on-rel {
21+
transform: rotateY(0deg);
22+
}
23+
24+
.book {
25+
min-width: 200px;
26+
min-height: 300px;
27+
position: relative;
28+
transform-style: preserve-3d;
29+
transform: rotateY(-30deg);
30+
transition: 1s ease;
31+
animation: 1s ease 0s 1 initAnimation;
32+
}
33+
34+
.book:hover {
35+
transform: rotateY(0deg);
36+
}
37+
38+
.book > :first-child {
39+
position: absolute;
40+
top: 0;
41+
left: 0;
42+
background-color: red;
43+
width: 200px;
44+
height: 300px;
45+
transform: translateZ(25px);
46+
background-color: #171a12;
47+
border-radius: 0 2px 2px 0;
48+
}
49+
50+
.book::before {
51+
position: absolute;
52+
content: ' ';
53+
left: 0;
54+
top: 3px;
55+
width: 48px;
56+
height: 294px;
57+
transform: translateX(172px) rotateY(90deg);
58+
background: linear-gradient(90deg,
59+
#fff 0%,
60+
#f9f9f9 5%,
61+
#fff 10%,
62+
#f9f9f9 15%,
63+
#fff 20%,
64+
#f9f9f9 25%,
65+
#fff 30%,
66+
#f9f9f9 35%,
67+
#fff 40%,
68+
#f9f9f9 45%,
69+
#fff 50%,
70+
#f9f9f9 55%,
71+
#fff 60%,
72+
#f9f9f9 65%,
73+
#fff 70%,
74+
#f9f9f9 75%,
75+
#fff 80%,
76+
#f9f9f9 85%,
77+
#fff 90%,
78+
#f9f9f9 95%,
79+
#fff 100%
80+
);
81+
}
82+
83+
.book::after {
84+
position: absolute;
85+
top: 0;
86+
left: 0;
87+
content: ' ';
88+
width: 200px;
89+
height: 300px;
90+
transform: translateZ(-25px);
91+
background-color: #292929;
92+
border-radius: 0 2px 2px 0;
93+
box-shadow: -2px 1px 30px 2px #666;
94+
}
95+
`;
96+
97+
export default BookComponentWrapper;

src/sections/Community/Meshmates/index.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { ReactComponent as MeshmateStackImage } from "../../../assets/images/mes
1010

1111
import { Link } from "gatsby";
1212
import { FiArrowRight } from "@react-icons/all-files/fi/FiArrowRight";
13-
import HandbookCard from "../../../components/HandbookCard";
13+
import BookComponent from "../Handbook/BookComponent/BookComponent";
1414

1515
const Meshmates = () => {
1616
const data = useStaticQuery(
@@ -131,13 +131,7 @@ const Meshmates = () => {
131131
<div className="expect">
132132
<h5> What to Expect </h5>
133133
<h2> Engaging with a MeshMate</h2>
134-
<div className="bookcomponent">
135-
<HandbookCard
136-
title="Community Handbook"
137-
description="Explore the Layer5 Community Handbook to learn more about our community, contribution guidelines, and resources."
138-
to="/community/handbook"
139-
/>
140-
</div>
134+
<div className="bookcomponent"><BookComponent /></div>
141135
<p> The program pairs experienced Layer5 community members with community newcomers to ensure a smooth onboarding experience. There is a lot going in the Layer5 community. Projects and working groups move fast. MeshMates are committed to helping their mentees in identifying an area of the projects to engage within, working groups to join, growing their Cloud Native knowledge, and network of relationships. By connecting one-on-one, MeshMates will share tips on how to have the best community experience possible. </p>
142136
<p> Meshtees are encouraged to reach out to any MeshMate directly in order to pair up. Introduce yourself either on in the <a href="https://discuss.layer5.io/c/community/12">Layer5 discussion forum</a>. Help your MeshMate understand your current skills, ideal topics of learning, and areas of passion. Doing so will help them to point out various aspects of projects that you might find your first foothold. </p>
143137
</div>
@@ -204,4 +198,4 @@ const Meshmates = () => {
204198
);
205199
};
206200

207-
export default Meshmates;
201+
export default Meshmates;

0 commit comments

Comments
 (0)