Skip to content

Commit 8717557

Browse files
committed
Improve data files for links and sponors & use svg
1 parent 09be3c7 commit 8717557

File tree

4 files changed

+55
-73
lines changed

4 files changed

+55
-73
lines changed

src/globals/actionLinks.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[
2+
{
3+
"href": "https://meetup.com/javascriptmn",
4+
"text": "RSVP"
5+
},
6+
{
7+
"href": "https://javascriptmn-slack.herokuapp.com",
8+
"text": "Join our Slack"
9+
},
10+
{
11+
"href": "https://www.youtube.com/channel/UC4DA_d8mD-14ZSBvIb1jmXg",
12+
"text": "Watch Previous Talks"
13+
}
14+
]

src/globals/sponsors.json

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[
22
{
3-
"key": "host",
3+
"showOnHome": true,
44
"section": "Host 🌎",
55
"sponsors": [
66
{
@@ -11,7 +11,7 @@
1111
]
1212
},
1313
{
14-
"key": "diamond",
14+
"showOnHome": true,
1515
"section": "Diamond 💎",
1616
"sponsors": [
1717
{
@@ -36,6 +36,14 @@
3636
}
3737
]
3838
},
39-
{ "key": "gold", "section": "Gold 🥇", "sponsors": [] },
40-
{ "key": "silver", "section": "Silver 🥈", "sponsors": [] }
39+
{
40+
"showOnHome": false,
41+
"section": "Gold 🥇",
42+
"sponsors": []
43+
},
44+
{
45+
"showOnHome": false,
46+
"section": "Silver 🥈",
47+
"sponsors": []
48+
}
4149
]
Lines changed: 0 additions & 1 deletion
Loading

src/index.njk

Lines changed: 29 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,6 @@
11
---
22
layout: base
33
title: JavaScriptMN
4-
links:
5-
[
6-
{ 'href': 'https://meetup.com/javascriptmn', 'text': 'RSVP' },
7-
{
8-
'href': 'https://javascriptmn-slack.herokuapp.com',
9-
'text': 'Join our Slack',
10-
},
11-
{
12-
'href': 'https://www.youtube.com/channel/UC4DA_d8mD-14ZSBvIb1jmXg',
13-
'text': 'Watch Previous Talks',
14-
},
15-
]
164
---
175

186
<!-- primary content -->
@@ -22,7 +10,9 @@ links:
2210
<div>
2311
<div class="text-center flex flex-wrap sm:flex-no-wrap justify-center px-4 sm:px-0">
2412
<div class="w-full sm:w-1/2">
25-
<div class="pl-8 sm:pl-16" data-animated-logo>{% include "_logo.njk" %}</div>
13+
<div class="pl-8 sm:pl-16" data-animated-logo>
14+
{% include "_logo.svg" %}
15+
</div>
2616
</div>
2717
<div class="w-full sm:w-1/2 self-center">
2818
<div class="text-4xl font-bold"><h1>JavaScriptMN</h1></div>
@@ -68,7 +58,7 @@ links:
6858
<ul
6959
class="flex justify-center sm:justify-end items-center space-y-2 sm:space-y-0 sm:space-x-2 flex-wrap sm:flex-no-wrap"
7060
>
71-
{% for link in links %}
61+
{% for link in actionLinks %}
7262
<li class="w-full sm:w-auto">
7363
<a
7464
class="block text-xl font-semibold border-2 border-black p-4 hover:bg-jsmn-yellow transition-all duration-100"
@@ -117,7 +107,6 @@ links:
117107
</div>
118108
</div>
119109

120-
121110
{# speaking #}
122111
<div class="mb-8">
123112
<div class="flex justify-start items-center mb-2">
@@ -147,7 +136,6 @@ links:
147136
</div>
148137
</div>
149138

150-
151139
{# promoted sponsors #}
152140
<div class="mb-8">
153141
<div class="flex justify-between items-center mb-2">
@@ -156,68 +144,41 @@ links:
156144
>
157145
Sponsors
158146
</h2>
159-
<p><a class="hover:underline" href="{{ site.baseUrl }}sponsors/">More Sponsors →</a></p>
147+
<p>
148+
<a class="hover:underline" href="{{ site.baseUrl }}sponsors/">
149+
More Sponsors →
150+
</a>
151+
</p>
160152
</div>
161-
<div
162-
class="border-jsmn-yellow border-4 p-4"
163-
>
164-
{# host #}
165-
<div class="w-2/3 mx-auto mb-4">
166-
<h3 class="font-bold text-2xl">Host 🌎</h3>
167-
<div class="grid sm:grid-cols-4 sm:gap-2 grid-cols-none space-y-4 sm:space-y-0">
153+
<div class="border-jsmn-yellow border-4 p-4">
168154
{% for section in sponsors %}
169-
{% if section.key === "host" %}
155+
{% if section.showOnHome === true %}
156+
<div class="w-2/3 mx-auto mb-4">
157+
<h3 class="font-bold text-2xl">{{ section.section }}</h3>
158+
<div class="grid sm:grid-cols-4 sm:gap-2 grid-cols-none space-y-4 sm:space-y-0">
170159
{% for sponsor in section.sponsors %}
171160
<div class="flex justify-center items-center">
172161
<a
173-
href="{{ sponsor.href }}"
174-
target="_blank"
175-
rel="noopener noreferrer"
176-
class="flex justify-center items-center shadow transition-all border border-gray-200 hover:border-gray-400 w-full p-4"
177-
>
178-
<img
179-
src="{{ site.baseUrl }}sponsors/{{ sponsor.imgSrc }}"
180-
alt="{{ sponsor.title }}"
181-
title="{{ sponsor.title }}"
182-
class="h-32"
183-
/>
184-
</a>
185-
</div>
162+
href="{{ sponsor.href }}"
163+
target="_blank"
164+
rel="noopener noreferrer"
165+
class="flex justify-center items-center shadow transition-all border border-gray-200 hover:border-gray-400 w-full p-4"
166+
>
167+
<img
168+
src="{{ site.baseUrl }}sponsors/{{ sponsor.imgSrc }}"
169+
alt="{{ sponsor.title }}"
170+
title="{{ sponsor.title }}"
171+
class="h-32"
172+
/>
173+
</a>
174+
</div>
186175
{% endfor %}
187-
{% endif %}
188-
{% endfor %}
176+
</div>
189177
</div>
190-
</div>
191-
{# diamond #}
192-
<div class="w-2/3 mx-auto mb-4">
193-
<h3 class="font-bold text-2xl">Diamond 💎</h3>
194-
<div class="grid sm:grid-cols-4 sm:gap-2 grid-cols-none space-y-4 sm:space-y-0">
195-
{% for section in sponsors %}
196-
{% if section.key === "diamond" %}
197-
{% for sponsor in section.sponsors %}
198-
<div class="flex justify-center items-center">
199-
<a
200-
href="{{ sponsor.href }}"
201-
target="_blank"
202-
rel="noopener noreferrer"
203-
class="flex justify-center items-center shadow transition-all border border-gray-200 hover:border-gray-400 w-full p-4"
204-
>
205-
<img
206-
src="{{ site.baseUrl }}sponsors/{{ sponsor.imgSrc }}"
207-
alt="{{ sponsor.title }}"
208-
title="{{ sponsor.title }}"
209-
class="h-32"
210-
/>
211-
</a>
212-
</div>
213-
{% endfor %}
214-
{% endif %}
178+
{% endif %}
215179
{% endfor %}
216-
</div>
217-
</div>
218180
</div>
219181
</div>
220-
221182
</div>
222183
</div>
223184
</div>

0 commit comments

Comments
 (0)