Skip to content

Commit 5dccd77

Browse files
committed
➕ Add: GitHub icon - top right
1 parent a281128 commit 5dccd77

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed

src/components/Landing.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,36 @@ const Landing = () => {
213213
draggable
214214
pauseOnHover
215215
/>
216+
217+
<a
218+
href="https://github.com/manuarora700/react-code-editor"
219+
title="Fork me on GitHub"
220+
class="github-corner"
221+
target="_blank"
222+
rel="noreferrer"
223+
>
224+
<svg
225+
width="50"
226+
height="50"
227+
viewBox="0 0 250 250"
228+
className="relative z-20 h-20 w-20"
229+
>
230+
<title>Fork me on GitHub</title>
231+
<path d="M0 0h250v250"></path>
232+
<path
233+
d="M127.4 110c-14.6-9.2-9.4-19.5-9.4-19.5 3-7 1.5-11 1.5-11-1-6.2 3-2 3-2 4 4.7 2 11 2 11-2.2 10.4 5 14.8 9 16.2"
234+
fill="currentColor"
235+
style={{ transformOrigin: "130px 110px" }}
236+
class="octo-arm"
237+
></path>
238+
<path
239+
d="M113.2 114.3s3.6 1.6 4.7.6l15-13.7c3-2.4 6-3 8.2-2.7-8-11.2-14-25 3-41 4.7-4.4 10.6-6.4 16.2-6.4.6-1.6 3.6-7.3 11.8-10.7 0 0 4.5 2.7 6.8 16.5 4.3 2.7 8.3 6 12 9.8 3.3 3.5 6.7 8 8.6 12.3 14 3 16.8 8 16.8 8-3.4 8-9.4 11-11.4 11 0 5.8-2.3 11-7.5 15.5-16.4 16-30 9-40 .2 0 3-1 7-5.2 11l-13.3 11c-1 1 .5 5.3.8 5z"
240+
fill="currentColor"
241+
class="octo-body"
242+
></path>
243+
</svg>
244+
</a>
245+
216246
<div className="h-4 w-full bg-gradient-to-r from-pink-500 via-red-500 to-yellow-500"></div>
217247
<div className="flex flex-row">
218248
<div className="px-4 py-2">

src/index.css

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,26 @@ body {
2121
background: #e2e8f0;
2222
cursor: pointer;
2323
}
24+
25+
.github-corner svg {
26+
position:absolute;
27+
right:0;
28+
top:0;
29+
mix-blend-mode:darken;
30+
color:#ffffff;
31+
fill:#000000;
32+
}
33+
.github-corner:hover .octo-arm {
34+
animation:octocat-wave .56s;
35+
}
36+
@keyframes octocat-wave {
37+
0%, 100% {
38+
transform:rotate(0);
39+
}
40+
20%, 60% {
41+
transform:rotate(-20deg);
42+
43+
} 40%, 80% {
44+
transform:rotate(10deg);
45+
}
46+
}

0 commit comments

Comments
 (0)