Skip to content

Commit

Permalink
Remove live text and disable CTA buttons (#263)
Browse files Browse the repository at this point in the history
* Remove live text and disable CTA buttons

* Fix icon color visibility
  • Loading branch information
RajatRajdeep authored Oct 4, 2023
1 parent 0c9ba9c commit 47870dc
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 39 deletions.
61 changes: 26 additions & 35 deletions components/HeroBanner.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,11 @@ import Tooltip from "./tooltip";
import IconComponent from "./icons";

const HeroBanner = () => {
const [countdown, setCountdown] = useState("");

useEffect(() => {
const eventDate = new Date("2023-09-29T09:00:00+05:30");
const timer = setInterval(() => {
const today = new Date(new Date().toLocaleString("en-US", { timeZone: "Asia/Kolkata" }));
const eventEndDateTime = new Date("2023-10-02T18:00:00+05:30");
const diff = eventDate.getTime() - today.getTime();
if (today < eventEndDateTime) {
if (diff <= 0) {
setCountdown("Live!");
} else {
const days = Math.floor(diff / (1000 * 60 * 60 * 24));
const hours = Math.floor((diff % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
const minutes = Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60));
const seconds = Math.floor((diff % (1000 * 60)) / 1000);
setCountdown(`${days}d ${hours}h ${minutes}m ${seconds}s`);
}
}
}, 1000);
return () => clearInterval(timer);
}, []);
Expand Down Expand Up @@ -62,14 +48,14 @@ const HeroBanner = () => {
anchorClassName="text-decoration-none text-light"
buttonClassName="custom-button green-btn"
buttonLabel="Download Program Guide"
// icon={
// <IconComponent
// className="ms-2"
// name="arrowRight"
// padding={0}
// size={20}
// />
// }
// icon={
// <IconComponent
// className="ms-2"
// name="arrowRight"
// padding={0}
// size={20}
// />
// }
/>
</div>
<div className="col-md-6 col-8 pt-3">
Expand All @@ -84,20 +70,26 @@ const HeroBanner = () => {
</div>
<div className="row register-btn justify-content-center">
<div className="col-md-6 col-8 pt-3">
<Button
buttonClassName="custom-button submit-btn register-btn-extra-padding"
anchorClassName="text-decoration-none text-light"
buttonLabel="Call For DevSprints"
buttonHyperLink="https://in.pycon.org/cfp/devsprint-2023/proposals/"
/>
<Tooltip text="Call For DevSprints is closed.">
<Button
buttonClassName="custom-button grey-btn register-btn-extra-padding"
anchorClassName="text-decoration-none text-light"
buttonLabel="Call For DevSprints"
buttonHyperLink="https://in.pycon.org/cfp/devsprint-2023/proposals/"
disabled={true}
/>
</Tooltip>
</div>
<div className="col-md-6 col-8 pt-3">
<Button
buttonClassName="custom-button submit-btn register-btn-extra-padding"
anchorClassName="text-decoration-none"
buttonLabel="Submit .extend() Tracks"
buttonHyperLink="https://forms.gle/xwtfwXF6y1Us9FBK9"
/>
<Tooltip text="Registration .extend() Tracks is closed.">
<Button
buttonClassName="custom-button grey-btn register-btn-extra-padding"
anchorClassName="text-decoration-none"
buttonLabel="Submit .extend() Tracks"
buttonHyperLink="https://forms.gle/xwtfwXF6y1Us9FBK9"
disabled={true}
/>
</Tooltip>
</div>
</div>
<h2 className="pt-5 mb-4 date-text text-center">
Expand All @@ -110,7 +102,6 @@ const HeroBanner = () => {
className="img-fluid"
/>
</h2>
<h3 className=" mb-4 date-text text-center">{countdown}</h3>
<div className="row">
{calendarData.map((calendar, index) => (
<div key={index} className="col-md-4">
Expand Down
8 changes: 4 additions & 4 deletions components/jobsBoard.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,31 +61,31 @@ const JobsBoard = ({ jobs }) => {
style={{ textDecoration: "none" }}
>
<span className="me-2">
<IconComponent name="building" color="#fff" backgroundColor="1f928d" size={30} />
<IconComponent name="building" color="#fff" backgroundColor="#1f928d" size={30} />
</span>
{job.companyName}
</Link>
</div>
:
<div>
<span className="me-2">
<IconComponent name="building" color="#fff" backgroundColor="1f928d" size={30} />
<IconComponent name="building" color="#fff" backgroundColor="#1f928d" size={30} />
</span>
{job.companyName}
</div>
}
{job.jobLocation &&
<div className="mb-1">
<span className="me-2">
<IconComponent name="location" color="#fff" backgroundColor="1f928d" size={30} />
<IconComponent name="location" color="#fff" backgroundColor="#1f928d" size={30} />
</span>
{job.jobLocation}
</div>
}
{job.jobType &&
<div className="mb-1">
<span className="me-2">
<IconComponent name="briefCase" color="#fff" backgroundColor="1f928d" size={30} />
<IconComponent name="briefCase" color="#fff" backgroundColor="#1f928d" size={30} />
</span>
{job.jobType}
</div>
Expand Down

0 comments on commit 47870dc

Please sign in to comment.