Skip to content

Commit

Permalink
Added a Github project link
Browse files Browse the repository at this point in the history
  • Loading branch information
predatorray committed Dec 11, 2024
1 parent 87abcde commit c0aac7a
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 0 deletions.
1 change: 1 addition & 0 deletions public/github-mark-white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,25 @@
}
}

.github-project-link {
position: fixed;
left: 0;
bottom: 0;

margin-left: 16px;
margin-bottom: 10px;
}

.github-project-link > img {
height: 20px;
width: 20px;
opacity: 0.5;
}

.github-project-link:hover > img {
opacity: 1;
}

.room-link {
margin-top: 5px;
color: #fff;
Expand Down
7 changes: 7 additions & 0 deletions src/components/GithubProjectLink.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default function GithubProjectLink() {
return (
<a title="Fork me on Github" className="github-project-link" href="https://github.com/predatorray/mental-texas-holdem" target="_blank" rel="noopener noreferrer">
<img src={`${process.env.PUBLIC_URL}/github-mark-white.svg`} alt="Github Project} Link"/>
</a>
);
}
2 changes: 2 additions & 0 deletions src/components/TexasHoldemGameTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import PlayerAvatar from "./PlayerAvatar";
import MessageBar from "./MessageBar";
import useChatRoom from "../lib/useChatRoom";
import useEventLogs from "../lib/texas-holdem/useEventLogs";
import GithubProjectLink from "./GithubProjectLink";

function RoomLink(props: {
playerId: string;
Expand Down Expand Up @@ -240,6 +241,7 @@ export default function TexasHoldemGameTable() {

return (
<div className="App">
<GithubProjectLink/>
{
(!players && playerId) && (
<div className="opponents">
Expand Down

0 comments on commit c0aac7a

Please sign in to comment.