Skip to content

Commit eaf9842

Browse files
Merge pull request #30 from IEEEUCSC/dev/ecertificate
fix: certificates layout issues
2 parents 90b09f6 + bb86ca4 commit eaf9842

3 files changed

Lines changed: 11 additions & 10 deletions

File tree

components/Competition/index.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,11 @@ const Competition = () => {
4040
Claim prestigious prizes and connect with top professionals.
4141
</ScrollBaseText>
4242
</div>
43-
<div className="flex w-full items-center justify-between gap-x-6">
43+
<div className="flex w-full flex-col items-center justify-between gap-6 md:flex-row">
4444
<AnimatedButton text="Download Booklet" to="/CodeQuest.pdf" />
45-
<ECertificateButton/>
45+
<ECertificateButton />
4646
</div>
47-
4847
</div>
49-
5048
</section>
5149
);
5250
};

components/ECertificate/CertificatePreview.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ const CertificatePreview = ({ data }: { data: CertificateData }) => {
1414
const canvas = await html2canvas(certificateRef.current);
1515
const imgData = canvas.toDataURL("image/png");
1616

17+
canvas.width = 2000;
18+
canvas.height = 1350;
19+
1720
const pdf = new jsPDF({
1821
orientation: "landscape",
1922
unit: "px",
@@ -25,10 +28,10 @@ const CertificatePreview = ({ data }: { data: CertificateData }) => {
2528
};
2629

2730
return (
28-
<div className="lg:mt-6 flex flex-col items-center justify-center lg:gap-y-4 py-4 lg:py-16 text-center">
31+
<div className="flex flex-col items-center justify-center py-4 text-center lg:mt-6 lg:gap-y-4 lg:py-16">
2932
<div
3033
ref={certificateRef}
31-
className="relative flex h-[675px] w-[1000px] scale-55 lg:scale-none flex-row items-center justify-center"
34+
className="relative flex w-[375px] h-[253.125px] md:h-[675px] md:w-[1000px] flex-row items-center justify-center lg:scale-none"
3235
>
3336
<img
3437
src="/ecertificate/CERTIFICATE.png"
@@ -42,7 +45,7 @@ const CertificatePreview = ({ data }: { data: CertificateData }) => {
4245
}}
4346
/>
4447
<div
45-
className="absolute text-center text-4xl font-semibold text-white"
48+
className="absolute text-center text-base md:text-4xl font-semibold text-white"
4649
style={{
4750
fontFamily: rusticRoadway.style.fontFamily,
4851
top: "57%",
@@ -58,7 +61,7 @@ const CertificatePreview = ({ data }: { data: CertificateData }) => {
5861
<AnimatedButton
5962
text="Download Certificate"
6063
onClick={() => handleDownload()}
61-
className="bg-primary-400 background-glow -translate-y-[100px] inline-block cursor-pointer rounded-2xl px-4 py-2 text-white"
64+
className="bg-primary-400 background-glow inline-block translate-y-[50px] cursor-pointer rounded-2xl px-4 py-2 text-white"
6265
/>
6366
</div>
6467
);

libs/data.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ export const timelineItems: TimelineItem[] = [
5959
time: "00:00 IST",
6060
},
6161
{
62-
date: { day: "09", month: "MAY" },
62+
date: { day: "13", month: "MAY" },
6363
header: "Final Round Awareness Session",
6464
content: " ",
6565
time: "00:00 IST",
6666
},
6767
{
68-
date: { day: "10", month: "MAY" },
68+
date: { day: "14", month: "MAY" },
6969
header: "Final Round",
7070
content: "Physical CTF Hackathon",
7171
time: "00:00 IST",

0 commit comments

Comments
 (0)