From f0eb048f483fb3a854480345aa145a21a4407449 Mon Sep 17 00:00:00 2001 From: Jacob Date: Thu, 27 Feb 2025 16:10:32 +0000 Subject: [PATCH 1/3] Logo click, Text Scaling Click on logo to scroll to top Improved mobile text scaling so its more readable --- src/App.css | 35 +++++++++++------------------------ src/App.jsx | 4 ++-- src/components/NavBar.jsx | 8 +++++++- src/components/about.css | 25 +++++++++++++++++++++---- src/components/about.jsx | 22 ++++++++++++++-------- 5 files changed, 55 insertions(+), 39 deletions(-) diff --git a/src/App.css b/src/App.css index 43cd49a..583d303 100644 --- a/src/App.css +++ b/src/App.css @@ -65,6 +65,11 @@ footer { animation: roll 2s ease-in-out; } +p { + font-size: clamp(16px, 1.5vw, 20px); /* Adjusts based on screen width */ + line-height: 1.6; +} + @keyframes roll { 0% { transform: rotateX(0deg) rotateY(0deg); @@ -113,29 +118,6 @@ footer { margin: 10px 0; } -.typewriter { - display: inline-block; - font-size: 2.5vw; - overflow: hidden; - white-space: nowrap; -} - -.blinker { - display: inline-block; - color: #800080; - animation: blink 1s step-end infinite; -} - -@keyframes blink { - from, - to { - opacity: 0; - } - 50% { - opacity: 1; - } -} - @media (min-width: 768px) { .about-section { flex-direction: row; @@ -370,7 +352,12 @@ footer { .header { align-items: center; justify-content: center; - font-size: 5em; + font-size: clamp(3rem, 12vw, 6rem); +} + +.tagline { + text-align: center; + font-size: clamp(1rem, 3vw, 2rem); } .header2 { diff --git a/src/App.jsx b/src/App.jsx index 77ee0b9..e762355 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -11,12 +11,12 @@ function App() { return ( <> - +

UniCS

-

+

University of Manchester
Computer Science Society{" "}

diff --git a/src/components/NavBar.jsx b/src/components/NavBar.jsx index d081fd0..3ea5280 100644 --- a/src/components/NavBar.jsx +++ b/src/components/NavBar.jsx @@ -59,6 +59,7 @@ const UnderConstruction = () => { ); }; + const NavBar = () => { const [showDropdown, setShowDropdown] = useState(false); @@ -66,6 +67,10 @@ const NavBar = () => { setShowDropdown(!showDropdown); }; + const scrollToTop = () => { + window.scrollTo({ top: 0, behavior: "smooth" }); + }; + return (