Skip to content

Commit 0f3b78f

Browse files
committed
Fix broken github ribbon
1 parent 72274d3 commit 0f3b78f

2 files changed

Lines changed: 56 additions & 1 deletion

File tree

_layouts/default.html

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ <h1>{{ page.title }}</h1>
4444
</div>
4545
{% include analytics_tracker.html %}
4646
<p id="now_streaming"><a href="/live">NOW STREAMING!!!!</a></p>
47-
<a href="https://github.com/ruby-sapporo/ruby-sapporo.org"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/365986a132ccd6a44c23a9169022c0b5c890c387/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f7265645f6161303030302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png"></a>
47+
<a href="https://github.com/ruby-sapporo/ruby-sapporo.org" class="github-corner" aria-label="Fork me on GitHub">
48+
<svg width="80" height="80" viewBox="0 0 250 250" aria-hidden="true">
49+
<path d="M0 0l115 115h15l12 27 108 108V0z"></path>
50+
<path class="octo-arm" d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor"></path>
51+
<path class="octo-body" d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor"></path>
52+
</svg>
53+
</a>
4854
</body>
4955
</html>

styles/screen.css

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,3 +173,52 @@ h1 {
173173
img {
174174
border: 0;
175175
}
176+
177+
/* GitHub ribbon */
178+
.github-corner {
179+
position: absolute;
180+
top: 0;
181+
right: 0;
182+
border: 0;
183+
fill: #c01848;
184+
color: #fff;
185+
}
186+
187+
.github-corner svg {
188+
display: block;
189+
}
190+
191+
.github-corner .octo-arm {
192+
transform-origin: 130px 106px;
193+
}
194+
195+
.github-corner .octo-arm,
196+
.github-corner .octo-body {
197+
fill: currentColor;
198+
}
199+
200+
.github-corner:hover .octo-arm {
201+
animation: octocat-wave 560ms ease-in-out;
202+
}
203+
204+
@keyframes octocat-wave {
205+
0%, 100% {
206+
transform: rotate(0deg);
207+
}
208+
20%, 60% {
209+
transform: rotate(-25deg);
210+
}
211+
40%, 80% {
212+
transform: rotate(10deg);
213+
}
214+
}
215+
216+
@media (max-width: 500px) {
217+
.github-corner:hover .octo-arm {
218+
animation: none;
219+
}
220+
221+
.github-corner .octo-arm {
222+
animation: octocat-wave 560ms ease-in-out;
223+
}
224+
}

0 commit comments

Comments
 (0)