Skip to content
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

Update thingy idk #2

Merged
merged 4 commits into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/pages/minecraft.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import styles from "@/styles/Minecraft.module.css"
import MainLayout from "@/components/MainLayout"

function copyToClipboard() {
navigator.clipboard.writeText("bridgescrims.net")
navigator.clipboard.writeText("Scrims.Network")
document.getElementById(styles.Copied)!.style.opacity = "1"
setTimeout(() => (document.getElementById(styles.Copied)!.style.opacity = "0"), 1700)
}
Expand All @@ -26,7 +26,7 @@ export default function Home() {
onClick={copyToClipboard}
title="Copy to clipboard"
>
BridgeScrims.net
Scrims.Network
</button>
<div id={styles.Copied}>Copied to clipboard!</div>
</section>
Expand Down
44 changes: 28 additions & 16 deletions src/pages/overlays.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,35 @@
import MainLayout from "@/components/MainLayout"
import { getVerifiedSession } from "@/lib/auth"
import { GetServerSideProps } from "next"
import Head from "next/head"

interface OverlaysProps {
admin: boolean
}
import LandingImageSection from "@/components/LandingImageSection"
import styles from "@/styles/Overlays.module.css"
import MainLayout from "@/components/MainLayout"

export default function Overlays({ admin }: OverlaysProps) {
return <></>
function overlaysChannel() {
window.open("https://discord.com/channels/759894401957888031/809518867097190480");
}

export const getServerSideProps: GetServerSideProps<OverlaysProps> = async (context) => {
return { notFound: true }
const verified = await getVerifiedSession(context.req, context.res).catch(console.error)
return {
props: {
admin: !!verified
}
}
export default function Overlays() {
return (
<>
<Head>
<title>Bridge Overlays</title>
</Head>
<LandingImageSection>
<section id={styles.TitleSection} className="imageTextWrapper">
<h1 id={styles.Title}>{"Check out the dedicated Bridge Overlays channel in our Discord "}</h1>
<button
id={styles.ChannelButton}
type="button"
className="btn"
onClick={overlaysChannel}
title="Go To Channel"
>
# bridge-overlays
</button>
</section>
</LandingImageSection>
</>
)
}

Overlays.Layout = MainLayout
38 changes: 38 additions & 0 deletions src/styles/Overlays.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#TitleSection {
position: absolute;
transform: translateY(-50%) translateX(-50%);
top: calc(50vh + 30px);
left: 50vw;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}

#Title {
text-align: center;
font-size: clamp(1rem, min(5.6vw, 5.6vh), 2.2rem);
font-weight: thin;
color: white;
letter-spacing: 1px;
padding: 0px 14px;
user-select: none;
}

#ChannelButton {
font-size: clamp(1.4rem, min(7.5vw, 7.5vh), 3.8rem);
margin-top: 5px;
padding: 0;
transition-duration: 0.2s;
background-color: #2B2D31;
border: 3px solid transparent;
font-weight: 600;
color: #80848E;
user-select: text;
margin-bottom: -8px;
padding: 0px 20px;
}

#ChannelButton:hover {
background-color: rgba(43,45,49, 0.3);
}
Loading