Skip to content

Commit

Permalink
Merge pull request RocketChat#754 from RocketChat/better-github-button
Browse files Browse the repository at this point in the history
Improve the "edit on github" button
  • Loading branch information
isabellarussell authored May 21, 2018
2 parents befbe8d + 3958619 commit f4d74b4
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
7 changes: 6 additions & 1 deletion _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,12 @@
<div id="content" class="content">
<div class="wrapper" {%if page.ignoreLinks%}data-proofer-ignore{% endif %}>
{{ content }}
<div class="edit-github"><a href="https://github.com/RocketChat/docs/blob/master{{page.url}}README.md">Edit this page on GitHub</a></div>
<div class="edit-github">
<div class="edit-github-button">
<img class="github-icon" src="{{ site.url }}/images/icons/github.svg" alt="Github">
<a href="https://github.com/RocketChat/docs/blob/master{{page.url}}README.md">Contribute to this page on GitHub</a>
</div>
</div>
</div>
</div>
</div>
Expand Down
20 changes: 19 additions & 1 deletion _sass/layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -204,13 +204,31 @@ header {
}

.edit-github{
display: flex;

margin: auto;
padding: 15px;
justify-content: end;
width: max-content;
text-align: right;
padding-top: 2em;

&-button {
display: flex;
background-color: #5cb85c;
border: 2px #4cae4c solid;
color: #fff;
padding: 15px 20px;

border-radius: 5px;
}
.github-icon {
filter: invert(100%);
margin-right: 10px;
}
}

.edit-github a, .edit-github a:visited {
color: #fff;
text-decoration: none;
}

Expand Down

0 comments on commit f4d74b4

Please sign in to comment.