Skip to content

Commit

Permalink
add redirection if user has signed up already
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerard Casas Saez committed Feb 14, 2019
1 parent 5e849dd commit 498d429
Show file tree
Hide file tree
Showing 5 changed files with 94 additions and 6 deletions.
Binary file not shown.
73 changes: 73 additions & 0 deletions _sass/mixins.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
@mixin box-shadow($shadow...) {
-webkit-box-shadow: $shadow;
-moz-box-shadow: $shadow;
box-shadow: $shadow;
}

@mixin box-sizing($sizing...) {
-webkit-box-sizing: $sizing;
-moz-box-sizing: $sizing;
box-sizing: $sizing;
}

@mixin border-radius($radius...) {
-webkit-border-radius: $radius;
-moz-border-radius: $radius;
border-radius: $radius;
}

@mixin border-top-left-radius($radius...) {
-webkit-border-top-left-radius: $radius;
-moz-border-radius-topleft: $radius;
border-top-left-radius: $radius;
}

@mixin border-top-right-radius($radius...) {
-webkit-border-top-right-radius: $radius;
-moz-border-radius-topright: $radius;
border-top-right-radius: $radius;
}

@mixin transition($transition...) {
-webkit-transition: $transition;
-moz-transition: $transition;
-o-transition: $transition;
transition: $transition;
}

@mixin user-select($select...) {
-webkit-user-select: $select; /* Chrome all / Safari all */
-moz-user-select: $select; /* Firefox all */
-ms-user-select: $select; /* IE 10+ */
-o-user-select: $select;
user-select: $select;
}

@mixin translateX($px) {
-webkit-transform: translateX($px);
-ms-transform: translateX($px);
transform: translateX($px);
}

@mixin btn($color, $border-color, $cursor: pointer, $opacity: 1, $hover-fx: true) {
cursor: $cursor;
opacity: $opacity;
background-color: $color;
@include box-shadow(0 1px 0 $border-color);
&:hover {
@if ($hover-fx) {
background-color: lighten($color, 5%);
} @else {
background-color: $color;
}
}
}

@mixin nodrag() {
user-drag: none;
user-select: none;
-moz-user-select: none;
-webkit-user-drag: none;
-webkit-user-select: none;
-ms-user-select: none;
}
1 change: 1 addition & 0 deletions css/mountains.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ $cloud-color:#E4EFF3;
.drawing{
width: 500px;
height: 700px;
transform: scale(0.7) translateX(-20px) translateY(200px);


}
Expand Down
12 changes: 10 additions & 2 deletions css/style.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
---

@import "../_sass/mixins";

/* Font*/
$font-stack: Biko, sans-serif, "Times New Roman";
$text-color: #ffffff;
Expand Down Expand Up @@ -115,13 +117,19 @@ h5 {
.fa {
color: $text-color;
margin: 0.5em;
@include transition(0.3s ease);
&:hover {
color: darken($text-color, 20%);
color: rgba($text-color, 0.5);
}
}

a {
color: $text-color;
@include transition(0.3s ease);
}

a:hover {
color: darken($text-color, 20%);
color: rgba($text-color, 0.5);
}

.title {
Expand Down
14 changes: 10 additions & 4 deletions js/subscribe.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,20 @@ function register($form) {
console.error("Could not connect to the registration server. Please try again later.");
},
success: function (data) {
if (!data.ok) {
statusMessage.innerHTML = "There was an error. You may have already signed up!";
if (!data.ok && data.error=="already_invited") {
statusMessage.innerHTML = "You have already joined! Redirecting you to the Slack group...";
statusMessage.style.color = 'white';
setTimeout(function() {
window.location = "https://hackcu.slack.com";
},1200)
} else if (!data.ok){
statusMessage.innerHTML = "There was an error. Please reach out to us to solve this!";
statusMessage.style.color = 'pink';
} else {
document.getElementById('mce-EMAIL').style.display = 'none';
document.getElementById('mc-embedded-subscribe').style.display = 'none';
statusMessage.innerHTML = "Success! You will be notified when applications open."
statusMessage.style.color = '#5bc0de';
statusMessage.innerHTML = "Success! You should receive an email soon!"
statusMessage.style.color = 'white';
}
}
});
Expand Down

0 comments on commit 498d429

Please sign in to comment.