mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-02-09 12:52:52 +08:00
Add color change to Join the Community!
This commit is contained in:
parent
8a2b860932
commit
8c0045a8d7
@ -86,8 +86,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.HomePage_Discord {
|
.HomePage_Discord {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
border-radius: 10px;
|
||||||
|
|
||||||
max-height: 40px;
|
max-height: 40px;
|
||||||
max-width: 150px;
|
max-width: 150px;
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
align-self: center;
|
align-self: center;
|
||||||
@ -98,13 +104,27 @@
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
max-width: 44px;
|
max-width: 44px;
|
||||||
max-height: 30px;
|
max-height: 30px;
|
||||||
|
|
||||||
|
fill: #5865F2;
|
||||||
}
|
}
|
||||||
|
|
||||||
p {
|
p {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
|
max-width: 90px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.HomePage_Discord:hover {
|
||||||
|
cursor: pointer;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
max-height: 50px;
|
||||||
|
max-width: 160px;
|
||||||
|
|
||||||
|
background-color: #5865F2;
|
||||||
|
}
|
||||||
|
|
||||||
.HomePage_Text {
|
.HomePage_Text {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
@ -4,6 +4,8 @@ import HomeButton from "@widgets/HomeButton";
|
|||||||
|
|
||||||
import { ReactComponent as DiscordLogo } from "@icons/discord.svg";
|
import { ReactComponent as DiscordLogo } from "@icons/discord.svg";
|
||||||
|
|
||||||
|
import { openUrl } from "@app/utils";
|
||||||
|
|
||||||
import "@css/pages/HomePage.scss";
|
import "@css/pages/HomePage.scss";
|
||||||
|
|
||||||
class HomePage extends React.Component<any, any> {
|
class HomePage extends React.Component<any, any> {
|
||||||
@ -39,7 +41,10 @@ class HomePage extends React.Component<any, any> {
|
|||||||
<p>trademarks and copyrights of HoYoverse.</p>
|
<p>trademarks and copyrights of HoYoverse.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className={"HomePage_Discord"}>
|
<div
|
||||||
|
className={"HomePage_Discord"}
|
||||||
|
onClick={() => openUrl("https://discord.gg/grasscutter")}
|
||||||
|
>
|
||||||
<DiscordLogo />
|
<DiscordLogo />
|
||||||
<p>Join the Community!</p>
|
<p>Join the Community!</p>
|
||||||
</div>
|
</div>
|
||||||
|
@ -144,3 +144,13 @@ export async function fetchEntityData(entity: Entity): Promise<EntityInfo> {
|
|||||||
export async function copyToClipboard(text: string): Promise<void> {
|
export async function copyToClipboard(text: string): Promise<void> {
|
||||||
await navigator.clipboard.writeText(text);
|
await navigator.clipboard.writeText(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Opens a URL in a new tab.
|
||||||
|
* Uses the window.open() method.
|
||||||
|
*
|
||||||
|
* @param url The URL to open.
|
||||||
|
*/
|
||||||
|
export function openUrl(url: string): void {
|
||||||
|
window.open(url, "_blank");
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user