Skip to content

Commit

Permalink
general cleanup, finish scrolling banners, remove test blog
Browse files Browse the repository at this point in the history
  • Loading branch information
cbrxyz committed Nov 26, 2024
1 parent 5ffe0ca commit ef13499
Show file tree
Hide file tree
Showing 12 changed files with 821 additions and 125 deletions.
109 changes: 109 additions & 0 deletions src/assets/roboboat.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 0 additions & 13 deletions src/blogs/test.md

This file was deleted.

69 changes: 45 additions & 24 deletions src/components/AwardBanner.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,51 +3,72 @@ import React from "react";
import robotXLogo from "../assets/robotx.svg";
import robosubLogo from "../assets/robosub.svg";

function BannerShape({ children, className }) {
import RobotX from "../components/RobotX";
import RoboSub from "../components/RoboSub";
import RoboBoat from "../components/RoboBoat";

function BannerShape({ children, className, style }) {
return (
<div className={`relative w-48 h-64 text-center mx-auto ${className}`}>
<div
className={`relative w-48 h-64 text-center mx-auto ${className}`}
style={style}
>
{/* Main Banner Body */}
<div className="h-full w-full flex flex-col items-center justify-center relative shadow-2xl">
{children}
</div>

{/* Triangle Bottom */}
{/* Triangle Bottom
<div
className="absolute bottom-0 left-1/2 transform -translate-x-1/2
w-0 h-0 border-l-[48px] border-l-transparent
border-r-[48px] border-r-transparent
border-t-[32px] border-t-inherit"
/>
/> */}
</div>
);
}

export default BannerShape;

function PlacementBanner({ place, year, event, competition }) {
// Determine the background color based on the place
const bgColor =
place.toLowerCase() === "1st place"
? "bg-yellow-500"
: place.toLowerCase() === "2nd place"
? "bg-gray-400"
: place.toLowerCase() === "3rd place"
? "bg-bronze-500"
: "bg-gray-200";
// Places to dark, light colors
// ex: 1st place: dark gold, lighter gold
const colors = {
"1st place": ["#B8860B", "#8B6508"],
"2nd place": ["#696969", "#4F4F4F"],
"3rd place": ["#8B4513", "#5A2D0D"],
};
const selectedColor = colors[place.toLowerCase()];
const tailwindColors = {
"1st place": "bg-gold-500 text-gold-800 border-4 border-gold-800",
"2nd place": "bg-silver-500 text-silver-800 border-4 border-silver-800",
"3rd place": "bg-bronze-500 text-bronze-800 border-4 border-bronze-800",
};
const logos = {
RoboSub: RoboSub,
RobotX: RobotX,
RoboBoat: RoboBoat,
};
const Logo = logos[competition] || RobotX;

return (
<BannerShape className={`${bgColor} text-white`}>
<BannerShape className={tailwindColors[place.toLowerCase()]}>
{/* Logo */}
<div className="w-1/2">
<img
src={competition === "RoboSub" ? robosubLogo : robotXLogo}
alt=""
/>
</div>
<div className="px-4">
<div className="text-4xl mt-4 font-bold tracking-wide">{year}</div>
<div className="text-lg font-bold uppercase tracking-wide">{place}</div>
<div className="text-sm mt-2">{event}</div>
<div
className="absolute inset-1 border-2 border-gold-800 flex flex-col items-center justify-center"
style={{ borderColor: selectedColor[1] }} // Inner border (pistachio green)
>
<div className="w-1/2">
<Logo lightColor={selectedColor[1]} darkColor={selectedColor[0]} />
</div>
<div className="px-4">
<div className="text-4xl mt-4 font-bold tracking-wide">{year}</div>
<div className="text-lg font-bold uppercase tracking-wide">
{place}
</div>
<div className="text-sm mt-2">{event}</div>
</div>
</div>
</BannerShape>
);
Expand Down
5 changes: 1 addition & 4 deletions src/components/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ function Footer() {
<img src={ece} alt="College Logo 2" className="h-10 pt-2" />
</div>

{/* College Logos */}
<div className="flex space-x-6 mb-4 md:mb-0"></div>

{/* Contact Information */}
<div className="text-center md:text-right">
<p className="text-lg font-semibold">Contact Us</p>
Expand All @@ -39,7 +36,7 @@ function Footer() {
</div>
</div>

{/* Social Media Links */}
{/* social media */}
<div className="flex justify-center space-x-6 mt-6">
<a
href="https://www.youtube.com/@navigatoruf3224"
Expand Down
1 change: 0 additions & 1 deletion src/components/Medal.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ const Medal = ({ text, placement }) => {
"1st": "text-black",
};

// Use a default color if placement is not defined
const bgColor = backgroundColors[placement] || "bg-blue-400";
const textColor = textColors[placement] || "text-white";

Expand Down
5 changes: 1 addition & 4 deletions src/components/Navbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,7 @@ function Navbar() {
<NavItem
to="/about"
label="About Us"
dropdown={[
{ to: "/history", label: "History" },
{ to: "/lab", label: "Lab Information" },
]}
dropdown={[{ to: "/lab", label: "Lab Information" }]}
closeMobileMenu={closeMobileMenu}
/>
<NavItem to="/team" label="Team" closeMobileMenu={closeMobileMenu} />
Expand Down
Loading

0 comments on commit ef13499

Please sign in to comment.