Skip to content

Commit

Permalink
Merge pull request #445 from strawbrary/edit-link-position
Browse files Browse the repository at this point in the history
Make position of "Edit on GitHub" link consistent
  • Loading branch information
fhemberger committed Jan 9, 2016
2 parents 190d099 + 41310af commit 1618ebd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,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\>(.+)\<\/h1\>/, function ($1, $2) {
return '<h1>' + $2 + ' <a class="edit-link" href="' + url + '">Edit on GitHub</a></h1>'
return `<a class="edit-link" href="${url}">Edit on GitHub</a> <h1>${$2}</h1>`
})

file.contents = new Buffer(contents)
Expand Down
2 changes: 1 addition & 1 deletion layouts/css/base.styl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1618ebd

Please # to comment.