Skip to content

Commit 2b99c45

Browse files
RajatRajdeepRajat.Rajdeep
andauthored
Disable CFP CTA, add DevSprints CTA, fix tickets sold out issue (#154)
Co-authored-by: Rajat.Rajdeep <[email protected]>
1 parent 18adc10 commit 2b99c45

File tree

4 files changed

+62
-8
lines changed

4 files changed

+62
-8
lines changed

components/HeroBanner.js

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import calendar from "../public/images/icons/calendar.png";
55
import logo from "../public/images/logos/logo.png";
66
import calendarData from "../data/calendar.yml";
77
import Button from "./button";
8+
import Tooltip from "./tooltip";
89

910
const HeroBanner = () => {
1011
return (
@@ -35,20 +36,31 @@ const HeroBanner = () => {
3536
<Button
3637
buttonClassName="custom-button submit-btn register-btn-extra-padding"
3738
anchorClassName="text-decoration-none"
38-
buttonLabel="Call For Proposal"
39-
buttonHyperLink="https://in.pycon.org/cfp/pycon-india-2023/proposals/"
39+
buttonLabel="BoFs and Posters"
40+
buttonHyperLink="https://in.pycon.org/cfp/bofs-and-posters-2023/proposals/"
4041
/>
4142
</div>
4243
</div>
4344
<div className="row register-btn justify-content-center">
4445
<div className="col-md-6 col-8 pt-3">
4546
<Button
46-
buttonClassName="custom-button light-yellow-btn register-btn-extra-padding"
47-
anchorClassName="text-decoration-none"
48-
buttonLabel="BoFs and Posters"
49-
buttonHyperLink="https://in.pycon.org/cfp/bofs-and-posters-2023/proposals/"
47+
buttonClassName="custom-button submit-btn register-btn-extra-padding"
48+
anchorClassName="text-decoration-none text-light"
49+
buttonLabel="Call For DevSprints"
50+
buttonHyperLink="https://in.pycon.org/cfp/devsprint-2023/proposals/"
5051
/>
5152
</div>
53+
<div className="col-md-6 col-8 pt-3">
54+
<Tooltip text="CFP closed for Talks and Workshops">
55+
<Button
56+
buttonClassName="custom-button grey-btn register-btn-extra-padding"
57+
anchorClassName="text-decoration-none"
58+
buttonLabel="Call For Proposal"
59+
buttonHyperLink="https://in.pycon.org/cfp/pycon-india-2023/proposals/"
60+
disabled={true}
61+
/>
62+
</Tooltip>
63+
</div>
5264
</div>
5365
<h2 className="pt-5 mb-4 date-text text-center">
5466
29 Sept - 02 Oct
@@ -84,7 +96,7 @@ const HeroBanner = () => {
8496
</div>
8597
</div>
8698
</div>
87-
</section>
99+
</section >
88100
);
89101
};
90102

components/pricetable.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const TicketsPriceTable = () => {
1818
id: ticket.ticket_id,
1919
name: ticket.ticket_name,
2020
price: ticket.minimum_price || ticket.ticket_price,
21-
soldOut: ticket.sold_out,
21+
soldOut: !(ticket.remaining_count > 0),
2222
description: ticket.description,
2323
}));
2424
setTickets(extractedTickets);

components/tooltip.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import React, { useState } from 'react';
2+
3+
const Tooltip = ({ text, children }) => {
4+
const [showTooltip, setShowTooltip] = useState(false);
5+
6+
const handleMouseEnter = () => {
7+
setShowTooltip(true);
8+
};
9+
10+
const handleMouseLeave = () => {
11+
setShowTooltip(false);
12+
};
13+
14+
return (
15+
<div className="custom-tooltip-container" onMouseEnter={handleMouseEnter} onMouseLeave={handleMouseLeave}>
16+
{children}
17+
{showTooltip && <div className="custom-tooltip">{text}</div>}
18+
</div>
19+
);
20+
};
21+
22+
export default Tooltip;

styles/css/style.css

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ button a {
248248
.grey-btn {
249249
color: white;
250250
background-color: grey;
251+
width: 100%;
251252
}
252253

253254
.green-btn:hover {
@@ -269,6 +270,25 @@ button a {
269270
opacity: 0.8;
270271
}
271272

273+
.custom-tooltip-container {
274+
position: relative;
275+
display: inline-block;
276+
width: 100%;
277+
}
278+
279+
.custom-tooltip {
280+
position: absolute;
281+
top: 101%;
282+
left: 50%;
283+
transform: translateX(-50%);
284+
background-color: #333;
285+
color: #fff;
286+
padding: 4px 8px;
287+
border-radius: 4px;
288+
white-space: nowrap;
289+
z-index: 1;
290+
}
291+
272292
.date-text {
273293
text-shadow: 2px 2px #eac141 !important;
274294
}

0 commit comments

Comments
 (0)