diff options
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/FormListing.tsx | 51 | ||||
-rw-r--r-- | src/components/HeaderBar/header_1.svg | 3 | ||||
-rw-r--r-- | src/components/HeaderBar/header_2.svg | 3 | ||||
-rw-r--r-- | src/components/HeaderBar/index.tsx | 49 | ||||
-rw-r--r-- | src/components/OAuth2Button.tsx | 42 |
5 files changed, 148 insertions, 0 deletions
diff --git a/src/components/FormListing.tsx b/src/components/FormListing.tsx new file mode 100644 index 0000000..9b7eb08 --- /dev/null +++ b/src/components/FormListing.tsx @@ -0,0 +1,51 @@ +/** @jsx jsx */ +import { css, jsx } from "@emotion/core"; + +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import { faArrowRight } from "@fortawesome/free-solid-svg-icons"; + +import colors from "../colors"; + +interface FormListingProps { + title: string, + description: string, + open: boolean +} + +function FormListing(props: FormListingProps) { + const listingStyle = css` + background-color: ${props.open ? colors.success : colors.darkButNotBlack}; + width: 80%; + padding: 20px; + margin-top: 20px; + margin-bottom: 20px; + border-radius: 20px; + transition: filter 100ms; + + &:hover { + filter: brightness(110%); + } + `; + + let closedTag; + + if (!props.open) { + closedTag = <span css={css` + font-size: 0.75em; + background-color: ${colors.error}; + border-radius: 5px; + margin: 0; + padding-top: 3px; + margin-right: 5px; + padding-left: 5px; + padding-right: 5px; + `}>CLOSED</span>; + }; + + return <div css={listingStyle}> + <h3 css={{fontSize: "1.5em", marginBottom: "0"}}>{closedTag}{props.title} <FontAwesomeIcon icon={faArrowRight} css={{fontSize: "0.75em", paddingBottom: "1px"}}/></h3> + <p css={{marginTop: "5px"}}>{props.description}</p> + </div> +} + +export default FormListing; diff --git a/src/components/HeaderBar/header_1.svg b/src/components/HeaderBar/header_1.svg new file mode 100644 index 0000000..e7db64c --- /dev/null +++ b/src/components/HeaderBar/header_1.svg @@ -0,0 +1,3 @@ +<svg width="1440" height="264" viewBox="0 0 1440 264" fill="none" id="header_1" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M-5.85724 -6.18774V109.725C71.6463 154.832 238.796 275.611 529.296 262.865C819.777 250.113 820.413 92.4954 1447.77 223.42V-6.18451L-5.85724 -6.18774Z" fill="#AFB8F0"/> +</svg> diff --git a/src/components/HeaderBar/header_2.svg b/src/components/HeaderBar/header_2.svg new file mode 100644 index 0000000..692cc7c --- /dev/null +++ b/src/components/HeaderBar/header_2.svg @@ -0,0 +1,3 @@ +<svg width="1440" height="293" viewBox="0 0 1440 293" fill="none" id="header_2" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"> +<path opacity="0.49063" d="M1447.27 -6.18774V132.565C1428.83 231.124 1378.94 292.543 1114.48 292.543C775.159 292.543 477.003 5.74973 -6.39087 232.513V-6.18713L1447.27 -6.18774Z" fill="#687AE3"/> +</svg> diff --git a/src/components/HeaderBar/index.tsx b/src/components/HeaderBar/index.tsx new file mode 100644 index 0000000..200221c --- /dev/null +++ b/src/components/HeaderBar/index.tsx @@ -0,0 +1,49 @@ +/** @jsx jsx */ +import { css, jsx } from "@emotion/core"; +import SVG from "react-inlinesvg"; + +import header1 from "./header_1.svg"; +import header2 from "./header_2.svg"; + +const headerImageStyles = css` +z-index: -1; +top: 0; +position: absolute; +width: 100%; +transition: height 1s; + +@media (max-width: 660px) { + height: 140px; +} +`; + +function HeaderBar() { + return <div> + <div> + <SVG src={header1} css={headerImageStyles}/> + <SVG src={header2} css={headerImageStyles}/> + </div> + <h1 css={css` + font-size: 4em; + margin: 0; + margin-top: 10px; + margin-left: 30px; + margin-bottom: 200px; + transition-property: font-size, margin-bottom; + transition-duration: 1s; + + @media (max-width: 660px) { + margin-bottom: 100px; + font-size: 3em; + } + + @media (max-width: 510px) { + font-size: 2em; + } + `}> + Python Discord Forms + </h1> + </div> +} + +export default HeaderBar; diff --git a/src/components/OAuth2Button.tsx b/src/components/OAuth2Button.tsx new file mode 100644 index 0000000..537496b --- /dev/null +++ b/src/components/OAuth2Button.tsx @@ -0,0 +1,42 @@ +/** @jsx jsx */ +import { css, jsx } from "@emotion/core"; + +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import { faDiscord } from "@fortawesome/free-brands-svg-icons"; + +import colors from "../colors"; + +const buttonStyling = css` +display: flex; +background-color: ${colors.blurple}; +border: none; +color: white; +font-family: "Hind", "Helvetica", "Arial", sans-serif; +border-radius: 5px; +padding-top: 10px; +padding-bottom: 10px; +padding-right: 20px; +padding-left: 20px; +outline: none; +transition: filter 100ms; +font-size: 1.2em; +align-items: center; + +span { + vertical-align: middle; +} + +&:hover { + filter: brightness(110%); + cursor: pointer; +} +`; + +function OAuth2Button() { + return <button css={buttonStyling}> + <span css={{marginRight: "10px"}}><FontAwesomeIcon icon={faDiscord} css={{fontSize: "2em", marginTop: "3px"}}/></span> + <span>Sign in with Discord</span> + </button>; +} + +export default OAuth2Button; |