-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from itsevalieu/calendarview
Calendar View of Meetups Issue #24 Eva has completed the initial version of the calendar view. We'll be working on adding more functionality.
- Loading branch information
Showing
4 changed files
with
345 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,6 @@ | |
gtag('config', 'UA-118124010-1'); | ||
</script> | ||
<!-- Google Analytics - END --> | ||
|
||
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" | ||
integrity="sha512-puBpdR0798OZvTTbP4A8Ix/l+A4dHDD0DGqYW6RQ+9jxkRFclaxxQb/SJAWZfWAkuyeQUytO7+7N4QKrDh+drA==" | ||
crossorigin=""/> | ||
|
@@ -37,7 +36,25 @@ <h2>Upcoming Events:</h2> | |
|
||
<div id="mapid"></div> | ||
|
||
<ul class="meetups"></ul> | ||
<div class='viewLinks'> | ||
<a class='viewLink active' id='list'>List View</a> | ||
<a class='viewLink' id='weekly'>Week View</a> | ||
</div> | ||
|
||
<div class='view weekly'> | ||
<div class='weekview slider'> | ||
<button class='prev' onclick='plusSlides(-1)'>❮</button> | ||
<button class='next' onclick='plusSlides(1)'>❯</button> | ||
<div class='week slide fade' id='firstweek'></div> | ||
<div class='week slide fade' id='secondweek'></div> | ||
</div> | ||
<div class='dots'> | ||
<span class='dot' onclick='currentSlide(1)'></span> | ||
<span class='dot' onclick='currentSlide(2)'></span> | ||
</div> | ||
</div> | ||
|
||
<div class='view list showing'><ul class="listview"></ul></div> | ||
|
||
<p>Visit our <a href="https://www.meetup.com/LearnTeachCode/">Meetup.com page</a> for details on our next meetings.</p> | ||
|
||
|
@@ -71,5 +88,6 @@ <h2>Stuff we do at Learn Teach Code:</h2> | |
integrity="sha512-QVftwZFqvtRNi0ZyCtsznlKSWOStnDORoefr1enyq5mVL4tmKB3S/EnC3rRJcxCPavG10IcrVGSmPh6Qw5lwrg==" | ||
crossorigin=""></script> | ||
<script src="custom.js"></script> | ||
<script src="slider.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
let slideIndex = 1; | ||
showSlides(slideIndex); | ||
|
||
// next/previous slide controls | ||
function plusSlides(n) { | ||
showSlides(slideIndex += n); | ||
} | ||
|
||
// thumbnail controls | ||
function currentSlide(n) { | ||
showSlides(slideIndex = n); | ||
} | ||
|
||
// slider | ||
function showSlides(n) { | ||
let i; | ||
let slides = document.querySelectorAll('.slide'); | ||
let dots = document.querySelectorAll('.dot'); | ||
if (n > slides.length) { slideIndex = 1 } | ||
if (n < 1) { slideIndex = slides.length } | ||
for (i = 0; i < slides.length; i++) { | ||
slides[i].style.display = 'none'; | ||
} | ||
for (i = 0; i < dots.length; i++) { | ||
dots[i].className = dots[i].className.replace(' active', ''); | ||
} | ||
slides[slideIndex-1].style.display = 'flex'; | ||
dots[slideIndex-1].className += ' active'; | ||
} |
Oops, something went wrong.