Skip to content

Commit a134ea1

Browse files
committed
file name, added reddit
1 parent ea68f10 commit a134ea1

File tree

4 files changed

+90
-50
lines changed

4 files changed

+90
-50
lines changed

src/components/Footer.astro

Lines changed: 36 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,24 @@ const footerLinks = [
4343
// ],
4444
// },
4545
];
46+
47+
const footerImageLinks = [
48+
{
49+
url: "https://www.reddit.com/r/bounteer",
50+
label: "Reddit",
51+
svg: "M12 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0zm5.01 4.744c.688 0 1.25.561 1.25 1.249a1.25 1.25 0 0 1-2.498.056l-2.597-.547-.8 3.747c1.824.07 3.48.632 4.674 1.488.308-.309.73-.491 1.207-.491.968 0 1.754.786 1.754 1.754 0 .716-.435 1.333-1.01 1.614a3.111 3.111 0 0 1 .042.52c0 2.694-3.13 4.87-7.004 4.87-3.874 0-7.004-2.176-7.004-4.87 0-.183.015-.366.043-.534A1.748 1.748 0 0 1 4.028 12c0-.968.786-1.754 1.754-1.754.463 0 .898.196 1.207.49 1.207-.883 2.878-1.43 4.744-1.487l.885-4.182a.342.342 0 0 1 .14-.197.35.35 0 0 1 .238-.042l2.906.617a1.214 1.214 0 0 1 1.108-.701zM9.25 12C8.561 12 8 12.562 8 13.25c0 .687.561 1.248 1.25 1.248.687 0 1.248-.561 1.248-1.249 0-.688-.561-1.249-1.249-1.249zm5.5 0c-.687 0-1.248.561-1.248 1.25 0 .687.561 1.248 1.249 1.248.688 0 1.249-.561 1.249-1.249 0-.687-.562-1.249-1.25-1.249zm-5.466 3.99a.327.327 0 0 0-.231.094.33.33 0 0 0 0 .463c.842.842 2.484.913 2.961.913.477 0 2.105-.056 2.961-.913a.361.361 0 0 0 .029-.463.33.33 0 0 0-.464 0c-.547.533-1.684.73-2.512.73-.828 0-1.979-.196-2.512-.730a.326.326 0 0 0-.232-.095z",
52+
},
53+
{
54+
url: "https://www.linkedin.com/company/bounteer",
55+
label: "LinkedIn",
56+
svg: "M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z",
57+
},
58+
{
59+
url: "https://github.com/bounteer",
60+
label: "GitHub",
61+
svg: "M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12",
62+
},
63+
];
4664
---
4765

4866
<footer class="bg-black text-white pt-8 pb-4 px-8">
@@ -58,38 +76,24 @@ const footerLinks = [
5876

5977
<div class="flex space-x-3">
6078
<div class="flex space-x-4">
61-
<a
62-
href="https://www.linkedin.com/company/bounteer"
63-
class="text-gray-400 hover:text-primary-400 transition-colors"
64-
aria-label="LinkedIn"
65-
>
66-
<svg
67-
class="w-6 h-6"
68-
fill="currentColor"
69-
viewBox="0 0 24 24"
70-
xmlns="http://www.w3.org/2000/svg"
71-
>
72-
<path
73-
d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"
74-
></path>
75-
</svg>
76-
</a>
77-
<a
78-
href="https://github.com/bounteer"
79-
class="text-gray-400 hover:text-primary-400 transition-colors"
80-
aria-label="GitHub"
81-
>
82-
<svg
83-
class="w-6 h-6"
84-
fill="currentColor"
85-
viewBox="0 0 24 24"
86-
xmlns="http://www.w3.org/2000/svg"
87-
>
88-
<path
89-
d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"
90-
></path>
91-
</svg>
92-
</a>
79+
{
80+
footerImageLinks.map((link) => (
81+
<a
82+
href={link.url}
83+
class="text-gray-400 hover:text-primary-400 transition-colors"
84+
aria-label={link.label}
85+
>
86+
<svg
87+
class="w-6 h-6"
88+
fill="currentColor"
89+
viewBox="0 0 24 24"
90+
xmlns="http://www.w3.org/2000/svg"
91+
>
92+
<path d={link.svg} />
93+
</svg>
94+
</a>
95+
))
96+
}
9397
</div>
9498
</div>
9599
</div>

src/components/interactive/CoverLetterCard.tsx

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,20 @@ interface CoverLetterCardProps {
2323
}
2424

2525
export default function CoverLetterCard({ report, candidateName, roleName, companyName }: CoverLetterCardProps) {
26+
// Create a nicely formatted filename for the cover letter PDF
27+
const createCoverLetterFileName = () => {
28+
// Clean strings for filename (remove special characters, replace spaces with underscores, lowercase)
29+
const cleanString = (str: string) => str
30+
.replace(/[^\w\s]/g, '') // Remove special characters except word chars and spaces
31+
.replace(/\s+/g, '_') // Replace spaces with underscores
32+
.toLowerCase() // Convert to lowercase
33+
.trim();
34+
35+
const cleanCandidate = cleanString(candidateName);
36+
37+
return `cover_letter_${cleanCandidate}`;
38+
};
39+
2640
const generateCoverLetterPDF = () => {
2741
if (!report?.cover_letter) return;
2842

@@ -53,7 +67,7 @@ export default function CoverLetterCard({ report, candidateName, roleName, compa
5367
printWindow.document.write(`
5468
<html>
5569
<head>
56-
<title>Cover Letter - ${candidateName}</title>
70+
<title>${createCoverLetterFileName()}</title>
5771
<style>
5872
@media print {
5973
body { margin: 0; }

src/components/interactive/ReportCard.tsx

Lines changed: 37 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,42 @@ export default function ReportCard() {
8787

8888
const blacklist = ["Bounteer Production", ""];
8989

90+
const candidateName = () => {
91+
const c = report?.submission?.user_created;
92+
const first = c?.first_name?.trim() || "";
93+
const last = c?.last_name?.trim() || "";
94+
const combined = [first, last].filter(Boolean).join(" ") || "—";
95+
return blacklist.includes(combined) ? "Guest" : combined;
96+
};
97+
98+
const roleName = report?.submission?.job_description?.role_name ?? "—";
99+
const companyName = report?.submission?.job_description?.company_name ?? "—";
100+
const backfillStatus = prettifyStatus(
101+
report?.submission?.job_description?.backfill_status ?? ""
102+
);
103+
104+
// Create a nicely formatted filename for the PDF download
105+
const createFileName = () => {
106+
const candidate = candidateName();
107+
const company = companyName !== "—" ? companyName : "Unknown-Company";
108+
109+
// Clean strings for filename (remove special characters, replace spaces with underscores, lowercase)
110+
const cleanString = (str: string) => str
111+
.replace(/[^\w\s]/g, '') // Remove special characters except word chars and spaces
112+
.replace(/\s+/g, '_') // Replace spaces with underscores
113+
.toLowerCase() // Convert to lowercase
114+
.trim();
115+
116+
const cleanCandidate = cleanString(candidate);
117+
const cleanCompany = cleanString(company);
118+
119+
const prefix = reportType === "full" ? "rfi_full" : "rfi";
120+
return `${prefix}_${cleanCandidate}_${cleanCompany}`;
121+
};
122+
90123
const handlePrint = useReactToPrint({
91124
contentRef: printRef,
92-
documentTitle: `Role-Fit-Report-${reportId || 'unknown'}`,
125+
documentTitle: createFileName(),
93126
});
94127

95128

@@ -272,20 +305,6 @@ export default function ReportCard() {
272305
.map((l) => l.replace(/^\s*-\s*/, "").trim())
273306
.filter(Boolean) || [];
274307

275-
const candidateName = () => {
276-
const c = report?.submission?.user_created;
277-
const first = c?.first_name?.trim() || "";
278-
const last = c?.last_name?.trim() || "";
279-
const combined = [first, last].filter(Boolean).join(" ") || "—";
280-
return blacklist.includes(combined) ? "Guest" : combined;
281-
};
282-
283-
const roleName = report?.submission?.job_description?.role_name ?? "—";
284-
const companyName = report?.submission?.job_description?.company_name ?? "—";
285-
const backfillStatus = prettifyStatus(
286-
report?.submission?.job_description?.backfill_status ?? ""
287-
);
288-
289308
if (loading) {
290309
return (
291310
<div className="flex items-center justify-center py-20">
@@ -651,6 +670,7 @@ export default function ReportCard() {
651670
<div className="space-y-4">
652671
<h3 className="text-sm font-medium text-gray-900 mb-3 text-center">Download Report</h3>
653672
<div className="flex flex-col md:flex-row justify-center items-center gap-2">
673+
{/* concise report */}
654674
<Button
655675
variant="outline"
656676
onClick={() => {
@@ -663,6 +683,8 @@ export default function ReportCard() {
663683
Concise Report PDF
664684
<span className="text-xs text-gray-500 ml-1">(RFI + WRFI + Scores)</span>
665685
</Button>
686+
687+
{/* full report */}
666688
<Button
667689
onClick={() => {
668690
setReportType("full");

src/pages/role-fit-index/index.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ import RoleFitForm from "@/components/interactive/RoleFitIndexForm";
1111

1212
<main>
1313
<HeroSection
14-
title="Get Your Bounteer Role Fit Index"
14+
title="Check Your Role Fit Index Now"
1515
highlightText="Role Fit Index"
16-
description="Bounteer Role Fit Index (RFI) doesn’t just tell you how well you match a job. It shows you exactly what to do next. Get a clear match score, pinpoint your missing skills, and receive concrete upgrade tips to make your CV stand out. See how recruiters might view you, fix weak spots instantly, and boost your chances of landing interviews."
16+
description="Bounteer Role Fit Index (RFI) shows you exactly how well you match a job—and what to do next. Get a clear match score, pinpoint missing skills, and receive instant upgrade tips to strengthen your CV. Plus, generate a tailored cover letter to boost your chances of landing interviews."
1717
badge="⚡ AI-Powered Career Matching"
1818
/>
1919

0 commit comments

Comments
 (0)