Skip to content

Commit

Permalink
Last minute fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
vadini-agrawal committed Sep 30, 2020
1 parent eb176f9 commit e0e2e1e
Show file tree
Hide file tree
Showing 6 changed files with 83 additions and 70 deletions.
4 changes: 4 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[build]
base = "web/"
command = "yarn run build"
publish = "public"
2 changes: 1 addition & 1 deletion web/src/components/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ const Footer = () => (
<ul className="pb_contact_details_v1 text-center">
<li>
<span className="text-uppercase">FACEBOOK</span><br></br>
<a href="https://www.facebook.com/cssggt/" target="blank">Facebook</a>
<a href="https://www.facebook.com/gtcssg/" target="blank">Facebook</a>
</li>
</ul>
</div>
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/MemberInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ return (
</div>
<div className="media-info-div">
<h3 className="mt-0 pb_font-17">{name}</h3>
<p className="pb_font-14">{role}<br />Major<br />Joined in {yearJoined}</p>
<p className="pb_font-14">{role}<br />Joined in {yearJoined}</p>
</div>
</div>
</div>
Expand Down
16 changes: 10 additions & 6 deletions web/src/components/TeamCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ const Styles = styled.section`
margin: 20px;
position: relative;
border-radius: 0.25rem;
}
.card-img-top {
height: 60%;
width: 70%;
padding-top: 10%;
height: 50%;
max-width: 50%;
// max-height: 100%;
transition: display 0.4s;
top: 10px;
left: 10px;
object-fit: cover;
object-fit: contain;
text-align: center;
}
.card-body {
Expand Down Expand Up @@ -72,7 +72,11 @@ const TeamCard = (props) => {
}
allNames.forEach(clearAll)
target.style.display = 'block';
window.scrollTo({top:findPos(target), behavior:'smooth'});
if (typeof window === 'undefined') {
global.window = {}
} else {
window.scrollTo({top:findPos(target), behavior:'smooth'});
}
} else {
target.style.display = 'none';
}
Expand Down
5 changes: 3 additions & 2 deletions web/src/components/WorkDiv.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,12 @@ const WorkDiv = () => {
}
}
`);


const workDropdown = data.allSanityProject.edges.map(item =>
<div className="tab">
<input type="checkbox" id={String(item.node._id)}></input>
<label className="tab-label" for={String(item.node._id)}>{item.node.title}</label>
<label className="tab-label" for={String(item.node._id)}>{item.node.title} <span id={String(item.node._id)}>+</span></label>
<div className="tab-content">
{item.node.description}
</div>
Expand All @@ -185,7 +186,7 @@ const WorkDiv = () => {
<div className="row">
<div className="col-md-8">
<h2 className="mt-0 heading-border-top font-weight-normal" style={{color:'#2F2D2E'}}>Work</h2>
<p style={{color: '#868e96'}}>We have partnered with different companies, startups and organizations to host events on Georgia Tech's campus, focused on technology and social good. Some examples include Affirm, Kabbage, Black Girls Code & oSTEM. We also go off campus to bring CS education to local schools.
<p style={{color: '#868e96'}}>We have partnered with different companies, startups and organizations to host events on Georgia Tech's campus, focused on technology and social good. We also go off campus to bring CS education to local schools.
</p>
</div>
</div>
Expand Down
124 changes: 64 additions & 60 deletions web/src/components/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,75 +101,79 @@ const Styles = styled.section`
`
const Header = () => {
window.onscroll = function () {
let currentScrollPos = window.pageYOffset;
// console.log(currentScrollPos);
console.log('woooooo scroll');
if (currentScrollPos > 550) {
var header = document.getElementById("header");
header.classList.add("white");
header.classList.remove("clear");
var nav_links= document.getElementsByClassName("nav-link");
var i;
for (i = 0; i < nav_links.length; i++) {
nav_links[i].classList.add("black")
}
} else {
var header = document.getElementById("header");
header.classList.remove("white");
header.classList.add("clear");
var nav_links= document.getElementsByClassName("nav-link");
var i;
for (i = 0; i < nav_links.length; i++) {
nav_links[i].classList.remove("black")
if (typeof window === 'undefined') {
global.window = {}
} else {
window.onscroll = function () {
let currentScrollPos = window.pageYOffset;
// console.log(currentScrollPos);
console.log('woooooo scroll');
if (currentScrollPos > 550) {
var header = document.getElementById("header");
header.classList.add("white");
header.classList.remove("clear");
var nav_links= document.getElementsByClassName("nav-link");
var i;
for (i = 0; i < nav_links.length; i++) {
nav_links[i].classList.add("black")
}
} else {
var header = document.getElementById("header");
header.classList.remove("white");
header.classList.add("clear");
var nav_links= document.getElementsByClassName("nav-link");
var i;
for (i = 0; i < nav_links.length; i++) {
nav_links[i].classList.remove("black")
}
}

if (currentScrollPos < 550) {
document.getElementById('about-link').style.color = 'white';
document.getElementById('team-link').style.color = 'white';
document.getElementById('work-link').style.color = 'white';
document.getElementById('sponsors-link').style.color = 'white';
document.getElementById('contact-link').style.color = 'white';
} else if (currentScrollPos >= 550 && currentScrollPos < 1200) {
document.getElementById('about-link').style.color = '#00e6e6';
document.getElementById('team-link').style.color = 'black';
document.getElementById('work-link').style.color = 'black';
document.getElementById('sponsors-link').style.color = 'black';
document.getElementById('contact-link').style.color = 'black';
} else if (currentScrollPos >= 1200 && currentScrollPos < 2350) {
document.getElementById('about-link').style.color = 'black';
document.getElementById('team-link').style.color = '#00e6e6';
document.getElementById('work-link').style.color = 'black';
document.getElementById('sponsors-link').style.color = 'black';
document.getElementById('contact-link').style.color = 'black';
} else if (currentScrollPos >= 2350 && currentScrollPos < 3200) {
document.getElementById('about-link').style.color = 'black';
document.getElementById('team-link').style.color = 'black';
document.getElementById('work-link').style.color = '#00e6e6';
document.getElementById('sponsors-link').style.color = 'black';
document.getElementById('contact-link').style.color = 'black';
} else if (currentScrollPos >= 3200 && currentScrollPos < 3780) {
document.getElementById('about-link').style.color = 'black';
document.getElementById('team-link').style.color = 'black';
document.getElementById('work-link').style.color = 'black';
document.getElementById('sponsors-link').style.color = '#00e6e6';
document.getElementById('contact-link').style.color = 'black';
} else if (currentScrollPos >= 3780) {
document.getElementById('about-link').style.color = 'black';
document.getElementById('team-link').style.color = 'black';
document.getElementById('work-link').style.color = 'black';
document.getElementById('sponsors-link').style.color = 'black';
document.getElementById('contact-link').style.color = '#00e6e6';
}
}

if (currentScrollPos < 550) {
document.getElementById('about-link').style.color = 'white';
document.getElementById('team-link').style.color = 'white';
document.getElementById('work-link').style.color = 'white';
document.getElementById('sponsors-link').style.color = 'white';
document.getElementById('contact-link').style.color = 'white';
} else if (currentScrollPos >= 550 && currentScrollPos < 1200) {
document.getElementById('about-link').style.color = '#00e6e6';
document.getElementById('team-link').style.color = 'black';
document.getElementById('work-link').style.color = 'black';
document.getElementById('sponsors-link').style.color = 'black';
document.getElementById('contact-link').style.color = 'black';
} else if (currentScrollPos >= 1200 && currentScrollPos < 2350) {
document.getElementById('about-link').style.color = 'black';
document.getElementById('team-link').style.color = '#00e6e6';
document.getElementById('work-link').style.color = 'black';
document.getElementById('sponsors-link').style.color = 'black';
document.getElementById('contact-link').style.color = 'black';
} else if (currentScrollPos >= 2350 && currentScrollPos < 3200) {
document.getElementById('about-link').style.color = 'black';
document.getElementById('team-link').style.color = 'black';
document.getElementById('work-link').style.color = '#00e6e6';
document.getElementById('sponsors-link').style.color = 'black';
document.getElementById('contact-link').style.color = 'black';
} else if (currentScrollPos >= 3200 && currentScrollPos < 3780) {
document.getElementById('about-link').style.color = 'black';
document.getElementById('team-link').style.color = 'black';
document.getElementById('work-link').style.color = 'black';
document.getElementById('sponsors-link').style.color = '#00e6e6';
document.getElementById('contact-link').style.color = 'black';
} else if (currentScrollPos >= 3780) {
document.getElementById('about-link').style.color = 'black';
document.getElementById('team-link').style.color = 'black';
document.getElementById('work-link').style.color = 'black';
document.getElementById('sponsors-link').style.color = 'black';
document.getElementById('contact-link').style.color = '#00e6e6';
}
}

return (
<Styles>
<header id='header' className="clear">
<a className='navbar-brand' href="">GT CS + Social Good</a>
<div className="links">
<ul className="navbar-nav ml-auto">
<li className="nav-item"><a id='home-link' className="nav-link" href="#section-home">Home</a></li>
<li className="nav-item"><a id='about-link' className="nav-link" href="#section-about">About</a></li>
<li className="nav-item"><a id='team-link' className="nav-link" href="#section-team">Team</a></li>
<li className="nav-item"><a id='work-link' className="nav-link" href="#section-work">Work</a></li>
Expand Down

0 comments on commit e0e2e1e

Please sign in to comment.