Skip to content

Commit

Permalink
Backport #31339 (#31414)
Browse files Browse the repository at this point in the history
* Backport #31339

Add view on GitHub links for easier content editing from the docs
  • Loading branch information
XhmikosR committed Aug 4, 2020
1 parent 30d375b commit e0f89dc
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
5 changes: 4 additions & 1 deletion site/_layouts/docs.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@
{% endif %}

<main class="col-md-9 col-xl-8 py-md-3 pl-md-5 bd-content" role="main">
<h1 class="bd-title" id="content">{{ page.title | smartify }}</h1>
<div class="d-md-flex flex-md-row-reverse align-items-center justify-content-between">
<a class="btn btn-sm btn-bd-light my-2 my-md-0" href="{{ site.repo }}/tree/v4-dev/site/{{ page.path }}" title="View and edit this file on GitHub" target="_blank" rel="noopener">View on GitHub</a>
<h1 class="bd-title" id="content">{{ page.title | smartify }}</h1>
</div>
<p class="bd-lead">{{ page.description | smartify }}</p>
{% include ads.html %}
{{ content }}
Expand Down
17 changes: 17 additions & 0 deletions site/docs/4.5/assets/scss/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,20 @@
box-shadow: 0 0 0 3px rgba($bd-download, .25);
}
}

.btn-bd-light {
color: $gray-600;
border-color: $gray-300;

.show > &,
&:hover,
&:active {
color: $bd-purple-bright;
background-color: $white;
border-color: $bd-purple-bright;
}

&:focus {
box-shadow: 0 0 0 3px rgba($bd-purple-bright, .25);
}
}

0 comments on commit e0f89dc

Please sign in to comment.