Skip to content

Commit b25d43d

Browse files
committed
Add link to join Slack to the bottom of event details
refactor: Deduplicated site external links refactor: Removed redundant site.about
1 parent 0de8485 commit b25d43d

File tree

9 files changed

+55
-44
lines changed

9 files changed

+55
-44
lines changed

_assets/styles/social.scss

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,20 +50,30 @@ a {
5050
}
5151
}
5252

53-
h2 .meetup-link svg {
53+
.slack-link {
54+
svg {
55+
fill: $tertiary;
56+
margin-right: 0;
57+
}
58+
}
59+
60+
h2 .meetup-link svg,
61+
h2 .slack-link svg {
5462
width: 24px;
5563
height: 24px;
5664
}
5765

58-
h3 .meetup-link svg {
66+
h3 .meetup-link svg,
67+
h3 .slack-link svg {
5968
width: 18px;
6069
height: 18px;
6170
margin-bottom: -2px;
6271
}
6372

64-
p .meetup-link svg {
73+
p .meetup-link svg,
74+
p .slack-link svg {
6575
width: 18px;
6676
height: 18px;
67-
margin-left: 2px;
77+
margin-left: 4px;
6878
margin-bottom: -3px;
6979
}

_includes/partials/footer.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
<footer class="footer">
22
<div class="container">
33
<ul class="links">
4-
{{#each site.elsewhere}}
5-
<li><a href="{{ link }}" title="{{ desc }}">{{ name }}</a></li>
4+
{{#each site.footer as |ref|}}
5+
{{#with (lookup ../site.elsewhere [ref])~}}
6+
<li><a href="{{ link }}" title="{{ desc }}">{{ name }}</a></li>
7+
{{/with}}
68
{{/each}}
79
</ul>
810

_includes/partials/meetupLink.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{#if link}}
2-
<a class="meetup-link" target="_blank" href="{{ link }}" title="View {{#if title}}{{ title }} {{/if}}on Meetup">
3-
{{ text }}{{{ iconmonstr 'meetup' }}}
4-
</a>
2+
<a class="meetup-link" target="_blank" href="{{ link }}" title="View {{#if title}}{{ title }} {{/if}}on Meetup">
3+
{{ text }}{{{ iconmonstr 'meetup' }}}
4+
</a>
55
{{/if}}

_includes/partials/nextEvent.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<section class="module event-detail">
22
<h2 class="module-heading">{{{ iconmonstr 'calendar-tick' }}}Next Event</h2>
33
{{#each soonest}}
4-
{{> eventDetail }}
4+
{{> eventDetail site=../site }}
55
{{/each}}
66
{{#unless soonest}}
77
<p class="prose">There are currently no upcoming events, stay tuned for more. You can follow us on <a href="https://twitter.com/asyncjs">Twitter</a> or subscribe to the <a href="/feed/">feed</a> for updates.</p>

_includes/partials/postDescription.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@
88
{{#if post.meetup}}
99
<p>Thinking of coming? {{> meetupLink link=post.meetup title=post.title text='Join us on Meetup'}}
1010
{{/if}}
11+
<p>{{> slackLink link=site.elsewhere.slack.link title='Join the Async Slack group' text='Stay up-to-date and join the community on Slack'}}
1112
</section>

_includes/partials/slackLink.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{{#if link}}
2+
<a class="slack-link" target="_blank" href="{{ link }}" title="{{ title }}">
3+
{{ text }}{{{ iconmonstr 'slack' }}}
4+
</a>
5+
{{/if}}
Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
<ul class="social">
22
{{#each site.social as |social|}}
3-
<li>
4-
<a href="{{ social.link }}" target="_blank" title="{{ social.desc }}">
5-
{{{ iconmonstr social.name }}}
6-
</a>
7-
</li>
3+
{{#with (lookup ../site.elsewhere [social])~}}
4+
<li>
5+
<a href="{{ link }}" target="_blank" title="{{ desc }}">
6+
{{{ iconmonstr name }}}
7+
</a>
8+
</li>
9+
{{/with}}
810
{{/each}}
911
</ul>

_pages/about/index.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,11 @@ <h2 class="module-heading">Want to know more?</h2>
6565
<p>There are a few ways to find out more about us:</p>
6666
<ul style="list-style: default">
6767
{{#each site.social as |social|}}
68-
<li>
69-
<a href="{{ social.link }}" target="_blank"> {{ social.desc }} </a>
70-
</li>
68+
{{#with (lookup ../site.elsewhere [social])~}}
69+
<li>
70+
<a href="{{ link }}" target="_blank">{{ desc }}</a>
71+
</li>
72+
{{/with}}
7173
{{/each}}
7274
</ul>
7375

site.json

Lines changed: 15 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -8,74 +8,63 @@
88
"mapbox": {
99
"api_token": "pk.eyJ1IjoiYXN5bmNqcyIsImEiOiJrMHlGX3BJIn0.O57e5qvXpxKni60engPX2Q"
1010
},
11-
"about": "Async meets monthly in Brighton & Hove, UK, to learn, discuss and play with JavaScript and related web technologies.\n\nWe host talks, hack nights, show n' tells and community events, all of which are free. \n\nDoors open 7.00pm, main session begins 7.00pm, we end around 9.00pm and continue nearby for an evening social.",
12-
"social": [
13-
{
11+
"elsewhere": {
12+
"twitter": {
1413
"name": "Twitter",
1514
"link": "https://twitter.com/asyncjs",
1615
"desc": "Follow @asyncjs on Twitter"
1716
},
18-
{
17+
"facebook": {
1918
"name": "Facebook",
2019
"link": "https://www.facebook.com/asyncjs/",
2120
"desc": "Like our page on Facebook"
2221
},
23-
{
22+
"youtube": {
2423
"name": "YouTube",
2524
"link": "https://www.youtube.com/AsyncBrighton",
2625
"desc": "Subscribe to our YouTube channel"
2726
},
28-
{
27+
"slack": {
2928
"name": "Slack",
3029
"link": "https://join.slack.com/t/asyncjs/shared_invite/zt-1aguxx86q-XjF_yWcFoJ8fyYYzoqgDaQ",
3130
"desc": "Join the Async Slack group"
3231
},
33-
{
32+
"meetup": {
3433
"name": "Meetup",
3534
"link": "https://www.meetup.com/Async-Web-Tech-Meetup/",
3635
"desc": "Join our meetup group"
3736
},
38-
{
37+
"github": {
3938
"name": "GitHub",
4039
"link": "https://github.com/asyncjs/async-website",
4140
"desc": "Fork this site on GitHub"
42-
}
43-
],
44-
"elsewhere": [
45-
{
46-
"name": "Meetup",
47-
"link": "https://www.meetup.com/Async-Web-Tech-Meetup/",
48-
"desc": "Join our meetup group"
4941
},
50-
{
42+
"news": {
5143
"name": "News",
5244
"link": "/news/",
5345
"desc": "Recent Async Announcements"
5446
},
55-
{
56-
"name": "Mailing List",
57-
"link": "http://groups.google.com/group/asyncjs/",
58-
"desc": "Email list on Google Groups"
59-
},
60-
{
47+
"feed": {
6148
"name": "Subscribe to feed",
6249
"link": "/feed/",
6350
"desc": "Subscribe to the website's Atom feed"
6451
},
65-
{
52+
"email": {
6653
"name": "Email Us",
6754
"link": "mailto:hello@asyncjs.com",
6855
"desc": "Get in touch"
6956
},
70-
{
57+
"analytics": {
7158
"name": "Analytics",
7259
"link": "https://app.usefathom.com/share/dcqsdyfp/asyncjs.com",
7360
"desc": "Analytics powered by Fathom"
7461
},
75-
{
62+
"conduct": {
7663
"name": "Code of Conduct",
7764
"link": "/codeofconduct/",
7865
"desc": "View our Code of Conduct"
7966
}
80-
]
67+
},
68+
"social": ["twitter", "facebook", "youtube", "slack", "meetup", "github"],
69+
"footer": ["meetup", "news", "feed", "email", "analytics", "conduct"]
8170
}

0 commit comments

Comments
 (0)