Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change slack invitation to be a link instead of a form #75

Merged
merged 1 commit into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions assets/scss/custom/_style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -137,4 +137,25 @@ footer {
.google {
max-width: 2.6rem;
}
}

.slack {
a:link {
color: $blue;
text-decoration: underline;
}

a:visited {
color: $pink;
text-decoration: underline;
}

a:hover {
color: $grey;
text-decoration: underline;
}
a:active {
color: $blue;
text-decoration: underline;
}
}
38 changes: 4 additions & 34 deletions layouts/partials/slack.html
Original file line number Diff line number Diff line change
@@ -1,39 +1,9 @@
<section class="bg-purple py-4">
<section class="bg-purple py-4 slack">
<div class="container">
<div class="row">
<div class="col-sm-12 col-lg-6 align-self-center">
<h3>Join our Slack community</h3>
</div>
<div class="col-sm-12 col-lg-6">
<form action="https://slack.cloudnativenordics.com/invite" method="get" class="mb-0">
<div class="input-group mb-3">
<input type="email" name="email" id="email" class="form-control form-control-lg"
placeholder="Enter email..." />
<div class="input-group-append">
<button type="submit" class="btn btn-secondary" type="button">Invite</button>
</div>
</div>
<div class="cf-turnstile" data-sitekey="0x4AAAAAAAQkG-a3pcOC8Ic1"></div>
</form>
<p id="status"></p>
<div class="col-sm-12 col-lg-12 align-self-center">
<h3>Join our Slack community by following <a href="https://join.slack.com/t/cloud-native-nordics/shared_invite/zt-2ge0c6cmo-SDDeFUDeEU~TUkZTDcis8w">this link</a></h3>
</div>
</div>
</div>
</section>
<script>
(() => {
const form = document.querySelector('form');
const formResponse = document.getElementById('status');
const inputEmail = document.getElementById("email")
form.onsubmit = e => {
e.preventDefault();
var xhr = new XMLHttpRequest();
xhr.open(form.method, form.action + "?email=" + inputEmail.value, true);
xhr.send(null);
xhr.onloadend = response => {
form.reset();
formResponse.innerHTML = response.target.responseText;
};
};
})();
</script>
</section>
Loading