diff --git a/about.html b/about.html
index 23f42255a..09cde6c37 100644
--- a/about.html
+++ b/about.html
@@ -18,6 +18,7 @@
Home
Events
Chapters
+ Community Groups
About
Build
Host
diff --git a/building-workshops.html b/building-workshops.html
index eb017dcb7..7c01c22e5 100644
--- a/building-workshops.html
+++ b/building-workshops.html
@@ -17,6 +17,7 @@
Home
Events
Chapters
+ Community Groups
About
Build
Host
diff --git a/chapters.html b/chapters.html
index 3aff33157..924a0f33c 100644
--- a/chapters.html
+++ b/chapters.html
@@ -19,6 +19,7 @@
Home
Events
Chapters
+ Community Groups
About
Build
Host
diff --git a/community-groups.html b/community-groups.html
new file mode 100644
index 000000000..2f7262627
--- /dev/null
+++ b/community-groups.html
@@ -0,0 +1,109 @@
+
+
+
+
+
+
+
+
+
+
+ NodeSchool - Chapters
+
+
+
+
+
+
+
+
+
+
+
+
+
+
NodeSchool Chapters
+
Cities all over have started to host NodeSchool events regularly. Here's a list of chapters. See the hexdex for an index of chapter ⬢ hexagon logos.
+
+
+
+
Other region?
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/community-groups/military.json b/community-groups/military.json
new file mode 100644
index 000000000..3c46454c1
--- /dev/null
+++ b/community-groups/military.json
@@ -0,0 +1,7 @@
+{
+ "name": "Military",
+ "organizers": ["hollomancer"],
+ "website": "",
+ "twitter": "",
+ "repo": "https://github.com/nodeschool/military-community-group"
+}
diff --git a/events.html b/events.html
index b711b37a1..66f25cc21 100644
--- a/events.html
+++ b/events.html
@@ -19,6 +19,7 @@
Home
Events
Chapters
+ Community Groups
About
Build
Host
diff --git a/hexdex.html b/hexdex.html
index a7ff51e98..abb40aa4e 100644
--- a/hexdex.html
+++ b/hexdex.html
@@ -19,6 +19,7 @@
Home
Events
Chapters
+ Community Groups
About
Build
Host
diff --git a/host.html b/host.html
index 7625b02b7..34954a183 100644
--- a/host.html
+++ b/host.html
@@ -18,6 +18,7 @@
Home
Events
Chapters
+ Community Groups
About
Build
Host
@@ -31,7 +32,7 @@
Hosting a NodeSchool Event
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.
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).
- We have created the Organizers Wiki to hold all the knowledge from the Chapter organizers around the world.
+ We have created the Organizers Wiki to hold all the knowledge from the Chapter and Community Group organizers around the world.
Check out the wiki for info on how to create a chapter, run a successful event and build a local NodeSchool community!
diff --git a/index.html b/index.html
index 507f70cce..60d191596 100644
--- a/index.html
+++ b/index.html
@@ -62,6 +62,7 @@ nodeschool
Tutorials
Events
Chapters
+ Community Groups
About
Build
Host
diff --git a/mentor-at-event.html b/mentor-at-event.html
index 6be4a15dc..27bfe12eb 100644
--- a/mentor-at-event.html
+++ b/mentor-at-event.html
@@ -18,6 +18,7 @@
Home
Events
Chapters
+ Community Groups
About
Build
Host
diff --git a/package.json b/package.json
index 74b510d2e..2e4d6a8b1 100644
--- a/package.json
+++ b/package.json
@@ -8,6 +8,7 @@
"build-copy": "node ./scripts/build-copy.js $$",
"build-html": "node ./scripts/build-html.js $$",
"build-chapters": "node ./scripts/build-chapters.js $$",
+ "build-community-groups": "node ./scripts/build-community-groups.js $$",
"build-dependencies": "bash ./scripts/build-dependencies.sh $$",
"generate-css": "bash ./scripts/generate-css.sh",
"generate-language": "node ./scripts/generate-lang.js",
diff --git a/scripts/build-community-groups.js b/scripts/build-community-groups.js
new file mode 100755
index 000000000..305792efc
--- /dev/null
+++ b/scripts/build-community-groups.js
@@ -0,0 +1,68 @@
+#!/usr/bin/env node
+const Fs = require('fs')
+const cmdwatcher = require('./util/cmdwatcher')
+const mkdirp = require('mkdirp')
+
+function groupByValue(list, grouper, groupName) {
+ var grouped = {}
+ groupName = groupName || 'items'
+ for (var i = 0; i < list.length; i++) {
+ var key = list[i][grouper]
+ if (typeof grouped[key] !== "object" || typeof grouped[key].push !== "function") {
+ grouped[key] = []
+ }
+ grouped[key].push(list[i])
+ }
+ return Object.keys(grouped).map(function (group) {
+ var formatted = {}
+ formatted[grouper] = group
+ formatted.count = grouped[group].length
+ formatted[groupName] = grouped[group]
+ return formatted
+ });
+}
+
+function sortByKey(list, key) {
+ return list.sort(function (a, b) {
+ return a[key] > b[key] ? 1 : 0
+ })
+}
+
+function sortedGroupByValue(list, grouper, groupName) {
+ return sortByKey(groupByValue(list, grouper, groupName), grouper);
+}
+
+var communityGroups = [];
+
+cmdwatcher('build-community-groups'
+ , './community-groups/!(list).json', function (files) {
+ files.forEach(function (f) {
+ Fs.readFile(f, function (err, buf) {
+ if (err) {
+ return console.error(err);
+ }
+ var data = buf.toString();
+ try {
+ var communityGroup = JSON.parse(data);
+ } catch (e) {
+ console.error("JSON parse error: " + f, e);
+ }
+ communityGroups.push(communityGroup);
+
+ if (communityGroups.length === files.length) {
+ writeCommunityGroups(communityGroups);
+ }
+ });
+ });
+});
+
+function writeCommunityGroups(communityGroups) {
+ data = {
+ total: communityGroups.length,
+ regions: sortedGroupByValue(communityGroups, 'name', 'communityGroups')
+ };
+ mkdirp.sync('.build/communityGroups')
+ Fs.writeFile('.build/communityGroups/list.json', JSON.stringify(data, null, 2), function (err) {
+ if (err) console.error(err);
+ });
+}
diff --git a/scripts/build.sh b/scripts/build.sh
index 78af88908..5445d3c44 100755
--- a/scripts/build.sh
+++ b/scripts/build.sh
@@ -1,6 +1,7 @@
#!/bin/bash
npm run build-chapters -- $@
+npm run build-community-groups -- $@
npm run generate-css
npm run build-dependencies
npm run build-copy -- $@
-npm run build-html -- $@
\ No newline at end of file
+npm run build-html -- $@
diff --git a/scripts/generate-css.sh b/scripts/generate-css.sh
index bd94f8fbe..101d696ee 100644
--- a/scripts/generate-css.sh
+++ b/scripts/generate-css.sh
@@ -5,6 +5,7 @@
# -u = utilize plugin
stylus -u autoprefixer-stylus -c -m ./styles/chapters.styl -o ./chapters.css
+stylus -u autoprefixer-stylus -c -m ./styles/community-groups.styl -o ./community-groups.css
stylus -u autoprefixer-stylus -c -m ./styles/events.styl -o ./events.css
stylus -u autoprefixer-stylus -c -m ./styles/mapbox.styl -o ./mapbox.css
stylus -u autoprefixer-stylus -c -m ./styles/style.styl -o ./style.css
diff --git a/styles/community-groups.styl b/styles/community-groups.styl
new file mode 100644
index 000000000..db9ae3ce3
--- /dev/null
+++ b/styles/community-groups.styl
@@ -0,0 +1,31 @@
+@import 'settings/*'
+
+.chapter-list {
+ ul {
+ list-style: none;
+ padding-left: 0;
+ }
+
+ li {
+ width: 250px;
+ margin: 5px;
+ padding-bottom: 0;
+ border: 2px solid $mineshaftGray;
+ border-radius: 3px;
+ display: inline-block;
+ transition: background-color 300ms, border 500ms;
+
+ &:hover {
+ background-color: $broomYellow;
+ border: 2px solid $broomYellow;
+ }
+ }
+
+ a {
+ display: block;
+ color: $black;
+ padding: 6px;
+ border-bottom: none;
+ text-decoration: none;
+ }
+}
diff --git a/styles/style.styl b/styles/style.styl
index 07f6d80bb..a8d668bca 100644
--- a/styles/style.styl
+++ b/styles/style.styl
@@ -233,6 +233,7 @@ ul {
color: $mineshaftGray;
font-weight: 700;
letter-spacing: 0.1em;
+ width: 95%;
li {
display: inline-block;