Skip to content

Commit 60710af

Browse files
author
Florian Kissling
committed
Add GitHub fork and star buttons to footer.
Directly borrowed from the Bootstrap docs again.
1 parent dfc8eec commit 60710af

4 files changed

Lines changed: 44 additions & 0 deletions

File tree

docs/_includes/footer.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<footer class="s2-docs-footer" role="contentinfo">
22
<div class="container">
3+
{% include social-buttons.html %}
34
<p>
45
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>.
56
</p>

docs/_includes/social-buttons.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<div class="s2-docs-social">
2+
<ul class="s2-docs-social-buttons">
3+
<li>
4+
<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>
5+
</li>
6+
<li>
7+
<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>
8+
</li>
9+
</ul>
10+
</div>

docs/_sass/_s2-docs-social.scss

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/*
2+
* Social buttons
3+
*
4+
* Twitter and GitHub social action buttons (for homepage and footer).
5+
*/
6+
7+
.s2-docs-social {
8+
margin-bottom: 20px;
9+
text-align: center;
10+
}
11+
.s2-docs-social-buttons {
12+
display: inline-block;
13+
padding-left: 0;
14+
margin-bottom: 0;
15+
list-style: none;
16+
}
17+
.s2-docs-social-buttons li {
18+
display: inline-block;
19+
padding: 5px 8px;
20+
line-height: 1;
21+
}
22+
.s2-docs-social-buttons .twitter-follow-button {
23+
width: 225px !important;
24+
}
25+
.s2-docs-social-buttons .twitter-share-button {
26+
width: 98px !important;
27+
}
28+
/* Style the GitHub buttons via CSS instead of inline attributes */
29+
.github-btn {
30+
overflow: hidden;
31+
border: 0;
32+
}

docs/css/s2-docs.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
@import "s2-docs-alert";
1010
@import "s2-docs-home";
1111
@import "s2-docs-examples";
12+
@import "s2-docs-social";
1213
@import "anchorjs";
1314
@import "jumbotron";
1415
@import "prettify";

0 commit comments

Comments
 (0)