@samitouri / QOS-React-2 / commits / 121529bdfd

Add "Edit on GitHub" link on docs pages

Ember's docs do this and I rather like the idea of encouraging people to make improvements.

Ben Alpert committed Jul 15, 2014 at 23:00 UTC 121529bdfd54150ed4a3c8f5e6b7cf668e4ccd4e
2 files changed +18 -1
docs/_css/react.scss
+13
@@ -566,6 +566,19 @@ figure {
566 margin: 0 auto;
567 }
568
569 +h1 {
570 + // Contains .edit-page-link
571 + @include clearfix;
572 +}
573 +
574 +.edit-page-link {
575 + float: right;
576 + font-size: 16px;
577 + font-weight: normal;
578 + line-height: 20px;
579 + margin-top: 17px;
580 +}
581 +
582 /* Blog */
583
584 .post-list-item + .post-list-item {
docs/_layouts/docs.html
+5 -1
@@ -7,8 +7,12 @@ sectionid: docs
7 {% include nav_docs.html %}
8
9 <div class="inner-content">
10 - <h1>{{ page.title }}</h1>
10 + <h1>
11 + {{ page.title }}
12 + <a class="edit-page-link" href="https://github.com/facebook/react/tree/master/docs/{{ page.path }}" target="_blank">Edit on GitHub</a>
13 + </h1>
14 <div class="subHeader">{{ page.description }}</div>
15 +
16 {{ content }}
17
18 <div class="docs-prevnext">