Skip to content

Commit d8aaa11

Browse files
committed
💫 workflow(/home): add logo
1 parent bf65171 commit d8aaa11

File tree

5 files changed

+24
-1
lines changed

5 files changed

+24
-1
lines changed

‎src/assets/images/github-logo.png

1.83 KB
Loading

‎src/assets/svg/github.svg

Lines changed: 3 additions & 0 deletions
Loading

‎src/components/Markdown.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export function Markdown(props) {
4343

4444
const mdFile = markdownMap.get(`${id}`);
4545

46-
console.log("idid=>", id);
46+
//console.log("idid=>", id);
4747

4848
useEffect(() => {
4949
//fetch("/doc/help.md");

‎src/pages/home/index.jsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,14 @@
33
* @Description:
44
*/
55
import { HomeWrapper } from "./styles";
6+
import github from "../../assets/images/github-logo.png";
67

78
import { Markdown } from "../../components/Markdown";
89

910
export default function Home() {
11+
function go(url) {
12+
window.open(url, "_blank");
13+
}
1014
return (
1115
<HomeWrapper>
1216
<h1 className="page-title">
@@ -19,6 +23,14 @@ export default function Home() {
1923
<div className="page-content">
2024
<Markdown id="m" />
2125
</div>
26+
<div className="page-footer">
27+
<div
28+
className="github-logo"
29+
onClick={() => go("https://github.com/coderzii")}
30+
>
31+
<img src={github} alt="github" />
32+
</div>
33+
</div>
2234
</HomeWrapper>
2335
);
2436
}

‎src/pages/home/styles.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,12 @@ export const HomeWrapper = styled.div`
2424
font-size: 12.8px;
2525
line-height: 1.5;
2626
}
27+
28+
.page-footer {
29+
margin-top: 16px;
30+
.github-logo img {
31+
width: 32px;
32+
height: 32px;
33+
}
34+
}
2735
`;

0 commit comments

Comments
 (0)