From 7d6435b8f760bdae0c7ca4bb1847520250d6b0c8 Mon Sep 17 00:00:00 2001 From: strawbrary Date: Mon, 4 Jan 2016 20:12:35 -0800 Subject: [PATCH 1/2] Make position of "Edit on GitHub" link consistent Moved the link before the headline so that it is always in the top right --- build.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.js b/build.js index a16c4d21f6abb..547f4cb2e2839 100755 --- a/build.js +++ b/build.js @@ -222,7 +222,7 @@ function githubLinks (options) { var url = 'https://github.com/nodejs/nodejs.org/edit/master/locale/' + options.locale + '/' + path.replace('.html', '.md') var contents = file.contents.toString().replace(/\(.+)\<\/h1\>/, function ($1, $2) { - return '

' + $2 + ' Edit on GitHub

' + return `

Edit on GitHub ${$2}

` }) file.contents = new Buffer(contents) From 41310af6d007dda45d69338996b0cc2fa0a5e80a Mon Sep 17 00:00:00 2001 From: strawbrary Date: Mon, 4 Jan 2016 21:26:04 -0800 Subject: [PATCH 2/2] Move GitHub edit link outside header for SEO/a11y --- build.js | 2 +- layouts/css/base.styl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.js b/build.js index 547f4cb2e2839..6590c5fdec4c3 100755 --- a/build.js +++ b/build.js @@ -222,7 +222,7 @@ function githubLinks (options) { var url = 'https://github.com/nodejs/nodejs.org/edit/master/locale/' + options.locale + '/' + path.replace('.html', '.md') var contents = file.contents.toString().replace(/\(.+)\<\/h1\>/, function ($1, $2) { - return `

Edit on GitHub ${$2}

` + return `Edit on GitHub

${$2}

` }) file.contents = new Buffer(contents) diff --git a/layouts/css/base.styl b/layouts/css/base.styl index 4cc6a2001f502..19cdc8d9ee9ee 100644 --- a/layouts/css/base.styl +++ b/layouts/css/base.styl @@ -135,7 +135,7 @@ pre .edit-link float right - font-size 0.6em + font-size 0.9em margin 0.5em 0 @media screen and (max-width: 480px)