Skip to content

Commit 8d9f179

Browse files
JP Wesselinkjpwesselink
JP Wesselink
authored andcommitted
Adds community groups
1 parent 70c5762 commit 8d9f179

16 files changed

+229
-2
lines changed

about.html

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<li><a href="index.html" data-i18n="menu-index">Home</a></li>
1919
<li><a href="events.html" data-i18n="menu-events">Events</a></li>
2020
<li><a href="chapters.html" data-i18n="menu-chapters">Chapters</a></li>
21+
<li><a href="community-groups.html" data-i18n="menu-community-groups">Community Groups</a></li>
2122
<li class="current-page"><a href="about.html" data-i18n="menu-about">About</a></li>
2223
<li><a href="building-workshops.html" data-i18n="menu-building-workshops">Build</a></li>
2324
<li><a href="host.html" data-i18n="menu-host">Host</a></li>

building-workshops.html

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<li><a href="index.html" data-i18n="menu-index">Home</a></li>
1818
<li><a href="events.html" data-i18n="menu-events">Events</a></li>
1919
<li><a href="chapters.html" data-i18n="menu-chapters">Chapters</a></li>
20+
<li><a href="community-groups.html" data-i18n="menu-community-groups">Community Groups</a></li>
2021
<li><a href="about.html" data-i18n="menu-about">About</a></li>
2122
<li class="current-page"><a href="building-workshops.html" data-i18n="menu-building-workshops">Build</a></li>
2223
<li><a href="host.html" data-i18n="menu-host">Host</a></li>

chapters.html

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
<li><a href="index.html" data-i18n="menu-index">Home</a></li>
2020
<li><a href="events.html" data-i18n="menu-events">Events</a></li>
2121
<li class="current-page"><a href="chapters.html" data-i18n="menu-chapters">Chapters</a></li>
22+
<li><a href="community-groups.html" data-i18n="menu-community-groups">Community Groups</a></li>
2223
<li><a href="about.html" data-i18n="menu-about">About</a></li>
2324
<li><a href="building-workshops.html" data-i18n="menu-building-workshops">Build</a></li>
2425
<li><a href="host.html" data-i18n="menu-host">Host</a></li>

community-groups.html

+109
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
<!DOCTYPE html>
2+
<html class="chapters">
3+
<head>
4+
<meta charset="utf-8">
5+
<link rel="stylesheet" href="/style.css">
6+
<link rel="stylesheet" href="/community-groups.css">
7+
<link rel="shortcut icon" href="/favicon.ico">
8+
<link href="http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700|Source+Code+Pro" rel="stylesheet" type="text/css">
9+
<link rel="stylesheet" href="/mapbox.css">
10+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
11+
<title>NodeSchool - Chapters</title>
12+
</head>
13+
<body class="chapters">
14+
<header>
15+
<div class="container">
16+
<div class="full">
17+
<a href="index.html"><img class="logo" src="/images/schoolhouse.svg" alt="nodeschoolhouse"></a>
18+
<ul class="nav">
19+
<li><a href="index.html" data-i18n="menu-index">Home</a></li>
20+
<li><a href="events.html" data-i18n="menu-events">Events</a></li>
21+
<li><a href="chapters.html" data-i18n="menu-chapters">Chapters</a></li>
22+
<li class="current-page"><a href="community-groups.html" data-i18n="menu-community-groups">Community Groups</a></li>
23+
<li><a href="about.html" data-i18n="menu-about">About</a></li>
24+
<li><a href="building-workshops.html" data-i18n="menu-building-workshops">Build</a></li>
25+
<li><a href="host.html" data-i18n="menu-host">Host</a></li>
26+
</ul>
27+
</div>
28+
</div>
29+
</header>
30+
<div id="main" name="main" role="main">
31+
<div class="container" style="background-color: #fff;">
32+
<div class="full">
33+
<h1 data-i18n="chapters-h1">NodeSchool Chapters</h1>
34+
<p data-i18n="chapters-header">Cities all over have started to host NodeSchool events regularly. Here&apos;s a list of chapters. See the <a href="hexdex.html">hexdex</a> for an index of chapter ⬢ hexagon logos.</p>
35+
36+
<div id="chapter-list">
37+
<div class="loading" data-i18n="index-chapter-list-loading">
38+
Loading...
39+
</div>
40+
</div>
41+
42+
<h2 id="region-other" data-i18n="chapters-other">Other region?</h2>
43+
<div class="other">
44+
<span data-i18n="chapters-start">Can't find a NodeSchool chapter in your region?</span> <a href="https://github.com/nodeschool/discussions" data-i18n="chapters-start2">Open an issue on the discussions board</a> <span data-i18n="chapters-start3">to find other people around you. If there isn't an existing chapter nearby, start your own! Follow these instructions on</span> <a href="host.html" data-i18n="chapters-start4">how to host an event</a><span data-i18n="chapters-start5">.</span>
45+
</div>
46+
</div>
47+
</div>
48+
</div>
49+
<div class="container" style="background-color: #fff;">
50+
<footer>
51+
<div class="third">
52+
<p><strong>nodeschool.io</strong></p>
53+
<small>Photos by <a href="https://www.flickr.com/photos/matthewbergman" target="_blank">Matthew Bergman</a></small>
54+
</div>
55+
<div class="two-thirds">
56+
<ul>
57+
<li><strong data-i18n="footer-contact-header">Contact</strong></li>
58+
<li><a href="https://twitter.com/nodeschool" target="_blank">t/@nodeschool</a></li>
59+
<li><a href="https://github.com/nodeschool" target="_blank">gh/nodeschool</a></li>
60+
</ul>
61+
<ul>
62+
<li><strong data-i18n="footer-contribute-header">Contribute</strong></li>
63+
<li><a href="https://github.com/nodeschool/discussions/issues/new" target="_blank" data-i18n="footer-contribute-question">Open an Issue</a></li>
64+
<li><a href="https://github.com/nodeschool/discussions/issues" target="_blank" data-i18n="footer-contribute-answer">Answer a Question</a></li>
65+
</ul>
66+
<ul>
67+
<li><strong data-i18n="footer-about-header">About</strong></li>
68+
<li><a href="building-workshops.html" data-i18n="footer-about-build">Build a workshopper</a></li>
69+
<li><a href="host.html" data-i18n="footer-about-host">Host a workshop</a></li>
70+
</ul>
71+
</div>
72+
</footer>
73+
</div>
74+
75+
<script id="tmpl-chapter-list" type="text/html">
76+
<p style="font-size: 100%"><em>Chapter count: {{total}}</em></p>
77+
{{#regions}}
78+
<div class="chapter-list {{region}}">
79+
<h2>{{region}} ({{count}})</h2>
80+
<ul>
81+
{{#chapters}}
82+
<li class="chapter">
83+
{{#website}}
84+
<a target="_blank" href="{{website}}">{{location}}{{#country}}, {{country}}{{/country}}</a>
85+
{{/website}}
86+
{{^website}}
87+
<a target="_blank" href="{{repo}}">{{location}}{{#country}}, {{country}}{{/country}}</a>
88+
{{/website}}
89+
</li>
90+
{{/chapters}}
91+
</ul>
92+
</div>
93+
{{/regions}}
94+
</script>
95+
96+
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
97+
<script type="text/javascript" src="/js/dependencies.js"></script>
98+
<script type="text/javascript" src="/js/chapters.js"></script>
99+
<script>
100+
!function(s,c,h,O,o,l){s.GoogleAnalyticsObject=h;s[h]||(s[h]=function(){
101+
(s[h].q=s[h].q||[]).push(arguments)});s[h].l=+new Date;o=c.createElement(O);
102+
l=c.getElementsByTagName(O)[0];o.src='//www.google-analytics.com/analytics.js';
103+
l.parentNode.insertBefore(o,l)}(window,document,'ga','script');
104+
105+
ga('create', 'UA-49267600-1', 'nodeschool.io');
106+
ga('send', 'pageview');
107+
</script>
108+
</body>
109+
</html>

community-groups/military.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"name": "Military",
3+
"organizers": ["hollomancer"],
4+
"website": "",
5+
"twitter": "",
6+
"repo": "http://github.com/nodeschool/military-community-group"
7+
}

events.html

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
<li><a href="index.html" data-i18n="menu-index">Home</a></li>
2020
<li class="current-page"><a href="events.html" data-i18n="menu-events">Events</a></li>
2121
<li><a href="chapters.html" data-i18n="menu-chapters">Chapters</a></li>
22+
<li><a href="community-groups.html" data-i18n="menu-community-groups">Community Groups</a></li>
2223
<li><a href="about.html" data-i18n="menu-about">About</a></li>
2324
<li><a href="building-workshops.html" data-i18n="menu-building-workshops">Build</a></li>
2425
<li><a href="host.html" data-i18n="menu-host">Host</a></li>

hexdex.html

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
<li><a href="index.html" data-i18n="menu-index">Home</a></li>
2020
<li><a href="events.html" data-i18n="menu-events">Events</a></li>
2121
<li class="current-page"><a href="chapters.html" data-i18n="menu-chapters">Chapters</a></li>
22+
<li><a href="community-groups.html" data-i18n="menu-community-groups">Community Groups</a></li>
2223
<li><a href="about.html" data-i18n="menu-about">About</a></li>
2324
<li><a href="building-workshops.html" data-i18n="menu-building-workshops">Build</a></li>
2425
<li><a href="host.html" data-i18n="menu-host">Host</a></li>

host.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<li><a href="index.html" data-i18n="menu-index">Home</a></li>
1919
<li><a href="events.html" data-i18n="menu-events">Events</a></li>
2020
<li><a href="chapters.html" data-i18n="menu-chapters">Chapters</a></li>
21+
<li><a href="community-groups.html" data-i18n="menu-community-groups">Community Groups</a></li>
2122
<li><a href="about.html" data-i18n="menu-about">About</a></li>
2223
<li><a href="building-workshops.html" data-i18n="menu-building-workshops">Build</a></li>
2324
<li class="current-page"><a href="host.html" data-i18n="menu-host">Host</a></li>
@@ -31,7 +32,7 @@
3132
<h1 data-i18n="host-header">Hosting a NodeSchool Event</h1>
3233
<p data-i18n="host-info">NodeSchool is a fully community driven effort and is 100% open source. This means that anyone can use the NodeSchool materials and/or host an event.</p>
3334
<p data-i18n="host-info-cost">The only expectations for event hosts is that events be not-for-profit (free or low cost) and that governance of events should have an open membership model (so that nobody can 'control' the events).</p>
34-
<p data-i18n="host-info-wiki">We have created the <a href="https://github.com/nodeschool/organizers/wiki">Organizers Wiki</a> to hold all the knowledge from the Chapter organizers around the world.</p>
35+
<p data-i18n="host-info-wiki">We have created the <a href="https://github.com/nodeschool/organizers/wiki">Organizers Wiki</a> to hold all the knowledge from the Chapter and Community Group organizers around the world.</p>
3536
<p data-i18n="host-info-wiki-link">Check out <a href="https://github.com/nodeschool/organizers/wiki">the wiki</a> for info on how to create a chapter, run a successful event and build a local NodeSchool community!</p>
3637
</div>
3738
</div>

index.html

+1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ <h1 class="name">nodeschool</h1>
6262
<li><a href="#workshoppers" data-i18n="menu-tutorials">Tutorials</a></li>
6363
<li><a href="events.html" data-i18n="menu-events">Events</a></li>
6464
<li><a href="chapters.html" data-i18n="menu-chapters">Chapters</a></li>
65+
<li><a href="community-groups.html" data-i18n="menu-community-groups">Community Groups</a></li>
6566
<li><a href="about.html" data-i18n="menu-about">About</a></li>
6667
<li><a href="building-workshops.html" data-i18n="menu-building-workshops">Build</a></li>
6768
<li><a href="host.html" data-i18n="menu-host">Host</a></li>

mentor-at-event.html

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<li><a href="index.html" data-i18n="menu-index">Home</a></li>
1919
<li><a href="events.html" data-i18n="menu-events">Events</a></li>
2020
<li><a href="chapters.html" data-i18n="menu-chapters">Chapters</a></li>
21+
<li><a href="community-groups.html" data-i18n="menu-community-groups">Community Groups</a></li>
2122
<li><a href="about.html" data-i18n="menu-about">About</a></li>
2223
<li><a href="building-workshops.html" data-i18n="menu-building-workshops">Build</a></li>
2324
<li class="current-page"><a href="host.html" data-i18n="menu-host">Host</a></li>

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"build-copy": "node ./scripts/build-copy.js $$",
99
"build-html": "node ./scripts/build-html.js $$",
1010
"build-chapters": "node ./scripts/build-chapters.js $$",
11+
"build-community-groups": "node ./scripts/build-community-groups.js $$",
1112
"build-dependencies": "bash ./scripts/build-dependencies.sh $$",
1213
"generate-css": "bash ./scripts/generate-css.sh",
1314
"generate-language": "node ./scripts/generate-lang.js",

scripts/build-community-groups.js

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
#!/usr/bin/env node
2+
const Fs = require('fs')
3+
const cmdwatcher = require('./util/cmdwatcher')
4+
const mkdirp = require('mkdirp')
5+
6+
function groupByValue(list, grouper, groupName) {
7+
var grouped = {}
8+
groupName = groupName || 'items'
9+
for (var i = 0; i < list.length; i++) {
10+
var key = list[i][grouper]
11+
if (typeof grouped[key] !== "object" || typeof grouped[key].push !== "function") {
12+
grouped[key] = []
13+
}
14+
grouped[key].push(list[i])
15+
}
16+
return Object.keys(grouped).map(function (group) {
17+
var formatted = {}
18+
formatted[grouper] = group
19+
formatted.count = grouped[group].length
20+
formatted[groupName] = grouped[group]
21+
return formatted
22+
});
23+
}
24+
25+
function sortByKey(list, key) {
26+
return list.sort(function (a, b) {
27+
return a[key] > b[key] ? 1 : 0
28+
})
29+
}
30+
31+
function sortedGroupByValue(list, grouper, groupName) {
32+
return sortByKey(groupByValue(list, grouper, groupName), grouper);
33+
}
34+
35+
var communityGroups = [];
36+
37+
cmdwatcher('build-community-groups'
38+
, './community-groups/!(list).json', function (files) {
39+
files.forEach(function (f) {
40+
Fs.readFile(f, function (err, buf) {
41+
if (err) {
42+
return console.error(err);
43+
}
44+
var data = buf.toString();
45+
try {
46+
var communityGroup = JSON.parse(data);
47+
} catch (e) {
48+
console.error("JSON parse error: " + f, e);
49+
}
50+
communityGroups.push(communityGroup);
51+
52+
if (communityGroups.length === files.length) {
53+
writeCommunityGroups(communityGroups);
54+
}
55+
});
56+
});
57+
});
58+
59+
function writeCommunityGroups(communityGroups) {
60+
data = {
61+
total: communityGroups.length,
62+
regions: sortedGroupByValue(communityGroups, 'name', 'communityGroups')
63+
};
64+
mkdirp.sync('.build/communityGroups')
65+
Fs.writeFile('.build/communityGroups/list.json', JSON.stringify(data, null, 2), function (err) {
66+
if (err) console.error(err);
67+
});
68+
}

scripts/build.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/bin/bash
22
npm run build-chapters -- $@
3+
npm run build-community-groups -- $@
34
npm run generate-css
45
npm run build-dependencies
56
npm run build-copy -- $@
6-
npm run build-html -- $@
7+
npm run build-html -- $@

scripts/generate-css.sh

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
# -u = utilize plugin
66

77
stylus -u autoprefixer-stylus -c -m ./styles/chapters.styl -o ./chapters.css
8+
stylus -u autoprefixer-stylus -c -m ./styles/community-groups.styl -o ./community-groups.css
89
stylus -u autoprefixer-stylus -c -m ./styles/events.styl -o ./events.css
910
stylus -u autoprefixer-stylus -c -m ./styles/mapbox.styl -o ./mapbox.css
1011
stylus -u autoprefixer-stylus -c -m ./styles/style.styl -o ./style.css

styles/community-groups.styl

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
@import 'settings/*'
2+
3+
.chapter-list {
4+
ul {
5+
list-style: none;
6+
padding-left: 0;
7+
}
8+
9+
li {
10+
width: 250px;
11+
margin: 5px;
12+
padding-bottom: 0;
13+
border: 2px solid $mineshaftGray;
14+
border-radius: 3px;
15+
display: inline-block;
16+
transition: background-color 300ms, border 500ms;
17+
18+
&:hover {
19+
background-color: $broomYellow;
20+
border: 2px solid $broomYellow;
21+
}
22+
}
23+
24+
a {
25+
display: block;
26+
color: $black;
27+
padding: 6px;
28+
border-bottom: none;
29+
text-decoration: none;
30+
}
31+
}

styles/style.styl

+1
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ ul {
233233
color: $mineshaftGray;
234234
font-weight: 700;
235235
letter-spacing: 0.1em;
236+
width: 95%;
236237

237238
li {
238239
display: inline-block;

0 commit comments

Comments
 (0)