-
-
Notifications
You must be signed in to change notification settings - Fork 785
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactored JavaScript files so that Events page sources meeting data from vrms_data.json #6815
Merged
roslynwythe
merged 9 commits into
hackforla:gh-pages
from
irais-valenzuela:refactor-js-events-page-6023
May 8, 2024
+343
−82
Merged
Changes from 7 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
1d085bc
created new files
irais-valenzuela 2d7df26
created new file to share data fetching code for projects.js and righ…
irais-valenzuela eb6b35e
created vrms-event.js and moved sortByDate and timeFomat funcs to tha…
irais-valenzuela 0f7a0a7
right-col-content.js also gets event data from vrms-event.jsand is fo…
irais-valenzuela faac9a0
sortByDate function is being shared between project.js and right-col-…
irais-valenzuela c7fcb07
both project.js and right-col-content.js share time formatting functi…
irais-valenzuela b56c934
Merge branch 'gh-pages' of https://github.com/hackforla/website into …
irais-valenzuela e190811
restored code in api-event.js for right-col-content-check.js to use
irais-valenzuela a6d762c
Merge branch 'gh-pages' of https://github.com/hackforla/website into …
irais-valenzuela File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<h3 class="event-title title4"> | ||
<img class="vector-img" src="../assets/images/hack-nights/meetings.svg" alt=""> | ||
<span><span>Online Project</span> <span>Team Meetings</span></span> | ||
</h3> | ||
<div class="mobile-dropdown"> | ||
<div class="meetup-steps-2"> | ||
<div id="img-content"> | ||
<img class="step-img-2" src="../assets/images/hack-nights/org-projects.png" alt=""> | ||
</div> | ||
<div id="text-content-1"> | ||
<p> | ||
Please review the listing of project team meeting times to find a | ||
project that fits your schedule. You are welcome to attend a project | ||
team meeting after you have completed | ||
<a href="https://www.hackforla.org/getting-started" target="_blank">Onboarding</a>. | ||
</p> | ||
</div> | ||
</div> | ||
<div class="days-display-1"> | ||
<div id="userTimeZone" class="userTimeZone"></div> | ||
{% assign days-of-week = | ||
"Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday" | split: "," %} | ||
{% for day in days-of-week %} | ||
<div id="{{day}}"> | ||
<h4 class="day-header-1 title7">{{day}}</h4> | ||
<ul id="{{day}}-List" class="schedule-list-1"></ul> | ||
</div> | ||
{% endfor %} | ||
</div> | ||
</div> | ||
|
||
<script src="../../assets/js/right-col-content-check.js" type="module"></script> |
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,45 @@ | ||
const locationsDropDown = document.querySelector(".getting-started-mobile-page"); | ||
const showingLocations = document.querySelector(".mobile-locations-dropdown"); | ||
const showContent = document.querySelectorAll(".event-title"); | ||
const showLocations = document.querySelector(".event-title-1"); | ||
|
||
showLocations.addEventListener("click", function () { | ||
this.classList.toggle("active"); | ||
if (showingLocations.style.display == "block") { | ||
showingLocations.style.display = "none"; | ||
} else { | ||
showingLocations.style.display = "block"; | ||
} | ||
}); | ||
|
||
for (let i = 0; i < showContent.length; i++) { | ||
showContent[i].addEventListener("click", showingDropDown); | ||
} | ||
|
||
function showingDropDown() { | ||
if(document.body.clientWidth<767){ | ||
this.classList.toggle("active"); | ||
let dropDown = this.nextElementSibling; | ||
if (dropDown.style.display === "block") { | ||
dropDown.style.display = "none"; | ||
} else { | ||
dropDown.style.display = "block"; | ||
} | ||
} | ||
} | ||
document.querySelector('.flex-page-card').addEventListener('resize',handleScreenResize) | ||
function handleScreenResize(){ | ||
if(document.body.clientWidth>767){ | ||
const columns = document.querySelectorAll('.mobile-dropdown'); | ||
for(let column of columns){ | ||
column.style.display='block'; | ||
column.previousElementSibling.classList.remove('active'); | ||
} | ||
} | ||
else{ | ||
const columns = document.querySelectorAll('.mobile-dropdown'); | ||
for(let column of columns){ | ||
column.style.display='none'; | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { getEventData, insertEventSchedule } from "./utility/api-events.js"; | ||
|
||
/** | ||
* This type of function is called an IIFE function. The main function is the primarily controller that loads the recurring events on this page. | ||
* Refer: https://developer.mozilla.org/en-US/docs/Glossary/IIFE | ||
*/ | ||
(async function main() { | ||
const eventData = await getEventData(); | ||
|
||
//Displays/Inserts event schedule to DOM | ||
if (document.readyState === "loading") { | ||
document.addEventListener( | ||
"DOMContentLoaded", | ||
() => { insertEventSchedule(eventData, "events"); } | ||
); | ||
} | ||
else { | ||
insertEventSchedule(eventData, "events"); | ||
} | ||
|
||
//Displays/Inserts the user's time zone in the DOM | ||
document | ||
.querySelector("#userTimeZone") | ||
.insertAdjacentHTML("afterbegin", timeZoneText()); | ||
})(); |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note