You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ga...@apache.org on 2017/03/07 13:58:33 UTC

couchdb-www git commit: add section about IRC and slack invite

Repository: couchdb-www
Updated Branches:
  refs/heads/asf-site 1b6c0d40b -> ba5656f30


add section about IRC and slack invite


Project: http://git-wip-us.apache.org/repos/asf/couchdb-www/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-www/commit/ba5656f3
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-www/tree/ba5656f3
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-www/diff/ba5656f3

Branch: refs/heads/asf-site
Commit: ba5656f30a7d3f9da47fc8015c3c376862145275
Parents: 1b6c0d4
Author: Garren Smith <ga...@gmail.com>
Authored: Fri Mar 3 15:14:39 2017 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Sat Mar 4 09:48:27 2017 +0200

----------------------------------------------------------------------
 index.html        | 55 +++++++++++++++++++++++++++++++++++++++++++++++++
 script/slack.js   | 53 +++++++++++++++++++++++++++++++++++++++++++++++
 style/master.css  | 50 +++++++++++++++++++++++++++++++++++++++++++-
 style/master.less | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 213 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-www/blob/ba5656f3/index.html
----------------------------------------------------------------------
diff --git a/index.html b/index.html
index b135d7b..5de5d8e 100644
--- a/index.html
+++ b/index.html
@@ -386,6 +386,60 @@ Thanks to Yohei Shimomae and the Apache Cordova team for the original design.
     </div>
   </div>
 
+   <a class="scroll-point" id="chat"></a>
+
+  <hr>
+
+  <div class="feature">
+    <div class="wrap">
+      <h2 class="icon icon-chat">CouchDB Chat</h2>
+
+      <p>
+        We run community chat channels on <a href="http://freenode.org">Freenode IRC network</a> and <a href="https://slack.com">Slack.</a>
+        IRC is open and very common, but Slack is more user-friendly. We have a Slack/IRC bridge so you can use what you prefer and your messages will be relayed.
+      </p>
+    </div>
+    <div class="grid contribute">
+      <div class="wrap cf">
+
+        <div class="skill-card">
+          <div class="stripe"></div>
+          <div class="skill-card-content">
+            <h3>
+              <span class="core card-icon"></span>
+              <span class="skill-card-heading-text">Slack</span>
+            </h3>
+            <p class="slack-slogan">To start using Slack, enter your email address here for an invite:</p>
+            <form id="slack-form" class="chat-slack-integration">
+              <input class="chat-email-input" type="email" placeholder="me@mydomain.com" required>
+              <button type="submit" class="chat-submit-slack">Get your invite</button>
+              <div class="chat-slack-form-message"></div>
+            </form>
+           </div>
+        </div>
+
+        <div class="skill-card">
+          <div class="stripe"></div>
+          <div class="skill-card-content">
+            <h3>
+              <span class="documentation card-icon"></span>
+              <span class="skill-card-heading-text">IRC</span>
+            </h3>
+            <p class="skill-card-slogan">
+              We have two IRC channels. <strong>#Couchdb</strong> for discusisons on using CouchDB and <strong>#CouchDB-dev</strong> for discussions
+              on CouchDB development.
+            </p>
+            <ul>
+              <li>&mdash; <a href="irc://freenode.noet/#couchdb">#CouchDB</a></li>
+              <li>&mdash; <a href="irc://freenode.net/#couchdb-dev/">#CouchDB-dev</a></li>
+            </ul>
+          </div>
+        </div>
+       
+      </div>
+    </div>
+  </div>
+
   <a class="scroll-point" id="mailing-lists"></a>
 
   <div class="wrap">
@@ -722,6 +776,7 @@ Thanks to Yohei Shimomae and the Apache Cordova team for the original design.
     })();
   </script>
   <script type="text/javascript" src="script/jira.js"></script>
+  <script type="text/javascript" src="script/slack.js"></script>
   <script>
     $(document).ready(function () {
       $('.download-list').on('click', function (e) {

http://git-wip-us.apache.org/repos/asf/couchdb-www/blob/ba5656f3/script/slack.js
----------------------------------------------------------------------
diff --git a/script/slack.js b/script/slack.js
new file mode 100644
index 0000000..56d8861
--- /dev/null
+++ b/script/slack.js
@@ -0,0 +1,53 @@
+$(document).ready(function () {
+    $('#slack-form').submit(function (e) {
+        e.preventDefault();
+        var btn = $('.chat-submit-slack', this),
+            email = $('.chat-email-input', this),
+            formMessage = $('.chat-slack-form-message', this);
+
+        console.log(email.val());
+        if (!email.val()) {
+            return;
+        }
+
+        btn.prop('disabled', true);
+        $.ajax({
+            type: 'POST',
+            url: 'https://couchdb-slack.now.sh/invite',
+            dataType: 'json',
+            crossDomain: true,
+            contentType: 'application/json; charset=utf-8',
+            data: JSON.stringify({ email: email.val() })
+        })
+        .fail(function (res) {
+            console.log('res', res);
+            var err;
+            try {
+              err = JSON.parse(res.responseText);
+            } catch (e) {
+              console.log('err', e);
+            }
+
+            if (!err) {
+              return formMessage.removeClass('slack-message').addClass('slack-message-fail')
+                  .html('Sorry, there was a server error. Please try our <a href="https://couchdb-slack.now.sh">Backup invite form</a>');
+            }
+            if (/already been invited/.test(err.msg)) {
+                return formMessage.removeClass('slack-message').addClass('slack-message-fail')
+                    .text('It looks like you\'ve already joined!');
+            }
+
+            formMessage.removeClass('slack-message').addClass('slack-message-fail')
+                .text(err.msg);
+        })
+        .done(function (data) {
+            email.val('');
+            formMessage.removeClass('slack-message')
+                .addClass('slack-message-done')
+                .text('Woot! Check your email!');
+        })
+        .always(function () {
+            btn.prop('disabled', false);
+        });
+    });
+});

http://git-wip-us.apache.org/repos/asf/couchdb-www/blob/ba5656f3/style/master.css
----------------------------------------------------------------------
diff --git a/style/master.css b/style/master.css
index bd5ece2..36585f4 100644
--- a/style/master.css
+++ b/style/master.css
@@ -135,8 +135,10 @@ div.button:hover {
 .cf:after {
   content: " ";
   /* 1 */
+
   display: table;
   /* 2 */
+
 }
 .cf:after,
 .clear {
@@ -216,7 +218,7 @@ blockquote {
   -moz-transition: all 0.25s linear;
   transition: all 0.25s linear;
   padding: 16px;
-  margin: 0 2.28571429px;
+  margin: 0 2.2857142857142856px;
   line-height: 55px;
 }
 .menu a:hover {
@@ -461,6 +463,51 @@ blockquote {
   background-position: -156px -95px;
   background-color: #e12830;
 }
+/**** Chat ****/
+.slack-slogan {
+  height: 62px;
+}
+.chat-slack-integration {
+  width: 100%;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: initial;
+}
+.chat-slack-integration label {
+  font-size: 18px;
+  line-height: 1.4em;
+  margin-bottom: 6px;
+}
+.chat-email-input {
+  text-align: center;
+  font-size: 18px;
+  line-height: 1.4em;
+  font-weight: 100;
+}
+.chat-submit-slack {
+  background-color: #e12830;
+  padding: 6px;
+  color: #fff;
+  text-transform: uppercase;
+  cursor: pointer;
+  border-style: none;
+  margin-top: 6px;
+}
+.chat-submit-slack:hover {
+  background-color: #ae2323;
+}
+.chat-slack-form-message {
+  text-align: center;
+  margin-top: 6px;
+}
+.slack-message {
+  color: #291d1e;
+}
+.slack-message-fail {
+  color: #e12830;
+  font-size: 0.9rem;
+}
 /*---------------------------------------------------
     Layout - Footer
 ---------------------------------------------------*/
@@ -693,6 +740,7 @@ a.pt-about {
 @media all and (max-width: 675px) {
   body {
     /*        font-size: 14px;*/
+  
   }
   .leadin img {
     left: -4px;

http://git-wip-us.apache.org/repos/asf/couchdb-www/blob/ba5656f3/style/master.less
----------------------------------------------------------------------
diff --git a/style/master.less b/style/master.less
index 3e140d0..dd9d26e 100644
--- a/style/master.less
+++ b/style/master.less
@@ -523,6 +523,62 @@ blockquote {
     background-color: @key-color;
 }
 
+/**** Chat ****/
+
+.slack-slogan {
+    height: 62px;
+}
+
+.chat-slack-integration {
+    width: 100%;
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    align-items: initial;
+}
+
+.chat-slack-integration label {
+    font-size: 18px;
+    line-height: 1.4em;
+    margin-bottom: 6px;
+}
+
+.chat-email-input {
+    text-align: center;
+    font-size: 18px;
+    line-height: 1.4em;
+    font-weight: 100;
+}
+
+.chat-submit-slack {
+    background-color: @key-color;
+    padding: 6px;
+    color: #fff;
+    text-transform: uppercase;
+    cursor: pointer;
+    border-style: none;
+    margin-top: 6px;
+}
+
+.chat-submit-slack:hover {
+    background-color: @key-color-hover;
+}
+
+.chat-slack-form-message {
+    text-align: center;
+    margin-top: 6px;
+}
+
+.slack-message {
+    color: @main-color;
+}
+
+.slack-message-fail {
+    color: @key-color;
+    font-size: 0.9rem;
+}
+
+
 
 /*---------------------------------------------------
     Layout - Footer