Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 115 additions & 0 deletions docs/Calendar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
const CurrentDate = document.querySelector('.calendar-month');
const ActiveDays = document.querySelector('.calendar-days');
const PreviousIcon = document.querySelectorAll('.calendar-month-previous');
const NextIcon = document.querySelectorAll('.calendar-month-next');
const EventText = document.querySelector('.calendar-event');
let Day = new Date();
CurrentYear = Day.getFullYear();
CurrentMonth = Day.getMonth();
const AllMonths = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
let DayList = [];
var DayPairs = [];

const RenderCalendar = () => {
let MonthFirstDay = new Date(CurrentYear, CurrentMonth, 1).getDay();
let MonthLastDate = new Date(CurrentYear, (CurrentMonth + 1), 0).getDate();
let MonthLastDay = new Date(CurrentYear, CurrentMonth, MonthLastDate).getDay();
let PreviousMonthLastDay = new Date(CurrentYear, CurrentMonth, 0).getDate();
let LiElements = "";

for (let i = MonthFirstDay; i > 0; i--){
LiElements += `<li class="calendar-days-visible">${((PreviousMonthLastDay - i) + 1)}</li>`;
DayList.push(new Date(CurrentYear, (CurrentMonth - 1), (PreviousMonthLastDay - i) + 1));
}

for (let i = 1; i <= MonthLastDate; i++){
LiElements += `<li class="calendar-days-visible">${i}</li>`;
DayList.push(new Date(CurrentYear, CurrentMonth, i));
}

for (let i = MonthLastDay; i < 6; i++){
LiElements += `<li class="calendar-days-visible">${((i - MonthLastDay) + 1)}</li>`;
DayList.push(new Date(CurrentYear, (CurrentMonth + 1), (i - MonthLastDay) + 1));
}

CurrentDate.innerText = `${AllMonths[CurrentMonth]} ${CurrentYear}`;
ActiveDays.innerHTML = LiElements;
//console.log(DayList);
}

RenderCalendar();

PreviousIcon.forEach(icon => {
icon.addEventListener("click", () => {
CurrentMonth--;

if (CurrentMonth < 0){
CurrentMonth = 11;
CurrentYear--;
}

RenderCalendar();

DayPairs = [];

for (let i = 0; i < VisibleDates.length; i++) {
DayPairs.push(VisibleDates[i], DayList[i]);
console.log("Day Pair:" + DayPairs[i]);
}
})
})

NextIcon.forEach(icon => {
icon.addEventListener("click", () => {
CurrentMonth++;

if (CurrentMonth > 11){
CurrentMonth = 0;
CurrentYear++;
}

RenderCalendar();

DayPairs = [];

for (let i = 0; i < VisibleDates.length; i++) {
DayPairs.push(VisibleDates[i], DayList[i]);
console.log("Day Pair:" + DayPairs[i]);
}


})
})

const FindValue = (Key) => {
for (let i = 0; i < DayPairs.length; i++){
if (Key == dayPairs[i].Key){
return DayPairs[i].Value;
}
}
}

const VisibleDates = document.querySelectorAll('.calendar-days-visible');
//console.log(VisibleDates);

DayPairs = []

for (let i = 0; i < VisibleDates.length; i++) {
DayPairs.push(VisibleDates[i], DayList[i]);
console.log("Day Pair:" + DayPairs[i] + " index: " + i);
}

VisibleDates.forEach(day => {
day.addEventListener("click", () => {
console.log("Events: " + AllEvents.length);
for (let i = 0; i < AllEvents.length; i++){
for (let j = 0; j < DayPairs.length; j++){
if ((AllEvents[i].EventDate.getTime() == DayPairs[j].Value.getTime()) && (DayPairs[j].Key == day)){
EventText.innerText = AllEvents[i].EventDescription;
}
}
}
})
})

console.log("End of file");
24 changes: 24 additions & 0 deletions docs/Event.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
const AllEvents = [];

class Event{
//var EventDate = new Date();
//var EventDescription = "";

constructor(Year, Month, Day){
this.EventDate = new Date(Year, Month, Day);
this.EventDescription = "test";
}

GetEventDescription() {
return this.EventDescription;
}

SetEventDescription(Description){
this.EventDescription = Description;
}
}

let temp = new Event(2024, 2, 24);
temp.SetEventDescription("Science Carnival");

AllEvents.push(temp);
6 changes: 6 additions & 0 deletions docs/Pair.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
class Pair{
constructor(Key, Value){
this.Key = Key;
this.Value = Value;
}
}
17 changes: 17 additions & 0 deletions docs/TypeMap.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
class TypeMap{
constructor(){
this.Pairs = [];
}

AddPair(Key, Value){
this.Pairs.push(new Pair(Key, Value));
}

FindValue(Key){
for (let i = 0; i < this.Pairs.length; i++){
if (Key == this.Pairs.Key){
return this.Pairs.Value;
}
}
}
}
Binary file modified docs/img/2023-2024/AboutUs/LucaFicanoLatimer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/2023-2024/Events/Game_Night_24-2-13.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 33 additions & 15 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<link rel="shortcut icon" href="img/favicon_32.ico" type="image/x-icon">
<link rel="stylesheet" href="styles.css">
<script src="https://kit.fontawesome.com/c4be304c4a.js" crossorigin="anonymous"></script>
<script src="Event.js" defer></script>
<script src="Calendar.js" defer></script>
</head>
<body>
<nav>
Expand Down Expand Up @@ -55,8 +57,8 @@ <h2>Updates</h2>
<div class="card-container">
<div class="card">
<img src="img/22-23/main-meeting.png" alt="empty">
<div>Thanks for a great Spring Semester!</div>
<p>Thanks to everyone who worked hard this semester on their game pitches! Feel free to check the club's itch.io page to see all the submissions from this semester. We look forward to seeing everyone again in the fall!</p>
<div>Welcome to Spring Semester!</div>
<p>Spring Game Pitches will be presented today, February 13th!</p>
<!-- <div>
<u>Meeting Details</u><br>
<p>
Expand All @@ -68,9 +70,9 @@ <h2>Updates</h2>
</div>

<div class="card">
<img src="img/22-23/main-firstmeeting.png" alt="empty">
<div>Have a great summer!</div>
<p>From everyone in the club, we hope that everyone has a great summer break! See you soon!</p>
<img src="img/2023-2024/Events/Game_Night_24-2-13.png" alt="empty">
<div>Game Night Social!</div>
<p>Thank you to everyone who showed up to Friday's game night social!</p>
<!-- <div>
<u>Workshop Details</u><br>
<p>
Expand All @@ -85,7 +87,7 @@ <h2>Updates</h2>
<img src="img/pitches_blank.png" alt="empty">
<div>Spring 2023 Game Pitches!</div>
<p>
Thanks for an amazing semester! Don't forget to check out all the games that were made this semester or watch the demo reel for each game with the links down below!
After today's meeting the link to the presentation can be found here!
<br><br>
<a href="https://itch.io/jam/cpp-game-development-club-spring-2023-game-pitches/entries">
<div class="link">
Expand All @@ -108,15 +110,31 @@ <h5>Fall Semester Demo Reel!</h5>

<div class="section">
<h2>Calendar</h2>
<p>
August 23rd - Club Fair @ University Park 10:30am - 12:30pm
<br />
August 25th - Club Fair @ Unversity Park 4:00pm - 6:00pm
<br />
August 29th - First Club Meeting @ Building 8 Room 4 12:00pm - 1:00pm
<br />
September 1st - Game Night @ Building 6 Room 204 3:00pm - 5:00pm
</p>
<div class="calendar-container">
<!-- <div>
<ul class="calendar-month">
<li class="calendar-month-previous">&#10094</li>
<li>August</li>
<li class="calendar-month-next">&#10095</li>
</ul>
</div> -->
<div>
<span class="calendar-month-previous">&#10094</span><span class="calendar-month"></span><span class="calendar-month-next">&#10095</span>
</div>
<ul class="calendar-weekdays">
<li>Sunday</li>
<li>Monday</li>
<li>Tuesday</li>
<li>Wednesday</li>
<li>Thursday</li>
<li>Friday</li>
<li>Saturday</li>
</ul>
<ul class="calendar-days">
</ul>
<p class="calendar-event">
</p>
</div>
</div>

<div class="section">
Expand Down
82 changes: 82 additions & 0 deletions docs/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,90 @@ nav{
padding-left: 30px;
}

.calendar-container{
border-collapse: separate;
border-radius: 10px;
overflow: hidden;
}

.calendar-days{
background: #eee;
margin: 0;
padding: 10px 0;
}

.calendar-days li{
color: #777;
display: inline-block;
font-size: 12px;
list-style-type: none;
margin-bottom: 5px;
text-align: center;
width: 13.6%;
}

.calendar-days-active{
color: black;
}

.calendar-days-visible{
}

.calendar-event{
}

.calendar-info{
background: #eee;
}

.calendar-month{
background: #4eb970;
display: inline-block;
padding: 50px 25px;
text-align: center;
width: 93.3%;
}

.calendar-month ul{
margin: 0px;
padding: 0px;
}

.calendar-month-next{
background: #4eb970;
display: inline-block;
float: right;
font-size: 20px;
list-style-type: none;
padding-bottom: 45px;
padding-right: 10px;
padding-top: 50px;
text-align: right;
}

.calendar-month-previous{
background: #4eb970;
display: inline-block;
float: left;
font-size: 20px;
list-style-type: none;
padding-bottom: 45px;
padding-right: 10px;
padding-top: 50px;
text-align: left;
}

.calendar-weekdays{
background-color: #ddd;
margin: 0;
padding: 10px 0;
}

.calendar-weekdays li{
color: #666;
display: inline-block;
text-align: center;
width: 13.6%;
}

.title{
Expand Down