Skip to content

Commit

Permalink
Merge pull request #29 from GDSCKCA2023-224/remove-events
Browse files Browse the repository at this point in the history
chore: remove events section
  • Loading branch information
Njoguu authored Jul 12, 2024
2 parents 873bf62 + 7fa41e3 commit 1b5c380
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 35 deletions.
26 changes: 0 additions & 26 deletions backend/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,12 @@ async function loadData(){
const response = await fetch(URL);

const data = await response.json();
const events = data.Events;
const resources = data.Resources;

const eventsContainer = document.getElementById('events-container');
const resourcesContainer = document.getElementById('resources-container');

eventsContainer.innerHTML = '';
resourcesContainer.innerHTML = '';

if (events.length == 0){
eventsContainer.innerHTML += `
<div class="text-center">
<p>No Events data to show!</p>
</div>
`
}else{
for (let event of events) {
eventsContainer.innerHTML += `
<div class="card w-72 bg-base-100 shadow-xl">
<figure><img src="${event.Image}" alt="${event.Name}" /></figure>
<div class="card-body">
<h2 class="card-title">${event.Name}</h2>
<p>${event.Location}<br/>@ ${event.Date}</p>
<div class="card-actions justify-end">
<a class="btn bg-[#EF5B25] text-white" href="${event.Link}" target="_blank">View Event</a>
</div>
</div>
</div>
`
}
}

if (resources.length == 0){
resourcesContainer.innerHTML += `
<div class="text-center">
Expand Down
9 changes: 0 additions & 9 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,6 @@ <h1 class="text-4xl text-[#EF5B25]">Benefits</h1>
</div>
</section>

<section id="events">
<h1 class="text-3xl text-center text-[#EF5B25]">Events</h1>
<div class="min-h-screen pt-5 m-2">
<div id="events-container" class="flex flex-wrap justify-center gap-8 text-black">
<span class="loading loading-bars loading-md"></span>
</div>
</div>
</section>

<section id="get-involved">
<div class="r">
<div class="text-center text-white bg-[#EF5B25] p-10 mt-5">
Expand Down

0 comments on commit 1b5c380

Please sign in to comment.