Skip to content

Commit

Permalink
Merge pull request #14 from kybrdbnd/dynamic-volunteer-list
Browse files Browse the repository at this point in the history
made volunteer list dynamic
  • Loading branch information
satyaakam authored Nov 14, 2023
2 parents fd6088c + c945aaa commit c6364c9
Showing 1 changed file with 24 additions and 41 deletions.
65 changes: 24 additions & 41 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,58 +14,41 @@
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/3.0.3/normalize.min.css">
<link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet'>
<link href='https://pydelhi.org/assests/css/main.css' rel='stylesheet'>
<script src="https://code.jquery.com/jquery-3.5.1.js"></script>
</head>
<body class="page page-volunteers">
<section class="intro">
<h2>Volunteers - Python Delhi User Group</h2>
</section>

<section class='sections--teams'>

<h2>Administration/Management</h2>
<ul>
<li>Akkshay Arora</li>
<li>Amit Tripathi</li>
<li>Sanyam Khurana</li>
<li>Satyakam Goswami</li>
<li>Saurabh Kumar</li>
</ul> <!-- .administration -->

<h2>Location affairs</h2>
<ul>
<li>Akkshay Arora</li>
<li>Balaji</li>
<li>Jaidev Deshpande</li>
<li>Satyakam Goswami</li>
<li>Vinay Kumar Dhayia</li>
</ul> <!-- .location -->

<h2>Marketing</h2>
<ul>
<li>Rajat Goyal</li>
</ul> <!-- .marketing -->

<h2>Speaker's Affairs</h2>
<ul>
<li>Amit Singh Sethi</li>
<li>Anuvrat Parashar</li>
<li>Balaji</li>
<li>Jaidev Deshpande</li>
</ul> <!-- .speakers -->

<h2>Sponsor Affairs</h2>
<ul>
<li>Alisha Aneja</li>
<li>Amit Singh Sethi</li>
<li>Geetika Batra</li>
<li>Satyakam Goswami</li>
</ul> <!-- .sponsors -->
</section>
<section id="sections--teams"></section>

<a class='link--fork-on-github' href="https://github.com/pydelhi/volunteers">
<img style="position: absolute; top: 0; right: 0; border: 0;" src="https://pydelhi.org/assests/images/btn--fork-on-github.png" alt="Fork me on GitHub">
</a>
<!-- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> -->

</body>
<script>
$(document).ready(function() {
$.getJSON("teams.json", function(teams){
$.each(teams, function(key, team_data){
var team = '';
$.getJSON('volunteers.json', function(volunteers){
var data= "";
var filtered_volunteers = volunteers.filter(volunteer => volunteer.teams.includes(team_data.slug));
data+='<h2>'+team_data.title+'</h2>'
data+='<ul>'
$.each(filtered_volunteers, function(key, volunteer){
data+='<li>'+volunteer.name+'</li>'
})
data+='</ul>'
team+=data
$('#sections--teams').append(team);
})
})
})
})
</script>
</html>

0 comments on commit c6364c9

Please # to comment.