]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Backport #31339 (#31414)
authorXhmikosR <xhmikosr@gmail.com>
Tue, 4 Aug 2020 15:54:01 +0000 (18:54 +0300)
committerGitHub <noreply@github.com>
Tue, 4 Aug 2020 15:54:01 +0000 (18:54 +0300)
* Backport #31339

Add view on GitHub links for easier content editing from the docs

site/_layouts/docs.html
site/docs/4.5/assets/scss/_buttons.scss

index b9381923bc0f541d15447cf2047194e9eb379af0..08788a2547d65f06383a20e520f18271d56e5c76 100644 (file)
         {% 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 }}
index 8d35fef4601b6792d38ac6afbb6a09942f4f787b..6a2d703e63dafa60e42e86647cafb2c52f77dd36 100644 (file)
     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);
+  }
+}