Skip to content

Commit bc64efd

Browse files
committed
refactor: use github corner from artistic-components
1 parent f959021 commit bc64efd

File tree

5 files changed

+9
-61
lines changed

5 files changed

+9
-61
lines changed

package-lock.json

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"@ui5/webcomponents": "^1.12.2",
1515
"@ui5/webcomponents-fiori": "^1.12.2",
1616
"@ui5/webcomponents-react": "^1.13.1",
17-
"artistic-components": "^0.4.0",
17+
"artistic-components": "^0.5.1",
1818
"localforage": "^1.10.0",
1919
"match-sorter": "^6.3.1",
2020
"react": "^18.2.0",

src/components/Header/Header.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { MoneyButton } from "artistic-components";
2-
import Octocat from "./Octocat";
1+
import { MoneyButton, Octocat } from "artistic-components";
32
import { FlexBox } from "@ui5/webcomponents-react";
43
import SponsorDialog from "../SponsorDialog/SponsorDialog";
54
import { useState } from "react";
5+
import "./index.css";
66

77
export default function Header() {
88
const [isDialogOpen, setIsDialogOpen] = useState<boolean>(false);
@@ -16,7 +16,7 @@ export default function Header() {
1616
</p>
1717
<FlexBox>
1818
<MoneyButton className="sponsor" onClick={clickHandler}> Sponsor me </MoneyButton>
19-
<Octocat />
19+
<Octocat href="https://github.com/S-N-O-R-L-A-X/S-N-O-R-L-A-X.github.io"/>
2020
</FlexBox>
2121
<SponsorDialog open={isDialogOpen} closeHandler={() => { setIsDialogOpen(false) }} />
2222
</>

src/components/Header/Octocat.tsx

-12
This file was deleted.

src/components/Header/index.css

+1-41
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,4 @@
1-
.github-corner {
2-
border-bottom: 0;
3-
text-decoration: none;
4-
z-index: 1;
5-
}
6-
7-
.github-corner:hover .octo-body {
8-
animation: octocat-push .56s ease-in-out;
9-
}
10-
11-
@media screen and (max-width: 768px) {
12-
.github-corner:hover .octo-arm {
13-
animation: none;
14-
}
15-
16-
.github-corner .octo-arm {
17-
animation: octocat-push .56s ease-in-out;
18-
}
19-
}
20-
21-
@keyframes octocat-push {
22-
23-
0%,
24-
to {
25-
transform: rotate(10deg);
26-
}
27-
28-
20%,
29-
60% {
30-
transform: rotate(10deg);
31-
}
32-
33-
40%,
34-
80% {
35-
transform: rotate(10deg);
36-
}
37-
}
38-
391
.github-corner svg {
40-
color: #fff;
41-
fill: black;
422
height: var(--header-height);
433
width: var(--header-height);
444
}
@@ -53,7 +13,7 @@
5313
font-size: 3rem;
5414
margin: 0;
5515
background-image: -webkit-linear-gradient(left, red, orange, yellow, green, blue, indigo, violet);
56-
-webkit-background-clip: text;
16+
background-clip: text;
5717
-webkit-text-fill-color: transparent;
5818
animation: marquee 5s linear infinite;
5919
}

0 commit comments

Comments
 (0)