Skip to content
This repository has been archived by the owner on Dec 8, 2024. It is now read-only.

Commit

Permalink
Merge pull request #205 from TheDivineAurora/main
Browse files Browse the repository at this point in the history
speakers section
  • Loading branch information
Vishesh-Vijay authored Jan 8, 2024
2 parents 01c4cae + d021fcf commit ae1d22f
Show file tree
Hide file tree
Showing 5 changed files with 185 additions and 3 deletions.
4 changes: 2 additions & 2 deletions css/organizers.css
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
font-weight: 500;
}

.github a {
.socials a {
display: inline-block;
height: 40px;
width: 40px;
Expand All @@ -87,7 +87,7 @@
transition: all 0.5s ease;
}

.github a:hover {
.socials a:hover {
color: rgb(255, 255, 255);
background-color: #00cf90;
}
94 changes: 94 additions & 0 deletions css/speakers.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
#speakers {
margin-bottom: 30px;
}
#speakers-content {
justify-content: center;
align-items: center;
text-align: center;
padding-top: 50px;
}
#speakers-content h1 {
color: #00cf90;
font-family: "Kufam", sans-serif;
font-weight: 400;
font-size: 40px;
margin-top: 50px;
}
#speakers-content p {
color: white;
font-weight: 400;
line-height: 19.5px;
margin: auto;
text-align: center;
}
#speakers-container {
margin: 0 30px;
margin-top: 50px;
display: flex;
flex-wrap: wrap;
justify-content: center;
}
.wing-speaker {
font-size: 16px;
color: #00cf90;
margin-top: 15px;
font-weight: 1000;
}
.role-speaker {
font-size: 15px;
color: #00cf90;
font-weight: 100;
}
.speaker-discord {
color: #b7e7d9;
margin-top: -6px;
font-size: 12px;
}
.speaker-card {
background-color: rgba(217, 217, 217, 0.2);
backdrop-filter: blur(10px);
width: 230px;
margin: 25px;
text-align: center;
transition: 0.3s ease;
height: 21rem;
padding: 4px 10px;
border-radius: 10px;
position: relative;
}
.speaker-card:hover {
box-shadow: 0px 40px 56px rgba(8, 157, 60, 0.1);
transition: 0.3s;
}
.speaker-gitavatar {
height: 90px;
margin: 10px 10px;
padding-top: 10px;
padding-bottom: 1px;
border-radius: 50%;
}
.speaker-name {
font-size: 19px;
font-family: "Kufam", sans-serif;
color: #00cf90;
font-weight: 500;
}

.github a {
display: inline-block;
height: 40px;
width: 40px;
background-color: rgba(79, 210, 105, 0.117);
margin: 10px;
text-align: center;
line-height: 40px;
border-radius: 50%;
color: #00cf90;
transition: all 0.5s ease;
}

.github a:hover {
color: rgb(255, 255, 255);
background-color: #00cf90;
}

18 changes: 18 additions & 0 deletions data/speakers.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[
{
"Name": "Srilakshmi Barathi",
"Role": "Coordinator",
"At": "Naksh - NFT Marketplace & The Phoenix Guild",
"x": "https://twitter.com/srilakshmitc",
"xavatar": "https://pbs.twimg.com/profile_images/1549356807361122304/_HdbSy3n_400x400.jpg",
"linkedin":"https://www.linkedin.com/in/srilakshmi-tc/"
},
{
"Name": "Aniket Raj",
"Role": "Community lead",
"At": "Devfolio",
"x": "https://twitter.com/AniketRaj314",
"xavatar": "https://pbs.twimg.com/profile_images/1679058188824645632/8LN9mYqO_400x400.jpg"
}

]
16 changes: 15 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<link rel="stylesheet" href="css/navbar.css" />
<link rel="stylesheet" href="css/leaderboard.css" />
<link rel="stylesheet" href="css/organizers.css" />
<link rel="stylesheet" href="css/speakers.css" />
<link
rel="stylesheet"
type="text/css"
Expand Down Expand Up @@ -61,6 +62,7 @@
<script src="js/navbar.js" defer></script>
<script src="js/projects.js" defer></script>
<script src="js/organizers.js" defer></script>
<script src="js/speakers.js" defer></script>
<script src="js/events.js" defer></script>
<script src="js/background.js" defer></script>
<script src="js/leaderboard.js" defer></script>
Expand All @@ -84,6 +86,7 @@
<li><a href="#leaderboard">LEADERBOARD</a></li>
<li><a href="#projects">PROJECTS</a></li>
<li><a href="#organizers">ORGANIZERS</a></li>
<li><a href="#speakers">SPEAKERS</a></li>
<li><a href="#events">EVENTS</a></li>
<li><a href="#mentors">MENTORS</a></li>
<li><a href="#footer">CONTACT US</a></li>
Expand Down Expand Up @@ -194,7 +197,18 @@ <h1>Organizers</h1>
<!-- Organizers section end -->

<!-- Speaker section starts -->
<section></section>
<section id="speakers">
<div id="speakers-content">
<h1>Speakers</h1>
</div>
<div id="speakers-container"></div>
<!-- <div class="show-more-button no-display" id="organizers-show-more"></div> -->
<div class="show-more-button-container">
<div class="show-more-button" id="speakers-show-more">
<p>Show More</p>
</div>
</div>
</section>
<!-- Speaker section ends -->

<!-- Events section starts -->
Expand Down
56 changes: 56 additions & 0 deletions js/speakers.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
var speakerShowAll = false;

const speakerShowAllButton = document.getElementById("speakers-show-more");
document.addEventListener("DOMContentLoaded", populateSpeakers);

speakerShowAllButton.addEventListener("click", () => {
speakerShowAll = true;
speakerShowAllButton.classList.add("no-display");
populateSpeakers();
});

function populateSpeakers() {
// Check if the screen width is more than 900px
if (window.innerWidth > 900) {
speakerShowAll = true;
speakerShowAllButton.classList.add("no-display");
}

fetch("data/speakers.json")
.then((response) => response.json())
.then((data) => generateSpeakerCards(data))
.catch((error) => console.error("Error fetching speaker data:", error));
}

function generateSpeakerCards(speakersData) {
const speakerSection = document.getElementById("speakers-container");
speakerSection.innerHTML = "";

const numLength = speakersData.length;
const numSpeakers = speakerShowAll ? numLength : 6;

for (let i = 0; i < numSpeakers; i++) {
const speaker = speakersData[i];

const card = document.createElement("div");
card.classList.add("speaker-card");
card.innerHTML = `
<img src="${speaker.xavatar}" class="image">
<div class="speaker-name">
<h3>${speaker.Name}</h3>
</div>
<h3 class="wing-speaker">${speaker.Role} </h4>
<h4 class="role-speaker">${speaker.At}</h4>
<div class="socials">
<a href="${speaker.x}" target="_blank"><i class="fab fa-twitter"></i></a>
${speaker.linkedin ? `<a href="${speaker.linkedin}" target="_blank"><i class="fab fa-linkedin"></i></a>` : ''}
</div>
<div class="github">
</div>
`;
speakerSection.appendChild(card);
}
}

0 comments on commit ae1d22f

Please sign in to comment.