-
Notifications
You must be signed in to change notification settings - Fork 0
Add Social Buttons #130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Social Buttons #130
Changes from all commits
c25b89d
54deaf8
2283b5b
efa4cf2
9914bf0
2e5e09b
8f6a9ac
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -12,8 +12,9 @@ export default function App() { | |||
| return ( | ||||
| <CourseWorkspaceProvider> | ||||
| <WorkspaceDndProvider> | ||||
| <div className="m-4 md:m-8 md:max-h-dvh overflow-hidden"> | ||||
| <div className="p-4 md:p-8 md:max-h-dvh overflow-hidden"> | ||||
| <header className="top-0 flex h-20 items-center justify-center bg-carpipink relative z-10"> | ||||
| {/* <SocialTray /> */} | ||||
|
||||
| {/* <SocialTray /> */} |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -6,6 +6,8 @@ import { | |||||||||||||||||||||||||||||||||||||||||||||
| BiImport, | ||||||||||||||||||||||||||||||||||||||||||||||
| BiReset, | ||||||||||||||||||||||||||||||||||||||||||||||
| BiDotsVerticalRounded, | ||||||||||||||||||||||||||||||||||||||||||||||
| BiLogoDiscordAlt, | ||||||||||||||||||||||||||||||||||||||||||||||
| BiLogoGithub, | ||||||||||||||||||||||||||||||||||||||||||||||
| } from "react-icons/bi"; | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| import Button from "@/components/Button"; | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -86,7 +88,20 @@ export default function ButtonTray() { | |||||||||||||||||||||||||||||||||||||||||||||
| return true; | ||||||||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| const buttonList = ( | ||||||||||||||||||||||||||||||||||||||||||||||
| const openExternalLinkAndClose = (url: string) => { | ||||||||||||||||||||||||||||||||||||||||||||||
| window.open(url, "_blank", "noopener,noreferrer"); | ||||||||||||||||||||||||||||||||||||||||||||||
| setIsOpen(false); | ||||||||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| const handleDiscordClick = () => { | ||||||||||||||||||||||||||||||||||||||||||||||
| openExternalLinkAndClose("https://discord.com/invite/xRBvFHgcYT"); | ||||||||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| const handleGithubClick = () => { | ||||||||||||||||||||||||||||||||||||||||||||||
| openExternalLinkAndClose("https://github.com/Project-CARPI"); | ||||||||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| const mainButtons = ( | ||||||||||||||||||||||||||||||||||||||||||||||
| <> | ||||||||||||||||||||||||||||||||||||||||||||||
| <Button onClick={handleResetClick} tooltip="Reset Workspace"> | ||||||||||||||||||||||||||||||||||||||||||||||
| <BiReset className="w-5 h-5" /> | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -100,6 +115,89 @@ export default function ButtonTray() { | |||||||||||||||||||||||||||||||||||||||||||||
| </> | ||||||||||||||||||||||||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| const socialButtons = ( | ||||||||||||||||||||||||||||||||||||||||||||||
| <> | ||||||||||||||||||||||||||||||||||||||||||||||
| <Button | ||||||||||||||||||||||||||||||||||||||||||||||
| onClick={handleDiscordClick} | ||||||||||||||||||||||||||||||||||||||||||||||
| tooltip="Join our Discord" | ||||||||||||||||||||||||||||||||||||||||||||||
| customStyles="hover:bg-[#5865f2] hover:text-[#e0e3ff] hover:p-1.5 p-3 transition-all duration-300" | ||||||||||||||||||||||||||||||||||||||||||||||
| > | ||||||||||||||||||||||||||||||||||||||||||||||
| <BiLogoDiscordAlt className="group-hover:w-8 group-hover:h-8 w-5 h-5 transition-all duration-300" /> | ||||||||||||||||||||||||||||||||||||||||||||||
| </Button> | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| <Button | ||||||||||||||||||||||||||||||||||||||||||||||
| onClick={handleGithubClick} | ||||||||||||||||||||||||||||||||||||||||||||||
| tooltip="View on GitHub" | ||||||||||||||||||||||||||||||||||||||||||||||
| customStyles="hover:bg-[#8534F3] hover:text-[#e0e3ff] hover:p-1.5 p-3 transition-all duration-300" | ||||||||||||||||||||||||||||||||||||||||||||||
| > | ||||||||||||||||||||||||||||||||||||||||||||||
| <BiLogoGithub className="group-hover:w-8 group-hover:h-8 w-5 h-5 transition-all duration-300" /> | ||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+123
to
+133
|
||||||||||||||||||||||||||||||||||||||||||||||
| customStyles="hover:bg-[#5865f2] hover:text-[#e0e3ff] hover:p-1.5 p-3 transition-all duration-300" | |
| > | |
| <BiLogoDiscordAlt className="group-hover:w-8 group-hover:h-8 w-5 h-5 transition-all duration-300" /> | |
| </Button> | |
| <Button | |
| onClick={handleGithubClick} | |
| tooltip="View on GitHub" | |
| customStyles="hover:bg-[#8534F3] hover:text-[#e0e3ff] hover:p-1.5 p-3 transition-all duration-300" | |
| > | |
| <BiLogoGithub className="group-hover:w-8 group-hover:h-8 w-5 h-5 transition-all duration-300" /> | |
| customStyles="hover:bg-[#5865f2] hover:text-[#e0e3ff] p-3 transition-all duration-300" | |
| > | |
| <BiLogoDiscordAlt className="w-5 h-5 transition-transform duration-300 group-hover:scale-125" /> | |
| </Button> | |
| <Button | |
| onClick={handleGithubClick} | |
| tooltip="View on GitHub" | |
| customStyles="hover:bg-[#8534F3] hover:text-[#e0e3ff] p-3 transition-all duration-300" | |
| > | |
| <BiLogoGithub className="w-5 h-5 transition-transform duration-300 group-hover:scale-125" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR changes the main layout container from margin (
m-*) to padding (p-*). That’s a visual/layout change not described in the PR description (“addition of social links”). If it’s required for the social buttons, please document the reason in the PR description; otherwise consider reverting to keep the change scoped.