Skip to content
Closed
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
8 changes: 7 additions & 1 deletion assets/js/communities-of-practice.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,10 @@ document.addEventListener("DOMContentLoaded", function() {
}

setMeetingTimes();
});
});

function setSlackLink(slackLink) {
console.log("before:", slackLink);
localStorage.setItem("slackLink", slackLink);
console.log('after:', localStorage.getItem("slackLink"));
}
3 changes: 2 additions & 1 deletion pages/communities-of-practice.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ <h3 class = "Title4">{{ community[1].name}}</h3>

{% if community[1].links[0].url %}
{% assign url_links = true %}
<a href="{{ community[1].links[0].url }}" class="btn btn-primary btn-md btn--default cop-btn" target="_blank" title="{{community[1].name}} Slack channel" rel="noopener noreferrer">
<a href="./join-slack-channel.html" onclick="setSlackLink(community[1].links[0].url)" class="btn btn-primary btn-md btn--default cop-btn" target="_blank" title="{{community[1].name}} Slack channel" rel="noopener noreferrer">
<!-- <a href="{{ community[1].links[0].url }}" class="btn btn-primary btn-md btn--default cop-btn" target="_blank" title="{{community[1].name}} Slack channel" rel="noopener noreferrer"> -->
{% include svg/icon-slack.svg %}
Join Slack Channel
</a>
Expand Down
27 changes: 27 additions & 0 deletions pages/join-slack-channel.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
layout: default
title: Join Our Slack Channel
permalink: /join-slack-channel
---

<!-- Header banner -->
<div class="header-container flex-container">
<div class="header-text ">
<p>
The link below goes to a Slack channel inside Hack for LA's Slack Workspace.
If you are a member of our community already, selecting the link below will take to the channel.
</p>
{% assign slackLink = localStorage.getItem('slackLink') %}
<a href="{{slackLink}}" class="btn btn-primary btn-md btn--default cop-btn" target="_blank" title="{{community[1].name}} Slack channel" rel="noopener noreferrer">
{% include svg/icon-slack.svg %}
Join Slack Channel
</a>
<p>
If you are not yet a member of our community, please see our
<a href="https://www.hackforla.org/getting-started" target="_blank">Getting Started</a>
page to join.
</p>
</div>
</div>

<script type="module" src="assets/js/communities-of-practice.js"></script>
Loading