mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2026-07-23 00:13:36 +10:00
8d347f5162
* feat: add options.showLinkInTitle to baseItemSchema Add itemOptionsSchema with showLinkInTitle boolean property to control whether the website URL is rendered as a hyperlink on the title instead of a separate link at the bottom. The field is optional for backwards compatibility with existing resumes. Co-authored-by: Cursor <cursoragent@cursor.com> * feat: add hideLabelButton prop to URLInput When hideLabelButton is true, the tag/label button is hidden from the URL input. This is used when showLinkInTitle is enabled since the label is not needed when the link is shown in the title. Co-authored-by: Cursor <cursoragent@cursor.com> * feat: create LinkedTitle component for title-as-link rendering Add a reusable component that conditionally renders the title as a hyperlink when showLinkInTitle is true and a website URL is provided. Co-authored-by: Cursor <cursoragent@cursor.com> * feat: add showLinkInTitle option to experience section - Add Switch toggle in experience dialog for showLinkInTitle option - Update URLInput to hide label button when showLinkInTitle is enabled - Use LinkedTitle component in experience-item for conditional link rendering - Hide bottom website link when showLinkInTitle is enabled Co-authored-by: Cursor <cursoragent@cursor.com> * feat: add showLinkInTitle option to all section items - Update education, projects, awards, certifications, publications, volunteer, references, and profiles dialogs with Switch toggle - Add LinkedTitle component usage in all corresponding item components - Conditionally hide bottom website link when showLinkInTitle is enabled - Add hideLabelButton prop to URLInput when showLinkInTitle is enabled Co-authored-by: Cursor <cursoragent@cursor.com> * chore: extract i18n strings for showLinkInTitle feature Add "Show link in title" translation string to all locale catalogs. Co-authored-by: Cursor <cursoragent@cursor.com> * update dependencies, fix an issue with glalie template and non-clickable links, fix better-auth type error * remove unused export --------- Co-authored-by: Cursor <cursoragent@cursor.com>
57 lines
1.7 KiB
TypeScript
57 lines
1.7 KiB
TypeScript
import { TiptapContent } from "@/components/input/rich-input";
|
|
import type { SectionItem } from "@/schema/resume/data";
|
|
import { stripHtml } from "@/utils/string";
|
|
import { cn } from "@/utils/style";
|
|
import { LinkedTitle } from "../linked-title";
|
|
import { PageLink } from "../page-link";
|
|
|
|
type ReferencesItemProps = SectionItem<"references"> & {
|
|
className?: string;
|
|
};
|
|
|
|
export function ReferencesItem({ className, ...item }: ReferencesItemProps) {
|
|
return (
|
|
<div className={cn("references-item", className)}>
|
|
{/* Header */}
|
|
<div className="section-item-header references-item-header">
|
|
{/* Row 1 */}
|
|
<div className="flex items-start justify-between gap-x-2">
|
|
<LinkedTitle
|
|
title={item.name}
|
|
website={item.website}
|
|
showLinkInTitle={item.options?.showLinkInTitle}
|
|
className="section-item-title references-item-name"
|
|
/>
|
|
</div>
|
|
|
|
{/* Row 2 */}
|
|
<div className="flex items-start justify-between gap-x-2">
|
|
<span className="section-item-metadata references-item-position">{item.position}</span>
|
|
</div>
|
|
</div>
|
|
|
|
{/* Description */}
|
|
<div
|
|
className={cn("section-item-description references-item-description", !stripHtml(item.description) && "hidden")}
|
|
>
|
|
<TiptapContent content={item.description} />
|
|
</div>
|
|
|
|
{/* Footer */}
|
|
<div className="section-item-footer references-item-footer flex flex-col">
|
|
{/* Row 1 */}
|
|
<span className="section-item-metadata references-item-phone inline-block">{item.phone}</span>
|
|
|
|
{/* Row 2 */}
|
|
{!item.options?.showLinkInTitle && (
|
|
<PageLink
|
|
{...item.website}
|
|
label={item.website.label}
|
|
className="section-item-website references-item-website"
|
|
/>
|
|
)}
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|