Skip to content
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

Feature/joh 12 footer #2

Merged
merged 13 commits into from
Dec 24, 2023
7 changes: 7 additions & 0 deletions src/assets/footer/FacebookLogo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions src/assets/footer/InstagramLogo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/footer/JohnJudLogo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions src/assets/footer/TwitterLogo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
53 changes: 50 additions & 3 deletions src/components/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,54 @@
import facebookLogo from "../assets/footer/FacebookLogo.svg";
import twitterLogo from "../assets/footer/InstagramLogo.svg";
import johnjudLogo from "../assets/footer/JohnJudLogo.svg";
import instagramLogo from "../assets/footer/TwitterLogo.svg";
console.log(facebookLogo);
const Footer = () => {
/* mt-auto or margin-top will make footer always on the bottom
please delete this comment after you read it */
return <div className="mt-auto">Footer</div>;
return (
<div className="mt-auto w-full">
<div className="relative mx-auto h-[215px] w-full shrink-0 lg:h-[215px]">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

บรรทัดนี้อ่ะ

  1. relative จะไม่มีผลอะไร เพราะเราไม่ได้ใช้คู่กับ absolute
  2. mx-auto ไม่มีผลอะไรเพราะว่า div เราเต็มหน้าจอ มันจะมีผลคือ ถ้า div เราไม่เต็มจอ มันจะจัดให้อยู่ตรงกลาง
  3. h-[215px] กับ lg:h-[215px] มันไม่ได้เปลี่ยน responsive อะไรเลย

บรรทัดนี้ลบ class ไปหมดเลยก็ได้ แล้วไปกำหนด padding py-.. บรรทัดต่อไปแทน

<div className="relative flex h-full w-full justify-between bg-teal-600 px-[7.63%] py-[6.80%] lg:px-[1.85%] lg:py-[0%]">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ตรงนี้สามารถกำหนด padding สำหรับ หน้าจอ desktop ได้ แทนการใช้ height
ก็คือลบ height แล้วเปลี่ยนไปใช้ padding แทนให้หมด
แล้วก็ padding อ่ะ ใช้เป็น px ไม่ก็ rem ได้ ใช้เป็น % ไม่เวิร์คเท่า px หรือ rem แต่จริงๆแนะนำให้ลองกะๆห้มันประมาณ docs tailwind ดู พวก px-5 px-6 px-8 อ่ะ

พยายามอย่าใช้ height มาก ถ้าสมมุติว่ามันสามารถจัดโดยให้มันแปรผันตาม element (ข้อความรูปภาพที่อยู่ข้างใน)

{/* Text & Logo*/}
<div className="flex-start inline-flex w-[66%] flex-col justify-start gap-4 lg:w-[55%] lg:flex-row lg:items-center">
<div className="mr-12 inline-flex h-[25.61%] items-center justify-start gap-3">
<img
className="h-[42px] w-[42px] rounded-full"
src={johnjudLogo}
alt="Johnjud Logo"
/>
<div className="text-sm font-bold text-white">JOHNJUD</div>
</div>
{/*Text*/}
<div className="inline-flex flex-col gap-4 lg:w-[458px] lg:gap-3">
<div className="w-full p-0 text-xs font-normal leading-[15px] text-white lg:text-[20px] lg:leading-[25px]">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

อันนี้ฝากเปลี่ยน lg:text-base หน่อย คิดว่าใช้ font ขนาดธรรมดาน่าจะดูดีกว่า ใน figma ทำไมมันดูสมส่วนก็ไม่รู้

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

จริงๆ leading ไม่ต้องก็ได้นะ พวก class text-base text-xs มันทำให้หมดละ

สโมสรนิสิตคณะสัตวแพทยศาสตร์ <br className="gap-3"></br>
จุฬาลงกรณ์มหาวิทยาลัย ถนน อังรีดูนังต์ แขวงปทุมวัน เขตปทุมวัน
กรุงเทพ ฯ 10330
</div>
<div className="w-full text-xs font-normal leading-[15px] text-white lg:pr-[5%] lg:text-[20px] lg:leading-[25px]">
พัฒนาโดย ฝ่ายพัฒนาระบบสารสนเทศ <br className="gap-3"></br>
องค์การบริหารสโมสรนิสิตจุฬาลงกรณ์มหาวิทยาลัย
</div>
</div>
</div>
{/*Social*/}
<div className="inline-flex flex-col items-center justify-center gap-6">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

สงสัยว่าทำไมใช้ inline-flex

<div className="relative flex items-center justify-center">
<img className="h-8 w-8" src={facebookLogo} alt="Facebook Logo" />
</div>
<div className="relative flex items-center justify-center">
<img className="h-8 w-8" src={twitterLogo} alt="Instagram Logo" />
</div>
<div className="relative flex items-center justify-center">
<img className="h-6 w-6" src={instagramLogo} alt="Twitter Logo" />
</div>
</div>
</div>
</div>
{/*Only available in less than md */}
{/*Johnjud*/}
</div>
);
};

export default Footer;