blob: d0b7b0a804b8d1822922a159f45f5a22c3e68148 [file] [log] [blame]
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Slack Invite for OpenWhisk</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
crossorigin="anonymous">
<!-- Optional theme -->
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css"
integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp"
crossorigin="anonymous">
<!-- Latest compiled and minified JavaScript -->
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<style>
.outer {
width: 500px;
min-width: 320px;
text-align: center;
margin: 10px auto;
font-family: "Helvetica Neue", Helvetica, Arial
}
.inner {
margin: 10px;
}
.splash {
display: block;
margin: 0px auto;
font-family: "Helvetica Neue", Helvetica, Arial
}
.footer {
margin: 10px auto;
text-align: center;
font-size: small;
font-family: "Helvetica Neue", Helvetica, Arial
}
@media screen and (max-width: 360px) and (min-width: 320px)
{
.outer{
max-width: 320px
}
}
</style>
</head>
<body>
<div class="outer">
<div class="splash"><img
src="https://s23.postimg.org/oy3kv2uxn/skitch.png"
alt="OpenWhisk plus Slack" style="height: 60px;"> </div>
<div class="inner">
<h3>Already a Team member?</h3>
<p>click here: <a href="https://openwhisk-team.slack.com/"><b>openwhisk-team.slack.com</b></a></p>
</div>
<div class="inner">
<h3>If not, join us!</h3>
<p>Join the OpenWhisk Community to discuss the project in
real-time.</p>
<ul style="text-align: left">
<li><strong>Talk</strong> to the core devs and the OpenWhisk
community.</li>
<li><strong>Learn</strong> from others and ask questions.</li>
<li><strong>Share</strong> your work and demos.</li>
</ul>
<form class="form-inline">
<div class="form-group"> <label for="exampleInputEmail2">Email:</label>
<input class="form-control" id="inputEmail"
placeholder="jane.doe@example.com" required=""
type="email"> </div>
<button type="button" class="btn btn-primary" style="margin:
5px;">Send invitation</button> </form>
</div>
<div class="inner">
<p>We are a friendly, respectful and inclusive community!</p>
</div>
<div class="footer"><a href="https://openwhisk-team.slack.com/"> </a>
<p><i>Code for Slack invite (this page) is on github:</i><br>
<i> </i><i><a
href="https://github.com/openwhisk/openwhisk-slackinvite"
target="blank">https://github.com/openwhisk/openwhisk-slackinvite</a></i></p>
</div>
</div>
<script type="text/javascript">
$(document).ready(function() {
var btn = $("button");
var res = $("#result");
var email = $('#inputEmail');
var actionUrl = "https://545303d4-dd03-4cfc-a553-4253f7929dfd-gws.api-gw.mybluemix.net/openwhisk-team/slackinvite";
function handler() {
var email = $("input")[0].value;
$.get(actionUrl, { email: email })
.done(function (data) {
btn.addClass("btn-success");
btn.html("WOOT. CHECK YOUR EMAIL!");
res.html(data.message);
})
.fail(function (err) {
res.html(err.statusText + ":Your invitation didn't work :-( ");
btn.addClass("btn-error");
});
}
btn.click(handler);
btn.prop("disabled", true);
function validate() {
console.log("validate")
if (email[0].validity.typeMismatch) {
btn.prop("disabled", true);
} else {
btn.prop("disabled", false);
}
}
email.keyup(validate);
})
</script>
</body>
</html>