Skip to content

Commit 0f6a172

Browse files
committed
Add a "fork-me" callout using github-corners
https://github.com/tholman/github-corners The Sass is added in _gh-corners.scss and after adding any vendor prefixes and changing `560ms` to `.56s`. The SVG is added in _includes/gh-corner.svg after added xmlns and optimizing it with SVGO.
1 parent 537723a commit 0f6a172

File tree

5 files changed

+52
-0
lines changed

5 files changed

+52
-0
lines changed

.stylelintrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"reportInvalidScopeDisables": true,
66
"reportNeedlessDisables": true,
77
"rules": {
8+
"at-rule-no-vendor-prefix": null,
89
"no-duplicate-selectors": true,
910
"property-no-vendor-prefix": null,
1011
"value-no-vendor-prefix": null

docs/_includes/gh-corner.svg

Lines changed: 1 addition & 0 deletions
Loading

docs/_includes/page.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
// Our bundle CSS files are listed here so that we inlcude the dist file in Jekyll
22
@use "page";
3+
@use "gh-corners";
34
@use "syntax";

docs/_layouts/default.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
</head>
1919

2020
<body>
21+
<a href="https://github.com/mdo/github-buttons" class="github-corner" aria-label="View repository on GitHub">
22+
{% include gh-corner.svg %}
23+
</a>
2124
<div class="container">
2225
<div class="tweet-button">
2326
<a href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-via="mdo">Tweet</a>

docs/_sass/_gh-corners.scss

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
// https://github.com/tholman/github-corners
2+
.github-corner:hover .octo-arm {
3+
-webkit-animation: octocat-wave .56s ease-in-out;
4+
animation: octocat-wave .56s ease-in-out;
5+
}
6+
7+
@-webkit-keyframes octocat-wave {
8+
0%,
9+
100% {
10+
transform: rotate(0);
11+
}
12+
20%,
13+
60% {
14+
transform: rotate(-25deg);
15+
}
16+
40%,
17+
80% {
18+
transform: rotate(10deg);
19+
}
20+
}
21+
22+
@keyframes octocat-wave {
23+
0%,
24+
100% {
25+
transform: rotate(0);
26+
}
27+
20%,
28+
60% {
29+
transform: rotate(-25deg);
30+
}
31+
40%,
32+
80% {
33+
transform: rotate(10deg);
34+
}
35+
}
36+
37+
@media (max-width: 500px) {
38+
.github-corner:hover .octo-arm {
39+
-webkit-animation: none;
40+
animation: none;
41+
}
42+
.github-corner .octo-arm {
43+
-webkit-animation: octocat-wave .56s ease-in-out;
44+
animation: octocat-wave .56s ease-in-out;
45+
}
46+
}

0 commit comments

Comments
 (0)