فهرست منبع

Add GitHub fork and star buttons to footer.

Directly borrowed from the Bootstrap docs again.
Florian Kissling 10 سال پیش
والد
کامیت
60710af6ed
4فایلهای تغییر یافته به همراه44 افزوده شده و 0 حذف شده
  1. 1 0
      docs/_includes/footer.html
  2. 10 0
      docs/_includes/social-buttons.html
  3. 32 0
      docs/_sass/_s2-docs-social.scss
  4. 1 0
      docs/css/s2-docs.scss

+ 1 - 0
docs/_includes/footer.html

@@ -1,5 +1,6 @@
 <footer class="s2-docs-footer" role="contentinfo">
   <div class="container">
+    {% include social-buttons.html %}
     <p>
       Select2 is licensed under <a href="https://github.com/select2/select2/blob/master/LICENSE.md">MIT</a>, documentation under <a href="https://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.
     </p>

+ 10 - 0
docs/_includes/social-buttons.html

@@ -0,0 +1,10 @@
+<div class="s2-docs-social">
+  <ul class="s2-docs-social-buttons">
+    <li>
+      <iframe class="github-btn" src="http://ghbtns.com/github-btn.html?user=select2&amp;repo=select2&amp;type=watch&amp;count=true" width="100" height="20" title="Star on GitHub"></iframe>
+    </li>
+    <li>
+      <iframe class="github-btn" src="http://ghbtns.com/github-btn.html?user=select2&amp;repo=select2&amp;type=fork&amp;count=true" width="102" height="20" title="Fork on GitHub"></iframe>
+    </li>
+  </ul>
+</div>

+ 32 - 0
docs/_sass/_s2-docs-social.scss

@@ -0,0 +1,32 @@
+/*
+ * Social buttons
+ *
+ * Twitter and GitHub social action buttons (for homepage and footer).
+ */
+
+.s2-docs-social {
+  margin-bottom: 20px;
+  text-align: center;
+}
+.s2-docs-social-buttons {
+  display: inline-block;
+  padding-left: 0;
+  margin-bottom: 0;
+  list-style: none;
+}
+.s2-docs-social-buttons li {
+  display: inline-block;
+  padding: 5px 8px;
+  line-height: 1;
+}
+.s2-docs-social-buttons .twitter-follow-button {
+  width: 225px !important;
+}
+.s2-docs-social-buttons .twitter-share-button {
+  width: 98px !important;
+}
+/* Style the GitHub buttons via CSS instead of inline attributes */
+.github-btn {
+  overflow: hidden;
+  border: 0;
+}

+ 1 - 0
docs/css/s2-docs.scss

@@ -9,6 +9,7 @@
 @import "s2-docs-alert";
 @import "s2-docs-home";
 @import "s2-docs-examples";
+@import "s2-docs-social";
 @import "anchorjs";
 @import "jumbotron";
 @import "prettify";