added the testimonials, but need to upload the images before it can work.

This commit is contained in:
NoobDeveloper412 2024-09-24 18:09:53 +05:00
parent 08697c0038
commit e24fb40d56

View file

@ -1,45 +1,110 @@
---
import core from "../core.json";
const testimonials = [
{
author: "Matteo",
text: `balance between Transparency and Privacy, accountable and unaccountable, manifest and secret, convex and concave, 1 and 0 is one of the most fun puzzles.`,
imageUrl: "/review.png",
id: "jaromil",
author: "Jaromil",
designation: "Hacktivist, Founder & Director at Dyne.org Foundation",
reviewText:
"Privacy-by-design is the best way to approach the web3 frontier and develop something that empowers people and builds the critical mass for its sustainability. Web3Privacy Now focuses on the best possible goals for crypto developments: privacy, independence and decentralisation.",
imageUrl: null,
},
{
author: "Jane",
text: `This platform has opened my eyes to the potential of blockchain technology in a way that I never imagined. The community is vibrant and full of innovation.`,
imageUrl: "/review.png",
id: "hackguru",
author: "HackGuru",
designation: "Developer Relation at Waku",
reviewText:
"They have been organising amazing pro-privacy initiatives. Been a big fan and excited to continue contributing to this amazing community : )",
imageUrl: null,
},
{
author: "Alex",
text: `It's amazing to see how much transparency can coexist with privacy, and this is the best representation of how it can work. Great work!`,
imageUrl: "/review.png",
id: "lunar-dao",
author: "Lunar Dao",
designation: null,
reviewText:
"A catalyst leading a brilliant charge into privacy content for the web3 ecosystem.",
imageUrl: null,
},
{
id: "amit-chaudhary",
author: "Amit Chaudhary",
designation: "Founder Labyrinth, Ex Head of DeFi Research Polygon",
reviewText:
"This is the best community for privacy that unites people to collaborate and turns user privacy into reality with exciting narratives.",
imageUrl: null,
},
{
id: "andreea",
author: "Andreea",
designation: null,
reviewText:
"I loved the event, the place, the people, the conversations, the swag. You guys are incredible! I think I wont be attending other crypto events that much anymore.",
imageUrl: null,
},
{
id: "cryptocanal",
author: "CryptoCanal",
designation: null,
reviewText:
"One event at a time, they are building an ecosystem to ensure that no one forgets the political frontiers being pushed by crypto. Web3Privacy Now has been rallying support and ensuring that privacy holds a prime spot at all the major conferences worldwide.",
imageUrl: null,
},
{
id: "matteo-tambussi",
author: "Matteo Tambussi",
designation: "Founder of Spaghetteth, Project Manager StakeCapital",
reviewText:
"The balance between Transparency and Privacy, accountable and unaccountable, manifest and secret, convex and concave, 1 and 0 is one of the most fun puzzles blockchain tech has to solve for the world. W3P community approaches this with incredible humility and an unravel-the-knot open debate approach. Also I like how they dress.",
imageUrl: null,
},
{
id: "pie-man",
author: "Pie Man",
designation: "Co-Founder Fairblock Network",
reviewText:
"Most bullish event by far in EthCC was Web3Privacy Now: right in the middle of the park without anything fancy going on, the only incentive to stay was lovely people with extreme passion for deep but practical steps, cryptography, and amazing applications.",
imageUrl: null,
},
];
function enrichTestimonials(testimonials, people) {
return testimonials.map((testimonial) => {
const person = people.find((p) => p.id === testimonial.id);
if (person && person.imageUrl) {
return {
...testimonial,
imageUrl: person.imageUrl,
};
}
return testimonial;
});
}
// Usage
const enrichedTestimonials = enrichTestimonials(testimonials, core.people);
let currentTestimonial = 0;
---
<div class="w-full mx-auto px-8 border-2 border-[#202020]">
<div class="relative" id="testimonial-container">
<div
class="flex flex-col md:flex-row my-4 md:my-0 items-center justify-center testimonial-fade active overflow-hidden"
class="flex flex-col md:flex-row my-4 md:my-0 items-center justify-center testimonial-fade active overflow-hidden person-item"
>
<div>
<img
src={testimonials[currentTestimonial].imageUrl}
class="grayscale"
alt="Review Image"
id="testimonial-image"
/>
</div>
<img
src={enrichedTestimonials[currentTestimonial].imageUrl}
class="grayscale h-24 rounded-full"
alt="Review Image"
id="testimonial-image"
/>
<div class="relative lg:w-9/12">
<div class="relative py-12 px-8 text-gray-700 leading-relaxed">
<h2 class="font-bold" id="testimonial-author">
{testimonials[currentTestimonial].author}:
{enrichedTestimonials[currentTestimonial].author}:
</h2>
<p class="leading-tight" id="testimonial-text">
"{testimonials[currentTestimonial].text}"
"{enrichedTestimonials[currentTestimonial].reviewText}"
</p>
</div>
</div>
@ -98,19 +163,68 @@ let currentTestimonial = 0;
document.addEventListener("DOMContentLoaded", function () {
const testimonials = [
{
author: "Matteo",
text: `balance between Transparency and Privacy, accountable and unaccountable, manifest and secret, convex and concave, 1 and 0 is one of the most fun puzzles.`,
imageUrl: "/review.png",
id: "jaromil",
author: "Jaromil",
designation: "Hacktivist, Founder & Director at Dyne.org Foundation",
reviewText:
"Privacy-by-design is the best way to approach the web3 frontier and develop something that empowers people and builds the critical mass for its sustainability. Web3Privacy Now focuses on the best possible goals for crypto developments: privacy, independence and decentralisation.",
imageUrl: null,
},
{
author: "Jane",
text: `This platform has opened my eyes to the potential of blockchain technology in a way that I never imagined. The community is vibrant and full of innovation.`,
imageUrl: "/review.png",
id: "hackguru",
author: "HackGuru",
designation: "Developer Relation at Waku",
reviewText:
"They have been organising amazing pro-privacy initiatives. Been a big fan and excited to continue contributing to this amazing community : )",
imageUrl: null,
},
{
author: "Alex",
text: `It's amazing to see how much transparency can coexist with privacy, and this is the best representation of how it can work. Great work!`,
imageUrl: "/review.png",
id: "lunar-dao",
author: "Lunar Dao",
designation: null,
reviewText:
"A catalyst leading a brilliant charge into privacy content for the web3 ecosystem.",
imageUrl: null,
},
{
id: "amit-chaudhary",
author: "Amit Chaudhary",
designation: "Founder Labyrinth, Ex Head of DeFi Research Polygon",
reviewText:
"This is the best community for privacy that unites people to collaborate and turns user privacy into reality with exciting narratives.",
imageUrl: null,
},
{
id: "andreea",
author: "Andreea",
designation: null,
reviewText:
"I loved the event, the place, the people, the conversations, the swag. You guys are incredible! I think I wont be attending other crypto events that much anymore.",
imageUrl: null,
},
{
id: "cryptocanal",
author: "CryptoCanal",
designation: null,
reviewText:
"One event at a time, they are building an ecosystem to ensure that no one forgets the political frontiers being pushed by crypto. Web3Privacy Now has been rallying support and ensuring that privacy holds a prime spot at all the major conferences worldwide.",
imageUrl: null,
},
{
id: "matteo-tambussi",
author: "Matteo Tambussi",
designation: "Founder of Spaghetteth, Project Manager StakeCapital",
reviewText:
"The balance between Transparency and Privacy, accountable and unaccountable, manifest and secret, convex and concave, 1 and 0 is one of the most fun puzzles blockchain tech has to solve for the world. W3P community approaches this with incredible humility and an unravel-the-knot open debate approach. Also I like how they dress.",
imageUrl: null,
},
{
id: "pie-man",
author: "Pie Man",
designation: "Co-Founder Fairblock Network",
reviewText:
"Most bullish event by far in EthCC was Web3Privacy Now: right in the middle of the park without anything fancy going on, the only incentive to stay was lovely people with extreme passion for deep but practical steps, cryptography, and amazing applications.",
imageUrl: null,
},
];
@ -135,7 +249,7 @@ let currentTestimonial = 0;
setTimeout(() => {
// Update content after fade-out
authorElement.innerText = testimonial.author;
textElement.innerText = `"${testimonial.text}"`;
textElement.innerText = `"${testimonial.reviewText}"`;
imageElement.src = testimonial.imageUrl;
// Add fade-in class