From f4d1c50f3781635ad1dfc986ade48a51b9e98d57 Mon Sep 17 00:00:00 2001 From: hcsong213 <51963099+hcsong213@users.noreply.github.com> Date: Sat, 28 Aug 2021 18:46:26 -0700 Subject: [PATCH 1/2] Landing Page Title Slider first pass Incorporated basic functionality of the slider. Basic functionality should be bug-free. Reponsiveness considered. Points for further consideration/development - Having just the verbs slide through while having the entire line adjust slightly so that it is always centered. - Having the verbs fade in/out instead of sliding in - Visual refinements (eg: having Nova start sparkling at the end) --- src/components/PageAssets.js | 60 +++++++++++++++--------------- src/components/TextVSlider.js | 70 +++++++++++++++++++++++++++++++++++ src/pages/index.js | 5 ++- 3 files changed, 103 insertions(+), 32 deletions(-) create mode 100644 src/components/TextVSlider.js diff --git a/src/components/PageAssets.js b/src/components/PageAssets.js index 5bc1a56..5cf5939 100644 --- a/src/components/PageAssets.js +++ b/src/components/PageAssets.js @@ -1,14 +1,14 @@ -import styled from "@emotion/styled" -import { Link } from "gatsby" -import React, { useState } from "react" -import Sparkles from "./Sparkle" -import Fade from "react-reveal/fade" +import styled from "@emotion/styled"; +import { Link } from "gatsby"; +import React, { useState } from "react"; +import Sparkles from "./Sparkle"; +import Fade from "react-reveal/fade"; const fonts = { main: "Prompt", -} +}; -const mobile = `@media (max-width: 800px)` +export const mobile = `@media (max-width: 800px)`; export const NovaH1 = styled.div` font-family: ${fonts.main}; @@ -24,7 +24,7 @@ export const NovaH1 = styled.div` ${mobile} { font-size: 32px; } -` +`; export const NovaH2 = styled.div` font-family: ${fonts.main}; font-style: normal; @@ -40,7 +40,7 @@ export const NovaH2 = styled.div` ${mobile} { font-size: 24px; } -` +`; export const NovaH4 = styled.div` font-family: ${fonts.main}; @@ -57,7 +57,7 @@ export const NovaH4 = styled.div` ${mobile} { font-size: 18px; } -` +`; export const NovaDiv = styled.div` font-family: Rubik; @@ -68,7 +68,7 @@ export const NovaDiv = styled.div` ${mobile} { font-size: ${({ fontSize }) => `${(2 / 3) * fontSize || 12}px`}; } -` +`; export const NovaSpacer = styled.div` width: 100%; @@ -76,7 +76,7 @@ export const NovaSpacer = styled.div` ${mobile} { height: ${({ mobileY, y }) => `${mobileY || (2 / 3) * y}`}px; } -` +`; export const MainBox = styled.div` margin-top: 100px; @@ -88,7 +88,7 @@ export const MainBox = styled.div` width: 95%; min-width: 0; } -` +`; export const NovaP = styled.p` -webkit-font-smoothing: antialiased; @@ -106,7 +106,7 @@ export const NovaP = styled.p` ${mobile} { font-size: 16px; } -` +`; export const Button = styled(Link)` color: ${({ textColor }) => `${textColor || "#FFFFFF"}`}; @@ -132,10 +132,10 @@ export const Button = styled(Link)` padding: 12px 15px; margin: 5px; } -` +`; export function SparklyButton(props) { - const [hover, setHover] = useState(false) + const [hover, setHover] = useState(false); return (