From dc1f17eb2fd256d99e779ae8bd63b94939ca33a0 Mon Sep 17 00:00:00 2001 From: James Dinh Date: Sat, 17 Dec 2022 01:49:14 -0800 Subject: [PATCH] Added styles --- .DS_Store | Bin 0 -> 8196 bytes assets/.DS_Store | Bin 0 -> 6148 bytes css/.DS_Store | Bin 0 -> 6148 bytes css/general.css | 58 ++++++++++++++ img/.DS_Store | Bin 0 -> 10244 bytes js/.DS_Store | Bin 0 -> 6148 bytes js/general.js | 196 ++++++++++++++++++++++----------------------- js/second.js | 204 +++++++++++++++++++++++------------------------ 8 files changed, 258 insertions(+), 200 deletions(-) create mode 100644 .DS_Store create mode 100644 assets/.DS_Store create mode 100644 css/.DS_Store create mode 100644 img/.DS_Store create mode 100644 js/.DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..6801a64266407a18f10324a0d72f84b186daa37e GIT binary patch literal 8196 zcmeHMPj3@P6o2CwSjVJnAc25DTGbaMB1j1TB7`u83ep}D;s_D~m|c5f7B(~1?m7-w zk$eTDet;f0_S$1PaqCy;p_hJv9(tGHFz`7r zfOobi)_{9ojhfalU>Nu+84&To!75}?%Z`#VbYLS>0F+tmmIZap10=@LvZ!T8NeRU{ zRrWwMl;{+LC^(Kg!W?B$%Z`!?4n)C$=#`1iP>5U|agHzE=UL)|Mcxvi*k{QbG*}Ko$XXUL2<;T2Lj@`H! zmE3Sud|To?@VdI|-SKIwVvk+tEOvcHLkaL}6ix2m^;wO#O1#Nxk;InOfR(dy6?>xH zo}Rrp>CBv+-I{dTvuCF!opUo6wzhKCc;U?D#mduQo$;4y%S49_7*XH1+gGUd>}jJM zvVgNX_6y8@r~(Iu%($qB_hofI8I;G_H0Q)K*t zh+fB#RtYM0>443O19tH}Tztp@(|h)-8#-K&x7{E1PuuPWjNEX3|HwB7?9qdVM#o0S z#}6Nw7(aUK*zt;e$aAYt>!An)*LlFhQqZK!ewDMb|C}zzbTbx8#Xgv_Tcovz@4A+r zHPB}4U5A|OW=JVpt%rVXer+wH@p3|6sn`diYRH3Nfk%GqbGC9n!WcFe)Ac#F#&N|B zj9>E&F%;dQVT7^|v%KPlq08#D^z1?4dNi14B_79oU090Qa3c#L6*I}T%MG{cvwGp` z-@?fN3dM!4a#ATa6qF(c8;;a1n=CQTXf9VM{-8%KIEBaTdnjYjYQc~26Z{Ns;5YaK z{(^rZ84X={T zL7|d}*^<7VfhT=|QiSEC%?JcIa~0=h@}i0c%`U@A^1>R15W|m$6<K4RS#A^t>e;NI^)h)`zk6Nqilh znH>@lEo_W|on-dgou9qTm+bD15JJ|6ostkaA%q2rm|BD38$mznoFv$?3Mg?8)%F7A z!3wuCVi+(C{C5WM>?TE9L?Sv4X3p;cc(&h3s0fboMp2JX`K#9p{Af@tzR5%~wX&MF z(pJ{Ga&Ohh9kd3+sNU*d;ObPVz?;rn-kIMWHFFz>Djc-@u-m5uzte?~%X2^Ms8L-F z!%jrGu69@%E7Q#7$Kz71TCgkS>ZD+gYvp3W-mUCSCK+pUYiIwYc^^E4>PeF>;Z7o1 zXPm+_Ot_jyw;u*7ya5YFC&b+x4=-T<%mc+N2n$rp7Y?9YBTK;mpARd$6xEs{4FiUO z-!OppgAI!4Fvc3`>VSb-0KgQONnlPt|A00c03F6yBUnJBP6gDdl3NVPy@S;0;CDDa z)~M5kq%Xrh{AI}PZ{_C DP0W}* literal 0 HcmV?d00001 diff --git a/css/.DS_Store b/css/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..599aa9f18c46fd6fb2db8fd65c818c2e4da955f6 GIT binary patch literal 6148 zcmeHKF-`+P3>-s>NJ!C@l=}iCez1y?f|?IN0un`}ATCIh*YRu^+Y92jKuLkdl0COx z&#rEY^BI6GpYJY#4#1r5h*u9&^L_V;owSS*={#eL2i)Qb2lSKb;|b?3$a%y)UPk;2 zu6p!WyZv^v+izIcy?wLeM=C1?q<|EV0#ZN<{Gx#OUfTRDQBev=0V(jQfPWtf-LW9Dw&=d_!xO(+(( zGhd<{RudJafD{-jaGJ}``~RB$!~8!cX(a`uz`s(!W~=MflCRWy>*VFU*B1H>{li!r n .timeline-icon{ + filter:hue-rotate(60deg); +} + +.timeline-button:hover { + color: white; + background-color: rgb(192, 168, 88); + transition: 0.5s; +} + /** * Time */ diff --git a/img/.DS_Store b/img/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..ffdd1bcd9dc82fb96ef50bf2b9fa20a82a9a92a8 GIT binary patch literal 10244 zcmeHMQBM;=5S~RMjX+ET0!rtkg-|APO_ zcc1k8W)Ijad!#0q5VPCt&2_uq%9KoZuQ-U?4CM7zhjm1_A@OkpVoj*$T^6hHGFTFc28HV1V_Zf=*dW<a21^{re*e{qEiD;htSXO|zl8Y%Nig#Z>}*R9=u?ceaOc%nu_5jc zQcc^KL9b$rjj)?l`+X(?=+k#+We+l%BS&*|p*e!JzH0Quh{5h;e0@BZ#&cgI^)-U_ z1hL%34xacq;SOf(JeuLLWsykpoK z%$0p)&(&}r*sf;9MB|e@GNbDH+?wc))cq@AG%dV$yt#*LB;#ED*pFd0XE3D<<~$0n z;g1|-G!*c(X9VR`X4ad`e3YNi0t118z(8OiFc28HQ3mc3|0ErIO38-bYpI-Csc?)d j9MZnc|L1=O=s}1c;N539|L2`v-IH%P|1(5Ukb<4n)|{aK1qB50>K$jQs(6wd~*hL0OoW@yn2|L@4HXzpfX0J^Ncm_aE(ViVK=GXpK$ImIS;tS%ZPu9 zd+aVY+x2R*U9qZr`)2zOR8|T|0VyB_q<|FoRRQn4wE0n@q7;wSn76#o~76 zTa?54L`5ke1;z>-=Cbqte@_2l{vVUHk^)lTUnyX-<>hk0SE}ARc{%U3jebS{FxEyn mL$qRIv|=v26`y>mYyQmrzHmqkI`cs%>PNtJkx7BSP~aWBTqVT- literal 0 HcmV?d00001 diff --git a/js/general.js b/js/general.js index dc6b273..791a62a 100644 --- a/js/general.js +++ b/js/general.js @@ -371,117 +371,117 @@ document.addEventListener( false ); -var slider = document.getElementById('slider'), - sliderItems = document.getElementById('items'), - prev = document.getElementById('prev'), - next = document.getElementById('next'); -slide(slider, sliderItems, prev, next); -function slide(wrapper, items, prev, next) { - var posX1 = 0, - posX2 = 0, - posInitial, - posFinal, - threshold = 100, - slides = items.getElementsByClassName('slide'), - slidesLength = slides.length, - slideSize = items.getElementsByClassName('slide')[0].offsetWidth, - firstSlide = slides[0], - lastSlide = slides[slidesLength - 1], - cloneFirst = firstSlide.cloneNode(true), - cloneLast = lastSlide.cloneNode(true), - index = 0, - allowShift = true; +// var slider = document.getElementById('slider'), +// sliderItems = document.getElementById('items'), +// prev = document.getElementById('prev'), +// next = document.getElementById('next'); +// slide(slider, sliderItems, prev, next); +// function slide(wrapper, items, prev, next) { +// var posX1 = 0, +// posX2 = 0, +// posInitial, +// posFinal, +// threshold = 100, +// slides = items.getElementsByClassName('slide'), +// slidesLength = slides.length, +// slideSize = items.getElementsByClassName('slide')[0].offsetWidth, +// firstSlide = slides[0], +// lastSlide = slides[slidesLength - 1], +// cloneFirst = firstSlide.cloneNode(true), +// cloneLast = lastSlide.cloneNode(true), +// index = 0, +// allowShift = true; - // Clone first and last slide - items.appendChild(cloneFirst); - items.insertBefore(cloneLast, firstSlide); - wrapper.classList.add('loaded'); +// // Clone first and last slide +// items.appendChild(cloneFirst); +// items.insertBefore(cloneLast, firstSlide); +// wrapper.classList.add('loaded'); - // Mouse and Touch events - items.onmousedown = dragStart; +// // Mouse and Touch events +// items.onmousedown = dragStart; - // Touch events - items.addEventListener('touchstart', dragStart); - items.addEventListener('touchend', dragEnd); - items.addEventListener('touchmove', dragAction); +// // Touch events +// items.addEventListener('touchstart', dragStart); +// items.addEventListener('touchend', dragEnd); +// items.addEventListener('touchmove', dragAction); - // Click events - prev.addEventListener('click', function () { shiftSlide(-1) }); - next.addEventListener('click', function () { shiftSlide(1) }); +// // Click events +// prev.addEventListener('click', function () { shiftSlide(-1) }); +// next.addEventListener('click', function () { shiftSlide(1) }); - // Transition events - items.addEventListener('transitionend', checkIndex); +// // Transition events +// items.addEventListener('transitionend', checkIndex); - function dragStart (e) { - e = e || window.event; - e.preventDefault(); - posInitial = items.offsetLeft; +// function dragStart (e) { +// e = e || window.event; +// e.preventDefault(); +// posInitial = items.offsetLeft; - if (e.type == 'touchstart') { - posX1 = e.touches[0].clientX; - } else { - posX1 = e.clientX; - document.onmouseup = dragEnd; - document.onmousemove = dragAction; - } - } - function dragAction (e) { - e = e || window.event; +// if (e.type == 'touchstart') { +// posX1 = e.touches[0].clientX; +// } else { +// posX1 = e.clientX; +// document.onmouseup = dragEnd; +// document.onmousemove = dragAction; +// } +// } +// function dragAction (e) { +// e = e || window.event; - if (e.type == 'touchmove') { - posX2 = posX1 - e.touches[0].clientX; - posX1 = e.touches[0].clientX; - } else { - posX2 = posX1 - e.clientX; - posX1 = e.clientX; - } - items.style.left = (items.offsetLeft - posX2) + "px"; - } +// if (e.type == 'touchmove') { +// posX2 = posX1 - e.touches[0].clientX; +// posX1 = e.touches[0].clientX; +// } else { +// posX2 = posX1 - e.clientX; +// posX1 = e.clientX; +// } +// items.style.left = (items.offsetLeft - posX2) + "px"; +// } - function dragEnd (e) { - posFinal = items.offsetLeft; - if (posFinal - posInitial < -threshold) { - shiftSlide(1, 'drag'); - } else if (posFinal - posInitial > threshold) { - shiftSlide(-1, 'drag'); - } else { - items.style.left = (posInitial) + "px"; - } - document.onmouseup = null; - document.onmousemove = null; - } +// function dragEnd (e) { +// posFinal = items.offsetLeft; +// if (posFinal - posInitial < -threshold) { +// shiftSlide(1, 'drag'); +// } else if (posFinal - posInitial > threshold) { +// shiftSlide(-1, 'drag'); +// } else { +// items.style.left = (posInitial) + "px"; +// } +// document.onmouseup = null; +// document.onmousemove = null; +// } - function shiftSlide(dir, action) { - items.classList.add('shifting'); +// function shiftSlide(dir, action) { +// items.classList.add('shifting'); - if (allowShift) { - if (!action) { posInitial = items.offsetLeft; } - if (dir == 1) { - items.style.left = (posInitial - slideSize) + "px"; - index++; - } else if (dir == -1) { - items.style.left = (posInitial + slideSize) + "px"; - index--; - } - }; +// if (allowShift) { +// if (!action) { posInitial = items.offsetLeft; } +// if (dir == 1) { +// items.style.left = (posInitial - slideSize) + "px"; +// index++; +// } else if (dir == -1) { +// items.style.left = (posInitial + slideSize) + "px"; +// index--; +// } +// }; - allowShift = false; - } +// allowShift = false; +// } - function checkIndex (){ - items.classList.remove('shifting'); - if (index == -1) { - items.style.left = -(slidesLength * slideSize) + "px"; - index = slidesLength - 1; - } - if (index == slidesLength) { - items.style.left = -(1 * slideSize) + "px"; - index = 0; - } +// function checkIndex (){ +// items.classList.remove('shifting'); +// if (index == -1) { +// items.style.left = -(slidesLength * slideSize) + "px"; +// index = slidesLength - 1; +// } +// if (index == slidesLength) { +// items.style.left = -(1 * slideSize) + "px"; +// index = 0; +// } - allowShift = true; - } -} +// allowShift = true; +// } +// } var options = { series: [{ @@ -561,4 +561,4 @@ var options = { }; var chart = new ApexCharts(document.querySelector("#chart"), options); - chart.re \ No newline at end of file + chart.render(); \ No newline at end of file diff --git a/js/second.js b/js/second.js index bb2a0f3..8a06fbd 100644 --- a/js/second.js +++ b/js/second.js @@ -1,103 +1,103 @@ -// Scroll Nav -// Gilroy Hacks Website Source Code -> JS (https://gilroyhacks.com) - -// Toggle the .pa-fixed-header class when the user -// scroll 100px - -window.onscroll = () => {scrollNavbar()}; - -var scrollNavbar = () => { - // Target elements - const navBar = document.getElementById("navBar"); - const links = document.querySelectorAll("#navBar a"); - -if (document.documentElement.scrollTop > 20) { - navBar.classList.add("pa-fixed-header"); - - // Change the color of links on scroll - for (let i = 0; i < links.length; i++) { - const element = links[i]; - element.classList.add('text-black'); - } - -} else { - navBar.classList.remove("pa-fixed-header"); - - // Change the color of links back to default - for (let i = 0; i < links.length; i++) { - const element = links[i]; - element.classList.remove('text-black'); - } -} -} - -// Email Replace -function setAttributes(elem, attrs) { - for(var key in attrs) { - elem.setAttribute(key, attrs[key]); - } -} - -const tech_emails = document.querySelectorAll('.email-replace-tech'); - tech_emails.forEach(entry => { - setAttributes(entry, {"href": "mailto:tech" + "@" + "gilroyhacks.com?subject=Gilroy Hacks", "target": "_blank"}); - entry.innerHTML = "tech" + "@" + "gilroyhacks.com"; - }); - -// Timer -// SRC: W3Schools https://www.w3schools.com/howto/howto_js_countdown.asp -// Set the date we're counting down to -const events = { - "Opening Ceremony": "Apr 15, 2023 10:00:00", - "Lunch": "Apr 15, 2023 12:00:00", - "Web Dev Workshop": "Apr 15, 2023 13:00:00", - "[REDACTED] Workshop": "Apr 15, 2023 15:00:00", - "Kahoot": "Apr 15, 2023 17:00:00", - "Hacking Ends": "Apr 16, 2023 14:00:00", - "Project Presentations": "Apr 16, 2023 14:30:00", - "Awards Ceremony" : "Apr 16, 2023 16:30:00" -} -var countDownDate = 0; -// Get today's date and time -var now = new Date().getTime(); - -// Test for the current event -for (const event in events) { -var testDate = new Date(events[event]).getTime(); -if (testDate > countDownDate && now < testDate) { - countDownDate = testDate; - document.getElementById("event-name").innerHTML = event; - document.styleSheets[0].addRule('#timer:after','content: "'+ events[event] +'";'); - break; -} -} - -// Update the count down every 1 second -var x = setInterval(function() { - - // Find the distance between now and the count down date - var distance = countDownDate - now; - - // Time calculations for days, hours, minutes and seconds - var days = Math.floor(distance / (1000 * 60 * 60 * 24)); - var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); - var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); - // var seconds = Math.floor((distance % (1000 * 60)) / 1000); - - // If the count down is finished, write some text - if (distance < 0) { - clearInterval(x); - document.getElementById("timer").innerHTML = "---"; - document.getElementById("event-name").innerHTML = "Event Ended"; - } - // Display the result in the element with id="timer" - else if (days != 0) { - document.getElementById("timer").innerHTML = days + "d " + hours + "h"; - } - else if (hours != 0) { - document.getElementById("timer").innerHTML = hours + "h " + minutes + "m"; - } - else { - document.getElementById("timer").innerHTML = minutes + "m"; - } +// Scroll Nav +// Gilroy Hacks Website Source Code -> JS (https://gilroyhacks.com) + +// Toggle the .pa-fixed-header class when the user +// scroll 100px + +window.onscroll = () => {scrollNavbar()}; + +var scrollNavbar = () => { + // Target elements + const navBar = document.getElementById("navBar"); + const links = document.querySelectorAll("#navBar a"); + +if (document.documentElement.scrollTop > 20) { + navBar.classList.add("pa-fixed-header"); + + // Change the color of links on scroll + for (let i = 0; i < links.length; i++) { + const element = links[i]; + element.classList.add('text-black'); + } + +} else { + navBar.classList.remove("pa-fixed-header"); + + // Change the color of links back to default + for (let i = 0; i < links.length; i++) { + const element = links[i]; + element.classList.remove('text-black'); + } +} +} + +// Email Replace +function setAttributes(elem, attrs) { + for(var key in attrs) { + elem.setAttribute(key, attrs[key]); + } +} + +const tech_emails = document.querySelectorAll('.email-replace-tech'); + tech_emails.forEach(entry => { + setAttributes(entry, {"href": "mailto:tech" + "@" + "gilroyhacks.com?subject=Gilroy Hacks", "target": "_blank"}); + entry.innerHTML = "tech" + "@" + "gilroyhacks.com"; + }); + +// Timer +// SRC: W3Schools https://www.w3schools.com/howto/howto_js_countdown.asp +// Set the date we're counting down to +const events = { + "Opening Ceremony": "Apr 15, 2023 10:00:00", + "Lunch": "Apr 15, 2023 12:00:00", + "Web Dev Workshop": "Apr 15, 2023 13:00:00", + "[REDACTED] Workshop": "Apr 15, 2023 15:00:00", + "Kahoot": "Apr 15, 2023 17:00:00", + "Hacking Ends": "Apr 16, 2023 14:00:00", + "Project Presentations": "Apr 16, 2023 14:30:00", + "Awards Ceremony" : "Apr 16, 2023 16:30:00" +} +var countDownDate = 0; +// Get today's date and time +var now = new Date().getTime(); + +// Test for the current event +for (const event in events) { +var testDate = new Date(events[event]).getTime(); +if (testDate > countDownDate && now < testDate) { + countDownDate = testDate; + document.getElementById("event-name").innerHTML = event; + document.styleSheets[0].addRule('#timer:after','content: "'+ events[event] +'";'); + break; +} +} + +// Update the count down every 1 second +var x = setInterval(function() { + + // Find the distance between now and the count down date + var distance = countDownDate - now; + + // Time calculations for days, hours, minutes and seconds + var days = Math.floor(distance / (1000 * 60 * 60 * 24)); + var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); + var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); + // var seconds = Math.floor((distance % (1000 * 60)) / 1000); + + // If the count down is finished, write some text + if (distance < 0) { + clearInterval(x); + document.getElementById("timer").innerHTML = "---"; + document.getElementById("event-name").innerHTML = "Event Ended"; + } + // Display the result in the element with id="timer" + else if (days != 0) { + document.getElementById("timer").innerHTML = days + "d " + hours + "h"; + } + else if (hours != 0) { + document.getElementById("timer").innerHTML = hours + "h " + minutes + "m"; + } + else { + document.getElementById("timer").innerHTML = minutes + "m"; + } }, 1000); \ No newline at end of file