Skip to content

Commit

Permalink
Add link to join Slack to the bottom of event details
Browse files Browse the repository at this point in the history
refactor: Deduplicated site external links

refactor: Removed redundant site.about
  • Loading branch information
JakeSidSmith committed Mar 14, 2024
1 parent 0de8485 commit b25d43d
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 44 deletions.
18 changes: 14 additions & 4 deletions _assets/styles/social.scss
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,30 @@ a {
}
}

h2 .meetup-link svg {
.slack-link {
svg {
fill: $tertiary;
margin-right: 0;
}
}

h2 .meetup-link svg,
h2 .slack-link svg {
width: 24px;
height: 24px;
}

h3 .meetup-link svg {
h3 .meetup-link svg,
h3 .slack-link svg {
width: 18px;
height: 18px;
margin-bottom: -2px;
}

p .meetup-link svg {
p .meetup-link svg,
p .slack-link svg {
width: 18px;
height: 18px;
margin-left: 2px;
margin-left: 4px;
margin-bottom: -3px;
}
6 changes: 4 additions & 2 deletions _includes/partials/footer.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<footer class="footer">
<div class="container">
<ul class="links">
{{#each site.elsewhere}}
<li><a href="{{ link }}" title="{{ desc }}">{{ name }}</a></li>
{{#each site.footer as |ref|}}
{{#with (lookup ../site.elsewhere [ref])~}}
<li><a href="{{ link }}" title="{{ desc }}">{{ name }}</a></li>
{{/with}}
{{/each}}
</ul>

Expand Down
6 changes: 3 additions & 3 deletions _includes/partials/meetupLink.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{#if link}}
<a class="meetup-link" target="_blank" href="{{ link }}" title="View {{#if title}}{{ title }} {{/if}}on Meetup">
{{ text }}{{{ iconmonstr 'meetup' }}}
</a>
<a class="meetup-link" target="_blank" href="{{ link }}" title="View {{#if title}}{{ title }} {{/if}}on Meetup">
{{ text }}{{{ iconmonstr 'meetup' }}}
</a>
{{/if}}
2 changes: 1 addition & 1 deletion _includes/partials/nextEvent.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<section class="module event-detail">
<h2 class="module-heading">{{{ iconmonstr 'calendar-tick' }}}Next Event</h2>
{{#each soonest}}
{{> eventDetail }}
{{> eventDetail site=../site }}
{{/each}}
{{#unless soonest}}
<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>
Expand Down
1 change: 1 addition & 0 deletions _includes/partials/postDescription.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@
{{#if post.meetup}}
<p>Thinking of coming? {{> meetupLink link=post.meetup title=post.title text='Join us on Meetup'}}
{{/if}}
<p>{{> slackLink link=site.elsewhere.slack.link title='Join the Async Slack group' text='Stay up-to-date and join the community on Slack'}}
</section>
5 changes: 5 additions & 0 deletions _includes/partials/slackLink.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{{#if link}}
<a class="slack-link" target="_blank" href="{{ link }}" title="{{ title }}">
{{ text }}{{{ iconmonstr 'slack' }}}
</a>
{{/if}}
12 changes: 7 additions & 5 deletions _includes/partials/socialIcons.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<ul class="social">
{{#each site.social as |social|}}
<li>
<a href="{{ social.link }}" target="_blank" title="{{ social.desc }}">
{{{ iconmonstr social.name }}}
</a>
</li>
{{#with (lookup ../site.elsewhere [social])~}}
<li>
<a href="{{ link }}" target="_blank" title="{{ desc }}">
{{{ iconmonstr name }}}
</a>
</li>
{{/with}}
{{/each}}
</ul>
8 changes: 5 additions & 3 deletions _pages/about/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,11 @@ <h2 class="module-heading">Want to know more?</h2>
<p>There are a few ways to find out more about us:</p>
<ul style="list-style: default">
{{#each site.social as |social|}}
<li>
<a href="{{ social.link }}" target="_blank"> {{ social.desc }} </a>
</li>
{{#with (lookup ../site.elsewhere [social])~}}
<li>
<a href="{{ link }}" target="_blank">{{ desc }}</a>
</li>
{{/with}}
{{/each}}
</ul>

Expand Down
41 changes: 15 additions & 26 deletions site.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,74 +8,63 @@
"mapbox": {
"api_token": "pk.eyJ1IjoiYXN5bmNqcyIsImEiOiJrMHlGX3BJIn0.O57e5qvXpxKni60engPX2Q"
},
"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.",
"social": [
{
"elsewhere": {
"twitter": {
"name": "Twitter",
"link": "https://twitter.com/asyncjs",
"desc": "Follow @asyncjs on Twitter"
},
{
"facebook": {
"name": "Facebook",
"link": "https://www.facebook.com/asyncjs/",
"desc": "Like our page on Facebook"
},
{
"youtube": {
"name": "YouTube",
"link": "https://www.youtube.com/AsyncBrighton",
"desc": "Subscribe to our YouTube channel"
},
{
"slack": {
"name": "Slack",
"link": "https://join.slack.com/t/asyncjs/shared_invite/zt-1aguxx86q-XjF_yWcFoJ8fyYYzoqgDaQ",
"desc": "Join the Async Slack group"
},
{
"meetup": {
"name": "Meetup",
"link": "https://www.meetup.com/Async-Web-Tech-Meetup/",
"desc": "Join our meetup group"
},
{
"github": {
"name": "GitHub",
"link": "https://github.com/asyncjs/async-website",
"desc": "Fork this site on GitHub"
}
],
"elsewhere": [
{
"name": "Meetup",
"link": "https://www.meetup.com/Async-Web-Tech-Meetup/",
"desc": "Join our meetup group"
},
{
"news": {
"name": "News",
"link": "/news/",
"desc": "Recent Async Announcements"
},
{
"name": "Mailing List",
"link": "http://groups.google.com/group/asyncjs/",
"desc": "Email list on Google Groups"
},
{
"feed": {
"name": "Subscribe to feed",
"link": "/feed/",
"desc": "Subscribe to the website's Atom feed"
},
{
"email": {
"name": "Email Us",
"link": "mailto:[email protected]",
"desc": "Get in touch"
},
{
"analytics": {
"name": "Analytics",
"link": "https://app.usefathom.com/share/dcqsdyfp/asyncjs.com",
"desc": "Analytics powered by Fathom"
},
{
"conduct": {
"name": "Code of Conduct",
"link": "/codeofconduct/",
"desc": "View our Code of Conduct"
}
]
},
"social": ["twitter", "facebook", "youtube", "slack", "meetup", "github"],
"footer": ["meetup", "news", "feed", "email", "analytics", "conduct"]
}

0 comments on commit b25d43d

Please sign in to comment.