diff --git a/README.md b/README.md
index 66706598eef7e..1921af255910c 100644
--- a/README.md
+++ b/README.md
@@ -91,7 +91,7 @@ All of the Node.js Foundation websites, including this repo, are jointly governe
- Steven R. Loomis ([srl295](https://github.com/srl295))
- Steve Mao ([stevemao](https://github.com/stevemao))
- Michaël Zasso ([targos](https://github.com/targos))
-- Myles Borins ([TheAlphaNerd](https://github.com/TheAlphaNerd))
+- Myles Borins ([MylesBorins](https://github.com/MylesBorins))
- Sakthipriyan Vairamani ([thefourtheye](https://github.com/thefourtheye))
- Trent Oswald ([therebelrobot](https://github.com/therebelrobot))
- Anton Wilhelm ([timaschew](https://github.com/timaschew))
diff --git a/build.js b/build.js
index 5b55109e1f862..bccde65e0f569 100755
--- a/build.js
+++ b/build.js
@@ -125,14 +125,6 @@ function buildLocale (source, locale) {
.use(markdown(markedOptions))
.use(githubLinks({ locale: locale }))
.use(prism())
- // Deletes Stylus partials since they'll be included in the main CSS file
- // anyways.
- .use(filterStylusPartials())
- .use(stylus({
- compress: true,
- paths: [path.join(__dirname, 'layouts', 'css')],
- use: [autoprefixer()]
- }))
// Set pretty permalinks, we don't want .html suffixes everywhere.
.use(permalinks({
relative: false
@@ -199,7 +191,7 @@ function githubLinks (options) {
return (files, m, next) => {
// add suffix (".html" or "/") to each part of regex
// to ignore possible occurrences in titles (e.g. blog posts)
- const isEditable = /security\.html|about\/|docs\/|foundation\/|get\-involved\/|knowledge\//
+ const isEditable = /security\.html|about\/|docs\/|foundation\/|get-involved\/|knowledge\//
Object.keys(files).forEach((path) => {
if (!isEditable.test(path)) {
@@ -220,6 +212,37 @@ function githubLinks (options) {
}
}
+// This function builds the layouts folder for all the Stylus files.
+function buildLayouts () {
+ console.time('[metalsmith] build/layouts finished')
+
+ fs.mkdir(path.join(__dirname, 'build'), () => {
+ fs.mkdir(path.join(__dirname, 'build', 'layouts'), () => {
+ const metalsmith = Metalsmith(__dirname)
+ metalsmith
+ // Sets the build source as /layouts/css.
+ .source(path.join(__dirname, 'layouts', 'css'))
+ // Deletes Stylus partials since they'll be included in the main CSS
+ // file anyways.
+ .use(filterStylusPartials())
+ .use(stylus({
+ compress: true,
+ paths: [path.join(__dirname, 'layouts', 'css')],
+ use: [autoprefixer()]
+ }))
+ // Pipes the generated files into /build/layouts/css.
+ .destination(path.join(__dirname, 'build', 'layouts', 'css'))
+
+ // This actually executes the build and stops the internal timer after
+ // completion.
+ metalsmith.build((err) => {
+ if (err) { throw err }
+ console.timeEnd('[metalsmith] build/layouts finished')
+ })
+ })
+ })
+}
+
// This function copies the rest of the static assets to their subfolder in the
// build directory.
function copyStatic () {
@@ -259,8 +282,10 @@ function getSource (callback) {
// This is where the build is orchestrated from, as indicated by the function
// name. It brings together all build steps and dependencies and executes them.
function fullBuild () {
- // Copies static files.
+ // Build static files.
copyStatic()
+ // Build layouts
+ buildLayouts()
getSource((err, source) => {
if (err) { throw err }
diff --git a/events/country-map.js b/events/country-map.js
index e3eec39f4b707..7ea99ead51dd8 100644
--- a/events/country-map.js
+++ b/events/country-map.js
@@ -18,6 +18,7 @@ module.exports = {
JP: 'Asia',
KR: 'Asia',
LK: 'Asia',
+ MY: 'Asia',
NP: 'Asia',
PH: 'Asia',
RU: 'Asia',
@@ -26,7 +27,9 @@ module.exports = {
TW: 'Asia',
VN: 'Asia',
AT: 'Europe',
+ BA: 'Europe',
BE: 'Europe',
+ BG: 'Europe',
BY: 'Europe',
CH: 'Europe',
CZ: 'Europe',
@@ -61,11 +64,14 @@ module.exports = {
TR: 'Europe',
UA: 'Europe',
CA: 'North America',
+ GP: 'North America',
US: 'North America',
AR: 'Latin America',
+ BO: 'Latin America',
BR: 'Latin America',
CL: 'Latin America',
CO: 'Latin America',
+ CR: 'Latin America',
DO: 'Latin America',
EC: 'Latin America',
GT: 'Latin America',
diff --git a/layouts/css/_base.styl b/layouts/css/_base.styl
new file mode 100644
index 0000000000000..c70ea54720c83
--- /dev/null
+++ b/layouts/css/_base.styl
@@ -0,0 +1,73 @@
+// Base styles
+body
+ box-sizing border-box
+ font 400 20px/1.5 'Source Sans Pro', Open Sans, Roboto, 'San Francisco', Helvetica, Arial, sans-serif
+ color $node-gray
+ margin 0
+ background-color $white
+
+header,
+#main,
+footer
+ display flex
+
+h1,
+h2,
+h3,
+h4,
+h5
+ font-weight 400
+
+a,
+a:link,
+a:active
+ color $node-green
+ text-decoration none
+ border-radius 2px
+
+a:hover
+ color $white
+ background-color $node-green
+
+a:hover
+ code
+ background-color transparent
+ color #fff
+
+a.imagelink:hover
+ background-color transparent
+
+strong,
+b
+ font-weight 600
+
+p
+ a
+ padded-link(2px)
+
+img
+ display block
+ max-width 100%
+
+ .logos &
+ // Fixes logo size on Firefox, see:
+ // https://github.com/nodejs/nodejs.org/issues/558
+ width 100%
+
+code
+ background-color $light-gray3
+ font-size 85%
+ padding 0.2em
+
+pre
+ background-color $node-gray
+ border-radius 3px
+ padding 0.75em 1.2em
+ font-size 0.8em
+ white-space pre-wrap
+ color $light-gray3
+ overflow-x auto
+
+ code
+ color $light-gray3
+ background-color inherit
diff --git a/layouts/css/page-modules/_home.styl b/layouts/css/page-modules/_home.styl
index f9371af77a26e..223bdbdc69373 100644
--- a/layouts/css/page-modules/_home.styl
+++ b/layouts/css/page-modules/_home.styl
@@ -29,6 +29,7 @@
&:hover
background-color transparent
border-bottom 1px solid $home-secondary-links-color
+ border-radius 0
#home-intro
max-width $body-max-width * 0.75
diff --git a/layouts/css/base.styl b/layouts/css/styles.styl
similarity index 62%
rename from layouts/css/base.styl
rename to layouts/css/styles.styl
index b9f827e9cf4ce..7bb86921557c0 100644
--- a/layouts/css/base.styl
+++ b/layouts/css/styles.styl
@@ -1,79 +1,5 @@
@import '_variables'
-
-// Base styles
-body
- box-sizing border-box
- font 400 20px/1.5 'Source Sans Pro', Open Sans, Roboto, 'San Francisco', Helvetica, Arial, sans-serif
- color $node-gray
- margin 0
- background-color $white
-
-header,
-#main,
-footer
- display flex
-
-h1,
-h2,
-h3,
-h4,
-h5
- font-weight 400
-
-a,
-a:link,
-a:active
- color $node-green
- text-decoration none
- border-radius 2px
-
-a:hover
- color $white
- background-color $node-green
-
-a:hover
- code
- background-color transparent
- color #fff
-
-a.imagelink:hover
- background-color transparent
-
-strong,
-b
- font-weight 600
-
-p
- a
- padded-link(2px)
-
-img
- display block
- max-width 100%
-
- .logos &
- // Fixes logo size on Firefox, see:
- // https://github.com/nodejs/nodejs.org/issues/558
- width 100%
-
-code
- background-color $light-gray3
- font-size 85%
- padding 0.2em
-
-pre
- background-color $node-gray
- border-radius 3px
- padding 0.75em 1.2em
- font-size 0.8em
- white-space pre-wrap
- color $light-gray3
- overflow-x auto
-
- code
- color $light-gray3
- background-color inherit
-
+@import '_base'
// Import specific page sections and layout parts
@import 'layout/_sticky-footer'
@import 'layout/_grid'
diff --git a/layouts/foundation.hbs b/layouts/foundation.hbs
index 2e15fcffcc4d3..22469dba88358 100644
--- a/layouts/foundation.hbs
+++ b/layouts/foundation.hbs
@@ -12,6 +12,9 @@
-
-
-
-
-