_layouts/slack.html (77 lines of code) (raw):

--- layout: default --- <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> <section id="whiskHeader" class="light-text bot-bar"> <main> <div> </div> </main> </section> <section id="whiskNodes"> <main class="doc"> <div class="content"> <h3>Already a Team member?</h3> <p>click here: <a href="https://openwhisk-team.slack.com/"><b>openwhisk-team.slack.com</b></a></p> <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> <div> <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> <p></p> <p>We are a friendly, respectful and inclusive community!</p> <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> </main> </section> <script type="text/javascript"> $(document).ready(function () { var btn = $("button"); var res = $("#result"); var email = $('#inputEmail'); var actionUrl = "https://js-http.nimbella.io/github.com/apache/openwhisk-website/blob/master/apis/slack-invite.js?__c=N0_f11fa71538824fb94496633108113162_0_26bbc52c50f5018f978fc2e90357347a989c233a92b179ccab53724d1c56b25e2ae63957680e177ea54c172df5152ba4aaf55c7430d482779fd9e38cd9afd120bf9d8bb72bc45049f56ece78c42208369d56f34163f3909bdbce45fe1b6b5b65_"; function handler() { var email = $("input")[0].value; $.get(actionUrl, { email: email, org: 'openwhisk-team' }) .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>