mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-09 20:12:26 +10:00
Merge pull request #2114 from Karanrajsinh/main
Fix #1660 [Mobile Frontend Issue] : Section-Dialog Overflow In Mobile Device Along With Some Changes In Spacing And Font Size Of Sidebar
This commit is contained in:
@ -161,7 +161,7 @@ export const LeftSidebar = () => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ScrollArea orientation="vertical" className="h-screen flex-1 pb-16 lg:pb-0">
|
<ScrollArea orientation="vertical" className="h-screen flex-1 pb-16 lg:pb-0">
|
||||||
<div ref={containterRef} className="grid gap-y-6 p-6 @container/left">
|
<div ref={containterRef} className="grid gap-y-10 p-6 @container/left">
|
||||||
<BasicsSection />
|
<BasicsSection />
|
||||||
<Separator />
|
<Separator />
|
||||||
<SummarySection />
|
<SummarySection />
|
||||||
|
|||||||
@ -18,7 +18,7 @@ export const BasicsSection = () => {
|
|||||||
<header className="flex items-center justify-between">
|
<header className="flex items-center justify-between">
|
||||||
<div className="flex items-center gap-x-4">
|
<div className="flex items-center gap-x-4">
|
||||||
{getSectionIcon("basics")}
|
{getSectionIcon("basics")}
|
||||||
<h2 className="line-clamp-1 text-3xl font-bold">{t`Basics`}</h2>
|
<h2 className="line-clamp-1 text-2xl font-bold lg:text-3xl">{t`Basics`}</h2>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
@ -27,7 +27,7 @@ export const BasicsSection = () => {
|
|||||||
<PictureSection />
|
<PictureSection />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="space-y-1.5 sm:col-span-2">
|
<div className="space-y-4 sm:col-span-2">
|
||||||
<Label htmlFor="basics.name">{t`Full Name`}</Label>
|
<Label htmlFor="basics.name">{t`Full Name`}</Label>
|
||||||
<Input
|
<Input
|
||||||
id="basics.name"
|
id="basics.name"
|
||||||
|
|||||||
@ -100,7 +100,7 @@ export const SectionBase = <T extends SectionItem>({ id, title, description }: P
|
|||||||
<div className="flex items-center gap-x-4">
|
<div className="flex items-center gap-x-4">
|
||||||
{getSectionIcon(id)}
|
{getSectionIcon(id)}
|
||||||
|
|
||||||
<h2 className="line-clamp-1 text-3xl font-bold">{section.name}</h2>
|
<h2 className="line-clamp-1 text-2xl font-bold lg:text-3xl">{section.name}</h2>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex items-center gap-x-2">
|
<div className="flex items-center gap-x-2">
|
||||||
@ -161,7 +161,11 @@ export const SectionBase = <T extends SectionItem>({ id, title, description }: P
|
|||||||
|
|
||||||
{section.items.length > 0 && (
|
{section.items.length > 0 && (
|
||||||
<footer className="flex items-center justify-end">
|
<footer className="flex items-center justify-end">
|
||||||
<Button variant="outline" className="ml-auto gap-x-2" onClick={onCreate}>
|
<Button
|
||||||
|
variant="outline"
|
||||||
|
className="ml-auto gap-x-2 text-xs lg:text-sm"
|
||||||
|
onClick={onCreate}
|
||||||
|
>
|
||||||
<Plus />
|
<Plus />
|
||||||
<span>
|
<span>
|
||||||
{t({
|
{t({
|
||||||
|
|||||||
@ -20,6 +20,7 @@ import {
|
|||||||
DialogHeader,
|
DialogHeader,
|
||||||
DialogTitle,
|
DialogTitle,
|
||||||
Form,
|
Form,
|
||||||
|
ScrollArea,
|
||||||
} from "@reactive-resume/ui";
|
} from "@reactive-resume/ui";
|
||||||
import { produce } from "immer";
|
import { produce } from "immer";
|
||||||
import get from "lodash.get";
|
import get from "lodash.get";
|
||||||
@ -146,36 +147,41 @@ export const SectionDialog = <T extends SectionItem>({
|
|||||||
<Dialog open={isOpen} onOpenChange={close}>
|
<Dialog open={isOpen} onOpenChange={close}>
|
||||||
<DialogContent className="z-50">
|
<DialogContent className="z-50">
|
||||||
<Form {...form}>
|
<Form {...form}>
|
||||||
<form className="space-y-6" onSubmit={form.handleSubmit(onSubmit)}>
|
<ScrollArea>
|
||||||
<DialogHeader>
|
<form
|
||||||
<DialogTitle>
|
className=" max-h-[60vh] space-y-6 lg:max-h-fit"
|
||||||
<div className="flex items-center space-x-2.5">
|
onSubmit={form.handleSubmit(onSubmit)}
|
||||||
{isCreate && <Plus />}
|
>
|
||||||
{isUpdate && <PencilSimple />}
|
<DialogHeader>
|
||||||
{isDuplicate && <CopySimple />}
|
<DialogTitle>
|
||||||
<h2>
|
<div className="flex items-center space-x-2.5">
|
||||||
{isCreate && t`Create a new item`}
|
{isCreate && <Plus />}
|
||||||
{isUpdate && t`Update an existing item`}
|
{isUpdate && <PencilSimple />}
|
||||||
{isDuplicate && t`Duplicate an existing item`}
|
{isDuplicate && <CopySimple />}
|
||||||
</h2>
|
<h2>
|
||||||
</div>
|
{isCreate && t`Create a new item`}
|
||||||
</DialogTitle>
|
{isUpdate && t`Update an existing item`}
|
||||||
|
{isDuplicate && t`Duplicate an existing item`}
|
||||||
|
</h2>
|
||||||
|
</div>
|
||||||
|
</DialogTitle>
|
||||||
|
|
||||||
|
<VisuallyHidden>
|
||||||
|
<DialogDescription />
|
||||||
|
</VisuallyHidden>
|
||||||
|
</DialogHeader>
|
||||||
|
|
||||||
<VisuallyHidden>
|
{children}
|
||||||
<DialogDescription />
|
|
||||||
</VisuallyHidden>
|
|
||||||
</DialogHeader>
|
|
||||||
|
|
||||||
{children}
|
<DialogFooter>
|
||||||
|
<Button type="submit">
|
||||||
<DialogFooter>
|
{isCreate && t`Create`}
|
||||||
<Button type="submit">
|
{isUpdate && t`Save Changes`}
|
||||||
{isCreate && t`Create`}
|
{isDuplicate && t`Duplicate`}
|
||||||
{isUpdate && t`Save Changes`}
|
</Button>
|
||||||
{isDuplicate && t`Duplicate`}
|
</DialogFooter>
|
||||||
</Button>
|
</form>
|
||||||
</DialogFooter>
|
</ScrollArea>
|
||||||
</form>
|
|
||||||
</Form>
|
</Form>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
|
|||||||
@ -82,7 +82,7 @@ export const SectionOptions = ({ id }: Props) => {
|
|||||||
<List weight="bold" />
|
<List weight="bold" />
|
||||||
</Button>
|
</Button>
|
||||||
</DropdownMenuTrigger>
|
</DropdownMenuTrigger>
|
||||||
<DropdownMenuContent className="w-48">
|
<DropdownMenuContent className="mr-4 w-48 ">
|
||||||
{hasItems && (
|
{hasItems && (
|
||||||
<>
|
<>
|
||||||
<DropdownMenuItem onClick={onCreate}>
|
<DropdownMenuItem onClick={onCreate}>
|
||||||
|
|||||||
@ -20,7 +20,7 @@ export const SummarySection = () => {
|
|||||||
<header className="flex items-center justify-between">
|
<header className="flex items-center justify-between">
|
||||||
<div className="flex items-center gap-x-4">
|
<div className="flex items-center gap-x-4">
|
||||||
{getSectionIcon("summary")}
|
{getSectionIcon("summary")}
|
||||||
<h2 className="line-clamp-1 text-3xl font-bold">{section.name}</h2>
|
<h2 className="line-clamp-1 text-2xl font-bold lg:text-3xl">{section.name}</h2>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex items-center gap-x-2">
|
<div className="flex items-center gap-x-2">
|
||||||
|
|||||||
@ -37,7 +37,7 @@ export const ExportSection = () => {
|
|||||||
<header className="flex items-center justify-between">
|
<header className="flex items-center justify-between">
|
||||||
<div className="flex items-center gap-x-4">
|
<div className="flex items-center gap-x-4">
|
||||||
{getSectionIcon("export")}
|
{getSectionIcon("export")}
|
||||||
<h2 className="line-clamp-1 text-3xl font-bold">{t`Export`}</h2>
|
<h2 className="line-clamp-1 text-2xl font-bold lg:text-3xl">{t`Export`}</h2>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
|||||||
@ -114,7 +114,7 @@ export const InformationSection = () => {
|
|||||||
<header className="flex items-center justify-between">
|
<header className="flex items-center justify-between">
|
||||||
<div className="flex items-center gap-x-4">
|
<div className="flex items-center gap-x-4">
|
||||||
{getSectionIcon("information")}
|
{getSectionIcon("information")}
|
||||||
<h2 className="line-clamp-1 text-3xl font-bold">{t`Information`}</h2>
|
<h2 className="line-clamp-1 text-2xl font-bold lg:text-3xl">{t`Information`}</h2>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
|||||||
@ -204,7 +204,7 @@ export const LayoutSection = () => {
|
|||||||
<header className="flex items-center justify-between">
|
<header className="flex items-center justify-between">
|
||||||
<div className="flex items-center gap-x-4">
|
<div className="flex items-center gap-x-4">
|
||||||
{getSectionIcon("layout")}
|
{getSectionIcon("layout")}
|
||||||
<h2 className="line-clamp-1 text-3xl font-bold">{t`Layout`}</h2>
|
<h2 className="line-clamp-1 text-2xl font-bold lg:text-3xl">{t`Layout`}</h2>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Tooltip content={t`Reset Layout`}>
|
<Tooltip content={t`Reset Layout`}>
|
||||||
@ -268,7 +268,7 @@ export const LayoutSection = () => {
|
|||||||
|
|
||||||
<Button variant="outline" className="ml-auto" onClick={onAddPage}>
|
<Button variant="outline" className="ml-auto" onClick={onAddPage}>
|
||||||
<Plus />
|
<Plus />
|
||||||
<span className="ml-2">{t`Add New Page`}</span>
|
<span className="ml-2 text-xs lg:text-sm">{t`Add New Page`}</span>
|
||||||
</Button>
|
</Button>
|
||||||
</main>
|
</main>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@ -14,7 +14,7 @@ export const NotesSection = () => {
|
|||||||
<header className="flex items-center justify-between">
|
<header className="flex items-center justify-between">
|
||||||
<div className="flex items-center gap-x-4">
|
<div className="flex items-center gap-x-4">
|
||||||
{getSectionIcon("notes")}
|
{getSectionIcon("notes")}
|
||||||
<h2 className="line-clamp-1 text-3xl font-bold">{t`Notes`}</h2>
|
<h2 className="line-clamp-1 text-2xl font-bold lg:text-3xl">{t`Notes`}</h2>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
|||||||
@ -23,11 +23,11 @@ export const PageSection = () => {
|
|||||||
<header className="flex items-center justify-between">
|
<header className="flex items-center justify-between">
|
||||||
<div className="flex items-center gap-x-4">
|
<div className="flex items-center gap-x-4">
|
||||||
{getSectionIcon("page")}
|
{getSectionIcon("page")}
|
||||||
<h2 className="line-clamp-1 text-3xl font-bold">{t`Page`}</h2>
|
<h2 className="line-clamp-1 text-2xl font-bold lg:text-3xl">{t`Page`}</h2>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<main className="grid gap-y-4">
|
<main className="grid gap-y-6">
|
||||||
<div className="space-y-1.5">
|
<div className="space-y-1.5">
|
||||||
<Label>{t`Format`}</Label>
|
<Label>{t`Format`}</Label>
|
||||||
<Select
|
<Select
|
||||||
|
|||||||
@ -36,7 +36,7 @@ export const SharingSection = () => {
|
|||||||
<header className="flex items-center justify-between">
|
<header className="flex items-center justify-between">
|
||||||
<div className="flex items-center gap-x-4">
|
<div className="flex items-center gap-x-4">
|
||||||
{getSectionIcon("sharing")}
|
{getSectionIcon("sharing")}
|
||||||
<h2 className="line-clamp-1 text-3xl font-bold">{t`Sharing`}</h2>
|
<h2 className="line-clamp-1 text-2xl font-bold lg:text-3xl">{t`Sharing`}</h2>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
|||||||
@ -20,7 +20,7 @@ export const StatisticsSection = () => {
|
|||||||
<header className="flex items-center justify-between">
|
<header className="flex items-center justify-between">
|
||||||
<div className="flex items-center gap-x-4">
|
<div className="flex items-center gap-x-4">
|
||||||
{getSectionIcon("statistics")}
|
{getSectionIcon("statistics")}
|
||||||
<h2 className="line-clamp-1 text-3xl font-bold">{t`Statistics`}</h2>
|
<h2 className="line-clamp-1 text-2xl font-bold lg:text-3xl">{t`Statistics`}</h2>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
|||||||
@ -16,11 +16,11 @@ export const TemplateSection = () => {
|
|||||||
<header className="flex items-center justify-between">
|
<header className="flex items-center justify-between">
|
||||||
<div className="flex items-center gap-x-4">
|
<div className="flex items-center gap-x-4">
|
||||||
{getSectionIcon("template")}
|
{getSectionIcon("template")}
|
||||||
<h2 className="line-clamp-1 text-3xl font-bold">{t`Template`}</h2>
|
<h2 className="line-clamp-1 text-2xl font-bold lg:text-3xl">{t`Template`}</h2>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<main className="grid grid-cols-2 gap-5 @lg/right:grid-cols-3 @2xl/right:grid-cols-4">
|
<main className="grid grid-cols-2 gap-8 @lg/right:grid-cols-3 @2xl/right:grid-cols-4">
|
||||||
{templatesList.map((template, index) => (
|
{templatesList.map((template, index) => (
|
||||||
<AspectRatio key={template} ratio={1 / 1.4142}>
|
<AspectRatio key={template} ratio={1 / 1.4142}>
|
||||||
<motion.div
|
<motion.div
|
||||||
|
|||||||
@ -17,11 +17,11 @@ export const ThemeSection = () => {
|
|||||||
<header className="flex items-center justify-between">
|
<header className="flex items-center justify-between">
|
||||||
<div className="flex items-center gap-x-4">
|
<div className="flex items-center gap-x-4">
|
||||||
{getSectionIcon("theme")}
|
{getSectionIcon("theme")}
|
||||||
<h2 className="line-clamp-1 text-3xl font-bold">{t`Theme`}</h2>
|
<h2 className="line-clamp-1 text-2xl font-bold lg:text-3xl">{t`Theme`}</h2>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<main className="grid gap-y-4">
|
<main className="grid gap-y-6">
|
||||||
<div className="mb-2 grid grid-cols-6 flex-wrap justify-items-center gap-y-4 @xs/right:grid-cols-9">
|
<div className="mb-2 grid grid-cols-6 flex-wrap justify-items-center gap-y-4 @xs/right:grid-cols-9">
|
||||||
{colors.map((color) => (
|
{colors.map((color) => (
|
||||||
<div
|
<div
|
||||||
|
|||||||
@ -58,15 +58,15 @@ export const TypographySection = () => {
|
|||||||
}, [typography.font.family]);
|
}, [typography.font.family]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section id="typography" className="grid gap-y-6">
|
<section id="typography" className="grid gap-y-8">
|
||||||
<header className="flex items-center justify-between">
|
<header className="flex items-center justify-between">
|
||||||
<div className="flex items-center gap-x-4">
|
<div className="flex items-center gap-x-4">
|
||||||
{getSectionIcon("typography")}
|
{getSectionIcon("typography")}
|
||||||
<h2 className="line-clamp-1 text-3xl font-bold">{t`Typography`}</h2>
|
<h2 className="line-clamp-1 text-2xl font-bold lg:text-3xl">{t`Typography`}</h2>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<main className="grid gap-y-4">
|
<main className="grid gap-y-8">
|
||||||
<div className="grid grid-cols-2 gap-4">
|
<div className="grid grid-cols-2 gap-4">
|
||||||
{fontSuggestions.map((font) => (
|
{fontSuggestions.map((font) => (
|
||||||
<Button
|
<Button
|
||||||
@ -75,7 +75,7 @@ export const TypographySection = () => {
|
|||||||
style={{ fontFamily: font }}
|
style={{ fontFamily: font }}
|
||||||
disabled={typography.font.family === font}
|
disabled={typography.font.family === font}
|
||||||
className={cn(
|
className={cn(
|
||||||
"flex h-12 items-center justify-center overflow-hidden rounded border text-center text-sm ring-primary transition-colors hover:bg-secondary-accent focus:outline-none focus:ring-1 disabled:opacity-100",
|
"flex h-12 items-center justify-center overflow-hidden rounded border text-center text-xs ring-primary transition-colors hover:bg-secondary-accent focus:outline-none focus:ring-1 disabled:opacity-100 lg:text-sm",
|
||||||
typography.font.family === font && "ring-1",
|
typography.font.family === font && "ring-1",
|
||||||
)}
|
)}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user