-
-
Notifications
You must be signed in to change notification settings - Fork 103
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
Footer Alignment and Spacing #472
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -110,7 +110,7 @@ const Section2 = () => { | |
> | ||
BoardGame Cafe{!isWide && <br />} | ||
</h1> | ||
<p className={`flex ${isWide ? `text-[center] mt-3 ml-[620px]` : `text-base mt-1`}`}> | ||
<p className={`flex ${isWide ? `text-[center] mt-3 ml-[620px]` : `text-base mt-1`}`}> | ||
©2024 by Sip & Play | ||
</p> | ||
</div> | ||
|
@@ -167,8 +167,8 @@ const Nav = () => { | |
const emailAddress = '[email protected]'; | ||
|
||
return ( | ||
<div className="flex md:flex-row flex-col shrink-0 gap-4 sm:gap-20 mx-[40px] md:ml-[30px] md:mr-0"> | ||
<div className="flex justify-between md:gap-20"> | ||
<div className="flex md:flex-row flex-col shrink-0 gap-4 sm:gap-20 mx-[40px] mb-10 md:ml-[50px] md:mr-0"> | ||
<div className="flex justify-between md:gap-28 "> | ||
<div className="flex flex-col gap-2 text-black dark:text-white"> | ||
<h3 className="mb-2 uppercase text-black dark:text-white cursor-pointer">About</h3> | ||
{navLinks.map((item, index) => ( | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,11 +3,11 @@ import Content from './Content'; | |
const Footer = () => { | ||
return ( | ||
<footer | ||
className="relative h-[800px]" | ||
className="h-[800px]" | ||
style={{ clipPath: 'polygon(0% 0, 100% 0%, 100% 100%, 0 100%)' }} | ||
Comment on lines
+6
to
7
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Footer layout uses complex viewport calculations that may cause inconsistencies The footer implementation relies on multiple viewport-dependent calculations and positioning that could lead to layout issues:
These viewport-dependent calculations and magic numbers make the footer's behavior unpredictable across different screen sizes. Consider:
🔗 Analysis chainVerify footer responsiveness across different screen sizes. The footer uses a fixed height of 800px with clip-path styling. While this works, please ensure it behaves correctly across different viewport sizes and doesn't cause content overflow issues. 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Search for any viewport-specific styles or media queries related to the footer
rg -l "h-\[(.*?)vh" frontend/src/components/Shared/footer/
rg -l "@media" frontend/src/components/Shared/footer/
Length of output: 163 Script: #!/bin/bash
# Let's examine the actual content of Footer.jsx to see all height-related classes and responsive styles
rg -A 5 -B 5 "h-\[" frontend/src/components/Shared/footer/Footer.jsx
# Also check for any Tailwind responsive prefixes (sm:, md:, lg:, etc.)
rg "(sm:|md:|lg:|xl:)h-" frontend/src/components/Shared/footer/Footer.jsx
# Look for any sticky positioning or viewport-related calculations
rg "calc\(|sticky|fixed|absolute" frontend/src/components/Shared/footer/Footer.jsx
Length of output: 947 |
||
> | ||
<div className="relative h-[calc(100vh+800px)] -top-[100vh] bg-amber-100 dark:bg-black mb-4 pb-10 sm:pb-16"> | ||
<div className="h-[700px] md:h-[650px] sticky top-[calc(100vh-600px)]"> | ||
<div className="h-[60px] md:h-[1px] sticky top-[calc(130vh-600px)]"> | ||
<Content /> | ||
</div> | ||
</div> | ||
Comment on lines
9
to
13
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Consider simplifying the complex positioning logic. The current implementation uses:
This makes the component brittle and hard to maintain. Consider refactoring to use more standard layout approaches. - <div className="relative h-[calc(100vh+800px)] -top-[100vh] bg-amber-100 dark:bg-black mb-4 pb-10 sm:pb-16">
- <div className="h-[60px] md:h-[1px] sticky top-[calc(130vh-600px)]">
+ <div className="bg-amber-100 dark:bg-black mb-4 pb-10 sm:pb-16">
+ <div className="sticky bottom-0">
<Content />
</div>
</div> Consider using Flexbox or Grid for layout: // Alternative approach using flex
<footer className="min-h-screen flex flex-col">
<div className="flex-grow bg-amber-100 dark:bg-black">
<div className="sticky bottom-0">
<Content />
</div>
</div>
</footer> |
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Improve responsive design for copyright text.
The current implementation has several issues:
ml-[620px]
margin could cause layout issues on different screen sizestext-[center]
is incorrect (should betext-center
)Consider this more responsive approach:
📝 Committable suggestion