From bdf8938589cbbeca105f85ed8f9a09fe39109b22 Mon Sep 17 00:00:00 2001 From: ccorbin Date: Fri, 1 Nov 2024 13:37:58 -0500 Subject: [PATCH] Improve a11y on Landing component --- TASKS.MD | 1 + src/components/Landing/Landing.module.css | 72 +++++++++++++++++------ src/components/Landing/Landing.tsx | 27 +++------ 3 files changed, 61 insertions(+), 39 deletions(-) diff --git a/TASKS.MD b/TASKS.MD index 89f9891..a6bf244 100644 --- a/TASKS.MD +++ b/TASKS.MD @@ -9,3 +9,4 @@ - Fix fetch-mock dependency weirdness - Figure out the following warning from Next.js: - `⚠ Fast Refresh had to perform a full reload. Read more: https://nextjs.org/docs/messages/fast-refresh-reload` +- Convert `master` branch to `main` \ No newline at end of file diff --git a/src/components/Landing/Landing.module.css b/src/components/Landing/Landing.module.css index aaafada..7133901 100644 --- a/src/components/Landing/Landing.module.css +++ b/src/components/Landing/Landing.module.css @@ -9,6 +9,57 @@ text-align: center; } +.landing h1 { + cursor: default; + position: relative; + padding: 1rem; + font-weight: normal; + font-size: 4rem; + margin: 0; + transition: all 1s; + &:after, &:before { + content: " "; + width: 2rem; + height: 0.5rem; + position: absolute; + border: 0px solid #fff; + transition: all 1.5s; + } + &:after { + top: -0.4rem; + left: -0.4rem; + border-top: .2rem solid black; + border-left: .2rem solid black; + } + &:before { + bottom: -0.4rem; + right: -0.4rem; + border-bottom: .8rem solid black; + border-right: .8rem solid black; + } + &:hover { + border-top-right-radius: 0px; + border-bottom-left-radius: 0px; + &:before, &:after{ + width: 100%; + height: 100%; + } + } +} + +.landing h2 { + margin: 0; + padding: 0; + font-weight: normal; +} + +.landing hr { + border: none; + height: .1rem; + background-color: #000; + width: 5rem; +} + .header { display: flex; flex-direction: column; @@ -17,16 +68,11 @@ padding: 1rem; } -.myName { - font-size: 4rem; -} - .jobTitle { padding-top: 1rem; padding-bottom: 1rem; } - .social { display: grid; grid-template-columns: repeat(3, 2fr); @@ -34,29 +80,17 @@ justify-content: center; } -.socialIcon { +.social a { margin: .5rem .5rem 2rem; color: black; transition: transform 0.3s ease, color 0.3s ease; } -.socialIcon:hover { +.social a:hover { transform: scale(1.2); color: #1e90ff; } -.landing hr { - border: none; - height: .1rem; - background-color: #000; - width: 5rem; -} - -.projectHeader { - margin-bottom: 0; - font-weight: normal; -} - .projectsContainer { display: grid; grid-template-columns: 1fr; diff --git a/src/components/Landing/Landing.tsx b/src/components/Landing/Landing.tsx index c4237f9..acf3ea6 100644 --- a/src/components/Landing/Landing.tsx +++ b/src/components/Landing/Landing.tsx @@ -8,18 +8,14 @@ import styles from './Landing.module.css'; const Landing = () => (
-
-
cal corbin
+
+

cal corbin

software engineer
- + ( rel="noopener noreferrer" href="https://www.linkedin.com/in/calcorbin/" > - + ( rel="noopener noreferrer" href="https://github.com/CalCorbin" > - +
-
- -

projects

+ +

projects

{PROJECTS.map((project) => (