Skip to content

Commit 13ce41f

Browse files
authored
Merge pull request creativecommons#452 from creativecommons/update_featured_project
add condition to slack link
2 parents 99b9744 + e2a8887 commit 13ce41f

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

themes/vocabulary_theme/templates/blocks/featured-projects.html

+7-5
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,13 @@ <h4 class="card-title b-header"><a href="{{ repo.url }}">{{ repo.english_name }}
3232
<i class="icon github"></i>
3333
<span class="link-content">Github Repository</span>
3434
</a>
35-
<br>
36-
<a class="button is-text tiny" href="https://creativecommons.slack.com/channels/{{ repo.slack }}">
37-
<i class="icon slack"></i>
38-
<span class="link-content">Slack channel (#{{ repo.slack }})</span>
39-
</a>
35+
{% if repo.slack %}
36+
<br>
37+
<a class="button is-text tiny" href="https://creativecommons.slack.com/channels/{{ repo.slack }}">
38+
<i class="icon slack"></i>
39+
<span class="link-content">Slack channel (#{{ repo.slack }})</span>
40+
</a>
41+
{% endif %}
4042
</div>
4143
</div>
4244
</article>

themes/vocabulary_theme/templates/project_list.html

+7-5
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,13 @@ <h4 class="card-title b-header"><a href="{{ repo.url }}">{{ repo.english_name }}
3838
<i class="icon github"></i>
3939
<span class="link-content">Github Repository</span>
4040
</a>
41-
<br>
42-
<a class="button is-text tiny" href="https://creativecommons.slack.com/channels/{{ repo.slack }}">
43-
<i class="icon slack"></i>
44-
<span class="link-content">Slack channel (#{{ repo.slack }})</span>
45-
</a>
41+
{% if repo.slack %}
42+
<br>
43+
<a class="button is-text tiny" href="https://creativecommons.slack.com/channels/{{ repo.slack }}">
44+
<i class="icon slack"></i>
45+
<span class="link-content">Slack channel (#{{ repo.slack }})</span>
46+
</a>
47+
{% endif %}
4648
</div>
4749
</div>
4850
</article>

0 commit comments

Comments
 (0)